diff --git a/TODO.md b/TODO.md index 52e50e5441..affc7e0fad 100644 --- a/TODO.md +++ b/TODO.md @@ -12,7 +12,6 @@ _Keep in mind that this is just a basic outline of planned features, and will be - More indicators for when the core is damaged and/or under attack - Fix bugs with junction not accepting blocks (low FPS) - Fix bugs with tunnel merging and/or removing items (low FPS) -- Investigate #6 - Edit descriptions for conveyors to be more clear about how to use them - Add link to Mindustry discord everywhere - Balancing to slow down progression diff --git a/core/assets-raw/sprites/ui/icon-none.png b/core/assets-raw/sprites/ui/icon-none.png new file mode 100644 index 0000000000..427d8006d9 Binary files /dev/null and b/core/assets-raw/sprites/ui/icon-none.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 992d6ec0c9..f8391e87c3 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -34,42 +34,42 @@ blocks/blackrockshadow1 index: -1 blocks/blackstone1 rotate: false - xy: 734, 418 + xy: 734, 406 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone2 rotate: false - xy: 734, 408 + xy: 734, 396 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone3 rotate: false - xy: 734, 398 + xy: 724, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock1 rotate: false - xy: 724, 371 + xy: 724, 361 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock2 rotate: false - xy: 724, 361 + xy: 724, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock3 rotate: false - xy: 724, 351 + xy: 734, 386 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -83,7 +83,7 @@ blocks/blackstoneedge index: -1 blocks/block rotate: false - xy: 165, 76 + xy: 734, 366 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -118,112 +118,112 @@ blocks/chainturret-icon index: -1 blocks/coal1 rotate: false - xy: 514, 114 + xy: 734, 346 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal2 rotate: false - xy: 224, 83 + xy: 165, 76 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal3 rotate: false - xy: 234, 83 + xy: 175, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coaldrill rotate: false - xy: 244, 83 + xy: 185, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator rotate: false - xy: 254, 83 + xy: 195, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator-top rotate: false - xy: 264, 83 + xy: 205, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalpurifier rotate: false - xy: 274, 83 + xy: 215, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/combustiongenerator rotate: false - xy: 284, 83 + xy: 225, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/compositewall rotate: false - xy: 294, 83 + xy: 235, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduit rotate: false - xy: 304, 83 + xy: 245, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitbottom rotate: false - xy: 314, 83 + xy: 255, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitliquid rotate: false - xy: 324, 83 + xy: 265, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduittop rotate: false - xy: 334, 83 + xy: 275, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyor rotate: false - xy: 344, 83 + xy: 285, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyormove rotate: false - xy: 354, 83 + xy: 295, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyortunnel rotate: false - xy: 364, 83 + xy: 305, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -237,42 +237,42 @@ blocks/core index: -1 blocks/cross rotate: false - xy: 374, 83 + xy: 315, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/crucible rotate: false - xy: 384, 83 + xy: 325, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/deepwater rotate: false - xy: 394, 83 + xy: 335, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt1 rotate: false - xy: 115, 4 + xy: 345, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt2 rotate: false - xy: 163, 30 + xy: 355, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt3 rotate: false - xy: 163, 20 + xy: 365, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -286,7 +286,7 @@ blocks/dirtedge index: -1 blocks/door rotate: false - xy: 167, 10 + xy: 375, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -300,7 +300,7 @@ blocks/door-large index: -1 blocks/door-large-icon rotate: false - xy: 406, 99 + xy: 385, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -314,7 +314,7 @@ blocks/door-large-open index: -1 blocks/door-open rotate: false - xy: 416, 99 + xy: 395, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -328,7 +328,7 @@ blocks/doubleturret index: -1 blocks/duriumwall rotate: false - xy: 404, 89 + xy: 809, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -342,7 +342,7 @@ blocks/duriumwall-large index: -1 blocks/duriumwall-large-icon rotate: false - xy: 414, 89 + xy: 514, 114 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -356,42 +356,42 @@ blocks/flameturret index: -1 blocks/fluxpump rotate: false - xy: 414, 79 + xy: 163, 30 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass1 rotate: false - xy: 428, 103 + xy: 163, 20 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass2 rotate: false - xy: 438, 103 + xy: 167, 10 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass3 rotate: false - xy: 448, 103 + xy: 406, 99 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock1 rotate: false - xy: 458, 103 + xy: 416, 99 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock2 rotate: false - xy: 468, 103 + xy: 428, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -405,21 +405,21 @@ blocks/grassedge index: -1 blocks/ice1 rotate: false - xy: 809, 420 + xy: 438, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ice2 rotate: false - xy: 175, 76 + xy: 448, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ice3 rotate: false - xy: 185, 79 + xy: 458, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -433,98 +433,98 @@ blocks/iceedge index: -1 blocks/icerock1 rotate: false - xy: 195, 79 + xy: 468, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerock2 rotate: false - xy: 205, 79 + xy: 225, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerockshadow1 rotate: false - xy: 478, 103 + xy: 235, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow1 rotate: false - xy: 478, 103 + xy: 235, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerockshadow2 rotate: false - xy: 488, 105 + xy: 245, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow2 rotate: false - xy: 488, 105 + xy: 245, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron1 rotate: false - xy: 601, 228 + xy: 325, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron2 rotate: false - xy: 611, 228 + xy: 335, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron3 rotate: false - xy: 621, 228 + xy: 345, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/irondrill rotate: false - xy: 631, 228 + xy: 355, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ironwall rotate: false - xy: 641, 228 + xy: 365, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/junction rotate: false - xy: 593, 218 + xy: 375, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/laserturret rotate: false - xy: 143, 8 + xy: 155, 8 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/lava rotate: false - xy: 603, 218 + xy: 385, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -538,63 +538,63 @@ blocks/lavaedge index: -1 blocks/lavasmelter rotate: false - xy: 613, 218 + xy: 395, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquiditemjunction rotate: false - xy: 623, 218 + xy: 809, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidjunction rotate: false - xy: 633, 218 + xy: 478, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidrouter rotate: false - xy: 643, 218 + xy: 488, 105 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/machineturret rotate: false - xy: 155, 8 + xy: 709, 279 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/megarepairturret rotate: false - xy: 709, 279 + xy: 721, 281 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mortarturret rotate: false - xy: 721, 281 + xy: 541, 177 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mossblock rotate: false - xy: 744, 408 + xy: 602, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/mossstone rotate: false - xy: 744, 408 + xy: 602, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -615,7 +615,7 @@ blocks/nuclearreactor-center index: -1 blocks/nuclearreactor-icon rotate: false - xy: 744, 388 + xy: 622, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -636,7 +636,7 @@ blocks/nuclearreactor-small index: -1 blocks/oil rotate: false - xy: 754, 420 + xy: 632, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -650,175 +650,175 @@ blocks/oiledge index: -1 blocks/oilrefinery rotate: false - xy: 754, 410 + xy: 642, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/omnidrill rotate: false - xy: 754, 400 + xy: 591, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/plasmaturret rotate: false - xy: 541, 177 + xy: 498, 108 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/powerbooster rotate: false - xy: 754, 390 + xy: 601, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyor rotate: false - xy: 734, 378 + xy: 611, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyormove rotate: false - xy: 734, 368 + xy: 621, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaser rotate: false - xy: 744, 378 + xy: 631, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlasercorner rotate: false - xy: 754, 380 + xy: 641, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaserrouter rotate: false - xy: 734, 358 + xy: 593, 218 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduit rotate: false - xy: 744, 368 + xy: 603, 218 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduitbottom rotate: false - xy: 754, 370 + xy: 613, 218 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduittop rotate: false - xy: 744, 358 + xy: 623, 218 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pump rotate: false - xy: 754, 360 + xy: 633, 218 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/repairturret rotate: false - xy: 498, 108 + xy: 704, 263 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/rock1 rotate: false - xy: 744, 348 + xy: 405, 89 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rock2 rotate: false - xy: 754, 350 + xy: 405, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/router rotate: false - xy: 185, 69 + xy: 415, 89 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator rotate: false - xy: 195, 69 + xy: 415, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator-top rotate: false - xy: 205, 69 + xy: 405, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand1 rotate: false - xy: 498, 98 + xy: 415, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand2 rotate: false - xy: 488, 95 + xy: 175, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand3 rotate: false - xy: 593, 208 + xy: 185, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock1 rotate: false - xy: 603, 208 + xy: 195, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock2 rotate: false - xy: 613, 208 + xy: 205, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock3 rotate: false - xy: 623, 208 + xy: 215, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -832,91 +832,91 @@ blocks/sandedge index: -1 blocks/shadow rotate: false - xy: 704, 263 + xy: 704, 251 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/shieldgenerator rotate: false - xy: 643, 208 + xy: 171, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shotgunturret rotate: false - xy: 704, 251 + xy: 704, 239 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/shrub rotate: false - xy: 653, 208 + xy: 191, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shrubshadow rotate: false - xy: 661, 234 + xy: 191, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/smelter rotate: false - xy: 671, 234 + xy: 201, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sniperturret rotate: false - xy: 704, 239 + xy: 722, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/snow1 rotate: false - xy: 663, 224 + xy: 201, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow2 rotate: false - xy: 663, 214 + xy: 211, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow3 rotate: false - xy: 673, 224 + xy: 211, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock1 rotate: false - xy: 673, 214 + xy: 225, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock2 rotate: false - xy: 663, 204 + xy: 235, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock3 rotate: false - xy: 673, 204 + xy: 245, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -930,28 +930,28 @@ blocks/snowedge index: -1 blocks/sorter rotate: false - xy: 498, 88 + xy: 255, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyor rotate: false - xy: 899, 487 + xy: 265, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyormove rotate: false - xy: 909, 487 + xy: 275, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelwall rotate: false - xy: 919, 487 + xy: 285, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -965,56 +965,56 @@ blocks/steelwall-large index: -1 blocks/steelwall-large-icon rotate: false - xy: 929, 487 + xy: 295, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone1 rotate: false - xy: 939, 487 + xy: 305, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone2 rotate: false - xy: 949, 487 + xy: 315, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone3 rotate: false - xy: 959, 487 + xy: 325, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock1 rotate: false - xy: 969, 487 + xy: 335, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock2 rotate: false - xy: 979, 487 + xy: 345, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock3 rotate: false - xy: 989, 487 + xy: 355, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonedrill rotate: false - xy: 999, 487 + xy: 365, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1028,35 +1028,35 @@ blocks/stoneedge index: -1 blocks/stoneformer rotate: false - xy: 765, 422 + xy: 375, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonewall rotate: false - xy: 764, 412 + xy: 385, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter rotate: false - xy: 764, 402 + xy: 395, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter-top rotate: false - xy: 764, 392 + xy: 221, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/thermalgenerator rotate: false - xy: 764, 382 + xy: 231, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1070,56 +1070,56 @@ blocks/titancannon index: -1 blocks/titancannon-icon rotate: false - xy: 722, 415 + xy: 722, 403 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/titanium1 rotate: false - xy: 764, 372 + xy: 241, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium2 rotate: false - xy: 764, 362 + xy: 251, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium3 rotate: false - xy: 764, 352 + xy: 261, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumdrill rotate: false - xy: 521, 167 + xy: 271, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumpurifier rotate: false - xy: 521, 157 + xy: 281, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumshieldwall rotate: false - xy: 531, 167 + xy: 291, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumwall rotate: false - xy: 521, 147 + xy: 301, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1133,49 +1133,49 @@ blocks/titaniumwall-large index: -1 blocks/titaniumwall-large-icon rotate: false - xy: 531, 157 + xy: 311, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/turret rotate: false - xy: 722, 403 + xy: 722, 391 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/uranium1 rotate: false - xy: 531, 147 + xy: 341, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium2 rotate: false - xy: 541, 157 + xy: 351, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium3 rotate: false - xy: 531, 137 + xy: 361, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uraniumdrill rotate: false - xy: 541, 147 + xy: 371, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/water rotate: false - xy: 541, 137 + xy: 381, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1189,14 +1189,14 @@ blocks/wateredge index: -1 blocks/waveturret rotate: false - xy: 722, 391 + xy: 734, 416 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 bullet rotate: false - xy: 809, 430 + xy: 734, 356 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1469,49 +1469,49 @@ enemyarrow index: -1 icon-coal rotate: false - xy: 592, 238 + xy: 255, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-dirium rotate: false - xy: 602, 238 + xy: 265, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-iron rotate: false - xy: 612, 238 + xy: 275, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-steel rotate: false - xy: 622, 238 + xy: 285, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-stone rotate: false - xy: 632, 238 + xy: 295, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-titanium rotate: false - xy: 642, 238 + xy: 305, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-uranium rotate: false - xy: 591, 228 + xy: 315, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1546,28 +1546,28 @@ mechs/mech-standard index: -1 shell rotate: false - xy: 633, 208 + xy: 171, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 651, 228 + xy: 181, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 653, 218 + xy: 181, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 541, 167 + xy: 321, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1804,20 +1804,27 @@ ui/icon-menu orig: 10, 10 offset: 0, 0 index: -1 -ui/icon-pause +ui/icon-none rotate: false xy: 320, 93 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 -ui/icon-play +ui/icon-pause rotate: false xy: 332, 93 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 +ui/icon-play + rotate: false + xy: 344, 93 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 ui/icon-play-2 rotate: false xy: 677, 276 @@ -1827,14 +1834,14 @@ ui/icon-play-2 index: -1 ui/icon-power rotate: false - xy: 344, 93 + xy: 356, 93 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-production rotate: false - xy: 356, 93 + xy: 368, 93 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1883,7 +1890,7 @@ ui/icon-save index: -1 ui/icon-settings rotate: false - xy: 368, 93 + xy: 380, 93 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1897,14 +1904,14 @@ ui/icon-tools index: -1 ui/icon-touch rotate: false - xy: 380, 93 + xy: 392, 93 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-touchDelete rotate: false - xy: 392, 93 + xy: 131, 8 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1918,7 +1925,7 @@ ui/icon-tutorial index: -1 ui/icon-weapon rotate: false - xy: 131, 8 + xy: 143, 8 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1996,14 +2003,14 @@ ui/selection index: -1 ui/separator rotate: false - xy: 179, 86 + xy: 169, 86 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 ui/slider rotate: false - xy: 652, 238 + xy: 547, 207 size: 1, 8 orig: 1, 8 offset: 0, 0 @@ -2031,7 +2038,7 @@ ui/slider-knob-over index: -1 ui/slider-vertical rotate: false - xy: 169, 86 + xy: 724, 348 size: 8, 1 orig: 8, 1 offset: 0, 0 @@ -2133,42 +2140,42 @@ ui/window-empty index: -1 weapons/blaster rotate: false - xy: 734, 388 + xy: 734, 376 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/flamer rotate: false - xy: 404, 79 + xy: 115, 4 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/mortar rotate: false - xy: 744, 418 + xy: 592, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/multigun rotate: false - xy: 744, 398 + xy: 612, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/railgun rotate: false - xy: 734, 348 + xy: 643, 218 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster rotate: false - xy: 521, 137 + xy: 331, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index f5df62b425..6e6187d5d2 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/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 15cf22dd93..58736b0263 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -15,6 +15,7 @@ import io.anuke.mindustry.Vars; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.*; import io.anuke.mindustry.entities.effect.Fx; +import io.anuke.mindustry.entities.effect.Shield; import io.anuke.mindustry.entities.enemies.BlastEnemy; import io.anuke.mindustry.entities.enemies.Enemy; import io.anuke.mindustry.entities.enemies.HealerEnemy; @@ -45,6 +46,7 @@ public class Control extends Module{ public final EntityGroup enemyGroup = Entities.addGroup(Enemy.class); public final EntityGroup tileGroup = Entities.addGroup(TileEntity.class, false); public final EntityGroup bulletGroup = Entities.addGroup(Bullet.class); + public final EntityGroup shieldGroup = Entities.addGroup(Shield.class); Array spawns = new Array<>(); int wave = 1; diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index 09d4aa9d79..3d44a33703 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -268,6 +268,14 @@ public class Renderer extends RendererModule{ } void drawShield(){ + if(control.shieldGroup.amount() == 0) return; + + Graphics.surface(Vars.renderer.shieldSurface, false); + Draw.color(Color.ROYAL); + Entities.draw(control.shieldGroup); + Draw.reset(); + Graphics.surface(); + for(int i = 0; i < shieldHits.size / 3; i++){ //float x = hits.get(i*3+0); //float y = hits.get(i*3+1); diff --git a/core/src/io/anuke/mindustry/core/World.java b/core/src/io/anuke/mindustry/core/World.java index 99e3996a42..bed99810ba 100644 --- a/core/src/io/anuke/mindustry/core/World.java +++ b/core/src/io/anuke/mindustry/core/World.java @@ -183,7 +183,7 @@ public class World extends Module{ Generator.generate(mapPixmaps[map.ordinal()], tiles); //TODO multiblock core - control.getInput().placeBlock(control.getCore().x, control.getCore().y, ProductionBlocks.core, 0, false); + control.getInput().placeBlock(control.getCore().x, control.getCore().y, ProductionBlocks.core, 0, false, false); if(map != Map.tutorial){ setDefaultBlocks(); diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 737f1083f9..389bc9ac03 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -27,7 +27,7 @@ public class Player extends DestructibleEntity{ public transient Recipe recipe; public transient int rotation; public transient PlaceMode placeMode = android ? PlaceMode.cursor : PlaceMode.hold; - public transient PlaceMode breakMode = PlaceMode.holdDelete; + public transient PlaceMode breakMode = android ? PlaceMode.none : PlaceMode.holdDelete; public Player(){ hitbox.setSize(5); diff --git a/core/src/io/anuke/mindustry/entities/effect/Shield.java b/core/src/io/anuke/mindustry/entities/effect/Shield.java index 2f4d6c03b3..8a9e19ec9f 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Shield.java +++ b/core/src/io/anuke/mindustry/entities/effect/Shield.java @@ -1,6 +1,5 @@ package io.anuke.mindustry.entities.effect; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.math.Interpolation; import io.anuke.mindustry.Vars; @@ -8,7 +7,6 @@ import io.anuke.mindustry.entities.enemies.Enemy; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.types.defense.ShieldBlock; import io.anuke.ucore.core.Draw; -import io.anuke.ucore.core.Graphics; import io.anuke.ucore.core.Timers; import io.anuke.ucore.entities.BulletEntity; import io.anuke.ucore.entities.Entities; @@ -75,13 +73,7 @@ public class Shield extends Entity{ } float rad = drawRadius(); - - Graphics.surface(Vars.renderer.shieldSurface, false); - Draw.color(Color.ROYAL); - Draw.thick(2f); Draw.rect("circle2", x, y, rad, rad); - Draw.reset(); - Graphics.surface(); } float drawRadius(){ @@ -92,6 +84,11 @@ public class Shield extends Entity{ active = false; } + @Override + public Shield add(){ + return add(Vars.control.shieldGroup); + } + @Override public void added(){ active = true; diff --git a/core/src/io/anuke/mindustry/input/AndroidInput.java b/core/src/io/anuke/mindustry/input/AndroidInput.java index 30a0ecb9f3..0385dafe16 100644 --- a/core/src/io/anuke/mindustry/input/AndroidInput.java +++ b/core/src/io/anuke/mindustry/input/AndroidInput.java @@ -8,7 +8,6 @@ import com.badlogic.gdx.math.Vector2; import io.anuke.mindustry.core.GameState; import io.anuke.mindustry.core.GameState.State; -import io.anuke.mindustry.resource.ItemStack; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.types.Configurable; import io.anuke.ucore.core.Graphics; @@ -33,7 +32,7 @@ public class AndroidInput extends InputHandler{ @Override public float getCursorEndY(){ return Gdx.input.getY(0); } @Override public float getCursorX(){ return mousex; } @Override public float getCursorY(){ return mousey; } - @Override public boolean drawPlace(){ return placing || (player.placeMode.pan && player.recipe != null); } + @Override public boolean drawPlace(){ return (placing && !brokeBlock) || (player.placeMode.pan && player.recipe != null); } @Override public boolean touchUp(int screenX, int screenY, int pointer, int button){ @@ -108,26 +107,15 @@ public class AndroidInput extends InputHandler{ if(player.breaktime >= tile.block().breaktime){ brokeBlock = true; - breakBlock(tile.x, tile.y); + breakBlock(tile.x, tile.y, true); player.breaktime = 0f; } } - - public void tryPlaceBlock(int tilex, int tiley){ - if(player.recipe != null && control.hasItems(player.recipe.requirements) && validPlace(tilex, tiley, player.recipe.result)){ - - placeBlock(tilex, tiley, player.recipe.result, player.rotation, true); - - for(ItemStack stack : player.recipe.requirements){ - control.removeItem(stack); - } - } - } @Override public void update(){ - if(Gdx.input.isTouched(0) && Mathf.near2d(lmousex, lmousey, Gdx.input.getX(0), Gdx.input.getY(0), Unit.dp.inPixels(50)) + if(player.recipe != null && Gdx.input.isTouched(0) && Mathf.near2d(lmousex, lmousey, Gdx.input.getX(0), Gdx.input.getY(0), Unit.dp.inPixels(50)) && !ui.hasMouse()){ warmup += Timers.delta(); diff --git a/core/src/io/anuke/mindustry/input/DesktopInput.java b/core/src/io/anuke/mindustry/input/DesktopInput.java index 35dd95f448..aa03a10692 100644 --- a/core/src/io/anuke/mindustry/input/DesktopInput.java +++ b/core/src/io/anuke/mindustry/input/DesktopInput.java @@ -9,7 +9,6 @@ import com.badlogic.gdx.math.Vector2; import io.anuke.mindustry.core.GameState; import io.anuke.mindustry.core.GameState.State; -import io.anuke.mindustry.resource.ItemStack; import io.anuke.mindustry.resource.Weapon; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.types.Configurable; @@ -110,7 +109,7 @@ public class DesktopInput extends InputHandler{ Tile tile = cursor; player.breaktime += Timers.delta(); if(player.breaktime >= tile.getBreakTime()){ - breakBlock(cursor.x, cursor.y); + breakBlock(cursor.x, cursor.y, true); player.breaktime = 0f; } }else{ @@ -118,23 +117,6 @@ public class DesktopInput extends InputHandler{ } } - - public void tryPlaceBlock(int x, int y){ - if(player.recipe != null && - validPlace(x, y, player.recipe.result) && !ui.hasMouse() && cursorNear() && - control.hasItems(player.recipe.requirements)){ - - placeBlock(x, y, player.recipe.result, player.rotation, true); - - for(ItemStack stack : player.recipe.requirements){ - control.removeItem(stack); - } - - if(!control.hasItems(player.recipe.requirements)){ - Cursors.restoreCursor(); - } - } - } public int tilex(){ return (player.recipe != null && player.recipe.result.isMultiblock() && diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java index bfb2585dca..a5108e98cb 100644 --- a/core/src/io/anuke/mindustry/input/InputHandler.java +++ b/core/src/io/anuke/mindustry/input/InputHandler.java @@ -49,12 +49,12 @@ public abstract class InputHandler extends InputAdapter{ return Vector2.dst(player.x, player.y, getBlockX() * tilesize, getBlockY() * tilesize) <= placerange; } - public void tryPlaceBlock(int x, int y){ + public void tryPlaceBlock(int x, int y, boolean sound){ if(player.recipe != null && validPlace(x, y, player.recipe.result) && !ui.hasMouse() && cursorNear() && Vars.control.hasItems(player.recipe.requirements)){ - placeBlock(x, y, player.recipe.result, player.rotation, true); + placeBlock(x, y, player.recipe.result, player.rotation, true, sound); for(ItemStack stack : player.recipe.requirements){ Vars.control.removeItem(stack); @@ -66,9 +66,9 @@ public abstract class InputHandler extends InputAdapter{ } } - public void tryDeleteBlock(int x, int y){ + public void tryDeleteBlock(int x, int y, boolean sound){ if(cursorNear() && validBreak(x, y)){ - breakBlock(x, y); + breakBlock(x, y, sound); } } @@ -167,7 +167,7 @@ public abstract class InputHandler extends InputAdapter{ return tile.breakable(); } - public void placeBlock(int x, int y, Block result, int rotation, boolean effects){ + public void placeBlock(int x, int y, Block result, int rotation, boolean effects, boolean sound){ Tile tile = world.tile(x, y); //just in case @@ -196,10 +196,10 @@ public abstract class InputHandler extends InputAdapter{ if(effects) Effects.effect(Fx.place, x * Vars.tilesize, y * Vars.tilesize); } - if(effects) Sounds.play("place"); + if(effects && sound) Sounds.play("place"); } - public void breakBlock(int x, int y){ + public void breakBlock(int x, int y, boolean sound){ Tile tile = world.tile(x, y); if(tile == null) return; @@ -225,7 +225,7 @@ public abstract class InputHandler extends InputAdapter{ } //Effects.shake(3f, 1f, player); - Sounds.play("break"); + if(sound)Sounds.play("break"); if(!tile.block().isMultiblock() && !tile.isLinked()){ tile.setBlock(Blocks.air); diff --git a/core/src/io/anuke/mindustry/input/PlaceMode.java b/core/src/io/anuke/mindustry/input/PlaceMode.java index 855f158445..231e561a78 100644 --- a/core/src/io/anuke/mindustry/input/PlaceMode.java +++ b/core/src/io/anuke/mindustry/input/PlaceMode.java @@ -58,7 +58,7 @@ public enum PlaceMode{ } public void tapped(int tilex, int tiley){ - control.getInput().tryPlaceBlock(tilex, tiley); + control.getInput().tryPlaceBlock(tilex, tiley, true); } }, touch{ @@ -70,13 +70,19 @@ public enum PlaceMode{ } public void tapped(int x, int y){ - control.getInput().tryPlaceBlock(x, y); + control.getInput().tryPlaceBlock(x, y, true); + } + }, + none{ + { + delete = true; + shown = true; } }, holdDelete{ { delete = true; - shown = true; + shown = false; } public void draw(int tilex, int tiley, int endx, int endy){ @@ -109,7 +115,7 @@ public enum PlaceMode{ } public void tapped(int x, int y){ - control.getInput().tryDeleteBlock(x, y); + control.getInput().tryDeleteBlock(x, y, true); } }, areaDelete{ @@ -173,9 +179,12 @@ public enum PlaceMode{ tilex = this.tilex; tiley = this.tiley; endx = this.endx; endy = this.endy; + boolean first = true; + for(int cx = tilex; cx <= endx; cx ++){ for(int cy = tiley; cy <= endy; cy ++){ - control.getInput().tryDeleteBlock(cx, cy); + control.getInput().tryDeleteBlock(cx, cy, first); + first = false; } } } @@ -207,7 +216,7 @@ public enum PlaceMode{ this.tiley = tiley; } }, - hold{ //TODO multiblock support! + hold{ int maxlen = 10; int tilex; int tiley; @@ -293,11 +302,13 @@ public enum PlaceMode{ player.rotation = this.rotation; + boolean first = true; for(int x = 0; x <= Math.abs(this.endx - this.tilex); x ++){ for(int y = 0; y <= Math.abs(this.endy - this.tiley); y ++){ control.getInput().tryPlaceBlock( tilex + x * Mathf.sign(endx - tilex), - tiley + y * Mathf.sign(endy - tiley)); + tiley + y * Mathf.sign(endy - tiley), first); + first = false; } } } diff --git a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java index 94e25d3544..356ecac18f 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java @@ -8,9 +8,7 @@ import com.badlogic.gdx.utils.Align; import io.anuke.mindustry.core.GameState; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.input.PlaceMode; -import io.anuke.ucore.scene.builders.button; -import io.anuke.ucore.scene.builders.imagebutton; -import io.anuke.ucore.scene.builders.table; +import io.anuke.ucore.scene.builders.*; import io.anuke.ucore.scene.event.Touchable; import io.anuke.ucore.scene.ui.ButtonGroup; import io.anuke.ucore.scene.ui.ImageButton; @@ -44,6 +42,8 @@ public class PlacementFragment implements Fragment{ touchable(Touchable.enabled); aleft(); + new label("place mode"); + row(); new table("pane"){{ get().pad(5); @@ -90,6 +90,9 @@ public class PlacementFragment implements Fragment{ abottom(); aleft(); + new label("break mode"); + row(); + new table("pane"){{ get().pad(5); touchable(Touchable.enabled); diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java index 9eadf7daa9..34f7139430 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java @@ -17,9 +17,9 @@ public class DesktopLauncher { Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration(); config.setTitle("Mindustry"); config.setMaximized(true); - //config.useVsync(false); - config.setWindowedMode(800, 600); + config.setWindowedMode(960, 540); config.setWindowIcon("sprites/icon.png"); + //config.useVsync(false); Mindustry.formatter = new Formatter(){ SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm");