diff --git a/core/assets-raw/sprites/blocks/splitter.png b/core/assets-raw/sprites/blocks/splitter.png new file mode 100644 index 0000000000..0d86dcb2a7 Binary files /dev/null and b/core/assets-raw/sprites/blocks/splitter.png differ diff --git a/core/assets-raw/sprites/ui/icons/icon-liquid.png b/core/assets-raw/sprites/ui/icons/icon-liquid.png new file mode 100644 index 0000000000..8511bad640 Binary files /dev/null and b/core/assets-raw/sprites/ui/icons/icon-liquid.png differ diff --git a/core/assets-raw/sprites/ui/icons/icon-logic.png b/core/assets-raw/sprites/ui/icons/icon-logic.png new file mode 100644 index 0000000000..8e299e06d7 Binary files /dev/null and b/core/assets-raw/sprites/ui/icons/icon-logic.png differ diff --git a/core/assets-raw/sprites/ui/icons/icon-units.png b/core/assets-raw/sprites/ui/icons/icon-units.png new file mode 100644 index 0000000000..d528133039 Binary files /dev/null and b/core/assets-raw/sprites/ui/icons/icon-units.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index eb860705bf..db54348096 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -430,6 +430,8 @@ block.teleporter.name=teleporter block.teleporter.fulldescription=Advanced item transport block. Teleporters input items to other teleporters of the same color. Does nothing if no teleporters of the same color exist. If multiple teleporters exist of the same color, a random one is selected. Uses power. Tap to change color. block.sorter.name=sorter block.sorter.fulldescription=Sorts item by material type. Material to accept is indicated by the color in the block. All items that match the sort material are outputted forward, everything else is outputted to the left and right. +block.splitter.name=splitter +block.splitter.fulldescription=Splits input into two directions. Outputs to the left and right only. Unlike a router, it has no internal storage and outputs instantly. block.core.name=core block.pump.name=pump block.pump.fulldescription=Pumps liquids from a source block- usually water, lava or oil. Outputs liquid into nearby conduits. diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 40c8ead303..85d8ae5e5b 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -27,49 +27,49 @@ blocks/blackrock1 index: -1 blocks/blackrockshadow1 rotate: false - xy: 214, 87 + xy: 732, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone1 rotate: false - xy: 224, 87 + xy: 736, 359 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone2 rotate: false - xy: 732, 381 + xy: 736, 349 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone3 rotate: false - xy: 234, 87 + xy: 659, 282 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock1 rotate: false - xy: 736, 371 + xy: 669, 282 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock2 rotate: false - xy: 736, 361 + xy: 679, 282 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock3 rotate: false - xy: 736, 351 + xy: 240, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -83,7 +83,7 @@ blocks/blackstoneedge index: -1 blocks/block rotate: false - xy: 264, 91 + xy: 270, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -104,7 +104,7 @@ blocks/block-3x3 index: -1 blocks/block-middle rotate: false - xy: 274, 91 + xy: 280, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -125,112 +125,112 @@ blocks/chainturret-icon index: -1 blocks/coal1 rotate: false - xy: 314, 95 + xy: 320, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal2 rotate: false - xy: 324, 95 + xy: 330, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal3 rotate: false - xy: 334, 95 + xy: 340, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coaldrill rotate: false - xy: 344, 95 + xy: 350, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator rotate: false - xy: 354, 95 + xy: 360, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator-top rotate: false - xy: 364, 95 + xy: 370, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalpurifier rotate: false - xy: 374, 95 + xy: 380, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/combustiongenerator rotate: false - xy: 384, 95 + xy: 390, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/compositewall rotate: false - xy: 394, 95 + xy: 400, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduit rotate: false - xy: 404, 95 + xy: 410, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitbottom rotate: false - xy: 414, 95 + xy: 420, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitliquid rotate: false - xy: 424, 95 + xy: 430, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduittop rotate: false - xy: 434, 95 + xy: 440, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyor rotate: false - xy: 444, 95 + xy: 450, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyormove rotate: false - xy: 454, 95 + xy: 460, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyortunnel rotate: false - xy: 464, 95 + xy: 470, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -244,42 +244,42 @@ blocks/core index: -1 blocks/cross rotate: false - xy: 669, 282 + xy: 624, 233 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/crucible rotate: false - xy: 679, 282 + xy: 624, 223 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/deepwater rotate: false - xy: 591, 187 + xy: 624, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt1 rotate: false - xy: 624, 233 + xy: 634, 235 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt2 rotate: false - xy: 624, 223 + xy: 634, 225 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt3 rotate: false - xy: 624, 213 + xy: 634, 215 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -293,7 +293,7 @@ blocks/dirtedge index: -1 blocks/door rotate: false - xy: 634, 235 + xy: 114, 80 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -307,7 +307,7 @@ blocks/door-large index: -1 blocks/door-large-icon rotate: false - xy: 634, 225 + xy: 113, 70 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -321,7 +321,7 @@ blocks/door-large-open index: -1 blocks/door-open rotate: false - xy: 634, 215 + xy: 113, 60 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -335,7 +335,7 @@ blocks/doubleturret index: -1 blocks/duriumwall rotate: false - xy: 114, 80 + xy: 113, 50 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -349,14 +349,14 @@ blocks/duriumwall-large index: -1 blocks/duriumwall-large-icon rotate: false - xy: 113, 70 + xy: 117, 40 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/enemyspawn rotate: false - xy: 113, 60 + xy: 117, 30 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -370,42 +370,42 @@ blocks/flameturret index: -1 blocks/fluxpump rotate: false - xy: 113, 50 + xy: 117, 20 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass1 rotate: false - xy: 117, 40 + xy: 117, 10 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass2 rotate: false - xy: 117, 30 + xy: 865, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass3 rotate: false - xy: 117, 20 + xy: 178, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock1 rotate: false - xy: 117, 10 + xy: 188, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock2 rotate: false - xy: 865, 417 + xy: 198, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -419,21 +419,21 @@ blocks/grassedge index: -1 blocks/ice1 rotate: false - xy: 178, 75 + xy: 208, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ice2 rotate: false - xy: 188, 75 + xy: 218, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ice3 rotate: false - xy: 198, 75 + xy: 228, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -447,98 +447,98 @@ blocks/iceedge index: -1 blocks/icerock1 rotate: false - xy: 208, 75 + xy: 238, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerock2 rotate: false - xy: 218, 77 + xy: 248, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerockshadow1 rotate: false - xy: 228, 77 + xy: 258, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow1 rotate: false - xy: 228, 77 + xy: 258, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerockshadow2 rotate: false - xy: 238, 77 + xy: 268, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow2 rotate: false - xy: 238, 77 + xy: 268, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron1 rotate: false - xy: 328, 85 + xy: 300, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron2 rotate: false - xy: 338, 85 + xy: 310, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron3 rotate: false - xy: 348, 85 + xy: 320, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/irondrill rotate: false - xy: 358, 85 + xy: 330, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ironwall rotate: false - xy: 368, 85 + xy: 340, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/junction rotate: false - xy: 378, 85 + xy: 350, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/laserturret rotate: false - xy: 728, 333 + xy: 731, 297 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/lava rotate: false - xy: 388, 85 + xy: 360, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -552,63 +552,63 @@ blocks/lavaedge index: -1 blocks/lavasmelter rotate: false - xy: 398, 85 + xy: 370, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquiditemjunction rotate: false - xy: 408, 85 + xy: 380, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidjunction rotate: false - xy: 418, 85 + xy: 390, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidrouter rotate: false - xy: 428, 85 + xy: 400, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/machineturret rotate: false - xy: 728, 321 + xy: 731, 285 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/megarepairturret rotate: false - xy: 728, 309 + xy: 853, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mortarturret rotate: false - xy: 731, 297 + xy: 142, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mossblock rotate: false - xy: 438, 85 + xy: 410, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/mossstone rotate: false - xy: 438, 85 + xy: 410, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -629,7 +629,7 @@ blocks/nuclearreactor-center index: -1 blocks/nuclearreactor-icon rotate: false - xy: 448, 85 + xy: 420, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -650,7 +650,7 @@ blocks/nuclearreactor-small index: -1 blocks/oil rotate: false - xy: 458, 85 + xy: 430, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -664,182 +664,182 @@ blocks/oiledge index: -1 blocks/oilrefinery rotate: false - xy: 468, 85 + xy: 440, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/omnidrill rotate: false - xy: 601, 187 + xy: 450, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/plasmaturret rotate: false - xy: 731, 285 + xy: 154, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/playerspawn rotate: false - xy: 611, 189 + xy: 460, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerbooster rotate: false - xy: 621, 189 + xy: 470, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyor rotate: false - xy: 875, 417 + xy: 480, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyormove rotate: false - xy: 885, 421 + xy: 298, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaser rotate: false - xy: 895, 421 + xy: 308, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlasercorner rotate: false - xy: 905, 421 + xy: 318, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaserrouter rotate: false - xy: 915, 421 + xy: 328, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduit rotate: false - xy: 925, 421 + xy: 338, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduitbottom rotate: false - xy: 935, 421 + xy: 348, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduittop rotate: false - xy: 945, 421 + xy: 358, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pump rotate: false - xy: 955, 421 + xy: 368, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/repairturret rotate: false - xy: 853, 415 + xy: 166, 81 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/rock1 rotate: false - xy: 965, 421 + xy: 378, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rock2 rotate: false - xy: 975, 421 + xy: 388, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/router rotate: false - xy: 985, 421 + xy: 398, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator rotate: false - xy: 995, 421 + xy: 408, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator-top rotate: false - xy: 248, 71 + xy: 418, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand1 rotate: false - xy: 258, 71 + xy: 428, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand2 rotate: false - xy: 268, 71 + xy: 438, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand3 rotate: false - xy: 278, 71 + xy: 448, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock1 rotate: false - xy: 288, 71 + xy: 458, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock2 rotate: false - xy: 298, 71 + xy: 468, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock3 rotate: false - xy: 308, 75 + xy: 875, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -853,98 +853,98 @@ blocks/sandedge index: -1 blocks/shadow rotate: false - xy: 142, 81 + xy: 178, 85 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/shieldgenerator rotate: false - xy: 328, 75 + xy: 895, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shotgunturret rotate: false - xy: 154, 81 + xy: 190, 85 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/shrub rotate: false - xy: 378, 75 + xy: 945, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shrubshadow rotate: false - xy: 388, 75 + xy: 955, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/smelter rotate: false - xy: 398, 75 + xy: 965, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/smelter-middle rotate: false - xy: 408, 75 + xy: 975, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sniperturret rotate: false - xy: 166, 81 + xy: 202, 85 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/snow1 rotate: false - xy: 418, 75 + xy: 985, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow2 rotate: false - xy: 428, 75 + xy: 995, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow3 rotate: false - xy: 438, 75 + xy: 298, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock1 rotate: false - xy: 448, 75 + xy: 308, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock2 rotate: false - xy: 458, 75 + xy: 318, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock3 rotate: false - xy: 468, 75 + xy: 328, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -958,28 +958,35 @@ blocks/snowedge index: -1 blocks/sorter rotate: false - xy: 478, 87 + xy: 338, 65 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/splitter + rotate: false + xy: 348, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyor rotate: false - xy: 488, 87 + xy: 358, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyormove rotate: false - xy: 478, 77 + xy: 368, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelwall rotate: false - xy: 488, 77 + xy: 378, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -993,56 +1000,56 @@ blocks/steelwall-large index: -1 blocks/steelwall-large-icon rotate: false - xy: 498, 80 + xy: 388, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone1 rotate: false - xy: 508, 80 + xy: 398, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone2 rotate: false - xy: 885, 411 + xy: 408, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone3 rotate: false - xy: 895, 411 + xy: 418, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock1 rotate: false - xy: 905, 411 + xy: 428, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock2 rotate: false - xy: 915, 411 + xy: 438, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock3 rotate: false - xy: 925, 411 + xy: 448, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonedrill rotate: false - xy: 935, 411 + xy: 458, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1056,35 +1063,35 @@ blocks/stoneedge index: -1 blocks/stoneformer rotate: false - xy: 945, 411 + xy: 468, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonewall rotate: false - xy: 955, 411 + xy: 885, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter rotate: false - xy: 965, 411 + xy: 895, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter-top rotate: false - xy: 975, 411 + xy: 905, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/thermalgenerator rotate: false - xy: 985, 411 + xy: 915, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1098,56 +1105,56 @@ blocks/titancannon index: -1 blocks/titancannon-icon rotate: false - xy: 178, 85 + xy: 214, 85 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/titanium1 rotate: false - xy: 995, 411 + xy: 925, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium2 rotate: false - xy: 308, 65 + xy: 935, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium3 rotate: false - xy: 318, 65 + xy: 945, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumdrill rotate: false - xy: 328, 65 + xy: 955, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumpurifier rotate: false - xy: 338, 65 + xy: 965, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumshieldwall rotate: false - xy: 348, 65 + xy: 975, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumwall rotate: false - xy: 358, 65 + xy: 985, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1161,49 +1168,49 @@ blocks/titaniumwall-large index: -1 blocks/titaniumwall-large-icon rotate: false - xy: 368, 65 + xy: 995, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/turret rotate: false - xy: 190, 85 + xy: 226, 85 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/uranium1 rotate: false - xy: 408, 65 + xy: 634, 267 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium2 rotate: false - xy: 418, 65 + xy: 644, 278 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium3 rotate: false - xy: 428, 65 + xy: 644, 268 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uraniumdrill rotate: false - xy: 438, 65 + xy: 654, 272 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/water rotate: false - xy: 468, 65 + xy: 684, 272 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1217,7 +1224,7 @@ blocks/wateredge index: -1 blocks/waveturret rotate: false - xy: 202, 85 + xy: 736, 369 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1231,21 +1238,21 @@ blocks/weaponfactory index: -1 blocks/weaponfactory-icon rotate: false - xy: 478, 67 + xy: 644, 258 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bullet rotate: false - xy: 284, 91 + xy: 290, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 chainbullet rotate: false - xy: 659, 283 + xy: 591, 188 size: 8, 7 orig: 8, 7 offset: 0, 0 @@ -1511,56 +1518,56 @@ enemyarrow index: -1 icon-coal rotate: false - xy: 248, 81 + xy: 278, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-dirium rotate: false - xy: 258, 81 + xy: 288, 81 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-iron rotate: false - xy: 268, 81 + xy: 238, 71 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-sand rotate: false - xy: 278, 81 + xy: 248, 71 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-steel rotate: false - xy: 288, 81 + xy: 258, 71 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-stone rotate: false - xy: 298, 81 + xy: 268, 71 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-titanium rotate: false - xy: 308, 85 + xy: 278, 71 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-uranium rotate: false - xy: 318, 85 + xy: 288, 71 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1609,28 +1616,28 @@ mechs/ship-standard index: -1 shell rotate: false - xy: 318, 75 + xy: 885, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 358, 75 + xy: 925, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 368, 75 + xy: 935, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 378, 65 + xy: 535, 127 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1993,6 +2000,13 @@ ui/icons/icon-line orig: 16, 16 offset: 0, 0 index: -1 +ui/icons/icon-liquid + rotate: false + xy: 535, 149 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 ui/icons/icon-load rotate: false xy: 853, 443 @@ -2021,27 +2035,34 @@ ui/icons/icon-loading orig: 16, 16 offset: 0, 0 index: -1 -ui/icons/icon-menu - rotate: false - xy: 535, 149 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 -ui/icons/icon-none +ui/icons/icon-logic rotate: false xy: 535, 137 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 -ui/icons/icon-pause +ui/icons/icon-menu rotate: false xy: 722, 415 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 +ui/icons/icon-none + rotate: false + xy: 722, 403 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +ui/icons/icon-pause + rotate: false + xy: 722, 391 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 ui/icons/icon-pencil rotate: false xy: 953, 495 @@ -2065,7 +2086,7 @@ ui/icons/icon-pick index: -1 ui/icons/icon-play rotate: false - xy: 722, 403 + xy: 734, 416 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2079,21 +2100,21 @@ ui/icons/icon-play-2 index: -1 ui/icons/icon-players rotate: false - xy: 722, 391 + xy: 734, 404 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icons/icon-power rotate: false - xy: 734, 416 + xy: 734, 392 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icons/icon-production rotate: false - xy: 734, 404 + xy: 724, 369 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2184,7 +2205,7 @@ ui/icons/icon-save-map index: -1 ui/icons/icon-settings rotate: false - xy: 734, 392 + xy: 724, 357 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2205,14 +2226,14 @@ ui/icons/icon-tools index: -1 ui/icons/icon-touch rotate: false - xy: 724, 369 + xy: 724, 345 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icons/icon-touchDelete rotate: false - xy: 724, 357 + xy: 728, 333 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2245,9 +2266,16 @@ ui/icons/icon-undo orig: 16, 16 offset: 0, 0 index: -1 +ui/icons/icon-units + rotate: false + xy: 728, 321 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 ui/icons/icon-weapon rotate: false - xy: 724, 345 + xy: 728, 309 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2332,7 +2360,7 @@ ui/selection index: -1 ui/slider rotate: false - xy: 474, 95 + xy: 532, 126 size: 1, 8 orig: 1, 8 offset: 0, 0 @@ -2441,70 +2469,70 @@ weapons/beam-equip index: -1 weapons/blaster rotate: false - xy: 244, 91 + xy: 250, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/blaster-equip rotate: false - xy: 254, 91 + xy: 260, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/clustergun rotate: false - xy: 294, 91 + xy: 300, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/clustergun-equip rotate: false - xy: 304, 95 + xy: 310, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/shockgun rotate: false - xy: 338, 75 + xy: 905, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/shockgun-equip rotate: false - xy: 348, 75 + xy: 915, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster rotate: false - xy: 388, 65 + xy: 742, 382 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster-equip rotate: false - xy: 398, 65 + xy: 634, 277 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/vulcan rotate: false - xy: 448, 65 + xy: 664, 272 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/vulcan-equip rotate: false - xy: 458, 65 + xy: 674, 272 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 6193c11acd..02f875ab87 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 119ee80449..5ab4dbe093 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Wed Feb 21 19:47:18 EST 2018 +#Wed Feb 21 20:34:22 EST 2018 version=release -androidBuildCode=262 +androidBuildCode=267 name=Mindustry code=3.3 build=custom build diff --git a/core/src/io/anuke/mindustry/resource/Recipes.java b/core/src/io/anuke/mindustry/resource/Recipes.java index 618f6429f4..c7e2b55f6e 100644 --- a/core/src/io/anuke/mindustry/resource/Recipes.java +++ b/core/src/io/anuke/mindustry/resource/Recipes.java @@ -30,22 +30,19 @@ public class Recipes { new Recipe(distribution, DistributionBlocks.router, stack(Item.stone, 2)), new Recipe(distribution, DistributionBlocks.junction, stack(Item.iron, 2)), new Recipe(distribution, DistributionBlocks.tunnel, stack(Item.iron, 2)), - new Recipe(distribution, DistributionBlocks.conduit, stack(Item.steel, 1)), - new Recipe(distribution, DistributionBlocks.pulseconduit, stack(Item.titanium, 1), stack(Item.steel, 1)), - new Recipe(distribution, DistributionBlocks.liquidrouter, stack(Item.steel, 2)), - new Recipe(distribution, DistributionBlocks.liquidjunction, stack(Item.steel, 2)), new Recipe(distribution, DistributionBlocks.sorter, stack(Item.steel, 2)), + new Recipe(distribution, DistributionBlocks.splitter, stack(Item.steel, 1)), - new Recipe(weapon, WeaponBlocks.turret, stack(Item.stone, 4)), + //new Recipe(weapon, WeaponBlocks.turret, stack(Item.stone, 4)), new Recipe(weapon, WeaponBlocks.doubleturret, stack(Item.stone, 7)), new Recipe(weapon, WeaponBlocks.machineturret, stack(Item.iron, 8), stack(Item.stone, 10)), - new Recipe(weapon, WeaponBlocks.shotgunturret, stack(Item.iron, 10), stack(Item.stone, 10)), + //new Recipe(weapon, WeaponBlocks.shotgunturret, stack(Item.iron, 10), stack(Item.stone, 10)), new Recipe(weapon, WeaponBlocks.flameturret, stack(Item.iron, 12), stack(Item.steel, 9)), new Recipe(weapon, WeaponBlocks.sniperturret, stack(Item.iron, 15), stack(Item.steel, 10)), new Recipe(weapon, WeaponBlocks.laserturret, stack(Item.steel, 12), stack(Item.titanium, 12)), new Recipe(weapon, WeaponBlocks.mortarturret, stack(Item.steel, 25), stack(Item.titanium, 15)), new Recipe(weapon, WeaponBlocks.teslaturret, stack(Item.steel, 20), stack(Item.titanium, 25), stack(Item.dirium, 15)), - new Recipe(weapon, WeaponBlocks.plasmaturret, stack(Item.steel, 10), stack(Item.titanium, 20), stack(Item.dirium, 15)), + //new Recipe(weapon, WeaponBlocks.plasmaturret, stack(Item.steel, 10), stack(Item.titanium, 20), stack(Item.dirium, 15)), new Recipe(weapon, WeaponBlocks.chainturret, stack(Item.steel, 50), stack(Item.titanium, 25), stack(Item.dirium, 40)), new Recipe(weapon, WeaponBlocks.titanturret, stack(Item.steel, 70), stack(Item.titanium, 50), stack(Item.dirium, 55)), @@ -82,6 +79,11 @@ public class Recipes { new Recipe(power, DefenseBlocks.repairturret, stack(Item.iron, 30)), new Recipe(power, DefenseBlocks.megarepairturret, stack(Item.iron, 20), stack(Item.steel, 30)), + new Recipe(liquid, DistributionBlocks.conduit, stack(Item.steel, 1)), + new Recipe(liquid, DistributionBlocks.pulseconduit, stack(Item.titanium, 1), stack(Item.steel, 1)), + new Recipe(liquid, DistributionBlocks.liquidrouter, stack(Item.steel, 2)), + new Recipe(liquid, DistributionBlocks.liquidjunction, stack(Item.steel, 2)), + new Recipe(production, ProductionBlocks.pump, stack(Item.steel, 10)), new Recipe(production, ProductionBlocks.fluxpump, stack(Item.steel, 10), stack(Item.dirium, 5)) ); diff --git a/core/src/io/anuke/mindustry/resource/Section.java b/core/src/io/anuke/mindustry/resource/Section.java index feb383eca8..34747cd099 100644 --- a/core/src/io/anuke/mindustry/resource/Section.java +++ b/core/src/io/anuke/mindustry/resource/Section.java @@ -1,5 +1,5 @@ package io.anuke.mindustry.resource; public enum Section{ - weapon, production, distribution, power, defense, crafting; + weapon, production, distribution, liquid, power, defense, crafting, units } diff --git a/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java b/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java index 0c3693ca4b..65fc790012 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java @@ -86,6 +86,8 @@ public class BlocksFragment implements Fragment{ } for (Section sec : Section.values()) { + int secrows = 4; + recipes.clear(); Recipes.getBy(sec, recipes); @@ -97,12 +99,13 @@ public class BlocksFragment implements Fragment{ input.recipe = null; } }); + button.setName("sectionbutton" + sec.name()); - add(button).growX().height(54).padLeft(-1).padTop(sec.ordinal() <= 2 ? -10 : -5); + add(button).growX().height(54).padLeft(-1).padTop(sec.ordinal() <= secrows-1 ? -10 : -5); button.getImageCell().size(40).padBottom(4).padTop(2); group.add(button); - if (sec.ordinal() % 3 == 2 && sec.ordinal() > 0) { + if (sec.ordinal() % secrows == secrows-1) { row(); } diff --git a/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java b/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java index 4e680e25bf..a8ec97aaaf 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java @@ -55,29 +55,13 @@ public class DebugFragment implements Fragment { row(); new button("paths", "toggle", () -> showPaths = !showPaths); row(); - new button("infammo", "toggle", () -> infiniteAmmo = !infiniteAmmo); - row(); new button("wave", () -> state.wavetime = 0f); row(); - new button("clear", () -> { - enemyGroup.clear(); - state.enemies = 0; - netClient.clearRecieved(); - }); - row(); new button("spawn", () -> { for(int i = 0; i < 30; i ++){ new Enemy(EnemyTypes.healer).set(player.x + Mathf.range(50f), player.y + Mathf.range(50f)).add(); } }); - row(); - new button("time", () -> { - Timers.resetTime(1080000 - 60*10); - }); - row(); - new button("time2", () -> { - Timers.resetTime(0); - }); }}.end(); row(); diff --git a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java index c03d1445ff..93e4e02325 100644 --- a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java @@ -59,5 +59,7 @@ public class DistributionBlocks{ teleporter = new Teleporter("teleporter"){{ }}, sorter = new Sorter("sorter"){{ + }}, + splitter = new Splitter("splitter"){{ }}; } diff --git a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java index 2830a111a1..0b2c6a366c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java @@ -104,6 +104,18 @@ public class ProductionBlocks{ } }, + pulverizer = new LiquidCrafter("siliconextractor"){ + { + input = Item.sand; + inputAmount = 5; + inputLiquid = Liquid.water; + liquidAmount = 18.99f; + output = Item.sand; + health = 50; + purifyTime = 50; + } + }, + siliconextractor = new LiquidCrafter("siliconextractor"){ { input = Item.sand; @@ -160,6 +172,13 @@ public class ProductionBlocks{ time = 4; } }, + + sandextractor = new Omnidrill("omnidrill"){ + { + time = 4; + } + }, + coalgenerator = new ItemPowerGenerator("coalgenerator"){ { generateItem = Item.coal; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/PowerSmelter.java b/core/src/io/anuke/mindustry/world/blocks/types/production/PowerSmelter.java new file mode 100644 index 0000000000..9b3b073100 --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/PowerSmelter.java @@ -0,0 +1,141 @@ +package io.anuke.mindustry.world.blocks.types.production; + +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.utils.Array; +import io.anuke.mindustry.entities.TileEntity; +import io.anuke.mindustry.graphics.Fx; +import io.anuke.mindustry.resource.Item; +import io.anuke.mindustry.world.BlockBar; +import io.anuke.mindustry.world.Tile; +import io.anuke.mindustry.world.blocks.types.PowerBlock; +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.util.Mathf; +import io.anuke.ucore.util.Strings; + +import java.util.Arrays; + +public class PowerSmelter extends PowerBlock { + protected final int timerDump = timers++; + protected final int timerCraft = timers++; + + protected Item[] inputs; + protected Item result; + protected float powerDrain = 0.01f; + + protected float heatUpTime = 80f; + protected float minHeat = 0.5f; + + protected float craftTime = 20f; //time to craft one item, so max 3 items per second by default + protected float burnDuration = 50f; //by default, the fuel will burn 45 frames, so that's 2.5 items/fuel at most + protected float burnEffectChance = 0.01f; + protected Effect craftEffect = Fx.smelt, burnEffect = Fx.fuelburn; + + protected int capacity = 20; + + public PowerSmelter(String name) { + super(name); + update = true; + solid = true; + } + + @Override + public void init(){ + for(Item item : inputs){ + bars.add(new BlockBar(Color.GREEN, true, tile -> (float)tile.entity.getItem(item)/capacity)); + } + } + + @Override + public void getStats(Array list){ + super.getStats(list); + list.add("[craftinfo]Input: " + Arrays.toString(inputs)); + list.add("[craftinfo]Power drain/second: " + Strings.toFixed(powerDrain*60f, 2)); + list.add("[craftinfo]Output: " + result); + list.add("[craftinfo]Fuel Duration: " + Strings.toFixed(burnDuration/60f, 1)); + list.add("[craftinfo]Max output/second: " + Strings.toFixed(60f/craftTime, 1)); + list.add("[craftinfo]Input Capacity: " + capacity); + list.add("[craftinfo]Output Capacity: " + capacity); + } + + @Override + public void update(Tile tile){ + PowerSmelterEntity entity = tile.entity(); + + if(entity.timer.get(timerDump, 5) && entity.hasItem(result)){ + tryDump(tile, -1, result); + } + + float used = powerDrain * Timers.delta(); + + //heat it up if there's enough power + if(entity.power > used){ + entity.power -= used; + entity.heat += 1f /heatUpTime; + if(Mathf.chance(Timers.delta() * burnEffectChance)) Effects.effect(burnEffect, entity.x + Mathf.range(2f), entity.y + Mathf.range(2f)); + }else{ + entity.heat -= 1f /heatUpTime; + } + + entity.heat = Mathf.clamp(entity.heat); + + //make sure it has all the items + for(Item item : inputs){ + if(!entity.hasItem(item)){ + return; + } + } + + if(entity.getItem(result) >= capacity //output full + || entity.heat <= minHeat //not burning + || !entity.timer.get(timerCraft, craftTime)){ //not yet time + return; + } + + for(Item item : inputs){ + entity.removeItem(item, 1); + } + + offloadNear(tile, result); + Effects.effect(craftEffect, entity); + } + + @Override + public boolean acceptItem(Item item, Tile tile, Tile source){ + boolean isInput = false; + + for(Item req : inputs){ + if(req == item){ + isInput = true; + break; + } + } + + return (isInput && tile.entity.getItem(item) < capacity); + } + + @Override + public void draw(Tile tile){ + super.draw(tile); + + Smelter.CrafterEntity entity = tile.entity(); + + //draw glowing center + if(entity.burnTime > 0){ + Draw.color(1f, 1f, 1f, Mathf.absin(Timers.time(), 9f, 0.4f) + Mathf.random(0.05f)); + Draw.rect("smelter-middle", tile.worldx(), tile.worldy()); + Draw.color(); + } + } + + @Override + public TileEntity getEntity() { + return new PowerSmelterEntity(); + } + + class PowerSmelterEntity extends PowerEntity{ + public float heat; + } +} diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/Smelter.java b/core/src/io/anuke/mindustry/world/blocks/types/production/Smelter.java index 470075b338..43211deb6a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/Smelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/Smelter.java @@ -42,9 +42,6 @@ public class Smelter extends Block{ for(Item item : inputs){ bars.add(new BlockBar(Color.GREEN, true, tile -> (float)tile.entity.getItem(item)/capacity)); } - //fuel and output bars, respectively: should these be added, or is it too cluttery? - //bars.add(new BlockBar(Color.ORANGE, true, tile -> (float)tile.entity.getItem(fuel)/capacity)); - //bars.add(new BlockBar(Color.LIGHT_GRAY, true, tile -> (float)tile.entity.getItem(result)/capacity)); } @Override