diff --git a/core/assets-raw/sprites/blocks/turrets/gatlingturret-heat.png b/core/assets-raw/sprites/blocks/turrets/gatlingturret-heat.png new file mode 100644 index 0000000000..c03179e8a7 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/gatlingturret-heat.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index daa3e52314..b12d2c2647 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -13,42 +13,42 @@ background index: -1 conduit-bottom rotate: false - xy: 590, 178 + xy: 602, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-top rotate: false - xy: 590, 168 + xy: 600, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduittunnel rotate: false - xy: 600, 178 + xy: 612, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyor rotate: false - xy: 612, 188 + xy: 590, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyormove rotate: false - xy: 590, 158 + xy: 600, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyortunnel rotate: false - xy: 600, 168 + xy: 610, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -62,42 +62,42 @@ core index: -1 junction rotate: false - xy: 433, 134 + xy: 453, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidjunction rotate: false - xy: 453, 134 + xy: 473, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter rotate: false - xy: 473, 144 + xy: 443, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-bottom rotate: false - xy: 443, 114 + xy: 453, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-liquid rotate: false - xy: 453, 124 + xy: 463, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-top rotate: false - xy: 463, 134 + xy: 483, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -132,70 +132,70 @@ multiplexer index: -1 poweredconveyor rotate: false - xy: 473, 124 + xy: 483, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 poweredconveyormove rotate: false - xy: 483, 134 + xy: 473, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-bottom rotate: false - xy: 483, 114 + xy: 493, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-top rotate: false - xy: 493, 124 + xy: 493, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 523, 133 + xy: 533, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sortedunloader rotate: false - xy: 583, 116 + xy: 593, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sorter rotate: false - xy: 593, 138 + xy: 593, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 splitter rotate: false - xy: 593, 128 + xy: 603, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelconveyor rotate: false - xy: 603, 138 + xy: 593, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelconveyormove rotate: false - xy: 593, 118 + xy: 603, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -209,7 +209,7 @@ teleporter-top index: -1 unloader rotate: false - xy: 867, 405 + xy: 877, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -223,7 +223,7 @@ vault index: -1 vault-icon rotate: false - xy: 877, 405 + xy: 887, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -237,56 +237,56 @@ weaponfactory index: -1 blackrock1 rotate: false - xy: 139, 6 + xy: 149, 16 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackrockshadow1 rotate: false - xy: 149, 16 + xy: 149, 6 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone1 rotate: false - xy: 149, 6 + xy: 716, 389 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone2 rotate: false - xy: 716, 389 + xy: 726, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone3 rotate: false - xy: 726, 390 + xy: 736, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneblock1 rotate: false - xy: 736, 390 + xy: 746, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneblock2 rotate: false - xy: 746, 390 + xy: 756, 394 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneblock3 rotate: false - xy: 756, 394 + xy: 766, 394 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -300,49 +300,49 @@ blackstoneedge index: -1 coal1 rotate: false - xy: 603, 198 + xy: 613, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal2 rotate: false - xy: 613, 198 + xy: 623, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal3 rotate: false - xy: 623, 198 + xy: 633, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 deepwater rotate: false - xy: 622, 188 + xy: 590, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt1 rotate: false - xy: 590, 148 + xy: 600, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt2 rotate: false - xy: 600, 158 + xy: 610, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt3 rotate: false - xy: 610, 168 + xy: 620, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -356,35 +356,35 @@ dirtedge index: -1 grass1 rotate: false - xy: 610, 148 + xy: 620, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass2 rotate: false - xy: 620, 158 + xy: 630, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass3 rotate: false - xy: 630, 168 + xy: 640, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassblock1 rotate: false - xy: 640, 178 + xy: 620, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassblock2 rotate: false - xy: 620, 148 + xy: 630, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -398,21 +398,21 @@ grassedge index: -1 ice1 rotate: false - xy: 630, 158 + xy: 640, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice2 rotate: false - xy: 640, 168 + xy: 630, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice3 rotate: false - xy: 630, 148 + xy: 640, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -426,70 +426,70 @@ iceedge index: -1 icerock1 rotate: false - xy: 640, 158 + xy: 640, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerock2 rotate: false - xy: 640, 148 + xy: 363, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow1 rotate: false - xy: 363, 113 + xy: 373, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow1 rotate: false - xy: 363, 113 + xy: 373, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow2 rotate: false - xy: 373, 114 + xy: 383, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow2 rotate: false - xy: 373, 114 + xy: 383, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron1 rotate: false - xy: 383, 114 + xy: 393, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron2 rotate: false - xy: 393, 113 + xy: 403, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron3 rotate: false - xy: 403, 113 + xy: 413, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lava rotate: false - xy: 453, 144 + xy: 433, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -503,35 +503,35 @@ lavaedge index: -1 lead1 rotate: false - xy: 443, 134 + xy: 463, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead2 rotate: false - xy: 463, 144 + xy: 433, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 433, 114 + xy: 443, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 mossblock rotate: false - xy: 463, 124 + xy: 473, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oil rotate: false - xy: 473, 134 + xy: 493, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -545,56 +545,56 @@ oiledge index: -1 rock1 rotate: false - xy: 523, 143 + xy: 513, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rock2 rotate: false - xy: 513, 123 + xy: 523, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand1 rotate: false - xy: 533, 133 + xy: 543, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 543, 143 + xy: 533, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 533, 123 + xy: 543, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock1 rotate: false - xy: 543, 133 + xy: 553, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock2 rotate: false - xy: 553, 143 + xy: 543, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock3 rotate: false - xy: 543, 123 + xy: 553, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -608,56 +608,56 @@ sandedge index: -1 shrub rotate: false - xy: 513, 113 + xy: 523, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shrubshadow rotate: false - xy: 523, 113 + xy: 533, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow1 rotate: false - xy: 553, 113 + xy: 563, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 563, 113 + xy: 573, 136 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 573, 136 + xy: 573, 126 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock1 rotate: false - xy: 573, 126 + xy: 573, 116 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock2 rotate: false - xy: 573, 116 + xy: 583, 136 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock3 rotate: false - xy: 583, 136 + xy: 583, 126 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -671,42 +671,42 @@ snowedge index: -1 stone1 rotate: false - xy: 623, 138 + xy: 613, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 613, 118 + xy: 623, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 623, 128 + xy: 633, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock1 rotate: false - xy: 633, 138 + xy: 623, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock2 rotate: false - xy: 623, 118 + xy: 633, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock3 rotate: false - xy: 633, 128 + xy: 643, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -720,49 +720,49 @@ stoneedge index: -1 thorium1 rotate: false - xy: 653, 138 + xy: 653, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium2 rotate: false - xy: 653, 128 + xy: 653, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 653, 118 + xy: 777, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 777, 405 + xy: 787, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 787, 405 + xy: 797, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 797, 405 + xy: 807, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water rotate: false - xy: 907, 405 + xy: 917, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -776,28 +776,28 @@ wateredge index: -1 block-middle rotate: false - xy: 218, 60 + xy: 228, 60 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump-liquid rotate: false - xy: 218, 60 + xy: 228, 60 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-liquid rotate: false - xy: 602, 188 + xy: 590, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 cross-1 rotate: false - xy: 610, 178 + xy: 622, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -825,35 +825,35 @@ cross-4 index: -1 enemyspawn rotate: false - xy: 620, 168 + xy: 630, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 463, 114 + xy: 473, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ripples rotate: false - xy: 921, 415 + xy: 933, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 shadow rotate: false - xy: 933, 415 + xy: 945, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 battery rotate: false - xy: 139, 16 + xy: 129, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -867,14 +867,14 @@ batterylarge index: -1 combustiongenerator rotate: false - xy: 633, 198 + xy: 643, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 combustiongenerator-top rotate: false - xy: 643, 198 + xy: 592, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -944,7 +944,7 @@ largesolarpanel index: -1 liquidcombustiongenerator rotate: false - xy: 443, 124 + xy: 453, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -972,14 +972,14 @@ nuclearreactor-lights index: -1 powerinfinite rotate: false - xy: 473, 114 + xy: 483, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powernode rotate: false - xy: 483, 124 + xy: 493, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -993,28 +993,28 @@ powernodelarge index: -1 powervoid rotate: false - xy: 493, 134 + xy: 483, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtgenerator rotate: false - xy: 533, 143 + xy: 523, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtgenerator-top rotate: false - xy: 523, 123 + xy: 533, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shieldgenerator rotate: false - xy: 553, 123 + xy: 563, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1028,7 +1028,7 @@ shieldprojector index: -1 solarpanel rotate: false - xy: 583, 126 + xy: 583, 116 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1042,14 +1042,14 @@ teleporter index: -1 thermalgenerator rotate: false - xy: 643, 118 + xy: 653, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 alloysmelter rotate: false - xy: 969, 417 + xy: 139, 16 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1154,56 +1154,56 @@ cultivator-top index: -1 extractor rotate: false - xy: 630, 178 + xy: 642, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 fluxpump rotate: false - xy: 642, 188 + xy: 610, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 irondrill rotate: false - xy: 413, 113 + xy: 677, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 irondrill-rotator rotate: false - xy: 677, 281 + xy: 687, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill-rotator rotate: false - xy: 677, 281 + xy: 687, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 irondrill-top rotate: false - xy: 687, 281 + xy: 697, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 itemsource rotate: false - xy: 433, 144 + xy: 443, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 itemvoid rotate: false - xy: 443, 144 + xy: 433, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1231,21 +1231,21 @@ laserdrill-top index: -1 lavasmelter rotate: false - xy: 433, 124 + xy: 443, 134 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidsource rotate: false - xy: 483, 144 + xy: 453, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 melter rotate: false - xy: 453, 114 + xy: 463, 124 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1308,7 +1308,7 @@ oilextractor-top index: -1 oilrefinery rotate: false - xy: 493, 144 + xy: 463, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1392,63 +1392,63 @@ siliconsmelter-top index: -1 pulverizer rotate: false - xy: 493, 114 + xy: 503, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 503, 143 + xy: 503, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump rotate: false - xy: 503, 133 + xy: 513, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 reinforceddrill rotate: false - xy: 513, 143 + xy: 503, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 reinforceddrill-rotator rotate: false - xy: 503, 123 + xy: 513, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 reinforceddrill-top rotate: false - xy: 513, 133 + xy: 523, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator rotate: false - xy: 553, 133 + xy: 563, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator-liquid rotate: false - xy: 563, 143 + xy: 553, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 siliconextractor rotate: false - xy: 533, 113 + xy: 543, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1462,56 +1462,56 @@ siliconsmelter index: -1 smelter rotate: false - xy: 543, 113 + xy: 553, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steeldrill rotate: false - xy: 603, 128 + xy: 613, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steeldrill-rotator rotate: false - xy: 613, 138 + xy: 603, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steeldrill-top rotate: false - xy: 603, 118 + xy: 613, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stonedrill rotate: false - xy: 643, 138 + xy: 633, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneformer rotate: false - xy: 633, 118 + xy: 643, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill rotate: false - xy: 807, 405 + xy: 817, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill-top rotate: false - xy: 817, 405 + xy: 827, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1546,7 +1546,7 @@ waterextractor-top index: -1 block-1 rotate: false - xy: 1013, 411 + xy: 218, 60 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1588,7 +1588,7 @@ chainturret index: -1 doubleturret rotate: false - xy: 600, 148 + xy: 610, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1649,9 +1649,16 @@ gatlingturret orig: 10, 10 offset: 0, 0 index: -1 +gatlingturret-heat + rotate: false + xy: 117, 1 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 laserturret rotate: false - xy: 873, 415 + xy: 885, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1679,35 +1686,35 @@ missileturret index: -1 railgunturret rotate: false - xy: 885, 415 + xy: 897, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 railgunturret-heat rotate: false - xy: 897, 415 + xy: 909, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 repairturret rotate: false - xy: 909, 415 + xy: 921, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 shotgunturret rotate: false - xy: 945, 415 + xy: 957, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 teslaturret rotate: false - xy: 957, 415 + xy: 969, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1763,14 +1770,14 @@ walkerfactory-top-open index: -1 compositewall rotate: false - xy: 592, 188 + xy: 590, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 door rotate: false - xy: 620, 178 + xy: 632, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1791,14 +1798,14 @@ door-large-open index: -1 door-open rotate: false - xy: 632, 188 + xy: 600, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 duriumwall rotate: false - xy: 610, 158 + xy: 620, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1812,14 +1819,14 @@ duriumwall-large index: -1 ironwall rotate: false - xy: 697, 281 + xy: 756, 384 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelwall rotate: false - xy: 613, 128 + xy: 623, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1833,21 +1840,21 @@ steelwall-large index: -1 stonewall rotate: false - xy: 643, 128 + xy: 643, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumshieldwall rotate: false - xy: 827, 405 + xy: 837, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumwall rotate: false - xy: 837, 405 + xy: 847, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1931,91 +1938,91 @@ shell-back index: -1 shot rotate: false - xy: 503, 113 + xy: 513, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-biomatter rotate: false - xy: 756, 384 + xy: 766, 384 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 766, 384 + xy: 653, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-densealloy rotate: false - xy: 653, 198 + xy: 652, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-iron rotate: false - xy: 652, 188 + xy: 650, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 650, 178 + xy: 650, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plastic rotate: false - xy: 650, 168 + xy: 650, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-sand rotate: false - xy: 650, 158 + xy: 650, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 650, 148 + xy: 423, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-steel rotate: false - xy: 423, 143 + xy: 423, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 423, 133 + xy: 423, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 423, 123 + xy: 423, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 423, 113 + xy: 433, 144 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2233,7 +2240,7 @@ icon-admin-small index: -1 icon-areaDelete rotate: false - xy: 117, 1 + xy: 572, 244 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2247,28 +2254,28 @@ icon-arrow index: -1 icon-arrow-down rotate: false - xy: 572, 244 + xy: 318, 67 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-left rotate: false - xy: 318, 67 + xy: 332, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-right rotate: false - xy: 332, 81 + xy: 344, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-up rotate: false - xy: 344, 81 + xy: 356, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2296,7 +2303,7 @@ icon-cancel index: -1 icon-chat rotate: false - xy: 356, 81 + xy: 638, 304 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2331,21 +2338,21 @@ icon-close-over index: -1 icon-crafting rotate: false - xy: 638, 304 + xy: 638, 292 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-cursor rotate: false - xy: 638, 292 + xy: 650, 289 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-defense rotate: false - xy: 650, 289 + xy: 662, 289 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2366,7 +2373,7 @@ icon-discord index: -1 icon-distribution rotate: false - xy: 662, 289 + xy: 644, 277 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2464,14 +2471,14 @@ icon-grid index: -1 icon-hold rotate: false - xy: 644, 277 + xy: 644, 265 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-holdDelete rotate: false - xy: 644, 265 + xy: 656, 277 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2492,7 +2499,7 @@ icon-host index: -1 icon-info rotate: false - xy: 656, 277 + xy: 656, 265 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2520,7 +2527,7 @@ icon-link index: -1 icon-liquid rotate: false - xy: 656, 265 + xy: 713, 333 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2555,14 +2562,14 @@ icon-loading index: -1 icon-logic rotate: false - xy: 713, 333 + xy: 713, 321 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-menu rotate: false - xy: 713, 321 + xy: 713, 309 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2576,14 +2583,14 @@ icon-menu-large index: -1 icon-none rotate: false - xy: 713, 309 + xy: 713, 297 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-pause rotate: false - xy: 713, 297 + xy: 713, 285 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2611,7 +2618,7 @@ icon-pick index: -1 icon-play rotate: false - xy: 713, 285 + xy: 777, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2625,21 +2632,21 @@ icon-play-2 index: -1 icon-players rotate: false - xy: 777, 415 + xy: 789, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-power rotate: false - xy: 789, 415 + xy: 801, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-production rotate: false - xy: 801, 415 + xy: 813, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2730,7 +2737,7 @@ icon-save-map index: -1 icon-settings rotate: false - xy: 813, 415 + xy: 825, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2751,14 +2758,14 @@ icon-tools index: -1 icon-touch rotate: false - xy: 825, 415 + xy: 837, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-touchDelete rotate: false - xy: 837, 415 + xy: 849, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2800,14 +2807,14 @@ icon-undo index: -1 icon-units rotate: false - xy: 849, 415 + xy: 861, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-weapon rotate: false - xy: 861, 415 + xy: 873, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -3043,84 +3050,84 @@ standard-mech-leg index: -1 beam rotate: false - xy: 129, 11 + xy: 129, 1 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 beam-equip rotate: false - xy: 129, 1 + xy: 139, 6 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blaster rotate: false - xy: 766, 394 + xy: 1003, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blaster-equip rotate: false - xy: 1003, 411 + xy: 1013, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 clustergun rotate: false - xy: 228, 60 + xy: 593, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 clustergun-equip rotate: false - xy: 593, 198 + xy: 603, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun rotate: false - xy: 563, 133 + xy: 563, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 563, 123 + xy: 503, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster rotate: false - xy: 847, 405 + xy: 857, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster-equip rotate: false - xy: 857, 405 + xy: 867, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan rotate: false - xy: 887, 405 + xy: 897, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan-equip rotate: false - xy: 897, 405 + xy: 907, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 70c79a89f8..0fb7b4fe9b 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/assets/version.properties b/core/assets/version.properties index e3849613b2..8029da0e9e 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Wed Apr 04 21:11:59 EDT 2018 +#Wed Apr 04 23:49:24 EDT 2018 version=release -androidBuildCode=844 +androidBuildCode=845 name=Mindustry code=3.4 build=custom build diff --git a/core/src/io/anuke/mindustry/content/AmmoTypes.java b/core/src/io/anuke/mindustry/content/AmmoTypes.java index aca979ddc5..96b14b0b69 100644 --- a/core/src/io/anuke/mindustry/content/AmmoTypes.java +++ b/core/src/io/anuke/mindustry/content/AmmoTypes.java @@ -12,5 +12,7 @@ public class AmmoTypes { basicFlame = new AmmoType(Liquids.oil, TurretBullets.basicFlame, 0.3f, 0.9f), - basicLeadFrag = new AmmoType(Items.lead, TurretBullets.basicLeadFragShell, 1, 0.8f); + basicLeadFrag = new AmmoType(Items.lead, TurretBullets.basicLeadFragShell, 1, 0.8f), + + lancerLaser = new AmmoType(TurretBullets.lancerLaser); } diff --git a/core/src/io/anuke/mindustry/content/blocks/WeaponBlocks.java b/core/src/io/anuke/mindustry/content/blocks/WeaponBlocks.java index caddbe6369..adfb6ab431 100644 --- a/core/src/io/anuke/mindustry/content/blocks/WeaponBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/WeaponBlocks.java @@ -4,7 +4,6 @@ import io.anuke.mindustry.content.AmmoTypes; import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.mindustry.resource.AmmoType; import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.blocks.types.defense.LaserTurret; import io.anuke.mindustry.world.blocks.types.defense.Turret; import io.anuke.mindustry.world.blocks.types.defense.turrets.*; import io.anuke.ucore.graphics.Draw; @@ -91,9 +90,14 @@ public class WeaponBlocks{ }; }}, - laserturret = new LaserTurret("laserturret"){ - - }, + laserturret = new PowerTurret("laserturret"){{ + range = 70f; + shootType = AmmoTypes.lancerLaser; + recoil = 2f; + reload = 80f; + shootEffect = BulletFx.lancerLaserShoot; + smokeEffect = BulletFx.lancerLaserShootSmoke; + }}, teslaturret = new PowerTurret("teslaturret"){ diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java index a329a13ce4..43abc754c5 100644 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java @@ -5,8 +5,10 @@ import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.entities.Bullet; import io.anuke.mindustry.entities.BulletType; +import io.anuke.mindustry.entities.effect.DamageArea; import io.anuke.mindustry.graphics.Palette; import io.anuke.ucore.graphics.Draw; +import io.anuke.ucore.graphics.Lines; import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Mathf; @@ -74,16 +76,17 @@ public class TurretBullets { hiteffect = Fx.none; despawneffect = Fx.none; hitsize = 4; + lifetime = 20f; } @Override public void draw(Bullet b) { drawBullet(Palette.bulletYellow, Palette.bulletYellowBack, - "bullet", b.x, b.y, 10f, 1f + b.fract()*11f, b.angle() - 90); + "bullet", b.x, b.y, 7f + b.fract()*3f, 1f + b.fract()*11f, b.angle() - 90); } }, - basicFlame = new BulletType(2f, 4) { + basicFlame = new BulletType(2f, 0) { { hitsize = 7f; lifetime = 30f; @@ -95,6 +98,39 @@ public class TurretBullets { @Override public void draw(Bullet b) {} + }, + + lancerLaser = new BulletType(0.001f, 1) { + Color[] colors = {Palette.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Palette.lancerLaser, Color.WHITE}; + float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; + float[] lenscales = {1f, 1.1f, 1.13f, 1.14f}; + float length = 70f; + + { + hiteffect = BulletFx.hitLancer; + despawneffect = Fx.none; + hitsize = 4; + lifetime = 12f; + pierce = true; + } + + @Override + public void init(Bullet b) { + DamageArea.collideLine(b, b.team, hiteffect, b.x, b.y, b.angle(), length); + } + + @Override + public void draw(Bullet b) { + Lines.lineAngle(b.x, b.y, b.angle(), length); + for(int s = 0; s < 3; s ++) { + Draw.color(colors[s]); + for (int i = 0; i < tscales.length; i++) { + Lines.stroke(7f * b.fract() * (s == 0 ? 1.5f : s == 1 ? 1f : 0.3f) * tscales[i]); + Lines.lineAngle(b.x, b.y, b.angle(), length * lenscales[i]); + } + } + Draw.reset(); + } }; private static void drawBullet(Color first, Color second, String name, float x, float y, float w, float h, float rot){ diff --git a/core/src/io/anuke/mindustry/content/fx/BulletFx.java b/core/src/io/anuke/mindustry/content/fx/BulletFx.java index c5eba925d6..db99726ab9 100644 --- a/core/src/io/anuke/mindustry/content/fx/BulletFx.java +++ b/core/src/io/anuke/mindustry/content/fx/BulletFx.java @@ -80,7 +80,7 @@ public class BulletFx { Draw.reset(); }), - shellEjectSmall = new StaticEffect(30f, 300f, e -> { + shellEjectSmall = new StaticEffect(30f, 400f, e -> { Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.ifract()); float rot = e.rotation + 90f; for(int i : Mathf.signs){ @@ -95,7 +95,7 @@ public class BulletFx { Draw.color(); }), - shellEjectMedium = new StaticEffect(34f, 300f, e -> { + shellEjectMedium = new StaticEffect(34f, 400f, e -> { Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.ifract()); float rot = e.rotation + 90f; for(int i : Mathf.signs){ @@ -118,7 +118,7 @@ public class BulletFx { Draw.color(); }), - shellEjectBig = new StaticEffect(22f, 300f, e -> { + shellEjectBig = new StaticEffect(22f, 400f, e -> { Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.ifract()); float rot = e.rotation + 90f; for(int i : Mathf.signs){ @@ -178,6 +178,18 @@ public class BulletFx { Draw.reset(); }), + hitLancer = new Effect(12, e -> { + Draw.color(Color.WHITE); + Lines.stroke(e.fract()*1.5f); + + Angles.randLenVectors(e.id, 8, e.powfract()*17f, e.rotation, 360f, (x, y) -> { + float ang = Mathf.atan2(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fract()*4 + 1f); + }); + + Draw.reset(); + }), + despawn = new Effect(12, e -> { Draw.color(Palette.lighterOrange, Color.GRAY, e.ifract()); Lines.stroke(e.fract()); @@ -211,6 +223,26 @@ public class BulletFx { Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), 1f + e.fract()*3f); }); + Draw.reset(); + }), + + lancerLaserShoot = new Effect(12f, e -> { + Draw.color(Palette.lancerLaser); + + for(int i : Mathf.signs){ + Shapes.tri(e.x, e.y, 4f * e.fract(), 29f, e.rotation + 90f*i); + } + + Draw.reset(); + }), + + lancerLaserShootSmoke = new Effect(20f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 7, 80f, e.rotation, 0f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), e.fract()*9f); + }); + Draw.reset(); }); } diff --git a/core/src/io/anuke/mindustry/entities/Unit.java b/core/src/io/anuke/mindustry/entities/Unit.java index 221d3963e5..881508a9c2 100644 --- a/core/src/io/anuke/mindustry/entities/Unit.java +++ b/core/src/io/anuke/mindustry/entities/Unit.java @@ -5,7 +5,7 @@ import io.anuke.mindustry.game.Team; public abstract class Unit extends SyncEntity { //total duration of hit effect - public static final float hitDuration = 5f; + public static final float hitDuration = 9f; public Team team = Team.blue; public Vector2 velocity = new Vector2(); diff --git a/core/src/io/anuke/mindustry/entities/effect/DamageArea.java b/core/src/io/anuke/mindustry/entities/effect/DamageArea.java index 7ce4e36cf3..a47571bf49 100644 --- a/core/src/io/anuke/mindustry/entities/effect/DamageArea.java +++ b/core/src/io/anuke/mindustry/entities/effect/DamageArea.java @@ -8,6 +8,7 @@ import io.anuke.mindustry.game.Team; import io.anuke.mindustry.world.Tile; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Effects.Effect; +import io.anuke.ucore.entities.SolidEntity; import io.anuke.ucore.function.Consumer; import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Physics; @@ -23,7 +24,7 @@ public class DamageArea{ /**Damages entities in a line. * Only enemies of the specified team are damaged.*/ - public static void damageLine(Team team, Effect effect, float x, float y, float angle, float length, int damage){ + public static void collideLine(SolidEntity hitter, Team team, Effect effect, float x, float y, float angle, float length){ tr.trns(angle, length); rect.setPosition(x, y).setSize(tr.x, tr.y); float x2 = tr.x + x, y2 = tr.y + y; @@ -56,7 +57,8 @@ public class DamageArea{ if (vec != null) { Effects.effect(effect, vec.x, vec.y); - e.damage(damage); + e.collision(hitter, vec.x, vec.y); + hitter.collision(e, vec.x, vec.y); } }; diff --git a/core/src/io/anuke/mindustry/entities/effect/StaticEffectEntity.java b/core/src/io/anuke/mindustry/entities/effect/StaticEffectEntity.java index 66b0894168..6539f9a59c 100644 --- a/core/src/io/anuke/mindustry/entities/effect/StaticEffectEntity.java +++ b/core/src/io/anuke/mindustry/entities/effect/StaticEffectEntity.java @@ -31,7 +31,7 @@ public class StaticEffectEntity extends EffectEntity { @Override public void drawOver(){ - if(once) Effects.renderEffect(id, renderer, color, once ? lifetime : time, rotation, x, y); + if(once) Effects.renderEffect(id, renderer, color, lifetime, rotation, x, y); } public static class StaticEffect extends Effect{ diff --git a/core/src/io/anuke/mindustry/graphics/Palette.java b/core/src/io/anuke/mindustry/graphics/Palette.java index 75afaa607e..fa92c8796b 100644 --- a/core/src/io/anuke/mindustry/graphics/Palette.java +++ b/core/src/io/anuke/mindustry/graphics/Palette.java @@ -15,4 +15,6 @@ public class Palette { public static final Color lighterOrange = Color.valueOf("f6e096"); public static final Color lightishGray = Color.valueOf("a2a2a2"); + + public static final Color lancerLaser = Color.valueOf("a9d8ff"); } diff --git a/core/src/io/anuke/mindustry/resource/AmmoType.java b/core/src/io/anuke/mindustry/resource/AmmoType.java index cc6dc24d00..d2528391d8 100644 --- a/core/src/io/anuke/mindustry/resource/AmmoType.java +++ b/core/src/io/anuke/mindustry/resource/AmmoType.java @@ -25,6 +25,14 @@ public class AmmoType { allTypes.add(this); } + public AmmoType(BulletType result){ + this.item = null; + this.liquid = null; + this.bullet = result; + this.quantityMultiplier = 1f; + this.speedMultiplier = 1f; + } + public AmmoType(Item item, BulletType result, float multiplier, float speedMultiplier){ this.item = item; this.liquid = null; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java deleted file mode 100644 index 61ee5aa804..0000000000 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java +++ /dev/null @@ -1,73 +0,0 @@ -package io.anuke.mindustry.world.blocks.types.defense; - -import com.badlogic.gdx.graphics.Color; -import com.badlogic.gdx.math.MathUtils; -import io.anuke.mindustry.entities.Unit; -import io.anuke.mindustry.graphics.Layer; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.types.defense.turrets.PowerTurret; -import io.anuke.ucore.core.Effects; -import io.anuke.ucore.core.Effects.Effect; -import io.anuke.ucore.core.Timers; -import io.anuke.ucore.graphics.Draw; -import io.anuke.ucore.graphics.Lines; -import io.anuke.ucore.util.Angles; -import io.anuke.ucore.util.Mathf; -import io.anuke.ucore.util.Tmp; - -public class LaserTurret extends PowerTurret { - protected Color beamColor = Color.WHITE.cpy(); - protected Effect hiteffect = Fx.none; - protected int damage = 4; - protected float cone = 15f; - - public LaserTurret(String name) { - super(name); - shootsound = null; - layer2 = Layer.laser; - //soundReload = 20; - } - - @Override - public void updateShooting(Tile tile){ - TurretEntity entity = tile.entity(); - Unit enemy = entity.target; - - if(Angles.angleDist(entity.rotation, Angles.angle(tile.drawx(), tile.drawy(), enemy.x, enemy.y)) < cone){ - enemy.damage(damage); - Effects.effect(hiteffect, enemy.x + Mathf.range(3), enemy.y + Mathf.range(3)); - } - } - - @Override - public void drawLayer2(Tile tile){ - TurretEntity entity = tile.entity(); - Unit enemy = entity.target; - - if(enemy != null && - Angles.angleDist(entity.rotation, Angles.angle(tile.drawx(), tile.drawy(), enemy.x, enemy.y)) <= cone){ - float len = 4f; - - float x = tile.drawx() + Angles.trnsx(entity.rotation, len), y = tile.drawy() + Angles.trnsy(entity.rotation, len); - float x2 = enemy.x, y2 = enemy.y; - - float lighten = (MathUtils.sin(Timers.time()/1.2f) + 1f) / 10f; - - Draw.color(Tmp.c1.set(beamColor).mul(1f + lighten, 1f + lighten, 1f + lighten, 1f)); - Draw.alpha(0.3f); - Lines.stroke(4f); - Lines.line(x, y, x2, y2); - Lines.stroke(2f); - Draw.rect("circle", x2, y2, 7f, 7f); - Draw.alpha(1f); - Lines.stroke(2f); - Lines.line(x, y, x2, y2); - Lines.stroke(1f); - Draw.rect("circle", x2, y2, 5f, 5f); - - } - - Draw.reset(); - } -} diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java index 50056fffc5..df7a7d79bd 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java @@ -49,6 +49,14 @@ public abstract class Turret extends Block{ protected Translator tr2 = new Translator(); protected String base = null; //name of the region to draw under turret, usually null protected BiConsumer drawer = (tile, entity) -> Draw.rect(name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); + protected BiConsumer heatDrawer = (tile, entity) ->{ + Graphics.setAdditiveBlending(); + Draw.color(Palette.turretHeat); + Draw.alpha(entity.heat); + Draw.rect(name + "-heat", tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); + Graphics.setNormalBlending(); + }; + protected Effect shootEffect = Fx.none; protected Effect smokeEffect = Fx.none; @@ -101,11 +109,7 @@ public abstract class Turret extends Block{ drawer.accept(tile, entity); if(Draw.hasRegion(name + "-heat")){ - Graphics.setAdditiveBlending(); - Draw.color(Palette.turretHeat); - Draw.alpha(entity.heat); - Draw.rect(name + "-heat", tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90); - Graphics.setNormalBlending(); + heatDrawer.accept(tile, entity); } Draw.color(); @@ -144,9 +148,11 @@ public abstract class Turret extends Block{ if(entity.target != null){ AmmoType type = peekAmmo(tile); + float speed = type.bullet.speed; + if(speed < 0.1f) speed = 9999999f; float targetRot = Angles.predictAngle(tile.worldx(), tile.worldy(), - entity.target.x, entity.target.y, entity.target.velocity.x, entity.target.velocity.y, type.bullet.speed); + entity.target.x, entity.target.y, entity.target.velocity.x, entity.target.velocity.y, speed); if(Float.isNaN(entity.rotation)){ entity.rotation = 0; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/turrets/PowerTurret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/turrets/PowerTurret.java index 412e2bbbf8..6b51f881ee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/turrets/PowerTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/turrets/PowerTurret.java @@ -6,7 +6,8 @@ import io.anuke.mindustry.world.blocks.types.defense.Turret; import io.anuke.ucore.util.Strings; public abstract class PowerTurret extends Turret { - public float powerUsed = 0.5f; + protected float powerUsed = 0.5f; + protected AmmoType shootType; public PowerTurret(String name) { super(name); @@ -21,12 +22,17 @@ public abstract class PowerTurret extends Turret { @Override public boolean hasAmmo(Tile tile){ - return tile.entity.power.amount >= powerUsed && super.hasAmmo(tile); + return tile.entity.power.amount >= powerUsed; } @Override public AmmoType useAmmo(Tile tile){ tile.entity.power.amount -= powerUsed; - return super.useAmmo(tile); + return shootType; + } + + @Override + public AmmoType peekAmmo(Tile tile) { + return shootType; } }