diff --git a/build.gradle b/build.gradle index e41badb06a..e572bda3dd 100644 --- a/build.gradle +++ b/build.gradle @@ -176,7 +176,6 @@ project(":core") { } compile "com.badlogicgames.gdx:gdx:$gdxVersion" - compile "com.badlogicgames.gdx:gdx-ai:$aiVersion" compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion" } diff --git a/core/assets-raw/sprites/blocks/distribution/conveyor-arrow.png b/core/assets-raw/sprites/blocks/distribution/conveyor-arrow.png new file mode 100644 index 0000000000..fa67ae25f8 Binary files /dev/null and b/core/assets-raw/sprites/blocks/distribution/conveyor-arrow.png differ diff --git a/core/assets-raw/sprites/blocks/distribution/conveyor.png b/core/assets-raw/sprites/blocks/distribution/conveyor.png index ad9c4328d5..284b091968 100644 Binary files a/core/assets-raw/sprites/blocks/distribution/conveyor.png and b/core/assets-raw/sprites/blocks/distribution/conveyor.png differ diff --git a/core/assets-raw/sprites/blocks/distribution/conveyormove.png b/core/assets-raw/sprites/blocks/distribution/conveyormove.png deleted file mode 100644 index 70f61687b6..0000000000 Binary files a/core/assets-raw/sprites/blocks/distribution/conveyormove.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/distribution/poweredconveyor.png b/core/assets-raw/sprites/blocks/distribution/poweredconveyor.png deleted file mode 100644 index bae08a3d20..0000000000 Binary files a/core/assets-raw/sprites/blocks/distribution/poweredconveyor.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/distribution/poweredconveyormove.png b/core/assets-raw/sprites/blocks/distribution/poweredconveyormove.png deleted file mode 100644 index 60d4002873..0000000000 Binary files a/core/assets-raw/sprites/blocks/distribution/poweredconveyormove.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/distribution/steelconveyor.png b/core/assets-raw/sprites/blocks/distribution/steelconveyor.png deleted file mode 100644 index ff6a0abd21..0000000000 Binary files a/core/assets-raw/sprites/blocks/distribution/steelconveyor.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/distribution/steelconveyormove.png b/core/assets-raw/sprites/blocks/distribution/steelconveyormove.png deleted file mode 100644 index 371a4a8720..0000000000 Binary files a/core/assets-raw/sprites/blocks/distribution/steelconveyormove.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/distribution/titanium-conveyor.png b/core/assets-raw/sprites/blocks/distribution/titanium-conveyor.png new file mode 100644 index 0000000000..d25210902a Binary files /dev/null and b/core/assets-raw/sprites/blocks/distribution/titanium-conveyor.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 962f9ac84a..cf2ad1f019 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -11,30 +11,30 @@ background orig: 421, 316 offset: 0, 0 index: -1 -conveyormove +conveyor-arrow rotate: false - xy: 757, 308 + xy: 737, 308 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-arrow rotate: false - xy: 723, 209 + xy: 713, 209 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-bridge rotate: false - xy: 723, 199 + xy: 713, 199 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-end rotate: false - xy: 713, 189 + xy: 723, 209 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -53,16 +53,9 @@ ripple orig: 24, 24 offset: 0, 0 index: -1 -poweredconveyormove +titanium-conveyor rotate: false - xy: 305, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -steelconveyormove - rotate: false - xy: 395, 23 + xy: 325, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -76,28 +69,28 @@ warpgate-top index: -1 irondrill rotate: false - xy: 756, 298 + xy: 746, 298 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 irondrill-rotator rotate: false - xy: 756, 288 + xy: 746, 288 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill-rotator rotate: false - xy: 756, 288 + xy: 746, 288 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 irondrill-top rotate: false - xy: 736, 278 + xy: 756, 298 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -209,56 +202,56 @@ plasmadrill-top index: -1 reinforceddrill rotate: false - xy: 315, 13 + xy: 305, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 reinforceddrill-rotator rotate: false - xy: 325, 23 + xy: 315, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 reinforceddrill-top rotate: false - xy: 335, 33 + xy: 325, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steeldrill rotate: false - xy: 405, 33 + xy: 385, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steeldrill-rotator rotate: false - xy: 395, 13 + xy: 395, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steeldrill-top rotate: false - xy: 405, 23 + xy: 385, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill rotate: false - xy: 365, 3 + xy: 335, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill-top rotate: false - xy: 375, 3 + xy: 345, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -370,28 +363,28 @@ blackstoneedge index: -1 coal2 rotate: false - xy: 747, 318 + xy: 737, 318 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal3 rotate: false - xy: 757, 328 + xy: 747, 328 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt2 rotate: false - xy: 767, 310 + xy: 757, 308 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt3 rotate: false - xy: 777, 320 + xy: 767, 320 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -405,28 +398,28 @@ dirtedge index: -1 grass2 rotate: false - xy: 706, 289 + xy: 787, 310 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass3 rotate: false - xy: 716, 299 + xy: 706, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassblock1 rotate: false - xy: 706, 279 + xy: 706, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassblock2 rotate: false - xy: 716, 289 + xy: 716, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -440,14 +433,14 @@ grassedge index: -1 ice2 rotate: false - xy: 726, 299 + xy: 706, 279 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice3 rotate: false - xy: 716, 279 + xy: 716, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -461,49 +454,49 @@ iceedge index: -1 icerock2 rotate: false - xy: 726, 289 + xy: 726, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow1 rotate: false - xy: 726, 279 + xy: 716, 279 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow1 rotate: false - xy: 726, 279 + xy: 716, 279 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow2 rotate: false - xy: 736, 298 + xy: 726, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow2 rotate: false - xy: 736, 298 + xy: 726, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron2 rotate: false - xy: 746, 298 + xy: 736, 298 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron3 rotate: false - xy: 746, 288 + xy: 736, 288 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -517,49 +510,49 @@ lavaedge index: -1 lead2 rotate: false - xy: 827, 423 + xy: 713, 189 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 893, 417 + xy: 723, 189 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor2 rotate: false - xy: 943, 417 + xy: 923, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor3 rotate: false - xy: 953, 413 + xy: 933, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor4 rotate: false - xy: 963, 423 + xy: 943, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor5 rotate: false - xy: 963, 413 + xy: 953, 413 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor6 rotate: false - xy: 295, 33 + xy: 963, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -573,7 +566,7 @@ metalflooredge index: -1 mossblock rotate: false - xy: 295, 23 + xy: 963, 413 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -587,42 +580,42 @@ oiledge index: -1 rock2 rotate: false - xy: 335, 23 + xy: 325, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 335, 13 + xy: 325, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 345, 23 + xy: 335, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock1 rotate: false - xy: 355, 33 + xy: 345, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock2 rotate: false - xy: 345, 13 + xy: 335, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock3 rotate: false - xy: 355, 23 + xy: 345, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -636,42 +629,42 @@ sandedge index: -1 shrubshadow rotate: false - xy: 365, 13 + xy: 355, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 385, 33 + xy: 375, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 375, 13 + xy: 365, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock1 rotate: false - xy: 385, 23 + xy: 375, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock2 rotate: false - xy: 395, 33 + xy: 385, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock3 rotate: false - xy: 385, 13 + xy: 375, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -692,63 +685,63 @@ spaceedge index: -1 stone-cliff-edge rotate: false - xy: 415, 23 + xy: 395, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-1 rotate: false - xy: 415, 13 + xy: 405, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-2 rotate: false - xy: 425, 35 + xy: 415, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-side rotate: false - xy: 425, 25 + xy: 405, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 415, 33 + xy: 395, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 405, 13 + xy: 405, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock1 rotate: false - xy: 425, 15 + xy: 415, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock2 rotate: false - xy: 295, 3 + xy: 415, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock3 rotate: false - xy: 305, 3 + xy: 425, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -762,56 +755,56 @@ stoneedge index: -1 thorium2 rotate: false - xy: 325, 3 + xy: 425, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 335, 3 + xy: 295, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 345, 3 + xy: 305, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 355, 3 + xy: 315, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge rotate: false - xy: 435, 21 + xy: 415, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-1 rotate: false - xy: 445, 31 + xy: 425, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-2 rotate: false - xy: 435, 11 + xy: 435, 31 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-side rotate: false - xy: 435, 1 + xy: 435, 21 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -846,42 +839,42 @@ combustion-generator-top index: -1 block-middle rotate: false - xy: 717, 329 + xy: 707, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump-liquid rotate: false - xy: 717, 329 + xy: 707, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-slope rotate: false - xy: 707, 319 + xy: 697, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 border rotate: false - xy: 717, 319 + xy: 717, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-liquid rotate: false - xy: 737, 308 + xy: 757, 328 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 cross-1 rotate: false - xy: 767, 320 + xy: 747, 308 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -909,7 +902,7 @@ cross-4 index: -1 enemyspawn rotate: false - xy: 787, 310 + xy: 777, 310 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -923,14 +916,14 @@ nuclearreactor-shadow index: -1 place-arrow rotate: false - xy: 305, 33 + xy: 295, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 295, 13 + xy: 295, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1042,105 +1035,105 @@ shadow-round-2 index: -1 bridgeconduit-arrow rotate: false - xy: 707, 309 + xy: 707, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconduit-bridge rotate: false - xy: 717, 309 + xy: 717, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconduit-end rotate: false - xy: 727, 329 + xy: 707, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor-arrow rotate: false - xy: 727, 319 + xy: 717, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor-bridge rotate: false - xy: 727, 309 + xy: 727, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor-end rotate: false - xy: 737, 328 + xy: 727, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-bottom rotate: false - xy: 757, 318 + xy: 747, 318 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-top rotate: false - xy: 747, 308 + xy: 757, 318 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-arrow rotate: false - xy: 719, 219 + xy: 717, 229 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-bridge rotate: false - xy: 713, 209 + xy: 709, 219 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-end rotate: false - xy: 713, 199 + xy: 719, 219 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter rotate: false - xy: 903, 417 + xy: 827, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-bottom rotate: false - xy: 913, 417 + xy: 893, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-liquid rotate: false - xy: 923, 417 + xy: 903, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-top rotate: false - xy: 933, 417 + xy: 913, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1168,14 +1161,14 @@ liquidtank-top index: -1 pulseconduit-bottom rotate: false - xy: 315, 33 + xy: 305, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-top rotate: false - xy: 305, 13 + xy: 295, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1280,7 +1273,7 @@ nuclear-reactor-lights index: -1 rtg-generator-top rotate: false - xy: 345, 33 + xy: 335, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1434,14 +1427,14 @@ cultivator-top index: -1 extractor rotate: false - xy: 706, 299 + xy: 787, 320 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lavasmelter rotate: false - xy: 723, 189 + xy: 723, 199 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1476,28 +1469,28 @@ silicon-smelter-top index: -1 pulverizer rotate: false - xy: 315, 23 + xy: 305, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 325, 33 + xy: 315, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator-liquid rotate: false - xy: 365, 33 + xy: 355, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 siliconextractor rotate: false - xy: 375, 23 + xy: 365, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1602,7 +1595,7 @@ crux-panel-right index: -1 duo rotate: false - xy: 787, 320 + xy: 777, 320 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1749,7 +1742,7 @@ reconstructor-open index: -1 repairpoint-turret rotate: false - xy: 325, 13 + xy: 315, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1763,21 +1756,21 @@ door-large-open index: -1 door-open rotate: false - xy: 777, 310 + xy: 767, 310 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stonewall rotate: false - xy: 315, 3 + xy: 425, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumshieldwall rotate: false - xy: 385, 3 + xy: 355, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1896,7 +1889,7 @@ shell-back index: -1 shot rotate: false - xy: 375, 33 + xy: 365, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1910,7 +1903,7 @@ transfer index: -1 transfer-arrow rotate: false - xy: 395, 3 + xy: 365, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2727,58 +2720,44 @@ power-node-large orig: 16, 16 offset: 0, 0 index: -1 -block-icon-poweredconveyor - rotate: false - xy: 715, 339 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -poweredconveyor - rotate: false - xy: 715, 339 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 block-icon-powerinfinite rotate: false - xy: 725, 339 + xy: 715, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powerinfinite rotate: false - xy: 725, 339 + xy: 715, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-powervoid rotate: false - xy: 843, 425 + xy: 725, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powervoid rotate: false - xy: 843, 425 + xy: 725, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-pulseconduit rotate: false - xy: 853, 425 + xy: 843, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-pulverizer rotate: false - xy: 863, 425 + xy: 853, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2813,35 +2792,35 @@ walkerfactory index: -1 block-icon-reinforceddrill rotate: false - xy: 873, 425 + xy: 863, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-repairpoint rotate: false - xy: 883, 425 + xy: 873, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 repairpoint rotate: false - xy: 883, 425 + xy: 873, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-resupplypoint rotate: false - xy: 893, 427 + xy: 883, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 resupplypoint rotate: false - xy: 893, 427 + xy: 883, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2855,14 +2834,14 @@ block-icon-ripple index: -1 block-icon-rock rotate: false - xy: 903, 427 + xy: 893, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rock1 rotate: false - xy: 903, 427 + xy: 893, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2883,77 +2862,77 @@ rotary-pump index: -1 block-icon-router rotate: false - xy: 913, 427 + xy: 903, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 913, 427 + xy: 903, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-rtg-generator rotate: false - xy: 923, 427 + xy: 913, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtg-generator rotate: false - xy: 923, 427 + xy: 913, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sand rotate: false - xy: 933, 427 + xy: 923, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand1 rotate: false - xy: 933, 427 + xy: 923, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-scorch rotate: false - xy: 943, 427 + xy: 933, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-separator rotate: false - xy: 953, 423 + xy: 943, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator rotate: false - xy: 953, 423 + xy: 943, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-shrub rotate: false - xy: 773, 330 + xy: 953, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shrub rotate: false - xy: 773, 330 + xy: 953, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2974,133 +2953,119 @@ silicon-smelter index: -1 block-icon-smelter rotate: false - xy: 783, 330 + xy: 773, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 smelter rotate: false - xy: 783, 330 + xy: 773, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-snow rotate: false - xy: 265, 31 + xy: 783, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow1 rotate: false - xy: 265, 31 + xy: 783, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-solar-panel rotate: false - xy: 265, 21 + xy: 265, 31 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 solar-panel rotate: false - xy: 265, 21 + xy: 265, 31 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sortedunloader rotate: false - xy: 703, 245 + xy: 265, 21 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sortedunloader rotate: false - xy: 703, 245 + xy: 265, 21 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sorter rotate: false - xy: 703, 195 + xy: 703, 245 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sorter rotate: false - xy: 703, 195 + xy: 703, 245 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-space rotate: false - xy: 279, 35 + xy: 703, 195 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 space rotate: false - xy: 279, 35 + xy: 703, 195 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-splitter rotate: false - xy: 275, 25 + xy: 279, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 splitter rotate: false - xy: 275, 25 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -block-icon-steelconveyor - rotate: false - xy: 275, 15 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -steelconveyor - rotate: false - xy: 275, 15 + xy: 279, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-steeldrill rotate: false - xy: 275, 5 + xy: 275, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-steelwall rotate: false - xy: 285, 25 + xy: 275, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelwall rotate: false - xy: 285, 25 + xy: 275, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3121,28 +3086,28 @@ steelwall-large index: -1 block-icon-stone rotate: false - xy: 285, 15 + xy: 275, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone1 rotate: false - xy: 285, 15 + xy: 275, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-stoneformer rotate: false - xy: 285, 5 + xy: 285, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneformer rotate: false - xy: 285, 5 + xy: 285, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3184,49 +3149,49 @@ thermal-pump index: -1 block-icon-thorium rotate: false - xy: 447, 51 + xy: 285, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium1 rotate: false - xy: 447, 51 + xy: 285, 15 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-titanium rotate: false - xy: 447, 41 + xy: 285, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 447, 41 + xy: 285, 5 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-titaniumdrill rotate: false - xy: 697, 329 + xy: 447, 51 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-titaniumwall rotate: false - xy: 697, 319 + xy: 447, 41 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumwall rotate: false - xy: 697, 319 + xy: 447, 41 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3261,14 +3226,14 @@ turbine-generator index: -1 block-icon-unloader rotate: false - xy: 707, 329 + xy: 697, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 unloader rotate: false - xy: 707, 329 + xy: 697, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3303,14 +3268,14 @@ warpgate index: -1 block-icon-water rotate: false - xy: 697, 309 + xy: 697, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water rotate: false - xy: 697, 309 + xy: 697, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3387,189 +3352,189 @@ mech-icon-trident-ship index: -1 item-armor-piercing-bullet rotate: false - xy: 746, 278 + xy: 756, 288 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-composite-flak rotate: false - xy: 726, 269 + xy: 706, 269 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-explosive-shell rotate: false - xy: 705, 259 + xy: 716, 269 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-frag-shell rotate: false - xy: 715, 259 + xy: 726, 269 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-homing-bullet rotate: false - xy: 725, 259 + xy: 705, 259 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-incendiary-mortar-shell rotate: false - xy: 736, 268 + xy: 715, 259 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead-bullet rotate: false - xy: 735, 258 + xy: 746, 268 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-scythe-missile rotate: false - xy: 723, 249 + xy: 755, 258 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-surge-mortar-shell rotate: false - xy: 723, 239 + xy: 753, 248 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-swarm-missile rotate: false - xy: 733, 238 + xy: 713, 239 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium-shell rotate: false - xy: 707, 229 + xy: 743, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-tracer-bullet rotate: false - xy: 709, 219 + xy: 707, 229 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-biomatter rotate: false - xy: 756, 278 + xy: 736, 278 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-blast-compound rotate: false - xy: 706, 269 + xy: 746, 278 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 716, 269 + xy: 756, 278 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-iron rotate: false - xy: 746, 268 + xy: 725, 259 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 756, 268 + xy: 736, 268 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-phase-matter rotate: false - xy: 745, 258 + xy: 756, 268 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plasteel rotate: false - xy: 755, 258 + xy: 735, 258 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-sand rotate: false - xy: 713, 249 + xy: 745, 258 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 733, 248 + xy: 713, 249 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-steel rotate: false - xy: 743, 248 + xy: 723, 249 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 753, 248 + xy: 733, 248 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-surge-alloy rotate: false - xy: 713, 239 + xy: 743, 248 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thermite rotate: false - xy: 743, 238 + xy: 723, 239 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 753, 238 + xy: 733, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 717, 229 + xy: 753, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4208,7 +4173,7 @@ icon-itch.io index: -1 icon-items-none rotate: false - xy: 736, 288 + xy: 726, 279 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4773,14 +4738,14 @@ blaster-equip index: -1 clustergun rotate: false - xy: 737, 318 + xy: 727, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 clustergun-equip rotate: false - xy: 747, 328 + xy: 737, 328 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4794,42 +4759,42 @@ generic-weapon index: -1 shockgun rotate: false - xy: 355, 13 + xy: 345, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 365, 23 + xy: 355, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster rotate: false - xy: 405, 3 + xy: 375, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster-equip rotate: false - xy: 415, 3 + xy: 385, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan rotate: false - xy: 425, 5 + xy: 395, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan-equip rotate: false - xy: 435, 31 + xy: 405, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 294d47cd3c..f71f6dcd81 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/ai/Pathfinder.java b/core/src/io/anuke/mindustry/ai/Pathfinder.java index fc03f07839..a8e02a4177 100644 --- a/core/src/io/anuke/mindustry/ai/Pathfinder.java +++ b/core/src/io/anuke/mindustry/ai/Pathfinder.java @@ -10,8 +10,8 @@ import io.anuke.mindustry.game.EventType.TileChangeEvent; import io.anuke.mindustry.game.EventType.WorldLoadEvent; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.game.TeamInfo.TeamData; -import io.anuke.mindustry.world.meta.BlockFlag; import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.world.meta.BlockFlag; import io.anuke.ucore.core.Events; import io.anuke.ucore.core.Timers; import io.anuke.ucore.util.Geometry; diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index 542237e891..8cfc1b6b03 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -1,7 +1,9 @@ package io.anuke.mindustry.content; import com.badlogic.gdx.utils.Array; -import io.anuke.mindustry.content.blocks.*; +import io.anuke.mindustry.content.blocks.DefenseBlocks; +import io.anuke.mindustry.content.blocks.DistributionBlocks; +import io.anuke.mindustry.content.blocks.WeaponBlocks; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentList; import io.anuke.mindustry.type.ItemStack; @@ -14,7 +16,35 @@ public class Recipes implements ContentList{ @Override public void load (){ new Recipe(defense, DefenseBlocks.ironwall, new ItemStack(Items.iron, 12)); - new Recipe(defense, DefenseBlocks.ironwalllarge, new ItemStack(Items.iron, 12)); + new Recipe(defense, DefenseBlocks.ironwalllarge, new ItemStack(Items.iron, 12*4)); + + new Recipe(weapon, WeaponBlocks.duo, new ItemStack(Items.iron, 12)); + new Recipe(weapon, WeaponBlocks.scatter, new ItemStack(Items.iron, 8), new ItemStack(Items.lead, 6)); + new Recipe(weapon, WeaponBlocks.scorch, new ItemStack(Items.iron, 12), new ItemStack(Items.lead, 8)); + new Recipe(weapon, WeaponBlocks.hail, new ItemStack(Items.iron, 12), new ItemStack(Items.lead, 12), new ItemStack(Items.steel, 6)); + + new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.iron, 1)); + new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.iron, 2), new ItemStack(Items.titanium, 1)); + new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 4)); + new Recipe(distribution, DistributionBlocks.multiplexer, new ItemStack(Items.iron, 8), new ItemStack(Items.lead, 8)); + new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.iron, 2)); + new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.iron, 4), new ItemStack(Items.lead, 4)); + new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 4)); + new Recipe(distribution, DistributionBlocks.overflowgate, new ItemStack(Items.steel, 4)); + + //new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.steel, 50)); + //new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.steel, 50)); + //new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.steel, 5)); + //new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.steel, 5)); + + new Recipe(distribution, DistributionBlocks.bridgeconveyor, new ItemStack(Items.steel, 8), new ItemStack(Items.iron, 8)); + + //new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.steel, 5)); + //new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.steel, 1)); + + + /* + new Recipe(defense, DefenseBlocks.steelwall, new ItemStack(Items.steel, 12)); new Recipe(defense, DefenseBlocks.titaniumwall, new ItemStack(Items.titanium, 12)); new Recipe(defense, DefenseBlocks.diriumwall, new ItemStack(Items.surgealloy, 12)); @@ -28,27 +58,9 @@ public class Recipes implements ContentList{ new Recipe(defense, DefenseBlocks.phasewall, new ItemStack(Items.titanium, 1)); new Recipe(defense, DefenseBlocks.phasewalllarge, new ItemStack(Items.titanium, 1)); - new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.iron, 1)); - new Recipe(distribution, DistributionBlocks.steelconveyor, new ItemStack(Items.steel, 1)); - new Recipe(distribution, DistributionBlocks.pulseconveyor, new ItemStack(Items.surgealloy, 1)); - new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.iron, 2)); - new Recipe(distribution, DistributionBlocks.multiplexer, new ItemStack(Items.iron, 8)); - new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.iron, 2)); - new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.steel, 2)); - new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.steel, 1)); - new Recipe(distribution, DistributionBlocks.overflowgate, new ItemStack(Items.steel, 1)); - new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.steel, 50)); - new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.steel, 50)); - new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.steel, 5)); - new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.steel, 5)); - new Recipe(distribution, DistributionBlocks.bridgeconveyor, new ItemStack(Items.steel, 5)); - new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.steel, 5)); - new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.steel, 1)); - new Recipe(weapon, WeaponBlocks.duo, new ItemStack(Items.iron, 1)); - new Recipe(weapon, WeaponBlocks.scatter, new ItemStack(Items.iron, 1)); - new Recipe(weapon, WeaponBlocks.scorch, new ItemStack(Items.iron, 1)); - new Recipe(weapon, WeaponBlocks.hail, new ItemStack(Items.iron, 1)); + + new Recipe(weapon, WeaponBlocks.wave, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.lancer, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.arc, new ItemStack(Items.iron, 1)); @@ -139,7 +151,7 @@ public class Recipes implements ContentList{ new Recipe(units, DebugBlocks.itemVoid, new ItemStack(Items.steel, 10)).setDebug(); new Recipe(units, DebugBlocks.liquidSource, new ItemStack(Items.steel, 10)).setDebug(); new Recipe(units, DebugBlocks.powerVoid, new ItemStack(Items.steel, 10)).setDebug(); - new Recipe(units, DebugBlocks.powerInfinite, new ItemStack(Items.steel, 10), new ItemStack(Items.surgealloy, 5)).setDebug(); + new Recipe(units, DebugBlocks.powerInfinite, new ItemStack(Items.steel, 10), new ItemStack(Items.surgealloy, 5)).setDebug();*/ } @Override diff --git a/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java index 38bf5cbf9f..46bdb3d654 100644 --- a/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/DistributionBlocks.java @@ -5,25 +5,20 @@ import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.distribution.*; public class DistributionBlocks extends BlockList implements ContentList{ - public static Block conveyor, steelconveyor, pulseconveyor, router, multiplexer, junction, + public static Block conveyor, titaniumconveyor, router, multiplexer, junction, bridgeconveyor, laserconveyor, sorter, splitter, overflowgate, massdriver; @Override public void load() { conveyor = new Conveyor("conveyor") {{ - health = 40; - speed = 0.02f; + health = 45; + speed = 0.03f; }}; - steelconveyor = new Conveyor("steelconveyor") {{ - health = 55; - speed = 0.04f; - }}; - - pulseconveyor = new Conveyor("poweredconveyor") {{ - health = 75; - speed = 0.09f; + titaniumconveyor = new Conveyor("titanium-conveyor") {{ + health = 65; + speed = 0.07f; }}; router = new Router("router"); diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 81eb23257c..e45a2f9ffd 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -65,7 +65,9 @@ public class Control extends Module{ Core.atlas.setErrorRegion("error"); ContentLoader.initialize(Content::load); - db.load(); + //TODO load database + //not loaded currently for testing + //db.load(); gdxInput = Gdx.input; diff --git a/core/src/io/anuke/mindustry/core/Logic.java b/core/src/io/anuke/mindustry/core/Logic.java index 2a5baedcf7..693bae124b 100644 --- a/core/src/io/anuke/mindustry/core/Logic.java +++ b/core/src/io/anuke/mindustry/core/Logic.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.core; import io.anuke.mindustry.Vars; +import io.anuke.mindustry.content.Items; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.game.EventType.GameOverEvent; @@ -46,16 +47,22 @@ public class Logic extends Module { state.wavetime = wavespace * state.difficulty.timeScaling * 2; //fill inventory with items for debugging - for(TeamData team : state.teams.getTeams()) { + + for (TeamData team : state.teams.getTeams()) { for (Tile tile : team.cores) { - for (Item item : Item.all()) { - if (item.type == ItemType.material) { - tile.entity.items.addItem(item, 1000); + if(debug) { + for (Item item : Item.all()) { + if (item.type == ItemType.material) { + tile.entity.items.addItem(item, 1000); + } } + }else{ + tile.entity.items.addItem(Items.iron, 50); } } } + Events.fire(PlayEvent.class); } diff --git a/core/src/io/anuke/mindustry/ui/fragments/BlockInventoryFragment.java b/core/src/io/anuke/mindustry/ui/fragments/BlockInventoryFragment.java index 087f6337d2..1d6b43ea4d 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/BlockInventoryFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/BlockInventoryFragment.java @@ -48,7 +48,7 @@ public class BlockInventoryFragment implements Fragment { public void showFor(Tile t){ this.tile = t.target(); - if(tile == null || tile.entity == null || !tile.block().isAccessible()) return; + if(tile == null || tile.entity == null || !tile.block().isAccessible() || tile.entity.items.totalItems() == 0) return; rebuild(); } diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index a598f2b434..2cbd4c91ec 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -1,5 +1,7 @@ package io.anuke.mindustry.world.blocks.distribution; +import com.badlogic.gdx.graphics.g2d.TextureRegion; +import com.badlogic.gdx.math.GridPoint2; import com.badlogic.gdx.utils.LongArray; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.entities.TileEntity; @@ -32,6 +34,8 @@ public class Conveyor extends Block{ private final Translator tr1 = new Translator(); private final Translator tr2 = new Translator(); + private final TextureRegion region1 = new TextureRegion(); + private final TextureRegion region2 = new TextureRegion(); protected float speed = 0f; protected float carryCapacity = 8f; @@ -60,9 +64,27 @@ public class Conveyor extends Block{ public void draw(Tile tile){ byte rotation = tile.getRotation(); - Draw.rect(name() + - (Timers.time() % ((20 / 100f) / speed) < (10 / 100f) / speed && acceptItem(Items.stone, tile, null) ? "" : "move"), - tile.worldx(), tile.worldy(), rotation * 90); + GridPoint2 point = Geometry.d4[rotation]; + + int offset = acceptItem(Items.stone, tile, null) ? (int)((Timers.time()/4f)%8) : 0; + TextureRegion region = Draw.region(name); + + region1.setRegion(region, 0, 0, region.getRegionWidth() - offset, region.getRegionHeight()); + region2.setRegion(region, region.getRegionWidth() - offset, 0, offset, region.getRegionHeight()); + + float x = tile.drawx(), y = tile.drawy(); + + if(offset % 2 == 1){ + if(point.x < 0) x += 0.5f; + if(point.y < 0) y += 0.5f; + } + + Draw.rect(region1, + x + (point.x * (tilesize/2f - region1.getRegionWidth()/2f)), + y + (point.y * (tilesize/2f - region1.getRegionWidth()/2f)), rotation * 90); + Draw.rect(region2, + x - (point.x * (tilesize/2f - region2.getRegionWidth()/2f)), + y - (point.y * (tilesize/2f - region2.getRegionWidth()/2f)), rotation * 90); } @Override