diff --git a/core/assets-raw/sprites/blocks/nuclearreactor-center.png b/core/assets-raw/sprites/blocks/nuclearreactor-center.png new file mode 100644 index 0000000000..5b5a2688cc Binary files /dev/null and b/core/assets-raw/sprites/blocks/nuclearreactor-center.png differ diff --git a/core/assets-raw/sprites/blocks/nuclearreactor-lights.png b/core/assets-raw/sprites/blocks/nuclearreactor-lights.png new file mode 100644 index 0000000000..69a28b33df Binary files /dev/null and b/core/assets-raw/sprites/blocks/nuclearreactor-lights.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index cb64244d5c..a7cbbbde79 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -13,77 +13,77 @@ backgrounds/background index: -1 blank rotate: false - xy: 232, 1 + xy: 231, 30 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 blocks/blackrock1 rotate: false - xy: 450, 480 + xy: 401, 234 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackrockshadow1 rotate: false - xy: 348, 231 + xy: 401, 224 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone1 rotate: false - xy: 348, 221 + xy: 450, 480 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone2 rotate: false - xy: 450, 470 + xy: 348, 231 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone3 rotate: false - xy: 312, 73 + xy: 450, 470 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock1 rotate: false - xy: 439, 377 + xy: 348, 221 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock2 rotate: false - xy: 439, 367 + xy: 317, 173 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock3 rotate: false - xy: 449, 379 + xy: 315, 163 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneedge rotate: false - xy: 234, 60 + xy: 263, 8 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/block rotate: false - xy: 439, 357 + xy: 496, 435 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -104,112 +104,112 @@ blocks/block-3x3 index: -1 blocks/chainturret rotate: false - xy: 212, 15 + xy: 228, 128 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/chainturret-icon rotate: false - xy: 411, 244 + xy: 456, 425 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/coal1 rotate: false - xy: 437, 347 + xy: 490, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal2 rotate: false - xy: 437, 337 + xy: 488, 415 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal3 rotate: false - xy: 437, 327 + xy: 488, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coaldrill rotate: false - xy: 437, 317 + xy: 488, 395 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator rotate: false - xy: 426, 218 + xy: 500, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalpurifier rotate: false - xy: 459, 379 + xy: 498, 415 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/combustiongenerator rotate: false - xy: 459, 369 + xy: 498, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/compositewall rotate: false - xy: 459, 359 + xy: 498, 395 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduit rotate: false - xy: 436, 220 + xy: 488, 385 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitbottom rotate: false - xy: 480, 431 + xy: 498, 385 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitliquid rotate: false - xy: 468, 422 + xy: 487, 375 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduittop rotate: false - xy: 478, 421 + xy: 487, 365 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyor rotate: false - xy: 464, 412 + xy: 497, 375 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyormove rotate: false - xy: 464, 402 + xy: 497, 365 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -223,294 +223,294 @@ blocks/core index: -1 blocks/cross rotate: false - xy: 464, 392 + xy: 312, 140 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/crucible rotate: false - xy: 474, 411 + xy: 312, 130 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/deepwater rotate: false - xy: 474, 401 + xy: 312, 120 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt1 rotate: false - xy: 474, 391 + xy: 314, 110 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt2 rotate: false - xy: 494, 435 + xy: 314, 100 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt3 rotate: false - xy: 327, 145 + xy: 314, 90 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirtblock rotate: false - xy: 443, 234 + xy: 314, 80 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirtedge rotate: false - xy: 423, 242 + xy: 277, 8 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/doubleturret rotate: false - xy: 470, 453 + xy: 470, 439 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/duriumwall rotate: false - xy: 484, 411 + xy: 314, 70 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/duriumwall-large rotate: false - xy: 419, 272 + xy: 228, 110 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/duriumwall-large-icon rotate: false - xy: 484, 401 + xy: 314, 60 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/flameturret rotate: false - xy: 456, 425 + xy: 452, 401 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/fluxpump rotate: false - xy: 488, 421 + xy: 314, 40 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass1 rotate: false - xy: 494, 411 + xy: 314, 30 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass2 rotate: false - xy: 494, 401 + xy: 325, 209 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass3 rotate: false - xy: 494, 391 + xy: 325, 199 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock-edge-0 rotate: false - xy: 324, 113 + xy: 345, 211 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock-edge-1 rotate: false - xy: 324, 103 + xy: 335, 201 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock-edge-2 rotate: false - xy: 324, 93 + xy: 335, 191 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock-edge-3 rotate: false - xy: 324, 83 + xy: 345, 201 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock1 rotate: false - xy: 324, 133 + xy: 325, 189 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock2 rotate: false - xy: 324, 123 + xy: 335, 211 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassedge rotate: false - xy: 384, 214 + xy: 411, 229 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/iron1 rotate: false - xy: 489, 381 + xy: 375, 206 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron2 rotate: false - xy: 479, 361 + xy: 375, 196 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron3 rotate: false - xy: 489, 371 + xy: 385, 206 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/irondrill rotate: false - xy: 489, 361 + xy: 385, 196 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ironwall rotate: false - xy: 499, 381 + xy: 375, 186 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/junction rotate: false - xy: 499, 371 + xy: 385, 186 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/laserturret rotate: false - xy: 437, 244 + xy: 464, 389 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/lava rotate: false - xy: 499, 361 + xy: 437, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/lavaedge rotate: false - xy: 398, 214 + xy: 425, 229 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/lavasmelter rotate: false - xy: 446, 224 + xy: 437, 341 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquiditemjunction rotate: false - xy: 446, 214 + xy: 437, 331 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidjunction rotate: false - xy: 436, 210 + xy: 437, 321 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidrouter rotate: false - xy: 432, 200 + xy: 437, 311 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/machineturret rotate: false - xy: 431, 230 + xy: 463, 377 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/megarepairturret rotate: false - xy: 384, 202 + xy: 463, 365 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mortarturret rotate: false - xy: 396, 202 + xy: 468, 425 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mossblock rotate: false - xy: 349, 205 + xy: 437, 291 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/mossstone rotate: false - xy: 349, 205 + xy: 437, 291 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -522,541 +522,555 @@ blocks/nuclearreactor orig: 24, 24 offset: 0, 0 index: -1 -blocks/nuclearreactor-icon - rotate: false - xy: 349, 185 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/nuclearreactor-small - rotate: false - xy: 228, 128 - size: 16, 16 - orig: 16, 16 - offset: 0, 0 - index: -1 -blocks/oil - rotate: false - xy: 349, 175 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/oiledge - rotate: false - xy: 412, 214 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -blocks/oilrefinery - rotate: false - xy: 359, 208 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/omnidrill - rotate: false - xy: 359, 198 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/plasmaturret - rotate: false - xy: 408, 202 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -blocks/powerbooster - rotate: false - xy: 359, 188 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/poweredconveyor - rotate: false - xy: 359, 178 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/poweredconveyormove - rotate: false - xy: 369, 198 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/powerlaser - rotate: false - xy: 369, 188 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/powerlaserrouter - rotate: false - xy: 369, 178 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/pulseconduit - rotate: false - xy: 379, 192 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/pulseconduitbottom - rotate: false - xy: 379, 182 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/pulseconduittop - rotate: false - xy: 389, 192 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/pump - rotate: false - xy: 389, 182 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/repairturret - rotate: false - xy: 420, 202 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -blocks/rock1 - rotate: false - xy: 399, 182 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/rock2 - rotate: false - xy: 409, 192 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/rockshadow1 - rotate: false - xy: 409, 182 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/rockshadow2 - rotate: false - xy: 419, 192 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/router - rotate: false - xy: 419, 182 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/rtgenerator - rotate: false - xy: 429, 190 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/shadow - rotate: false - xy: 315, 143 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -blocks/shieldgenerator - rotate: false - xy: 379, 172 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/shotgunturret - rotate: false - xy: 312, 131 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -blocks/shrub - rotate: false - xy: 409, 172 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/shrubshadow - rotate: false - xy: 419, 172 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/smelter - rotate: false - xy: 429, 170 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/sniperturret - rotate: false - xy: 312, 119 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -blocks/sorter - rotate: false - xy: 439, 190 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/steelconveyor - rotate: false - xy: 439, 180 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/steelconveyormove - rotate: false - xy: 439, 170 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/steelwall - rotate: false - xy: 359, 168 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/steelwall-large - rotate: false - xy: 228, 110 - size: 16, 16 - orig: 16, 16 - offset: 0, 0 - index: -1 -blocks/steelwall-large-icon - rotate: false - xy: 369, 168 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stone - rotate: false - xy: 474, 465 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -blocks/stone1 - rotate: false - xy: 349, 165 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stone2 - rotate: false - xy: 331, 155 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stone3 - rotate: false - xy: 379, 162 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock-edge-0 - rotate: false - xy: 419, 162 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock-edge-1 - rotate: false - xy: 429, 160 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock-edge-2 - rotate: false - xy: 439, 160 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock-edge-3 - rotate: false - xy: 337, 145 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock-smooth1 - rotate: false - xy: 334, 135 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock1 - rotate: false - xy: 389, 162 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock2 - rotate: false - xy: 399, 162 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneblock3 - rotate: false - xy: 409, 162 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stonedrill - rotate: false - xy: 334, 125 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stoneedge - rotate: false - xy: 456, 451 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -blocks/stoneformer - rotate: false - xy: 334, 115 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/stonewall - rotate: false - xy: 334, 105 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/teleporter - rotate: false - xy: 334, 95 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/teleporter-top - rotate: false - xy: 334, 85 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/thermalgenerator - rotate: false - xy: 341, 155 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/titancannon +blocks/nuclearreactor-center rotate: false xy: 411, 309 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 -blocks/titancannon-icon +blocks/nuclearreactor-icon rotate: false - xy: 312, 107 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -blocks/titanium1 - rotate: false - xy: 351, 155 + xy: 437, 271 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/titanium2 +blocks/nuclearreactor-lights rotate: false - xy: 347, 145 - size: 8, 8 - orig: 8, 8 + xy: 411, 283 + size: 24, 24 + orig: 24, 24 offset: 0, 0 index: -1 -blocks/titanium3 +blocks/nuclearreactor-small rotate: false - xy: 344, 135 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/titaniumdrill - rotate: false - xy: 344, 125 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/titaniumpurifier - rotate: false - xy: 344, 115 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/titaniumshieldwall - rotate: false - xy: 344, 105 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/titaniumwall - rotate: false - xy: 344, 95 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -blocks/titaniumwall-large - rotate: false - xy: 230, 74 + xy: 246, 128 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 -blocks/titaniumwall-large-icon +blocks/oil rotate: false - xy: 344, 85 + xy: 437, 261 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/turret +blocks/oiledge rotate: false - xy: 312, 95 + xy: 460, 465 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +blocks/oilrefinery + rotate: false + xy: 437, 251 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/omnidrill + rotate: false + xy: 451, 355 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/plasmaturret + rotate: false + xy: 496, 445 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 -blocks/uranium1 +blocks/powerbooster rotate: false - xy: 354, 135 + xy: 461, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/uranium2 +blocks/poweredconveyor rotate: false - xy: 354, 125 + xy: 471, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/uranium3 +blocks/poweredconveyormove rotate: false - xy: 354, 115 + xy: 481, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/uraniumdrill +blocks/powerlaser rotate: false - xy: 354, 105 + xy: 491, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/water +blocks/powerlaserrouter rotate: false - xy: 354, 95 + xy: 447, 345 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/wateredge +blocks/pulseconduit + rotate: false + xy: 447, 335 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/pulseconduitbottom + rotate: false + xy: 457, 345 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/pulseconduittop + rotate: false + xy: 447, 325 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/pump + rotate: false + xy: 457, 335 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/repairturret + rotate: false + xy: 484, 441 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +blocks/rock1 + rotate: false + xy: 447, 315 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/rock2 + rotate: false + xy: 457, 325 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/rockshadow1 + rotate: false + xy: 467, 335 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/rockshadow2 + rotate: false + xy: 477, 345 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/router + rotate: false + xy: 447, 305 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/rtgenerator + rotate: false + xy: 457, 315 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/shadow + rotate: false + xy: 435, 217 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +blocks/shieldgenerator + rotate: false + xy: 477, 335 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/shotgunturret + rotate: false + xy: 476, 413 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +blocks/shrub + rotate: false + xy: 457, 305 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/shrubshadow + rotate: false + xy: 467, 315 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/smelter + rotate: false + xy: 477, 325 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/sniperturret + rotate: false + xy: 476, 401 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +blocks/sorter + rotate: false + xy: 487, 335 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/steelconveyor + rotate: false + xy: 447, 285 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/steelconveyormove + rotate: false + xy: 457, 295 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/steelwall + rotate: false + xy: 467, 305 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/steelwall-large + rotate: false + xy: 246, 110 + size: 16, 16 + orig: 16, 16 + offset: 0, 0 + index: -1 +blocks/steelwall-large-icon + rotate: false + xy: 477, 315 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stone + rotate: false + xy: 456, 451 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +blocks/stone1 + rotate: false + xy: 487, 325 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stone2 + rotate: false + xy: 447, 275 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stone3 + rotate: false + xy: 457, 285 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock-edge-0 + rotate: false + xy: 447, 265 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock-edge-1 + rotate: false + xy: 457, 275 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock-edge-2 + rotate: false + xy: 467, 285 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock-edge-3 + rotate: false + xy: 477, 295 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock-smooth1 + rotate: false + xy: 487, 305 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock1 + rotate: false + xy: 467, 295 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock2 + rotate: false + xy: 477, 305 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneblock3 + rotate: false + xy: 487, 315 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stonedrill + rotate: false + xy: 447, 255 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stoneedge rotate: false xy: 456, 437 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 +blocks/stoneformer + rotate: false + xy: 457, 265 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/stonewall + rotate: false + xy: 467, 275 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/teleporter + rotate: false + xy: 477, 285 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/teleporter-top + rotate: false + xy: 487, 295 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/thermalgenerator + rotate: false + xy: 457, 255 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titancannon + rotate: false + xy: 411, 257 + size: 24, 24 + orig: 24, 24 + offset: 0, 0 + index: -1 +blocks/titancannon-icon + rotate: false + xy: 476, 389 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +blocks/titanium1 + rotate: false + xy: 467, 265 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titanium2 + rotate: false + xy: 477, 275 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titanium3 + rotate: false + xy: 487, 285 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titaniumdrill + rotate: false + xy: 467, 255 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titaniumpurifier + rotate: false + xy: 477, 265 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titaniumshieldwall + rotate: false + xy: 487, 275 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titaniumwall + rotate: false + xy: 477, 255 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/titaniumwall-large + rotate: false + xy: 248, 74 + size: 16, 16 + orig: 16, 16 + offset: 0, 0 + index: -1 +blocks/titaniumwall-large-icon + rotate: false + xy: 487, 265 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/turret + rotate: false + xy: 475, 377 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +blocks/uranium1 + rotate: false + xy: 497, 345 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/uranium2 + rotate: false + xy: 497, 335 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/uranium3 + rotate: false + xy: 497, 325 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/uraniumdrill + rotate: false + xy: 497, 315 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/water + rotate: false + xy: 497, 305 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/wateredge + rotate: false + xy: 470, 451 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 blocks/waveturret rotate: false - xy: 312, 83 + xy: 475, 365 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 bullet rotate: false - xy: 449, 359 + xy: 480, 425 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 chainbullet rotate: false - xy: 470, 432 + xy: 206, 1 size: 8, 7 orig: 8, 7 offset: 0, 0 index: -1 circle rotate: false - xy: 419, 290 + xy: 212, 14 size: 17, 17 orig: 17, 17 offset: 0, 0 @@ -1070,112 +1084,112 @@ circle2 index: -1 enemies/blastenemy-t1 rotate: false - xy: 248, 94 + xy: 385, 228 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/blastenemy-t2 rotate: false - xy: 248, 78 + xy: 264, 134 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/blastenemy-t3 rotate: false - xy: 385, 228 + xy: 264, 118 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/empenemy-t1 rotate: false - xy: 264, 134 + xy: 280, 134 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/empenemy-t2 rotate: false - xy: 264, 118 + xy: 280, 118 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/empenemy-t3 rotate: false - xy: 280, 134 + xy: 296, 134 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/enemy-t1 rotate: false - xy: 264, 102 + xy: 296, 118 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/targetenemy-t1 rotate: false - xy: 264, 102 + xy: 296, 118 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/enemy-t2 rotate: false - xy: 417, 228 + xy: 291, 8 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 enemies/enemy-t3 rotate: false - xy: 358, 218 + xy: 305, 8 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 enemies/fastenemy-t1 rotate: false - xy: 280, 118 + xy: 234, 58 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/fastenemy-t2 rotate: false - xy: 296, 134 + xy: 234, 42 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/fastenemy-t3 rotate: false - xy: 264, 86 + xy: 250, 58 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/flamerenemy-t1 rotate: false - xy: 280, 102 + xy: 250, 42 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/flamerenemy-t2 rotate: false - xy: 296, 118 + xy: 234, 26 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/flamerenemy-t3 rotate: false - xy: 280, 86 + xy: 250, 26 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1203,161 +1217,161 @@ enemies/fortressenemy-t3 index: -1 enemies/healerenemy-t1 rotate: false - xy: 296, 102 + xy: 231, 10 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/healerenemy-t2 rotate: false - xy: 296, 86 + xy: 247, 10 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/healerenemy-t3 rotate: false - xy: 317, 203 + xy: 266, 102 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/mortarenemy-t1 rotate: false - xy: 280, 70 + xy: 282, 38 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/mortarenemy-t2 rotate: false - xy: 296, 70 + xy: 298, 102 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/mortarenemy-t3 rotate: false - xy: 248, 62 + xy: 298, 86 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/rapidenemy-t1 rotate: false - xy: 234, 44 + xy: 298, 70 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/rapidenemy-t2 rotate: false - xy: 250, 46 + xy: 298, 54 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/rapidenemy-t3 rotate: false - xy: 234, 28 + xy: 298, 38 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/tankenemy-t1 rotate: false - xy: 250, 30 + xy: 266, 22 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/tankenemy-t2 rotate: false - xy: 411, 256 + xy: 282, 22 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/tankenemy-t3 rotate: false - xy: 427, 256 + xy: 298, 22 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/titanenemy-t1 rotate: false - xy: 246, 128 + xy: 230, 92 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 enemies/titanenemy-t2 rotate: false - xy: 246, 110 + xy: 230, 74 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 enemies/titanenemy-t3 rotate: false - xy: 230, 92 + xy: 248, 92 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 enemyarrow rotate: false - xy: 312, 64 + xy: 228, 1 size: 8, 7 orig: 8, 7 offset: 0, 0 index: -1 icon-coal rotate: false - xy: 322, 73 + xy: 345, 191 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-dirium rotate: false - xy: 322, 63 + xy: 355, 210 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-iron rotate: false - xy: 469, 381 + xy: 365, 210 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-steel rotate: false - xy: 469, 371 + xy: 355, 200 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-stone rotate: false - xy: 479, 381 + xy: 365, 200 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-titanium rotate: false - xy: 469, 361 + xy: 355, 190 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-uranium rotate: false - xy: 479, 371 + xy: 365, 190 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1378,35 +1392,35 @@ laserend index: -1 mechs/player rotate: false - xy: 460, 465 + xy: 474, 465 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shell rotate: false - xy: 429, 180 + xy: 467, 325 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 389, 172 + xy: 487, 345 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 399, 172 + xy: 447, 295 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 361, 158 + xy: 487, 255 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1498,42 +1512,42 @@ ui/check-over index: -1 ui/clear rotate: false - xy: 372, 220 + xy: 452, 413 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/cursor rotate: false - xy: 349, 215 + xy: 507, 379 size: 4, 4 orig: 4, 4 offset: 0, 0 index: -1 ui/icon-arrow-left rotate: false - xy: 452, 413 + xy: 452, 389 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-arrow-right rotate: false - xy: 470, 441 + xy: 358, 220 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-cancel rotate: false - xy: 317, 187 + xy: 266, 86 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-check rotate: false - xy: 333, 205 + xy: 282, 102 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1561,133 +1575,133 @@ ui/icon-close-over index: -1 ui/icon-crafting rotate: false - xy: 452, 401 + xy: 370, 220 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-cursor rotate: false - xy: 452, 389 + xy: 216, 2 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-defense rotate: false - xy: 482, 453 + xy: 484, 453 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-distribution rotate: false - xy: 482, 441 + xy: 496, 457 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-info rotate: false - xy: 230, 16 + xy: 439, 375 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-load rotate: false - xy: 333, 189 + xy: 266, 70 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-menu rotate: false - xy: 232, 4 + xy: 439, 363 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-pause rotate: false - xy: 242, 16 + xy: 451, 377 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-play rotate: false - xy: 254, 18 + xy: 451, 365 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-play-2 rotate: false - xy: 317, 171 + xy: 282, 86 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-power rotate: false - xy: 244, 4 + xy: 411, 217 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-production rotate: false - xy: 372, 208 + xy: 423, 217 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-rotate rotate: false - xy: 333, 173 + xy: 266, 54 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-rotate-arrow rotate: false - xy: 315, 155 + xy: 282, 70 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-settings rotate: false - xy: 494, 457 + xy: 382, 216 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-tools rotate: false - xy: 401, 228 + xy: 266, 38 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-touch rotate: false - xy: 494, 445 + xy: 464, 413 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-tutorial rotate: false - xy: 264, 70 + xy: 282, 54 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-weapon rotate: false - xy: 256, 6 + xy: 464, 401 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1741,7 +1755,7 @@ ui/scroll-horizontal index: -1 ui/scroll-knob-horizontal rotate: false - xy: 411, 273 + xy: 317, 183 size: 6, 34 split: 2, 2, 0, 34 pad: 0, 5, 13, 12 @@ -1758,21 +1772,21 @@ ui/scroll-knob-vertical index: -1 ui/selection rotate: false - xy: 491, 466 + xy: 263, 23 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 ui/separator rotate: false - xy: 312, 147 + xy: 228, 11 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 ui/slider rotate: false - xy: 490, 431 + xy: 506, 435 size: 1, 8 orig: 1, 8 offset: 0, 0 @@ -1807,7 +1821,7 @@ ui/slider-vertical index: -1 ui/text-exit rotate: false - xy: 206, 1 + xy: 411, 243 size: 24, 12 orig: 24, 12 offset: 0, 0 @@ -1902,42 +1916,42 @@ ui/window-empty index: -1 weapons/blaster rotate: false - xy: 449, 369 + xy: 315, 153 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/flamer rotate: false - xy: 484, 391 + xy: 314, 50 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/mortar rotate: false - xy: 446, 204 + xy: 437, 301 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/multigun rotate: false - xy: 349, 195 + xy: 437, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/railgun rotate: false - xy: 399, 192 + xy: 467, 345 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster rotate: false - xy: 357, 145 + xy: 501, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 285a94889c..b9704369c3 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/entities/TileEntity.java b/core/src/io/anuke/mindustry/entities/TileEntity.java index 903ae69b45..c78833f629 100644 --- a/core/src/io/anuke/mindustry/entities/TileEntity.java +++ b/core/src/io/anuke/mindustry/entities/TileEntity.java @@ -12,7 +12,6 @@ import io.anuke.mindustry.entities.enemies.Enemy; import io.anuke.mindustry.resource.Item; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.Blocks; import io.anuke.mindustry.world.blocks.ProductionBlocks; import io.anuke.mindustry.world.blocks.types.Wall; import io.anuke.ucore.core.Effects; @@ -63,11 +62,8 @@ public class TileEntity extends Entity{ Block block = tile.block(); block.onDestroyed(tile); - for(Tile other : tile.getLinkedTiles()){ - other.setBlock(Blocks.air); - } - tile.setBlock(Blocks.air); + Vars.world.removeBlock(tile); } public void collision(Bullet other){ @@ -105,6 +101,10 @@ public class TileEntity extends Entity{ return sum; } + public int getItem(Item item){ + return items.get(item, 0); + } + public boolean hasItem(Item item){ return items.get(item, 0) > 0; } diff --git a/core/src/io/anuke/mindustry/entities/effect/DamageArea.java b/core/src/io/anuke/mindustry/entities/effect/DamageArea.java index 51f8415b2a..e49c0e988b 100644 --- a/core/src/io/anuke/mindustry/entities/effect/DamageArea.java +++ b/core/src/io/anuke/mindustry/entities/effect/DamageArea.java @@ -3,6 +3,7 @@ package io.anuke.mindustry.entities.effect; import com.badlogic.gdx.math.Vector2; import io.anuke.mindustry.Vars; +import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.enemies.Enemy; import io.anuke.mindustry.world.Tile; import io.anuke.ucore.entities.Entities; @@ -11,6 +12,15 @@ import io.anuke.ucore.util.Mathf; //TODO public class DamageArea{ + public static void damageEntities(float x, float y, float radius, int damage){ + damage(true, x, y, radius, damage); + if(!Vars.android){ + Player player = Vars.player; + int amount = calculateDamage(x, y, player.x, player.y, radius, damage); + player.damage(amount); + } + } + public static void damage(boolean enemies, float x, float y, float radius, int damage){ if(enemies){ @@ -35,6 +45,12 @@ public class DamageArea{ } } } + + if(!Vars.android){ + Player player = Vars.player; + int amount = calculateDamage(x, y, player.x, player.y, radius, damage); + player.damage(amount); + } } } diff --git a/core/src/io/anuke/mindustry/entities/effect/Fx.java b/core/src/io/anuke/mindustry/entities/effect/Fx.java index feec4f2403..e6e8cc3d28 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Fx.java +++ b/core/src/io/anuke/mindustry/entities/effect/Fx.java @@ -26,6 +26,33 @@ public class Fx{ }); }), + reactorsmoke = new Effect(17, e -> { + Angles.randLenVectors(e.id, 4, e.ifract()*8f, (x, y)->{ + float size = 1f+e.fract()*5f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }), + + nuclearsmoke = new Effect(40, e -> { + Angles.randLenVectors(e.id, 4, e.ifract()*13f, (x, y)->{ + float size = e.sfract()*4f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }), + + nuclearcloud = new Effect(90, e -> { + Angles.randLenVectors(e.id, 10, e.powfract()*90f, (x, y)->{ + float size = e.fract()*14f; + Draw.color(Color.LIME, Color.GRAY, e.ifract()); + Draw.rect("circle", e.x + x, e.y + y, size, size); + Draw.reset(); + }); + }), + chainshot = new Effect(9f, e -> { Draw.color(Color.WHITE, lightOrange, e.ifract()); Draw.thick(e.fract()*4f); @@ -86,6 +113,13 @@ public class Fx{ Draw.reset(); }), + nuclearShockwave = new Effect(10f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract()); + Draw.thick(e.fract()*3f + 0.2f); + Draw.polygon(40, e.x, e.y, e.ifract()*140f); + Draw.reset(); + }), + shockwaveSmall = new Effect(10f, e -> { Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract()); Draw.thick(e.fract()*2f + 0.1f); diff --git a/core/src/io/anuke/mindustry/entities/effect/Shield.java b/core/src/io/anuke/mindustry/entities/effect/Shield.java index 1f1193e1f3..b62bfbdd41 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Shield.java +++ b/core/src/io/anuke/mindustry/entities/effect/Shield.java @@ -17,7 +17,7 @@ import io.anuke.ucore.util.Mathf; public class Shield extends Entity{ public boolean active; - public boolean hitPlayers = true; + public boolean hitPlayers = false; private float uptime = 0f; private final Tile tile; diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index da2b525863..4f28bcaf75 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -73,7 +73,7 @@ public class Tile{ if(dst > rad || (dx == 0 && dy == 0)) continue; Tile other = Vars.world.tile(x + dx, y + dy); - if(other.entity != null){ + if(other != null && other.entity != null){ other.entity.damage((int)(amount * Mathf.lerp(1f-dst/rad, 1f, falloff))); } } diff --git a/core/src/io/anuke/mindustry/world/World.java b/core/src/io/anuke/mindustry/world/World.java index 0891df8193..fff4ef6546 100644 --- a/core/src/io/anuke/mindustry/world/World.java +++ b/core/src/io/anuke/mindustry/world/World.java @@ -339,6 +339,19 @@ public class World extends Module{ } } + public void removeBlock(Tile tile){ + if(!tile.block().isMultiblock() && !tile.isLinked()){ + tile.setBlock(Blocks.air); + }else{ + Tile target = tile.isLinked() ? tile.getLinked() : tile; + Array removals = target.getLinkedTiles(); + for(Tile toremove : removals){ + //note that setting a new block automatically unlinks it + toremove.setBlock(Blocks.air); + } + } + } + public boolean validBreak(int x, int y){ Tile tile = tile(x, y); diff --git a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java index 4d82686a15..e0d3c13d57 100644 --- a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java @@ -44,7 +44,7 @@ public class DistributionBlocks{ //TODO pulseconveyor = new Conveyor("poweredconveyor"){{ - health = 90; + health = 75; speed = 0.09f; description = "Moves items even faster."; formalName = "pulse conveyor"; diff --git a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java index 43e521c51d..a76c189a28 100644 --- a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java @@ -257,20 +257,14 @@ public class ProductionBlocks{ fullDescription = "Generates small amounts of power from the radioactive decay of uranium. Outputs power as lasers to its 4 sides."; } }, - nuclearReactor = new LiquidItemPowerGenerator("nuclearreactor"){ + nuclearReactor = new NuclearReactor("nuclearreactor"){ { //TODO formalName = "nuclear reactor"; width = 3; height = 3; - generateLiquid = Liquid.water; - generateItem = Item.uranium; - itemCapacity = 60; - itemInput = 6; - inputLiquid = 2f; - health = 500; - breaktime *= 2.2f; - powerCapacity = 100f; + health = 600; + breaktime *= 2.3f; description = "Generates power from uranium + water."; fullDescription = "The ultimate power generator. Highly volatile. Generates power from uranium. Requires constant cooling in the form of water. " + "Will explode violently if insufficient amounts of coolant are supplied. "; diff --git a/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java b/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java index ac4f3969fa..67b43d0ca0 100644 --- a/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java @@ -147,7 +147,6 @@ public class WeaponBlocks{ range = 70; reload = 15f; bullet = BulletType.shell; - ammo = Item.coal; health = 140; fullDescription = "Advanced multi-target turret. Uses power. Medium range. Never misses." + "Average to low damage, but can hit multiple enemies simultaneously with chain lighting."; @@ -189,6 +188,7 @@ public class WeaponBlocks{ health = 430; width = height = 2; shootCone = 9f; + ammoMultiplier = 8; shots = 2; fullDescription = "The ultimate rapid-fire turret. Uses uranium as ammo. Shoots large slugs at a high fire rate. " + "Medium range. Spans multiple tiles. Extremely tough."; @@ -223,7 +223,7 @@ public class WeaponBlocks{ bullet = BulletType.titanshell; ammo = Item.uranium; health = 800; - ammoMultiplier = 5; + ammoMultiplier = 4; width = height = 3; rotatespeed = 0.07f; shootCone = 9f; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java index 89aad46348..c7a08a8487 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java @@ -38,7 +38,9 @@ public class RepairTurret extends PowerTurret{ public void update(Tile tile){ PowerTurretEntity entity = tile.entity(); - if(entity.power < powerUsed) return; + if(entity.power < powerUsed){ + return; + } if(Timers.get(entity, "blocktarget", targetInterval)){ entity.blockTarget = Vars.world.findTileTarget(tile.worldx(), tile.worldy(), tile, range, true); @@ -70,9 +72,9 @@ public class RepairTurret extends PowerTurret{ @Override public void drawOver(Tile tile){ - TurretEntity entity = tile.entity(); + PowerTurretEntity entity = tile.entity(); - if(entity.blockTarget != null && Angles.angleDist(entity.angleTo(entity.blockTarget), entity.rotation) < 10){ + if(entity.power >= powerUsed && entity.blockTarget != null && Angles.angleDist(entity.angleTo(entity.blockTarget), entity.rotation) < 10){ Tile targetTile = entity.blockTarget.tile; Vector2 offset = targetTile.block().getPlaceOffset(); float x = tile.worldx(), y = tile.worldy(); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/ShieldBlock.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/ShieldBlock.java index 11be93223a..4549b4c19d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/ShieldBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/ShieldBlock.java @@ -31,7 +31,7 @@ public class ShieldBlock extends PowerBlock{ } if(entity.power > powerPerDamage){ - if(!entity.shield.active && entity.power > powerDrain * Timers.delta() * 10f){ + if(!entity.shield.active && entity.power > powerPerDamage * 8f){ entity.shield.add(); } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/Generator.java b/core/src/io/anuke/mindustry/world/blocks/types/production/Generator.java index c981f35f5d..fecfec5056 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/Generator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/Generator.java @@ -14,9 +14,7 @@ import io.anuke.ucore.core.Draw; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Timers; import io.anuke.ucore.graphics.Hue; -import io.anuke.ucore.util.Angles; -import io.anuke.ucore.util.Geometry; -import io.anuke.ucore.util.Mathf; +import io.anuke.ucore.util.*; public class Generator extends PowerBlock{ public static final int powerTime = 2; @@ -118,13 +116,15 @@ public class Generator extends PowerBlock{ Tile target = laserTarget(tile, rotation); if(target != null){ + Tmp.v1.set(Angles.translation(rotation * 90, target.block().width * Vars.tilesize/2 + 2f)); Angles.translation(rotation * 90, width * Vars.tilesize/2 + 2f); Draw.tint(Hue.mix(Color.GRAY, Color.WHITE, 0.902f + Mathf.sin(Timers.time(), 1.7f, 0.08f))); float r = 0f; - Draw.laser("laser", "laserend", tile.worldx() + Angles.x() + Mathf.range(r), tile.worldy() + Angles.y() + Mathf.range(r), target.worldx() - Angles.x() + Mathf.range(r), target.worldy() - Angles.y() + Mathf.range(r), 0.7f + Mathf.sin(Timers.time(), 2f, 0.1f * 0)); + Draw.laser("laser", "laserend", tile.worldx() + Angles.x() + Mathf.range(r), tile.worldy() + Angles.y() + Mathf.range(r), + target.worldx() - Tmp.v1.x + Mathf.range(r), target.worldy() - Tmp.v1.y + Mathf.range(r), 0.7f + Mathf.sin(Timers.time(), 2f, 0.1f * 0)); Draw.color(); } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java index 869582b83e..a9fdd32fe9 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java @@ -48,14 +48,17 @@ public class LiquidPowerGenerator extends Generator implements LiquidAcceptor{ if(entity.liquid == null) return; - Vector2 offset = getPlaceOffset(); - Draw.color(entity.liquid.color); Draw.alpha(entity.liquidAmount / liquidCapacity); - Draw.rect("blank", tile.worldx() + offset.x, tile.worldy() + offset.y, 2, 2); + drawLiquidCenter(tile); Draw.color(); } + public void drawLiquidCenter(Tile tile){ + Vector2 offset = getPlaceOffset(); + Draw.rect("black", tile.worldx() + offset.x, tile.worldy() + offset.y, 2, 2); + } + @Override public void update(Tile tile){ LiquidPowerEntity entity = tile.entity(); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/NuclearReactor.java b/core/src/io/anuke/mindustry/world/blocks/types/production/NuclearReactor.java index d7714d9dc9..e0bcacbf29 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/NuclearReactor.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/NuclearReactor.java @@ -1,10 +1,170 @@ package io.anuke.mindustry.world.blocks.types.production; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.math.Vector2; + +import io.anuke.mindustry.Vars; +import io.anuke.mindustry.entities.TileEntity; +import io.anuke.mindustry.entities.effect.DamageArea; +import io.anuke.mindustry.entities.effect.Fx; +import io.anuke.mindustry.resource.Item; +import io.anuke.mindustry.resource.Liquid; +import io.anuke.mindustry.world.Tile; +import io.anuke.ucore.core.Draw; +import io.anuke.ucore.core.Effects; +import io.anuke.ucore.core.Timers; +import io.anuke.ucore.util.Mathf; +import io.anuke.ucore.util.Tmp; + public class NuclearReactor extends LiquidItemPowerGenerator{ + protected Color coolColor = new Color(1, 1, 1, 0f); + protected Color hotColor = Color.valueOf("ff9575a3"); + protected int fuelUseTime = 120; //time to consume 1 fuel + protected float powerMultiplier = 0.08f; //power per frame, depends on full capacity + protected float heating = 0.007f; //heating per frame + protected float coolantPower = 0.007f; //how much heat decreases per coolant unit + protected float smokeThreshold = 0.3f; //threshold at which block starts smoking + protected int explosionRadius = 19; + protected int explosionDamage = 128; + protected float flashThreshold = 0.5f; - //TODO make it explode when broken public NuclearReactor(String name) { super(name); + generateItem = Item.uranium; + generateLiquid = Liquid.water; + itemCapacity = 30; + liquidCapacity = 50; + explosionEffect = Fx.nuclearShockwave; + explosive = true; + powerCapacity = 80f; + } + + @Override + public void update(Tile tile){ + NuclearReactorEntity entity = tile.entity(); + + int fuel = entity.getItem(generateItem); + float fullness = (float)fuel / itemCapacity; + + if(fuel > 0){ + entity.heat += fullness * heating; + entity.power += powerMultiplier * fullness; + if(Timers.get(tile, "fuelRemove", fuelUseTime)){ + entity.removeItem(generateItem, 1); + } + } + + if(entity.liquidAmount > 0){ + float maxCool = Math.min(entity.liquidAmount * coolantPower, entity.heat); + entity.heat -= maxCool; //TODO steam when cooling large amounts? + entity.liquidAmount -= maxCool / coolantPower; + } + + if(entity.heat > smokeThreshold){ + float smoke = 1.0f + (entity.heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0 + if(Mathf.chance(smoke / 20.0 * Timers.delta())){ + Effects.effect(Fx.reactorsmoke, tile.worldx() + Mathf.range(width * Vars.tilesize / 2f), + tile.worldy() + Mathf.random(height * Vars.tilesize / 2f)); + } + } + + if(entity.heat >= 1f){ + onDestroyed(tile); + Vars.world.removeBlock(tile); + + }else{ + distributeLaserPower(tile); + } + } + + @Override + public void drawLiquidCenter(Tile tile){ + Vector2 offset = getPlaceOffset(); + Draw.rect(name + "-center", tile.worldx() + offset.x, tile.worldy() + offset.y); + } + + @Override + public void onDestroyed(Tile tile){ + super.onDestroyed(tile); + + int waves = 6; + float delay = 8f; + + for(int i = 0; i < waves; i ++){ + float rad = (float)i /waves * explosionRadius; + Timers.run(i * delay, ()->{ + tile.damageNearby((int)rad, explosionDamage / waves, 0.4f); + }); + } + + Effects.shake(6f, 16f, tile.worldx(), tile.worldy()); + Effects.effect(explosionEffect, tile.worldx(), tile.worldy()); + for(int i = 0; i < 6; i ++){ + Timers.run(Mathf.random(40), ()->{ + Effects.effect(Fx.nuclearcloud, tile.worldx(), tile.worldy()); + }); + } + + DamageArea.damageEntities(tile.worldx(), tile.worldy(), explosionRadius * Vars.tilesize, explosionDamage * 4); + + + for(int i = 0; i < 20; i ++){ + Timers.run(Mathf.random(50), ()->{ + Tmp.v1.setToRandomDirection().setLength(Mathf.random(40f)); + Effects.effect(Fx.explosion, Tmp.v1.x + tile.worldx(), Tmp.v1.y + tile.worldy()); + }); + } + + for(int i = 0; i < 70; i ++){ + Timers.run(Mathf.random(80), ()->{ + Tmp.v1.setToRandomDirection().setLength(Mathf.random(120f)); + Effects.effect(Fx.nuclearsmoke, Tmp.v1.x + tile.worldx(), Tmp.v1.y + tile.worldy()); + }); + } + } + + @Override + public void drawPixelOverlay(Tile tile){ + super.drawPixelOverlay(tile); + + NuclearReactorEntity entity = tile.entity(); + + float fract = entity.heat; + if(fract > 0) + fract = Mathf.clamp(fract + 0.2f, 0.24f, 1f); + + Vector2 offset = getPlaceOffset(); + + Vars.renderer.drawBar(Color.ORANGE, tile.worldx() + offset.x, + tile.worldy() + Vars.tilesize * height/2f + 10 + offset.y, fract); + } + + @Override + public void draw(Tile tile){ + super.draw(tile); + + NuclearReactorEntity entity = tile.entity(); + Vector2 offset = getPlaceOffset(); + + Draw.color(coolColor, hotColor, entity.heat); + Draw.rect("white", tile.worldx() + offset.x, tile.worldy() + offset.y, width * Vars.tilesize, height * Vars.tilesize); + + if(entity.heat > flashThreshold){ + float flash = 9f - ((entity.heat - flashThreshold) / (1f - flashThreshold)) * 4f; + Draw.color(Color.RED, Color.YELLOW, Mathf.absin(Timers.time(), flash, 1f)); + Draw.alpha(0.6f); + Draw.rect(name + "-lights", tile.worldx() + offset.x, tile.worldy() + offset.y); + } + + Draw.color(); + } + + @Override + public TileEntity getEntity(){ + return new NuclearReactorEntity(); + } + + public static class NuclearReactorEntity extends LiquidPowerEntity{ + public float heat; } - } diff --git a/desktop/mindustry-saves/0.mins b/desktop/mindustry-saves/0.mins index a4159bda14..25fe6a2ac0 100644 Binary files a/desktop/mindustry-saves/0.mins and b/desktop/mindustry-saves/0.mins differ diff --git a/desktop/mindustry-saves/1.mins b/desktop/mindustry-saves/1.mins index cdfaa3f8cd..9d9a8ca039 100644 Binary files a/desktop/mindustry-saves/1.mins and b/desktop/mindustry-saves/1.mins differ diff --git a/desktop/mindustry-saves/3.mins b/desktop/mindustry-saves/3.mins index 2ec9e5b063..93ba885bfc 100644 Binary files a/desktop/mindustry-saves/3.mins and b/desktop/mindustry-saves/3.mins differ