diff --git a/core/assets-raw/sprites/blocks/power/turbine-generator-top.png b/core/assets-raw/sprites/blocks/power/turbine-generator-top.png new file mode 100644 index 0000000000..84caa97329 Binary files /dev/null and b/core/assets-raw/sprites/blocks/power/turbine-generator-top.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index e07fedf620..d70c302565 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -265,7 +265,8 @@ text.upgrades=Upgrades text.purchased=[LIME]Created! text.weapons=Weapons text.paused=Paused -text.respawn=Respawning in +text.yes=Yes +text.no=No text.info.title=[accent]Info text.error.title=[crimson]An error has occured text.error.crashmessage=[SCARLET]An unexpected error has occured, which would have caused a crash.\n[]Please report the exact circumstances under which this error occured to the developer: \n[ORANGE]anukendev@gmail.com[] @@ -273,6 +274,7 @@ text.error.crashtitle=An error has occured text.blocks.blockinfo=Block Info text.blocks.powercapacity=Power Capacity text.blocks.powershot=Power/Shot +text.blocks.targetsair=Targets Air text.blocks.itemspeed=Units Moved text.blocks.shootrange=Range text.blocks.size=Size diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 337bea2f73..84ce8e37db 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -13,42 +13,42 @@ background index: -1 bridge-conveyor-arrow rotate: false - xy: 537, 111 + xy: 333, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridge-conveyor-bridge rotate: false - xy: 557, 121 + xy: 343, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridge-conveyor-end rotate: false - xy: 547, 111 + xy: 333, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conveyor-arrow rotate: false - xy: 638, 58 + xy: 597, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conveyor-bridge rotate: false - xy: 648, 58 + xy: 587, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conveyor-end rotate: false - xy: 658, 68 + xy: 597, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -90,21 +90,21 @@ blast-drill-top index: -1 carbide-drill rotate: false - xy: 537, 101 + xy: 343, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 carbide-drill-rotator rotate: false - xy: 557, 111 + xy: 353, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 carbide-drill-top rotate: false - xy: 547, 101 + xy: 343, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -188,49 +188,49 @@ plasma-drill-top index: -1 tungsten-drill rotate: false - xy: 303, 45 + xy: 670, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-rotator rotate: false - xy: 303, 35 + xy: 680, 139 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-top rotate: false - xy: 313, 45 + xy: 677, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-extractor rotate: false - xy: 382, 81 + xy: 184, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 water-extractor-liquid rotate: false - xy: 184, 63 + xy: 202, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 water-extractor-rotator rotate: false - xy: 202, 63 + xy: 220, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 water-extractor-top rotate: false - xy: 220, 63 + xy: 238, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -272,14 +272,14 @@ block-icon-blackstone index: -1 blackstone2 rotate: false - xy: 418, 84 + xy: 974, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone3 rotate: false - xy: 498, 58 + xy: 512, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -293,35 +293,35 @@ blackstoneedge index: -1 coal1 rotate: false - xy: 537, 91 + xy: 353, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal2 rotate: false - xy: 534, 81 + xy: 363, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal3 rotate: false - xy: 534, 71 + xy: 353, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt2 rotate: false - xy: 544, 71 + xy: 383, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt3 rotate: false - xy: 538, 61 + xy: 373, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -335,42 +335,42 @@ dirtedge index: -1 grass-cliff-edge rotate: false - xy: 587, 178 + xy: 403, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass-cliff-edge-1 rotate: false - xy: 597, 178 + xy: 403, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass-cliff-edge-2 rotate: false - xy: 607, 178 + xy: 403, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass-cliff-side rotate: false - xy: 617, 178 + xy: 517, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass2 rotate: false - xy: 558, 61 + xy: 393, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass3 rotate: false - xy: 577, 178 + xy: 393, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -384,42 +384,42 @@ grassedge index: -1 ice-cliff-edge rotate: false - xy: 575, 168 + xy: 517, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice-cliff-edge-1 rotate: false - xy: 585, 168 + xy: 967, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice-cliff-edge-2 rotate: false - xy: 595, 168 + xy: 967, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice-cliff-side rotate: false - xy: 605, 168 + xy: 977, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice2 rotate: false - xy: 627, 178 + xy: 517, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice3 rotate: false - xy: 637, 178 + xy: 517, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -433,35 +433,35 @@ iceedge index: -1 icerock2 rotate: false - xy: 615, 168 + xy: 977, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow1 rotate: false - xy: 625, 168 + xy: 987, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow1 rotate: false - xy: 625, 168 + xy: 987, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow2 rotate: false - xy: 635, 168 + xy: 997, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow2 rotate: false - xy: 635, 168 + xy: 997, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -475,399 +475,399 @@ lavaedge index: -1 lead1 rotate: false - xy: 642, 148 + xy: 505, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead2 rotate: false - xy: 652, 158 + xy: 517, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 652, 148 + xy: 527, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor2 rotate: false - xy: 567, 128 + xy: 565, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor3 rotate: false - xy: 567, 118 + xy: 522, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor4 rotate: false - xy: 577, 128 + xy: 532, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor5 rotate: false - xy: 567, 108 + xy: 542, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor6 rotate: false - xy: 577, 118 + xy: 552, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalflooredge rotate: false - xy: 878, 367 + xy: 847, 302 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 oiledge rotate: false - xy: 906, 369 + xy: 892, 369 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 rock2 rotate: false - xy: 667, 98 + xy: 617, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge rotate: false - xy: 674, 78 + xy: 637, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-1 rotate: false - xy: 678, 68 + xy: 647, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-2 rotate: false - xy: 678, 58 + xy: 637, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-side rotate: false - xy: 677, 128 + xy: 647, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 670, 138 + xy: 637, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 680, 139 + xy: 627, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandedge rotate: false - xy: 934, 369 + xy: 920, 369 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shrubshadow rotate: false - xy: 677, 98 + xy: 577, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge rotate: false - xy: 688, 68 + xy: 607, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-1 rotate: false - xy: 688, 58 + xy: 617, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-2 rotate: false - xy: 274, 55 + xy: 627, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-side rotate: false - xy: 284, 55 + xy: 637, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 677, 88 + xy: 587, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 684, 78 + xy: 597, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowedge rotate: false - xy: 879, 339 + xy: 879, 353 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 spaceedge rotate: false - xy: 893, 355 + xy: 879, 339 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 stone-cliff-edge rotate: false - xy: 314, 55 + xy: 662, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-1 rotate: false - xy: 324, 55 + xy: 660, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-2 rotate: false - xy: 334, 55 + xy: 657, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-side rotate: false - xy: 344, 55 + xy: 657, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 294, 55 + xy: 647, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 304, 55 + xy: 662, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneedge rotate: false - xy: 893, 341 + xy: 893, 355 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 thorium1 rotate: false - xy: 354, 55 + xy: 657, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium2 rotate: false - xy: 364, 55 + xy: 657, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 374, 55 + xy: 672, 159 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 384, 55 + xy: 682, 159 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 273, 45 + xy: 672, 149 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 273, 35 + xy: 682, 149 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten1 rotate: false - xy: 283, 35 + xy: 667, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten2 rotate: false - xy: 293, 45 + xy: 667, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten3 rotate: false - xy: 293, 35 + xy: 667, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge rotate: false - xy: 313, 35 + xy: 677, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-1 rotate: false - xy: 323, 45 + xy: 677, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-2 rotate: false - xy: 323, 35 + xy: 677, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-side rotate: false - xy: 333, 45 + xy: 889, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 wateredge rotate: false - xy: 921, 355 + xy: 907, 341 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 block-border rotate: false - xy: 728, 281 + xy: 957, 349 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-elevation rotate: false - xy: 728, 271 + xy: 921, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 combustion-generator-top rotate: false - xy: 728, 271 + xy: 921, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-middle rotate: false - xy: 562, 151 + xy: 313, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump-liquid rotate: false - xy: 562, 151 + xy: 313, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-slope rotate: false - xy: 560, 141 + xy: 323, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 border rotate: false - xy: 527, 101 + xy: 313, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-liquid rotate: false - xy: 547, 91 + xy: 373, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 cross-1 rotate: false - xy: 557, 91 + xy: 373, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -895,7 +895,7 @@ cross-4 index: -1 enemyspawn rotate: false - xy: 548, 61 + xy: 383, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -909,21 +909,21 @@ nuclearreactor-shadow index: -1 place-arrow rotate: false - xy: 658, 58 + xy: 607, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 664, 78 + xy: 597, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ripples rotate: false - xy: 490, 68 + xy: 488, 68 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -972,7 +972,7 @@ rubble-3-1 index: -1 shadow-1 rotate: false - xy: 430, 56 + xy: 428, 56 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1014,7 +1014,7 @@ shadow-6 index: -1 shadow-round-1 rotate: false - xy: 442, 56 + xy: 440, 56 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1035,63 +1035,63 @@ shadow-rounded-2 index: -1 bridge-conduit-arrow rotate: false - xy: 527, 91 + xy: 323, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridge-conduit-bridge rotate: false - xy: 557, 131 + xy: 333, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridge-conduit-end rotate: false - xy: 547, 121 + xy: 323, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-bottom rotate: false - xy: 557, 101 + xy: 363, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-top rotate: false - xy: 544, 81 + xy: 363, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router rotate: false - xy: 620, 138 + xy: 557, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router-bottom rotate: false - xy: 630, 138 + xy: 545, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router-liquid rotate: false - xy: 640, 138 + xy: 567, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router-top rotate: false - xy: 650, 138 + xy: 555, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1119,35 +1119,35 @@ liquid-tank-top index: -1 phase-conduit-arrow rotate: false - xy: 608, 58 + xy: 587, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conduit-bridge rotate: false - xy: 618, 58 + xy: 577, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conduit-end rotate: false - xy: 628, 58 + xy: 587, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-bottom rotate: false - xy: 668, 68 + xy: 607, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top rotate: false - xy: 668, 58 + xy: 617, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1252,11 +1252,18 @@ nuclear-reactor-lights index: -1 rtg-generator-top rotate: false - xy: 667, 88 + xy: 627, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 +turbine-generator-top + rotate: false + xy: 364, 81 + size: 16, 16 + orig: 16, 16 + offset: 0, 0 + index: -1 alloy-fuser rotate: false xy: 873, 419 @@ -1420,7 +1427,7 @@ cultivator-top index: -1 lavasmelter rotate: false - xy: 642, 158 + xy: 507, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1462,21 +1469,21 @@ poweralloysmelter-top index: -1 pulverizer rotate: false - xy: 667, 128 + xy: 607, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 667, 118 + xy: 617, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator-liquid rotate: false - xy: 677, 118 + xy: 647, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1490,14 +1497,14 @@ core-open index: -1 block-1 rotate: false - xy: 508, 59 + xy: 512, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-1-top rotate: false - xy: 728, 291 + xy: 957, 359 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1574,7 +1581,7 @@ mass-driver-turret index: -1 duo rotate: false - xy: 554, 71 + xy: 393, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1595,21 +1602,21 @@ spectre index: -1 hail rotate: false - xy: 947, 357 + xy: 933, 357 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 scatter rotate: false - xy: 947, 357 + xy: 933, 357 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 hail-heat rotate: false - xy: 879, 327 + xy: 933, 345 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1679,14 +1686,14 @@ salvo-panel-right index: -1 scorch rotate: false - xy: 502, 81 + xy: 500, 69 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 scorch-shoot rotate: false - xy: 502, 69 + xy: 416, 58 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1700,14 +1707,14 @@ swarmer index: -1 wave rotate: false - xy: 238, 63 + xy: 256, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 wave-liquid rotate: false - xy: 256, 63 + xy: 274, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -1777,7 +1784,7 @@ reconstructor-open index: -1 repair-point-turret rotate: false - xy: 667, 108 + xy: 627, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1798,7 +1805,7 @@ door-large-open index: -1 door-open rotate: false - xy: 554, 81 + xy: 383, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1910,7 +1917,7 @@ missile index: -1 missile-back rotate: false - xy: 454, 57 + xy: 452, 57 size: 9, 9 orig: 9, 9 offset: 0, 0 @@ -1952,21 +1959,21 @@ scorch5 index: -1 shell rotate: false - xy: 465, 57 + xy: 463, 57 size: 9, 9 orig: 9, 9 offset: 0, 0 index: -1 shell-back rotate: false - xy: 476, 57 + xy: 474, 57 size: 9, 9 orig: 9, 9 offset: 0, 0 index: -1 shot rotate: false - xy: 677, 108 + xy: 567, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1980,7 +1987,7 @@ transfer index: -1 transfer-arrow rotate: false - xy: 283, 45 + xy: 667, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2015,49 +2022,49 @@ block-icon-blast-drill index: -1 block-icon-bridge-conduit rotate: false - xy: 728, 261 + xy: 931, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridge-conduit rotate: false - xy: 728, 261 + xy: 931, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-bridge-conveyor rotate: false - xy: 728, 251 + xy: 941, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridge-conveyor rotate: false - xy: 728, 251 + xy: 941, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-carbide-drill rotate: false - xy: 726, 241 + xy: 951, 335 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-carbide-wall rotate: false - xy: 726, 231 + xy: 496, 58 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 carbide-wall rotate: false - xy: 726, 231 + xy: 496, 58 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2092,35 +2099,35 @@ centrifuge index: -1 block-icon-combustion-generator rotate: false - xy: 726, 221 + xy: 506, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 combustion-generator rotate: false - xy: 726, 221 + xy: 506, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-conduit rotate: false - xy: 726, 211 + xy: 728, 291 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-conveyor rotate: false - xy: 863, 309 + xy: 728, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyor rotate: false - xy: 863, 309 + xy: 728, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2176,42 +2183,42 @@ dart-ship-factory index: -1 block-icon-deepwater rotate: false - xy: 861, 299 + xy: 728, 271 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 deepwater rotate: false - xy: 861, 299 + xy: 728, 271 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-deflector-wall rotate: false - xy: 517, 131 + xy: 728, 261 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 deflector-wall rotate: false - xy: 517, 131 + xy: 728, 261 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-wall rotate: false - xy: 517, 131 + xy: 728, 261 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-phase-wall rotate: false - xy: 517, 131 + xy: 728, 261 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2260,28 +2267,28 @@ delta-mech-factory index: -1 block-icon-dirt rotate: false - xy: 517, 121 + xy: 728, 251 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt1 rotate: false - xy: 517, 121 + xy: 728, 251 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-door rotate: false - xy: 517, 111 + xy: 726, 241 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 door rotate: false - xy: 517, 111 + xy: 726, 241 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2309,14 +2316,14 @@ block-icon-drone-factory index: -1 block-icon-drop-point rotate: false - xy: 517, 101 + xy: 726, 231 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 drop-point rotate: false - xy: 517, 101 + xy: 726, 231 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2351,14 +2358,14 @@ block-icon-fusion-reactor index: -1 block-icon-grass rotate: false - xy: 517, 91 + xy: 726, 221 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass1 rotate: false - xy: 517, 91 + xy: 726, 221 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2372,70 +2379,70 @@ block-icon-hail index: -1 block-icon-ice rotate: false - xy: 514, 81 + xy: 726, 211 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice1 rotate: false - xy: 514, 81 + xy: 726, 211 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-icerock rotate: false - xy: 514, 71 + xy: 863, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerock1 rotate: false - xy: 514, 71 + xy: 863, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-incinerator rotate: false - xy: 518, 61 + xy: 861, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 incinerator rotate: false - xy: 518, 61 + xy: 861, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-itemsource rotate: false - xy: 524, 81 + xy: 289, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 itemsource rotate: false - xy: 524, 81 + xy: 289, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-itemvoid rotate: false - xy: 524, 71 + xy: 289, 43 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 itemvoid rotate: false - xy: 524, 71 + xy: 289, 43 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2456,14 +2463,14 @@ javelin-ship-factory index: -1 block-icon-junction rotate: false - xy: 528, 61 + xy: 289, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 junction rotate: false - xy: 528, 61 + xy: 289, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2484,35 +2491,35 @@ block-icon-laser-drill index: -1 block-icon-lava rotate: false - xy: 701, 161 + xy: 299, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lava rotate: false - xy: 701, 161 + xy: 299, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-liquid-junction rotate: false - xy: 711, 161 + xy: 309, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-junction rotate: false - xy: 711, 161 + xy: 309, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-liquid-router rotate: false - xy: 721, 161 + xy: 299, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2526,14 +2533,14 @@ block-icon-liquid-tank index: -1 block-icon-liquidsource rotate: false - xy: 731, 161 + xy: 319, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidsource rotate: false - xy: 731, 161 + xy: 319, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2561,14 +2568,14 @@ core-top index: -1 block-icon-mechanical-pump rotate: false - xy: 775, 302 + xy: 299, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 mechanical-pump rotate: false - xy: 775, 302 + xy: 299, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2582,28 +2589,28 @@ block-icon-meltdown index: -1 block-icon-melter rotate: false - xy: 785, 302 + xy: 309, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 melter rotate: false - xy: 785, 302 + xy: 309, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-metalfloor rotate: false - xy: 795, 302 + xy: 329, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor1 rotate: false - xy: 795, 302 + xy: 329, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2638,14 +2645,14 @@ nuclear-reactor index: -1 block-icon-oil rotate: false - xy: 507, 181 + xy: 309, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oil rotate: false - xy: 507, 181 + xy: 309, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2659,56 +2666,56 @@ block-icon-oil-extractor index: -1 block-icon-oilrefinery rotate: false - xy: 505, 171 + xy: 319, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oilrefinery rotate: false - xy: 505, 171 + xy: 319, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-overflow-gate rotate: false - xy: 517, 181 + xy: 339, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 overflow-gate rotate: false - xy: 517, 181 + xy: 339, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-phase-conduit rotate: false - xy: 527, 181 + xy: 319, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conduit rotate: false - xy: 527, 181 + xy: 319, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-phase-conveyor rotate: false - xy: 515, 171 + xy: 329, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conveyor rotate: false - xy: 515, 171 + xy: 329, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2743,14 +2750,14 @@ plastanium-compressor index: -1 block-icon-power-node rotate: false - xy: 537, 181 + xy: 349, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 power-node rotate: false - xy: 537, 181 + xy: 349, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2771,42 +2778,42 @@ power-node-large index: -1 block-icon-powerinfinite rotate: false - xy: 525, 171 + xy: 329, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powerinfinite rotate: false - xy: 525, 171 + xy: 329, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-powervoid rotate: false - xy: 547, 181 + xy: 339, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powervoid rotate: false - xy: 547, 181 + xy: 339, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-pulse-conduit rotate: false - xy: 535, 171 + xy: 359, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-pulverizer rotate: false - xy: 557, 181 + xy: 339, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2855,28 +2862,28 @@ reconstructor index: -1 block-icon-repair-point rotate: false - xy: 545, 171 + xy: 349, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 repair-point rotate: false - xy: 545, 171 + xy: 349, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-resupply-point rotate: false - xy: 567, 181 + xy: 369, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 resupply-point rotate: false - xy: 567, 181 + xy: 369, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2890,14 +2897,14 @@ block-icon-ripple index: -1 block-icon-rock rotate: false - xy: 555, 171 + xy: 349, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rock1 rotate: false - xy: 555, 171 + xy: 349, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2918,28 +2925,28 @@ rotary-pump index: -1 block-icon-router rotate: false - xy: 565, 171 + xy: 359, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 565, 171 + xy: 359, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-rtg-generator rotate: false - xy: 522, 161 + xy: 379, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtg-generator rotate: false - xy: 522, 161 + xy: 379, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2953,49 +2960,49 @@ block-icon-salvo index: -1 block-icon-sand rotate: false - xy: 532, 161 + xy: 359, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand1 rotate: false - xy: 532, 161 + xy: 359, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-scorch rotate: false - xy: 921, 343 + xy: 921, 357 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 block-icon-separator rotate: false - xy: 542, 161 + xy: 369, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator rotate: false - xy: 542, 161 + xy: 369, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-shrub rotate: false - xy: 552, 161 + xy: 389, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shrub rotate: false - xy: 552, 161 + xy: 389, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3016,42 +3023,42 @@ silicon-smelter index: -1 block-icon-smelter rotate: false - xy: 562, 161 + xy: 369, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 smelter rotate: false - xy: 562, 161 + xy: 369, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-snow rotate: false - xy: 522, 151 + xy: 379, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow1 rotate: false - xy: 522, 151 + xy: 379, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-solar-panel rotate: false - xy: 520, 141 + xy: 379, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 solar-panel rotate: false - xy: 520, 141 + xy: 379, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3072,56 +3079,56 @@ solar-panel-large index: -1 block-icon-solidifer rotate: false - xy: 532, 151 + xy: 389, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 solidifer rotate: false - xy: 532, 151 + xy: 389, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sortedunloader rotate: false - xy: 530, 141 + xy: 389, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sortedunloader rotate: false - xy: 530, 141 + xy: 389, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sorter rotate: false - xy: 527, 131 + xy: 399, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sorter rotate: false - xy: 527, 131 + xy: 399, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-space rotate: false - xy: 542, 151 + xy: 399, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 space rotate: false - xy: 542, 151 + xy: 399, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3135,28 +3142,28 @@ block-icon-spectre index: -1 block-icon-splitter rotate: false - xy: 540, 141 + xy: 399, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 splitter rotate: false - xy: 540, 141 + xy: 399, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-stone rotate: false - xy: 527, 121 + xy: 293, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone1 rotate: false - xy: 527, 121 + xy: 293, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3198,14 +3205,14 @@ thermal-pump index: -1 block-icon-thorium-wall rotate: false - xy: 537, 131 + xy: 293, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium-wall rotate: false - xy: 537, 131 + xy: 293, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3226,35 +3233,35 @@ thorium-wall-large index: -1 block-icon-titanium-conveyor rotate: false - xy: 552, 151 + xy: 293, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium-conveyor rotate: false - xy: 552, 151 + xy: 293, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-tungsten-drill rotate: false - xy: 550, 141 + xy: 303, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-tungsten-wall rotate: false - xy: 527, 111 + xy: 303, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-wall rotate: false - xy: 527, 111 + xy: 303, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3289,14 +3296,14 @@ turbine-generator index: -1 block-icon-unloader rotate: false - xy: 547, 131 + xy: 313, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 unloader rotate: false - xy: 547, 131 + xy: 313, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3331,14 +3338,14 @@ warp-gate index: -1 block-icon-water rotate: false - xy: 537, 121 + xy: 303, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water rotate: false - xy: 537, 121 + xy: 303, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3359,749 +3366,749 @@ block-icon-wave index: -1 liquid-icon-cryofluid rotate: false - xy: 580, 138 + xy: 537, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-lava rotate: false - xy: 590, 138 + xy: 525, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-oil rotate: false - xy: 600, 138 + xy: 547, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-water rotate: false - xy: 610, 138 + xy: 535, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 mech-icon-alpha-mech rotate: false - xy: 492, 141 + xy: 279, 1 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-dart-ship rotate: false - xy: 506, 141 + xy: 492, 141 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-delta-mech rotate: false - xy: 508, 155 + xy: 506, 141 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-halberd-ship rotate: false - xy: 863, 319 + xy: 508, 155 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-trident-ship rotate: false - xy: 863, 319 + xy: 508, 155 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-omega-mech rotate: false - xy: 847, 302 + xy: 863, 319 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-tau-mech rotate: false - xy: 847, 302 + xy: 863, 319 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 ore-coal-grass1 rotate: false - xy: 587, 128 + xy: 562, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-grass2 rotate: false - xy: 567, 98 + xy: 522, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-grass3 rotate: false - xy: 577, 108 + xy: 520, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice1 rotate: false - xy: 587, 118 + xy: 532, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice2 rotate: false - xy: 597, 128 + xy: 530, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice3 rotate: false - xy: 577, 98 + xy: 527, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand1 rotate: false - xy: 587, 108 + xy: 542, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand2 rotate: false - xy: 597, 118 + xy: 540, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand3 rotate: false - xy: 607, 128 + xy: 527, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow1 rotate: false - xy: 587, 98 + xy: 537, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow2 rotate: false - xy: 597, 108 + xy: 552, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow3 rotate: false - xy: 607, 118 + xy: 550, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone1 rotate: false - xy: 617, 128 + xy: 527, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone2 rotate: false - xy: 597, 98 + xy: 537, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone3 rotate: false - xy: 607, 108 + xy: 547, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass1 rotate: false - xy: 617, 118 + xy: 562, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass2 rotate: false - xy: 627, 128 + xy: 560, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass3 rotate: false - xy: 607, 98 + xy: 527, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice1 rotate: false - xy: 617, 108 + xy: 537, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice2 rotate: false - xy: 627, 118 + xy: 547, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice3 rotate: false - xy: 637, 128 + xy: 557, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand1 rotate: false - xy: 617, 98 + xy: 537, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand2 rotate: false - xy: 627, 108 + xy: 547, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand3 rotate: false - xy: 637, 118 + xy: 557, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow1 rotate: false - xy: 647, 128 + xy: 547, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow2 rotate: false - xy: 627, 98 + xy: 557, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow3 rotate: false - xy: 637, 108 + xy: 557, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone1 rotate: false - xy: 647, 118 + xy: 577, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone2 rotate: false - xy: 637, 98 + xy: 587, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone3 rotate: false - xy: 647, 108 + xy: 597, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass1 rotate: false - xy: 647, 98 + xy: 607, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass2 rotate: false - xy: 567, 88 + xy: 617, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass3 rotate: false - xy: 577, 88 + xy: 627, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice1 rotate: false - xy: 587, 88 + xy: 637, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice2 rotate: false - xy: 597, 88 + xy: 575, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice3 rotate: false - xy: 607, 88 + xy: 585, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand1 rotate: false - xy: 617, 88 + xy: 595, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand2 rotate: false - xy: 627, 88 + xy: 605, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand3 rotate: false - xy: 637, 88 + xy: 615, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow1 rotate: false - xy: 647, 88 + xy: 625, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow2 rotate: false - xy: 564, 78 + xy: 635, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow3 rotate: false - xy: 574, 78 + xy: 572, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone1 rotate: false - xy: 584, 78 + xy: 582, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone2 rotate: false - xy: 594, 78 + xy: 592, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone3 rotate: false - xy: 604, 78 + xy: 602, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass1 rotate: false - xy: 614, 78 + xy: 612, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass2 rotate: false - xy: 624, 78 + xy: 622, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass3 rotate: false - xy: 634, 78 + xy: 632, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice1 rotate: false - xy: 644, 78 + xy: 572, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice2 rotate: false - xy: 662, 158 + xy: 582, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice3 rotate: false - xy: 662, 148 + xy: 592, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand1 rotate: false - xy: 660, 138 + xy: 602, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand2 rotate: false - xy: 657, 128 + xy: 612, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand3 rotate: false - xy: 657, 118 + xy: 622, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow1 rotate: false - xy: 657, 108 + xy: 632, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow2 rotate: false - xy: 657, 98 + xy: 645, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow3 rotate: false - xy: 657, 88 + xy: 655, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone1 rotate: false - xy: 654, 78 + xy: 642, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone2 rotate: false - xy: 672, 159 + xy: 642, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone3 rotate: false - xy: 682, 159 + xy: 652, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass1 rotate: false - xy: 672, 149 + xy: 652, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass2 rotate: false - xy: 682, 149 + xy: 570, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass3 rotate: false - xy: 568, 68 + xy: 580, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice1 rotate: false - xy: 578, 68 + xy: 590, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice2 rotate: false - xy: 588, 68 + xy: 600, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice3 rotate: false - xy: 598, 68 + xy: 610, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand1 rotate: false - xy: 608, 68 + xy: 620, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand2 rotate: false - xy: 618, 68 + xy: 630, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand3 rotate: false - xy: 628, 68 + xy: 640, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow1 rotate: false - xy: 638, 68 + xy: 650, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow2 rotate: false - xy: 648, 68 + xy: 567, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow3 rotate: false - xy: 568, 58 + xy: 567, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone1 rotate: false - xy: 578, 58 + xy: 577, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone2 rotate: false - xy: 588, 58 + xy: 567, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone3 rotate: false - xy: 598, 58 + xy: 577, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 unit-icon-scout rotate: false - xy: 907, 355 + xy: 893, 341 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 unit-icon-titan rotate: false - xy: 364, 81 + xy: 382, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 unit-icon-vtol rotate: false - xy: 907, 341 + xy: 907, 355 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 vtol rotate: false - xy: 907, 341 + xy: 907, 355 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 item-biomatter rotate: false - xy: 582, 158 + xy: 997, 345 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-blast-compound rotate: false - xy: 592, 158 + xy: 1007, 349 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-carbide rotate: false - xy: 602, 158 + xy: 1007, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 612, 158 + xy: 409, 48 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 622, 158 + xy: 409, 38 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-phase-matter rotate: false - xy: 632, 158 + xy: 413, 28 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plastanium rotate: false - xy: 572, 148 + xy: 413, 18 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-pyratite rotate: false - xy: 582, 148 + xy: 413, 8 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-sand rotate: false - xy: 592, 148 + xy: 701, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 602, 148 + xy: 711, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 612, 148 + xy: 721, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-surge-alloy rotate: false - xy: 622, 148 + xy: 731, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 632, 148 + xy: 775, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 645, 168 + xy: 785, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-tungsten rotate: false - xy: 655, 168 + xy: 795, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon rotate: false - xy: 570, 138 + xy: 515, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-none rotate: false - xy: 570, 138 + xy: 515, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4192,14 +4199,14 @@ delta-mech-leg index: -1 omega-mech rotate: false - xy: 920, 369 + xy: 906, 369 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 tau-mech rotate: false - xy: 920, 369 + xy: 906, 369 size: 12, 12 orig: 12, 12 offset: 0, 0 @@ -4383,7 +4390,7 @@ check-over index: -1 clear rotate: false - xy: 935, 357 + xy: 921, 345 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4418,21 +4425,21 @@ controller-cursor index: -1 icon-about rotate: false - xy: 274, 65 + xy: 292, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-add rotate: false - xy: 290, 65 + xy: 308, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-admin rotate: false - xy: 306, 65 + xy: 324, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4446,7 +4453,7 @@ icon-admin-small index: -1 icon-areaDelete rotate: false - xy: 877, 315 + xy: 945, 357 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4467,28 +4474,28 @@ icon-arrow-16 index: -1 icon-arrow-down rotate: false - xy: 416, 94 + xy: 945, 345 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-left rotate: false - xy: 428, 92 + xy: 879, 327 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-right rotate: false - xy: 440, 92 + xy: 877, 315 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-up rotate: false - xy: 452, 92 + xy: 416, 94 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4502,7 +4509,7 @@ icon-back index: -1 icon-ban rotate: false - xy: 322, 65 + xy: 340, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4523,7 +4530,7 @@ icon-cancel index: -1 icon-chat rotate: false - xy: 464, 92 + xy: 428, 92 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4537,70 +4544,70 @@ icon-check index: -1 icon-crafting rotate: false - xy: 476, 92 + xy: 440, 92 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-cursor rotate: false - xy: 488, 92 + xy: 452, 92 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-defense rotate: false - xy: 418, 72 + xy: 464, 92 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-dev-builds rotate: false - xy: 338, 65 + xy: 356, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-discord rotate: false - xy: 354, 65 + xy: 372, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-distribution rotate: false - xy: 418, 60 + xy: 476, 92 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-donate rotate: false - xy: 370, 65 + xy: 388, 65 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-dots rotate: false - xy: 386, 65 + xy: 177, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-editor rotate: false - xy: 177, 47 + xy: 177, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-egg rotate: false - xy: 177, 31 + xy: 193, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4621,7 +4628,7 @@ icon-eraser index: -1 icon-exit rotate: false - xy: 193, 47 + xy: 193, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4642,7 +4649,7 @@ icon-file-image index: -1 icon-file-text rotate: false - xy: 193, 31 + xy: 209, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4656,7 +4663,7 @@ icon-fill index: -1 icon-floppy rotate: false - xy: 209, 47 + xy: 209, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4670,14 +4677,14 @@ icon-floppy-16 index: -1 icon-folder rotate: false - xy: 209, 31 + xy: 225, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-folder-parent rotate: false - xy: 225, 47 + xy: 225, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4691,14 +4698,14 @@ icon-generated index: -1 icon-github rotate: false - xy: 225, 31 + xy: 241, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-google-play rotate: false - xy: 241, 47 + xy: 241, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4712,49 +4719,49 @@ icon-grid index: -1 icon-hold rotate: false - xy: 974, 365 + xy: 488, 92 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-holdDelete rotate: false - xy: 962, 359 + xy: 416, 82 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-home rotate: false - xy: 241, 31 + xy: 257, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-host rotate: false - xy: 257, 47 + xy: 257, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-info rotate: false - xy: 974, 353 + xy: 404, 78 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-itch.io rotate: false - xy: 257, 31 + xy: 273, 47 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-items-none rotate: false - xy: 572, 158 + xy: 987, 345 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4768,21 +4775,21 @@ icon-line index: -1 icon-link rotate: false - xy: 181, 15 + xy: 273, 31 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-liquid rotate: false - xy: 986, 353 + xy: 404, 66 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-load rotate: false - xy: 197, 15 + xy: 181, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4817,21 +4824,21 @@ icon-locked index: -1 icon-logic rotate: false - xy: 998, 353 + xy: 416, 70 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-map rotate: false - xy: 213, 15 + xy: 197, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-menu rotate: false - xy: 1010, 347 + xy: 428, 80 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4845,14 +4852,14 @@ icon-menu-large index: -1 icon-none rotate: false - xy: 430, 80 + xy: 440, 80 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-pause rotate: false - xy: 430, 68 + xy: 452, 80 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4866,7 +4873,7 @@ icon-pencil index: -1 icon-pencil-small rotate: false - xy: 229, 15 + xy: 213, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4880,42 +4887,42 @@ icon-pick index: -1 icon-play rotate: false - xy: 442, 80 + xy: 464, 80 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-play-2 rotate: false - xy: 245, 15 + xy: 229, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-players rotate: false - xy: 442, 68 + xy: 476, 80 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-power rotate: false - xy: 454, 80 + xy: 488, 80 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-production rotate: false - xy: 454, 68 + xy: 500, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-quit rotate: false - xy: 261, 15 + xy: 245, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4929,14 +4936,14 @@ icon-redo index: -1 icon-refresh rotate: false - xy: 400, 90 + xy: 261, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rename rotate: false - xy: 492, 155 + xy: 277, 15 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4950,14 +4957,14 @@ icon-resize index: -1 icon-rotate rotate: false - xy: 402, 74 + xy: 400, 90 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-arrow rotate: false - xy: 402, 58 + xy: 492, 155 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -4999,7 +5006,7 @@ icon-save-map index: -1 icon-settings rotate: false - xy: 466, 80 + xy: 428, 68 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -5020,14 +5027,14 @@ icon-tools index: -1 icon-touch rotate: false - xy: 466, 68 + xy: 440, 68 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-touchDelete rotate: false - xy: 478, 80 + xy: 452, 68 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -5069,7 +5076,7 @@ icon-undo index: -1 icon-units rotate: false - xy: 478, 68 + xy: 464, 68 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -5083,7 +5090,7 @@ icon-unlocks index: -1 icon-weapon rotate: false - xy: 490, 80 + xy: 476, 68 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -5190,7 +5197,7 @@ scroll-knob-vertical-black index: -1 selection rotate: false - xy: 564, 88 + xy: 703, 379 size: 1, 1 orig: 1, 1 offset: 0, 0 @@ -5334,7 +5341,7 @@ unit-icon-monsoon index: -1 scout rotate: false - xy: 948, 369 + xy: 934, 369 size: 12, 12 orig: 12, 12 offset: 0, 0 @@ -5362,7 +5369,7 @@ titan-leg index: -1 vtol-flame rotate: false - xy: 487, 57 + xy: 485, 57 size: 9, 9 orig: 9, 9 offset: 0, 0 @@ -5397,14 +5404,14 @@ flamethrower-equip index: -1 missiles-equip rotate: false - xy: 892, 369 + xy: 878, 367 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 879, 353 + xy: 948, 369 size: 12, 12 orig: 12, 12 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 5aae50403c..0fe64032fd 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/src/io/anuke/mindustry/content/blocks/Blocks.java b/core/src/io/anuke/mindustry/content/blocks/Blocks.java index 510e1d9991..cba522baa1 100644 --- a/core/src/io/anuke/mindustry/content/blocks/Blocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/Blocks.java @@ -32,7 +32,6 @@ public class Blocks extends BlockList implements ContentList{ for(int i = 1; i <= 6; i ++){ new BuildBlock("build" + i); - new BreakBlock("break" + i); } space = new Floor("space") {{ diff --git a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java index a42faae567..69e2d879ab 100644 --- a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java @@ -27,9 +27,10 @@ public class PowerBlocks extends BlockList implements ContentList { }}; turbineGenerator = new TurbineGenerator("turbine-generator") {{ - powerOutput = 0.25f; + powerOutput = 0.28f; powerCapacity = 40f; itemDuration = 30f; + auxLiquidUse = 0.05f; size = 2; }}; diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index 829c71ad59..c8659d38f6 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -191,6 +191,10 @@ public class NetServer extends Module{ player.setMineTile(packet.mining); player.isBoosting = packet.boosting; player.isShooting = packet.shooting; + player.getPlaceQueue().clear(); + if(packet.currentRequest != null){ + player.getPlaceQueue().addLast(packet.currentRequest); + } vector.set(packet.x - player.getInterpolator().target.x, packet.y - player.getInterpolator().target.y); diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index fde8c6c04d..7b8596a7d6 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -245,7 +245,9 @@ public class Renderer extends RendererModule{ } batch.begin(); + EntityDraw.setClip(false); drawAndInterpolate(playerGroup, p -> !p.isDead() && !p.isLocal, Player::drawName); + EntityDraw.setClip(true); batch.end(); } diff --git a/core/src/io/anuke/mindustry/core/World.java b/core/src/io/anuke/mindustry/core/World.java index 8bfc9d9f0d..49f543d3f6 100644 --- a/core/src/io/anuke/mindustry/core/World.java +++ b/core/src/io/anuke/mindustry/core/World.java @@ -100,6 +100,10 @@ public class World extends Module{ return tiles[0].length; } + public int toPacked(int x, int y){ + return x + y *width(); + } + public Tile tile(int packed){ return tiles == null ? null : tile(packed % width(), packed / width()); } diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 46bdc124f4..3d9b2051fa 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -735,6 +735,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra buffer.writeByte(mech.id); buffer.writeBoolean(isBoosting); buffer.writeInt(mining == null ? -1 : mining.packedPosition()); + + writeBuilding(buffer); } @Override @@ -748,6 +750,8 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra mech = Upgrade.getByID(buffer.readByte()); boolean boosting = buffer.readBoolean(); int mine = buffer.readInt(); + readBuilding(buffer, !isLocal); + interpolator.read(lastx, lasty, x, y, time, rotation); rotation = lastrot; diff --git a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java index 8b8d2cd19b..9331513d42 100644 --- a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java @@ -8,32 +8,36 @@ import io.anuke.mindustry.content.fx.BlockFx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; -import io.anuke.mindustry.gen.CallBlocks; import io.anuke.mindustry.gen.CallEntity; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.world.Build; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.BreakBlock; -import io.anuke.mindustry.world.blocks.BreakBlock.BreakEntity; import io.anuke.mindustry.world.blocks.BuildBlock; import io.anuke.mindustry.world.blocks.BuildBlock.BuildEntity; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Timers; +import io.anuke.ucore.entities.trait.Entity; import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Fill; import io.anuke.ucore.graphics.Lines; import io.anuke.ucore.graphics.Shapes; -import io.anuke.ucore.util.*; +import io.anuke.ucore.util.Angles; +import io.anuke.ucore.util.Geometry; +import io.anuke.ucore.util.Mathf; +import io.anuke.ucore.util.Translator; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; import java.util.Arrays; import static io.anuke.mindustry.Vars.tilesize; import static io.anuke.mindustry.Vars.world; /**Interface for units that build, break or mine things.*/ -public interface BuilderTrait { +public interface BuilderTrait extends Entity{ //these are not instance variables! Translator[] tmptr = {new Translator(), new Translator(), new Translator(), new Translator()}; float placeDistance = 140f; @@ -54,6 +58,49 @@ public interface BuilderTrait { /**Build power, can be any float. 1 = builds recipes in normal time, 0 = doesn't build at all.*/ float getBuildPower(Tile tile); + default void writeBuilding(DataOutput output) throws IOException{ + BuildRequest request = getCurrentRequest(); + + if(request != null){ + output.writeByte(request.remove ? 1 : 0); + output.writeInt(world.toPacked(request.x, request.y)); + if(!request.remove){ + output.writeByte(request.recipe.id); + output.writeByte(request.rotation); + } + }else{ + output.writeByte(-1); + } + } + + default void readBuilding(DataInput input) throws IOException{ + readBuilding(input, true); + } + + default void readBuilding(DataInput input, boolean applyChanges) throws IOException{ + synchronized (getPlaceQueue()) { + if(applyChanges) getPlaceQueue().clear(); + + byte type = input.readByte(); + if (type != -1) { + int position = input.readInt(); + BuildRequest request; + + if (type == 1) { //remove + request = new BuildRequest(position % world.width(), position / world.width()); + } else { //place + byte recipe = input.readByte(); + byte rotation = input.readByte(); + request = new BuildRequest(position % world.width(), position / world.width(), rotation, Recipe.getByID(recipe)); + } + + if(applyChanges){ + getPlaceQueue().addLast(request); + } + } + } + } + /**Return whether this builder's place queue contains items.*/ default boolean isBuilding(){ return getPlaceQueue().size != 0; @@ -77,11 +124,7 @@ public interface BuilderTrait { /**Clears the placement queue.*/ default void clearBuilding(){ - if(this instanceof Player) { - CallBlocks.onBuildDeselect((Player) this); - }else{ - getPlaceQueue().clear(); - } + getPlaceQueue().clear(); } /**Add another build requests to the tail of the queue, if it doesn't exist there yet.*/ @@ -119,75 +162,38 @@ public interface BuilderTrait { setMineTile(null); } + TileEntity core = unit.getClosestCore(); + + //if there is no core to build with, stop building! + if(core == null){ + return; + } + Tile tile = world.tile(current.x, current.y); - if(unit.distanceTo(tile) > placeDistance || //out of range, skip it - (current.lastEntity != null && current.lastEntity.isDead())) { //build/destroy request has died, skip it - getPlaceQueue().removeFirst(); - }else if(current.remove){ - - if (!(tile.block() instanceof BreakBlock)) { //check if haven't started placing - if(Build.validBreak(unit.getTeam(), current.x, current.y)){ - - //if it's valid, place it - if(!current.requested && unit instanceof Player){ - CallBlocks.breakBlock((Player)unit, unit.getTeam(), current.x, current.y); - current.requested = true; - } - }else{ - //otherwise, skip it - getPlaceQueue().removeFirst(); - } + if (!(tile.block() instanceof BuildBlock)) { + if(!current.remove && Build.validPlace(unit.getTeam(), current.x, current.y, current.recipe.result, current.rotation)) { + Build.beginPlace(unit.getTeam(), current.x, current.y, current.recipe, current.rotation); + }else if(current.remove && Build.validBreak(unit.getTeam(), current.x, current.y)){ + Build.beginBreak(unit.getTeam(), current.x, current.y); }else{ - TileEntity core = unit.getClosestCore(); - - //if there is no core to build with, stop building! - if(core == null){ - return; - } - - //otherwise, update it. - BreakEntity entity = tile.entity(); - current.lastEntity = entity; - - entity.addProgress(core, unit, 1f / entity.breakTime * Timers.delta() * getBuildPower(tile)); - unit.rotation = Mathf.slerpDelta(unit.rotation, unit.angleTo(entity), 0.4f); - getCurrentRequest().progress = entity.progress(); - } - }else{ - if (!(tile.block() instanceof BuildBlock)) { //check if haven't started placing - if(Build.validPlace(unit.getTeam(), current.x, current.y, current.recipe.result, current.rotation)){ - - //if it's valid, place it - if(!current.requested && unit instanceof Player){ - CallBlocks.placeBlock((Player)unit, unit.getTeam(), current.x, current.y, current.recipe, current.rotation); - current.requested = true; - } - - }else{ - //otherwise, skip it - getPlaceQueue().removeFirst(); - } - }else{ - TileEntity core = unit.getClosestCore(); - - //if there is no core to build with, stop building! - if(core == null){ - return; - } - - //otherwise, update it. - BuildEntity entity = tile.entity(); - current.lastEntity = entity; - - entity.addProgress(core.items, 1f / entity.recipe.cost * Timers.delta() * getBuildPower(tile)); - if(unit instanceof Player){ - entity.lastBuilder = (Player)unit; - } - unit.rotation = Mathf.slerpDelta(unit.rotation, unit.angleTo(entity), 0.4f); - getCurrentRequest().progress = entity.progress(); + getPlaceQueue().removeFirst(); + return; } } + + //otherwise, update it. + BuildEntity entity = tile.entity(); + + //deconstructing is 2x as fast + if(current.remove){ + entity.deconstruct(unit, core, 2f / entity.buildCost * Timers.delta() * getBuildPower(tile)); + }else{ + entity.construct(unit, core, 1f / entity.buildCost * Timers.delta() * getBuildPower(tile)); + } + + unit.rotation = Mathf.slerpDelta(unit.rotation, unit.angleTo(entity), 0.4f); + current.progress = entity.progress(); } /**Do not call directly.*/ @@ -302,9 +308,6 @@ public interface BuilderTrait { public final Recipe recipe; public final boolean remove; - public boolean requested; - public TileEntity lastEntity; - public float progress; /**This creates a build request.*/ diff --git a/core/src/io/anuke/mindustry/entities/units/types/Drone.java b/core/src/io/anuke/mindustry/entities/units/types/Drone.java index ce96066bfe..89d7885892 100644 --- a/core/src/io/anuke/mindustry/entities/units/types/Drone.java +++ b/core/src/io/anuke/mindustry/entities/units/types/Drone.java @@ -18,7 +18,6 @@ import io.anuke.mindustry.gen.CallEntity; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; -import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.BuildBlock; import io.anuke.mindustry.world.blocks.BuildBlock.BuildEntity; @@ -206,26 +205,19 @@ public class Drone extends FlyingUnit implements BuilderTrait { public void write(DataOutput data) throws IOException { super.write(data); data.writeInt(mineTile == null ? -1 : mineTile.packedPosition()); - data.writeInt(placeQueue.size == 0 ? -1 : world.tile(placeQueue.last().x, placeQueue.last().y).packedPosition()); - data.writeByte(placeQueue.size == 0 ? -1 : placeQueue.last().recipe.id); + writeBuilding(data); } @Override public void read(DataInput data, long time) throws IOException { super.read(data, time); int mined = data.readInt(); - int pp = data.readInt(); - byte rid = data.readByte(); + + readBuilding(data); if(mined != -1){ mineTile = world.tile(mined); } - - if(pp != -1){ - Tile tile = world.tile(pp); - placeQueue.clear(); - placeQueue.addLast(new BuildRequest(tile.x, tile.y, tile.getRotation(), Recipe.getByID(rid))); - } } public final UnitState diff --git a/core/src/io/anuke/mindustry/io/TypeIO.java b/core/src/io/anuke/mindustry/io/TypeIO.java index be1eb8020b..ec7bab7a8c 100644 --- a/core/src/io/anuke/mindustry/io/TypeIO.java +++ b/core/src/io/anuke/mindustry/io/TypeIO.java @@ -144,6 +144,16 @@ public class TypeIO { return world.tile(buffer.getInt()); } + @WriteClass(Block.class) + public static void writeBlock(ByteBuffer buffer, Block block){ + buffer.put((byte)block.id); + } + + @ReadClass(Block.class) + public static Block readBlock(ByteBuffer buffer){ + return Block.getByID(buffer.get()); + } + @WriteClass(KickReason.class) public static void writeKick(ByteBuffer buffer, KickReason reason){ buffer.put((byte)reason.ordinal()); diff --git a/core/src/io/anuke/mindustry/net/Packets.java b/core/src/io/anuke/mindustry/net/Packets.java index c3986416c6..7ba866677f 100644 --- a/core/src/io/anuke/mindustry/net/Packets.java +++ b/core/src/io/anuke/mindustry/net/Packets.java @@ -5,7 +5,9 @@ import com.badlogic.gdx.utils.TimeUtils; import io.anuke.mindustry.Vars; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.Unit; +import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; import io.anuke.mindustry.io.Version; +import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.world.Tile; import io.anuke.ucore.io.IOUtils; import io.anuke.ucore.util.Mathf; @@ -122,6 +124,7 @@ public class Packets { public float x, y, pointerX, pointerY, rotation, baseRotation, xv, yv; public Tile mining; public boolean boosting, shooting; + public BuildRequest currentRequest; @Override public void write(ByteBuffer buffer) { @@ -145,6 +148,19 @@ public class Packets { buffer.putShort((short)(player.baseRotation*2)); buffer.putInt(player.getMineTile() == null ? -1 : player.getMineTile().packedPosition()); + + BuildRequest request = player.getCurrentRequest(); + + if(request != null){ + buffer.put(request.remove ? (byte)1 : 0); + buffer.putInt(world.toPacked(request.x, request.y)); + if(!request.remove){ + buffer.put((byte)request.recipe.id); + buffer.put((byte)request.rotation); + } + }else{ + buffer.put((byte)-1); + } } @Override @@ -164,6 +180,21 @@ public class Packets { rotation = buffer.getShort()/2f; baseRotation = buffer.getShort()/2f; mining = world.tile(buffer.getInt()); + + byte type = buffer.get(); + if (type != -1) { + int position = buffer.getInt(); + + if (type == 1) { //remove + currentRequest = new BuildRequest(position % world.width(), position / world.width()); + } else { //place + byte recipe = buffer.get(); + byte rotation = buffer.get(); + currentRequest = new BuildRequest(position % world.width(), position / world.width(), rotation, Recipe.getByID(recipe)); + } + }else{ + currentRequest = null; + } } } diff --git a/core/src/io/anuke/mindustry/world/Build.java b/core/src/io/anuke/mindustry/world/Build.java index fb7cc574a5..2c963268e8 100644 --- a/core/src/io/anuke/mindustry/world/Build.java +++ b/core/src/io/anuke/mindustry/world/Build.java @@ -1,20 +1,11 @@ package io.anuke.mindustry.world; import com.badlogic.gdx.math.Rectangle; -import io.anuke.annotations.Annotations.Loc; -import io.anuke.annotations.Annotations.Remote; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.Units; -import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; import io.anuke.mindustry.game.EventType.BlockBuildEvent; import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.net.In; -import io.anuke.mindustry.net.Net; import io.anuke.mindustry.type.Recipe; -import io.anuke.mindustry.world.blocks.BreakBlock; -import io.anuke.mindustry.world.blocks.BreakBlock.BreakEntity; -import io.anuke.mindustry.world.blocks.BuildBlock; import io.anuke.mindustry.world.blocks.BuildBlock.BuildEntity; import io.anuke.ucore.core.Events; import io.anuke.ucore.entities.Entities; @@ -26,15 +17,10 @@ public class Build { private static final Rectangle hitrect = new Rectangle(); /**Returns block type that was broken, or null if unsuccesful.*/ - @Remote(targets = Loc.both, forward = true, called = Loc.server, in = In.blocks) - public static void breakBlock(Player player, Team team, int x, int y){ - if(Net.server()){ - if(!validBreak(team, x, y)){ - return; - } - - team = player.getTeam(); - //throw new ValidateException(player, "An invalid block has been broken."); + //@Remote(targets = Loc.both, forward = true, called = Loc.server, in = In.blocks) + public static void beginBreak(Team team, int x, int y){ + if(!validBreak(team, x, y)){ + return; } Tile tile = world.tile(x, y); @@ -46,59 +32,38 @@ public class Build { Block previous = tile.block(); - //remote players only - if(player != null && !player.isLocal){ - player.getPlaceQueue().clear(); - player.getPlaceQueue().addFirst(new BuildRequest(x, y)); - } + Block sub = Block.getByName("build" + previous.size); - Block sub = Block.getByName("break" + previous.size); + tile.setBlock(sub); + tile.entity().setDeconstruct(previous); + tile.setTeam(team); - if(previous instanceof BuildBlock){ - BuildEntity build = tile.entity(); + if (previous.isMultiblock()) { + int offsetx = -(previous.size - 1) / 2; + int offsety = -(previous.size - 1) / 2; - tile.setBlock(sub); - tile.setTeam(team); - - BreakEntity breake = tile.entity(); - breake.set(build.recipe.result); - breake.progress = 1.0 - build.progress; - }else { - tile.setBlock(sub); - tile.entity().set(previous); - tile.setTeam(team); - - if (previous.isMultiblock()) { - int offsetx = -(previous.size - 1) / 2; - int offsety = -(previous.size - 1) / 2; - - for (int dx = 0; dx < previous.size; dx++) { - for (int dy = 0; dy < previous.size; dy++) { - int worldx = dx + offsetx + x; - int worldy = dy + offsety + y; - if (!(worldx == x && worldy == y)) { - Tile toplace = world.tile(worldx, worldy); - if (toplace != null) { - toplace.setLinked((byte) (dx + offsetx), (byte) (dy + offsety)); - toplace.setTeam(team); - } + for (int dx = 0; dx < previous.size; dx++) { + for (int dy = 0; dy < previous.size; dy++) { + int worldx = dx + offsetx + x; + int worldy = dy + offsety + y; + if (!(worldx == x && worldy == y)) { + Tile toplace = world.tile(worldx, worldy); + if (toplace != null) { + toplace.setLinked((byte) (dx + offsetx), (byte) (dy + offsety)); + toplace.setTeam(team); } } } } } + } - /**Places a BuildBlock at this location. Call validPlace first.*/ - @Remote(targets = Loc.both, forward = true, called = Loc.server, in = In.blocks) - public static void placeBlock(Player player, Team team, int x, int y, Recipe recipe, int rotation){ - if(Net.server()){ - if(!validPlace(team, x, y, recipe.result, rotation)){ - return; - } - - team = player.getTeam(); - //throw new ValidateException(player, "An invalid block has been placed."); + /**Places a BuildBlock at this location.*/ + //@Remote(targets = Loc.both, forward = true, called = Loc.server, in = In.blocks) + public static void beginPlace(Team team, int x, int y, Recipe recipe, int rotation){ + if(!validPlace(team, x, y, recipe.result, rotation)){ + return; } Tile tile = world.tile(x, y); @@ -109,51 +74,33 @@ public class Build { Block result = recipe.result; Block previous = tile.block(); - //remote players only - if(player != null && !player.isLocal){ - player.getPlaceQueue().clear(); - player.getPlaceQueue().addFirst(new BuildRequest(x, y, rotation, recipe)); - } - Block sub = Block.getByName("build" + result.size); - if(previous instanceof BreakBlock){ - BreakEntity breake = tile.entity(); + tile.setBlock(sub, rotation); + tile.entity().setConstruct(previous, recipe); + tile.setTeam(team); - tile.setBlock(sub); - tile.setTeam(team); + if (result.isMultiblock()) { + int offsetx = -(result.size - 1) / 2; + int offsety = -(result.size - 1) / 2; - BuildEntity build = tile.entity(); - build.set(breake.previous, recipe); - build.progress = 1.0 - breake.progress; - }else{ - tile.setBlock(sub, rotation); - tile.entity().set(previous, recipe); - tile.setTeam(team); - - if (result.isMultiblock()) { - int offsetx = -(result.size - 1) / 2; - int offsety = -(result.size - 1) / 2; - - for (int dx = 0; dx < result.size; dx++) { - for (int dy = 0; dy < result.size; dy++) { - int worldx = dx + offsetx + x; - int worldy = dy + offsety + y; - if (!(worldx == x && worldy == y)) { - Tile toplace = world.tile(worldx, worldy); - if (toplace != null) { - toplace.setLinked((byte) (dx + offsetx), (byte) (dy + offsety)); - toplace.setTeam(team); - } + for (int dx = 0; dx < result.size; dx++) { + for (int dy = 0; dy < result.size; dy++) { + int worldx = dx + offsetx + x; + int worldy = dy + offsety + y; + if (!(worldx == x && worldy == y)) { + Tile toplace = world.tile(worldx, worldy); + if (toplace != null) { + toplace.setLinked((byte) (dx + offsetx), (byte) (dy + offsety)); + toplace.setTeam(team); } } } } } - Team fteam = team; - threads.runDelay(() -> Events.fire(BlockBuildEvent.class, fteam, tile)); + threads.runDelay(() -> Events.fire(BlockBuildEvent.class, team, tile)); } /**Returns whether a tile can be placed at this location by this team.*/ @@ -226,7 +173,7 @@ public class Build { public static boolean validBreak(Team team, int x, int y) { Tile tile = world.tile(x, y); - return tile != null && !tile.block().unbreakable && !(tile.target().block() instanceof BreakBlock) + return tile != null && !tile.block().unbreakable && (!tile.isLinked() || !tile.getLinked().block().unbreakable) && tile.breakable() && (tile.getTeam() == Team.none || tile.getTeam() == team); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java b/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java deleted file mode 100644 index d273aeb554..0000000000 --- a/core/src/io/anuke/mindustry/world/blocks/BreakBlock.java +++ /dev/null @@ -1,211 +0,0 @@ -package io.anuke.mindustry.world.blocks; - -import com.badlogic.gdx.graphics.g2d.TextureRegion; -import io.anuke.annotations.Annotations.Loc; -import io.anuke.annotations.Annotations.Remote; -import io.anuke.mindustry.content.fx.ExplosionFx; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.entities.Player; -import io.anuke.mindustry.entities.TileEntity; -import io.anuke.mindustry.entities.Unit; -import io.anuke.mindustry.entities.effect.RubbleDecal; -import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; -import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.gen.CallBlocks; -import io.anuke.mindustry.graphics.Layer; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.graphics.Shaders; -import io.anuke.mindustry.input.CursorType; -import io.anuke.mindustry.net.In; -import io.anuke.mindustry.type.ItemStack; -import io.anuke.mindustry.type.Recipe; -import io.anuke.mindustry.world.BarType; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.meta.BlockBar; -import io.anuke.ucore.core.Effects; -import io.anuke.ucore.core.Graphics; -import io.anuke.ucore.graphics.Draw; - -import static io.anuke.mindustry.Vars.world; - -public class BreakBlock extends Block { - private static final float decaySpeedScl = 6f; - - public BreakBlock(String name) { - super(name); - solidifes = true; - update = true; - size = Integer.parseInt(name.charAt(name.length()-1) + ""); - health = 1; - layer = Layer.placement; - consumesTap = true; - } - - @Override - public boolean isSolidFor(Tile tile) { - BreakEntity entity = tile.entity(); - return entity.previous == null || entity.previous.solid; - } - - @Override - public CursorType getCursor(Tile tile) { - return CursorType.hand; - } - - @Override - public void tapped(Tile tile, Player player) { - CallBlocks.onBreakSelect(player, tile); - } - - @Override - public void setBars(){ - bars.replace(new BlockBar(BarType.health, true, tile -> (float)tile.entity().progress)); - } - - @Override - public void onDestroyed(Tile tile){ - Effects.effect(ExplosionFx.blockExplosionSmoke, tile); - - if(!tile.floor().solid && !tile.floor().isLiquid){ - RubbleDecal.create(tile.drawx(), tile.drawy(), size); - } - } - - @Override - public void afterDestroyed(Tile tile, TileEntity e){ - BreakEntity entity = (BreakEntity)e; - - if(entity != null && entity.previous != null && entity.previous.synthetic()){ - tile.setBlock(entity.previous); - } - } - - @Override - public void draw(Tile tile){ - } - - @Override - public void drawLayer(Tile tile) { - BreakEntity entity = tile.entity(); - - Shaders.blockbuild.color = Palette.remove; - - if(entity.previous == null) return; - - for(TextureRegion region : entity.previous.getBlockIcon()){ - Shaders.blockbuild.region = region; - Shaders.blockbuild.progress = (float)(1f-entity.progress); //progress reversed - Shaders.blockbuild.apply(); - - Draw.rect(region, tile.drawx(), tile.drawy(), entity.previous.rotate ? tile.getRotation() * 90 : 0); - - Graphics.flush(); - } - } - - @Override - public void drawShadow(Tile tile) { - BreakEntity entity = tile.entity(); - - if(entity.previous instanceof BreakBlock || entity.previous == null || entity.previous.shadowRegion == null){ - return; - } - - entity.previous.drawShadow(tile); - } - - @Override - public void update(Tile tile) { - BreakEntity entity = tile.entity(); - - if(entity.progress >= 1f){ - CallBlocks.onBreakFinish(tile); - }else if(entity.progress < 0f){ - CallBlocks.onBreakDeath(tile); - } - } - - @Override - public TileEntity getEntity() { - return new BreakEntity(); - } - - @Remote(called = Loc.server, in = In.blocks) - public static void onBreakDeath(Tile tile){ - BreakEntity entity = tile.entity(); - - Team team = tile.getTeam(); - tile.setBlock(entity.previous); - tile.setTeam(team); - } - - @Remote(called = Loc.server, in = In.blocks) - public static void onBreakFinish(Tile tile){ - - if(tile.entity instanceof BreakEntity){ - BreakEntity entity = tile.entity(); - if(entity.previous != null){ - Effects.effect(Fx.breakBlock, tile.drawx(), tile.drawy(), entity.previous.size); - } - } - - world.removeBlock(tile); - } - - @Remote(called = Loc.both, targets = Loc.both, in = In.blocks, forward = true) - public static void onBreakSelect(Player player, Tile tile){ - if(player == null || !(tile.entity instanceof BreakEntity)) return; - - player.getPlaceQueue().clear(); - player.addBuildRequest(new BuildRequest(tile.x, tile.y)); - } - - public class BreakEntity extends TileEntity{ - private double[] accumulator; - - public double progress = 0; - public Block previous; - public float breakTime; - - public void addProgress(TileEntity core, Unit unit, double add){ - Recipe recipe = Recipe.getByResult(previous); - - if(recipe != null) { - ItemStack[] requirements = recipe.requirements; - - for (int i = 0; i < requirements.length; i++) { - accumulator[i] += requirements[i].amount * add / 2f; //add scaled amount progressed to the accumulator - int amount = (int) (accumulator[i]); //get amount - - if (amount > 0) { //if it's positive, add it to the core - int accepting = core.tile.block().acceptStack(requirements[i].item, amount, core.tile, unit); - core.tile.block().handleStack(requirements[i].item, amount, core.tile, unit); - - accumulator[i] -= accepting; - } - } - } - - progress += add; - - if(progress > 1.0001f){ - progress = 1.0001f; - } - } - - public float progress(){ - return (float)progress; - } - - public void set(Block previous){ - this.previous = previous; - if(Recipe.getByResult(previous) != null){ - this.accumulator = new double[Recipe.getByResult(previous).requirements.length]; - this.breakTime = Recipe.getByResult(previous).cost; - }else{ - this.breakTime = 20f; - } - } - } -} diff --git a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java index 4e81f02eb9..0f827abb11 100644 --- a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java @@ -7,6 +7,7 @@ import io.anuke.mindustry.content.fx.ExplosionFx; import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; +import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.effect.RubbleDecal; import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; import io.anuke.mindustry.game.Team; @@ -16,6 +17,7 @@ import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Shaders; import io.anuke.mindustry.input.CursorType; import io.anuke.mindustry.net.In; +import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.world.BarType; import io.anuke.mindustry.world.Block; @@ -25,16 +27,15 @@ import io.anuke.mindustry.world.meta.BlockBar; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Graphics; import io.anuke.ucore.graphics.Draw; +import io.anuke.ucore.util.Mathf; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import static io.anuke.mindustry.Vars.threads; +import static io.anuke.mindustry.Vars.*; public class BuildBlock extends Block { - private static final float decaySpeedScl = 6f; - public BuildBlock(String name) { super(name); update = true; @@ -48,7 +49,7 @@ public class BuildBlock extends Block { @Override public boolean isSolidFor(Tile tile) { BuildEntity entity = tile.entity(); - return entity == null || entity.recipe ==null || entity.recipe.result.solid || entity.previous.solid; + return entity == null || entity.recipe == null || entity.recipe.result.solid || entity.previous.solid; } @Override @@ -58,7 +59,13 @@ public class BuildBlock extends Block { @Override public void tapped(Tile tile, Player player) { - CallBlocks.onBuildSelect(player, tile); + BuildEntity entity = tile.entity(); + + //if the target is constructible, begin constructing + if(entity.recipe != null){ + player.clearBuilding(); + player.addBuildRequest(new BuildRequest(tile.x, tile.y, tile.getRotation(), entity.recipe)); + } } @Override @@ -79,7 +86,7 @@ public class BuildBlock extends Block { public void afterDestroyed(Tile tile, TileEntity e){ BuildEntity entity = (BuildEntity)e; - if(entity.previous.synthetic()){ + if(entity.previous != null && entity.previous.synthetic()){ tile.setBlock(entity.previous); } } @@ -88,10 +95,13 @@ public class BuildBlock extends Block { public void draw(Tile tile){ BuildEntity entity = tile.entity(); - if(entity.previous != null && entity.previous.synthetic()) { - for (TextureRegion region : entity.previous.getBlockIcon()) { - Draw.rect(region, tile.drawx(), tile.drawy(), entity.recipe.result.rotate ? tile.getRotation() * 90 : 0); - } + //When breaking, don't draw the previous block... since it's the thing you were breaking + if(entity.recipe != null && entity.previous == entity.recipe.result){ + return; + } + + for (TextureRegion region : entity.previous.getBlockIcon()) { + Draw.rect(region, tile.drawx(), tile.drawy(), entity.previous.rotate ? tile.getRotation() * 90 : 0); } } @@ -101,12 +111,16 @@ public class BuildBlock extends Block { Shaders.blockbuild.color = Palette.accent; - for(TextureRegion region : entity.recipe.result.getBlockIcon()){ + Block target = entity.recipe == null ? entity.previous : entity.recipe.result; + + if(target == null) return; + + for(TextureRegion region : target.getBlockIcon()){ Shaders.blockbuild.region = region; Shaders.blockbuild.progress = (float)entity.progress; Shaders.blockbuild.apply(); - Draw.rect(region, tile.drawx(), tile.drawy(), entity.recipe.result.rotate ? tile.getRotation() * 90 : 0); + Draw.rect(region, tile.drawx(), tile.drawy(), target.rotate ? tile.getRotation() * 90 : 0); Graphics.flush(); } @@ -116,26 +130,16 @@ public class BuildBlock extends Block { public void drawShadow(Tile tile) { BuildEntity entity = tile.entity(); - if(entity.recipe != null && entity.recipe.result != null){ + if(entity.recipe != null){ entity.recipe.result.drawShadow(tile); + }else if(entity.previous != null){ + entity.previous.drawShadow(tile); } } @Override public void update(Tile tile) { - BuildEntity entity = tile.entity(); - if(entity.progress >= 1f){ - CallBlocks.onBuildFinish(tile, entity.lastBuilder); - }else if(entity.progress < 0f){ - CallBlocks.onBuildDeath(tile); - } - - if(!entity.updated && entity.recipe != null){ - entity.progress -= 1f/entity.recipe.cost/decaySpeedScl; - } - - entity.updated = false; } @Override @@ -144,77 +148,85 @@ public class BuildBlock extends Block { } @Remote(called = Loc.server, in = In.blocks) - public static void onBuildDeath(Tile tile){ - if(tile.entity == null) return; - tile.entity.damage(tile.entity.health + 1); + public static void onDeconstructFinish(Tile tile, Block block){ + Effects.effect(Fx.breakBlock, tile.drawx(), tile.drawy(), block.size); + world.removeBlock(tile); } @Remote(called = Loc.server, in = In.blocks) - public static void onBuildFinish(Tile tile, Player lastBuilder){ - if(tile.entity == null || !(tile.entity instanceof BuildEntity)) return; - BuildEntity entity = tile.entity(); - + public static void onConstructFinish(Tile tile, Block block, int builderID){ Team team = tile.getTeam(); - tile.setBlock(entity.recipe.result); + tile.setBlock(block); tile.setTeam(team); - Effects.effect(Fx.placeBlock, tile.drawx(), tile.drawy(), entity.recipe.result.size); + Effects.effect(Fx.placeBlock, tile.drawx(), tile.drawy(), block.size); //last builder was this local client player, call placed() - if(lastBuilder != null && lastBuilder.isLocal){ + if(!headless && builderID == players[0].id){ //this is run delayed, since if this is called on the server, all clients need to recieve the onBuildFinish() //event first before they can recieve the placed() event modification results threads.runDelay(() -> tile.block().placed(tile)); } } - @Remote(called = Loc.both, targets = Loc.both, in = In.blocks, forward = true) - public static void onBuildSelect(Player player, Tile tile){ - if(player == null || !(tile.entity instanceof BuildEntity)) return; - - BuildEntity entity = tile.entity(); - - player.getPlaceQueue().clear(); - player.addBuildRequest(new BuildRequest(tile.x, tile.y, tile.getRotation(), entity.recipe)); - } - - @Remote(called = Loc.server, targets = Loc.both, in = In.blocks, forward = true) - public static void onBuildDeselect(Player player){ - if(player == null) return; - - player.getPlaceQueue().clear(); - } - public class BuildEntity extends TileEntity{ + /**The recipe of the block that is being constructed. + * If there is no recipe for this block, as is the case with rocks, 'previous' is used.*/ public Recipe recipe; public double progress = 0; public double lastProgress; + public double buildCost; + /**The block that used to be here. + * If a non-recipe block is being deconstructed, this is the block that is being deconstructed.*/ public Block previous; - public Player lastBuilder; private double[] accumulator; - private boolean updated; - public void addProgress(InventoryModule inventory, double amount){ - double maxProgress = checkRequired(inventory, amount); + public void construct(Unit builder, TileEntity core, double amount){ + double maxProgress = checkRequired(core.items, amount); for (int i = 0; i < recipe.requirements.length; i++) { accumulator[i] += recipe.requirements[i].amount*maxProgress; //add min amount progressed to the accumulator } - maxProgress = checkRequired(inventory, maxProgress); + maxProgress = checkRequired(core.items, maxProgress); - progress += maxProgress; + progress = Mathf.clamp(progress + maxProgress); lastProgress = maxProgress; - updated = true; - if(progress > 1.0001f){ - progress = 1.0001f; + if(progress >= 1f){ + CallBlocks.onConstructFinish(tile, recipe.result, builder.getID()); } } - public double checkRequired(InventoryModule inventory, double amount){ + public void deconstruct(Unit builder, TileEntity core, double amount){ + Recipe recipe = Recipe.getByResult(previous); + + if(recipe != null) { + ItemStack[] requirements = recipe.requirements; + + for (int i = 0; i < requirements.length; i++) { + accumulator[i] += requirements[i].amount * amount / 2f; //add scaled amount progressed to the accumulator + int accumulated = (int) (accumulator[i]); //get amount + + if (amount > 0) { //if it's positive, add it to the core + int accepting = core.tile.block().acceptStack(requirements[i].item, accumulated, core.tile, builder); + core.tile.block().handleStack(requirements[i].item, accumulated, core.tile, builder); + + accumulator[i] -= accepting; + } + } + } + + progress = Mathf.clamp(progress - amount); + + if(progress <= 0){ + CallBlocks.onDeconstructFinish(tile, recipe == null ? previous : recipe.result); + } + } + + private double checkRequired(InventoryModule inventory, double amount){ double maxProgress = amount; for(int i = 0; i < recipe.requirements.length; i ++){ @@ -243,11 +255,23 @@ public class BuildBlock extends Block { return (float)progress; } - public void set(Block previous, Recipe recipe){ - updated = true; + public void setConstruct(Block previous, Recipe recipe){ this.recipe = recipe; this.previous = previous; this.accumulator = new double[recipe.requirements.length]; + this.buildCost = recipe.cost; + } + + public void setDeconstruct(Block previous){ + this.previous = previous; + this.progress = 1f; + if(Recipe.getByResult(previous) != null){ + this.recipe = Recipe.getByResult(previous); + this.accumulator = new double[Recipe.getByResult(previous).requirements.length]; + this.buildCost = Recipe.getByResult(previous).cost; + }else{ + this.buildCost = 20f; //default no-recipe build cost is 20 + } } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index e24a5ca0e8..9feeb9d9a3 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -110,6 +110,7 @@ public abstract class Turret extends Block{ stats.add(BlockStat.inaccuracy, (int)inaccuracy, StatUnit.degrees); stats.add(BlockStat.reload, 60f/reload, StatUnit.seconds); stats.add(BlockStat.shots, shots, StatUnit.none); + stats.add(BlockStat.targetsAir, targetAir); } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/power/ItemGenerator.java b/core/src/io/anuke/mindustry/world/blocks/power/ItemGenerator.java index 14963bf75e..63f551c112 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/ItemGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/ItemGenerator.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.world.blocks.power; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.g2d.TextureRegion; import io.anuke.mindustry.content.fx.BlockFx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; @@ -29,6 +30,7 @@ public abstract class ItemGenerator extends PowerGenerator { protected Effect generateEffect = BlockFx.generatespark, explodeEffect = BlockFx.generatespark; protected Color heatColor = Color.valueOf("ff9b59"); + protected TextureRegion topRegion; public ItemGenerator(String name) { super(name); @@ -36,6 +38,12 @@ public abstract class ItemGenerator extends PowerGenerator { hasItems = true; } + @Override + public void load() { + super.load(); + topRegion = Draw.region(name + "-top"); + } + @Override public void setStats() { super.setStats(); @@ -61,7 +69,7 @@ public abstract class ItemGenerator extends PowerGenerator { float alpha = (entity.items.totalItems() > 0 ? 1f : Mathf.clamp(entity.generateTime)); alpha = alpha * 0.7f + Mathf.absin(Timers.time(), 12f, 0.3f) * alpha; Draw.alpha(alpha); - Draw.rect(name + "-top", tile.worldx(), tile.worldy()); + Draw.rect(topRegion, tile.drawx(), tile.drawy()); Draw.reset(); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/power/PowerDistributor.java b/core/src/io/anuke/mindustry/world/blocks/power/PowerDistributor.java index 07b84e8ba1..bb2a5ac1f8 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/PowerDistributor.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/PowerDistributor.java @@ -51,8 +51,11 @@ public class PowerDistributor extends PowerBlock { } protected boolean shouldDistribute(Tile tile, Tile other) { + other = other.target(); //only generators can distribute to other generators return (!(other.block() instanceof PowerGenerator) || tile.block() instanceof PowerGenerator) + && other.entity != null + && other.block().hasPower && other.entity.power.amount / other.block().powerCapacity < tile.entity.power.amount / powerCapacity; } diff --git a/core/src/io/anuke/mindustry/world/meta/BlockStat.java b/core/src/io/anuke/mindustry/world/meta/BlockStat.java index a72600dc32..4279f272c9 100644 --- a/core/src/io/anuke/mindustry/world/meta/BlockStat.java +++ b/core/src/io/anuke/mindustry/world/meta/BlockStat.java @@ -38,7 +38,8 @@ public enum BlockStat { shots(StatCategory.shooting), reload(StatCategory.shooting), powerShot(StatCategory.shooting), - + targetsAir(StatCategory.shooting) +, ; diff --git a/core/src/io/anuke/mindustry/world/meta/BlockStats.java b/core/src/io/anuke/mindustry/world/meta/BlockStats.java index a9659c6e97..112f431211 100644 --- a/core/src/io/anuke/mindustry/world/meta/BlockStats.java +++ b/core/src/io/anuke/mindustry/world/meta/BlockStats.java @@ -5,10 +5,7 @@ import com.badlogic.gdx.utils.OrderedMap; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.type.Liquid; -import io.anuke.mindustry.world.meta.values.ItemValue; -import io.anuke.mindustry.world.meta.values.LiquidValue; -import io.anuke.mindustry.world.meta.values.NumberValue; -import io.anuke.mindustry.world.meta.values.StringValue; +import io.anuke.mindustry.world.meta.values.*; import io.anuke.ucore.util.Bundles; import io.anuke.ucore.util.Log; @@ -24,6 +21,11 @@ public class BlockStats { add(stat, new NumberValue(value, unit)); } + /**Adds a single y/n boolean value.*/ + public void add(BlockStat stat, boolean value){ + add(stat, new BooleanValue(value)); + } + /**Adds an item value.*/ public void add(BlockStat stat, Item item){ add(stat, new ItemValue(new ItemStack(item, 1))); diff --git a/core/src/io/anuke/mindustry/world/meta/values/BooleanValue.java b/core/src/io/anuke/mindustry/world/meta/values/BooleanValue.java new file mode 100644 index 0000000000..ace31e66ce --- /dev/null +++ b/core/src/io/anuke/mindustry/world/meta/values/BooleanValue.java @@ -0,0 +1,17 @@ +package io.anuke.mindustry.world.meta.values; + +import io.anuke.mindustry.world.meta.StatValue; +import io.anuke.ucore.scene.ui.layout.Table; + +public class BooleanValue implements StatValue { + private final boolean value; + + public BooleanValue(boolean value) { + this.value = value; + } + + @Override + public void display(Table table) { + table.add(!value ? "$text.no" : "$text.yes"); + } +}