diff --git a/core/assets-raw/sprites/ui/icons/icon-nullitem.png b/core/assets-raw/sprites/ui/icons/icon-nullitem.png new file mode 100644 index 0000000000..a15ef92d0c Binary files /dev/null and b/core/assets-raw/sprites/ui/icons/icon-nullitem.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index be782dff2f..0fdf42319b 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -34,28 +34,28 @@ bridge-conveyor-end index: -1 phase-conveyor-arrow rotate: false - xy: 627, 118 + xy: 637, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conveyor-bridge rotate: false - xy: 637, 128 + xy: 627, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conveyor-end rotate: false - xy: 627, 108 + xy: 637, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 647, 98 + xy: 662, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -195,21 +195,21 @@ plasma-drill-top index: -1 tungsten-drill rotate: false - xy: 741, 161 + xy: 747, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-rotator rotate: false - xy: 747, 181 + xy: 747, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-top rotate: false - xy: 747, 171 + xy: 751, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -482,56 +482,56 @@ lavaedge index: -1 lead1 rotate: false - xy: 567, 181 + xy: 555, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead2 rotate: false - xy: 555, 171 + xy: 565, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 565, 171 + xy: 522, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor2 rotate: false - xy: 527, 131 + xy: 542, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor3 rotate: false - xy: 542, 151 + xy: 540, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor4 rotate: false - xy: 540, 141 + xy: 527, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor5 rotate: false - xy: 527, 121 + xy: 537, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor6 rotate: false - xy: 537, 131 + xy: 552, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -552,49 +552,49 @@ oiledge index: -1 rock2 rotate: false - xy: 637, 98 + xy: 647, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge rotate: false - xy: 657, 128 + xy: 657, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-1 rotate: false - xy: 657, 118 + xy: 657, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-2 rotate: false - xy: 657, 108 + xy: 657, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-side rotate: false - xy: 657, 98 + xy: 672, 159 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 662, 148 + xy: 660, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 660, 138 + xy: 657, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -608,49 +608,49 @@ sandedge index: -1 shrubshadow rotate: false - xy: 672, 149 + xy: 682, 149 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge rotate: false - xy: 667, 118 + xy: 667, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-1 rotate: false - xy: 667, 108 + xy: 667, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-2 rotate: false - xy: 667, 98 + xy: 670, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-side rotate: false - xy: 670, 138 + xy: 680, 139 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 682, 149 + xy: 667, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 667, 128 + xy: 667, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -671,42 +671,42 @@ spaceedge index: -1 stone-cliff-edge rotate: false - xy: 677, 118 + xy: 677, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-1 rotate: false - xy: 677, 108 + xy: 677, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-2 rotate: false - xy: 677, 98 + xy: 889, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-side rotate: false - xy: 889, 317 + xy: 736, 241 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 680, 139 + xy: 677, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 677, 128 + xy: 677, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -720,91 +720,91 @@ stoneedge index: -1 thorium1 rotate: false - xy: 736, 241 + xy: 736, 231 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium2 rotate: false - xy: 736, 231 + xy: 736, 221 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 736, 221 + xy: 736, 211 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 736, 211 + xy: 731, 201 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 731, 201 + xy: 731, 191 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 731, 191 + xy: 741, 201 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten1 rotate: false - xy: 741, 191 + xy: 737, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten2 rotate: false - xy: 737, 181 + xy: 737, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten3 rotate: false - xy: 737, 171 + xy: 741, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge rotate: false - xy: 751, 161 + xy: 873, 305 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-1 rotate: false - xy: 873, 305 + xy: 883, 305 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-2 rotate: false - xy: 883, 305 + xy: 871, 295 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-side rotate: false - xy: 871, 295 + xy: 881, 295 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -916,14 +916,14 @@ nuclearreactor-shadow index: -1 place-arrow rotate: false - xy: 637, 118 + xy: 647, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 647, 128 + xy: 637, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1168,28 +1168,28 @@ conduit-top-6 index: -1 liquid-router rotate: false - xy: 522, 151 + xy: 520, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router-bottom rotate: false - xy: 520, 141 + xy: 532, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router-liquid rotate: false - xy: 532, 151 + xy: 530, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-router-top rotate: false - xy: 530, 141 + xy: 527, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1217,70 +1217,70 @@ liquid-tank-top index: -1 phase-conduit-arrow rotate: false - xy: 617, 118 + xy: 627, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conduit-bridge rotate: false - xy: 627, 128 + xy: 617, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-conduit-end rotate: false - xy: 617, 108 + xy: 627, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-0 rotate: false - xy: 637, 108 + xy: 647, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-1 rotate: false - xy: 647, 118 + xy: 647, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-2 rotate: false - xy: 647, 108 + xy: 567, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-3 rotate: false - xy: 567, 98 + xy: 577, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-4 rotate: false - xy: 577, 98 + xy: 587, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-5 rotate: false - xy: 587, 98 + xy: 597, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulse-conduit-top-6 rotate: false - xy: 597, 98 + xy: 607, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1385,7 +1385,7 @@ nuclear-reactor-lights index: -1 rtg-generator-top rotate: false - xy: 662, 158 + xy: 662, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1560,14 +1560,14 @@ cultivator-top index: -1 lavasmelter rotate: false - xy: 545, 171 + xy: 567, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oilrefinery rotate: false - xy: 552, 151 + xy: 550, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1609,21 +1609,21 @@ poweralloysmelter-top index: -1 pulverizer rotate: false - xy: 607, 98 + xy: 617, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 617, 98 + xy: 627, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator-liquid rotate: false - xy: 672, 159 + xy: 682, 159 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1924,7 +1924,7 @@ reconstructor-open index: -1 repair-point-turret rotate: false - xy: 627, 98 + xy: 637, 98 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2113,7 +2113,7 @@ shell-back index: -1 shot rotate: false - xy: 682, 159 + xy: 672, 149 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2127,7 +2127,7 @@ transfer index: -1 transfer-arrow rotate: false - xy: 741, 201 + xy: 741, 191 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3478,28 +3478,28 @@ block-icon-wave index: -1 liquid-icon-cryofluid rotate: false - xy: 532, 161 + xy: 542, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-lava rotate: false - xy: 542, 161 + xy: 552, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-oil rotate: false - xy: 552, 161 + xy: 562, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon-water rotate: false - xy: 562, 161 + xy: 522, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3555,525 +3555,525 @@ mech-icon-tau-mech index: -1 ore-coal-grass1 rotate: false - xy: 550, 141 + xy: 527, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-grass2 rotate: false - xy: 527, 111 + xy: 537, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-grass3 rotate: false - xy: 537, 121 + xy: 547, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice1 rotate: false - xy: 547, 131 + xy: 562, 151 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice2 rotate: false - xy: 562, 151 + xy: 560, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice3 rotate: false - xy: 560, 141 + xy: 527, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand1 rotate: false - xy: 527, 101 + xy: 537, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand2 rotate: false - xy: 537, 111 + xy: 547, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand3 rotate: false - xy: 547, 121 + xy: 557, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow1 rotate: false - xy: 557, 131 + xy: 537, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow2 rotate: false - xy: 537, 101 + xy: 547, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow3 rotate: false - xy: 547, 111 + xy: 557, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone1 rotate: false - xy: 557, 121 + xy: 547, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone2 rotate: false - xy: 547, 101 + xy: 557, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone3 rotate: false - xy: 557, 111 + xy: 557, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass1 rotate: false - xy: 557, 101 + xy: 577, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass2 rotate: false - xy: 577, 178 + xy: 587, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass3 rotate: false - xy: 587, 178 + xy: 597, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice1 rotate: false - xy: 597, 178 + xy: 607, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice2 rotate: false - xy: 607, 178 + xy: 617, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice3 rotate: false - xy: 617, 178 + xy: 627, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand1 rotate: false - xy: 627, 178 + xy: 637, 178 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand2 rotate: false - xy: 637, 178 + xy: 575, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand3 rotate: false - xy: 575, 168 + xy: 585, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow1 rotate: false - xy: 585, 168 + xy: 595, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow2 rotate: false - xy: 595, 168 + xy: 605, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow3 rotate: false - xy: 605, 168 + xy: 615, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone1 rotate: false - xy: 615, 168 + xy: 625, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone2 rotate: false - xy: 625, 168 + xy: 635, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone3 rotate: false - xy: 635, 168 + xy: 572, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass1 rotate: false - xy: 572, 158 + xy: 582, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass2 rotate: false - xy: 582, 158 + xy: 592, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass3 rotate: false - xy: 592, 158 + xy: 602, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice1 rotate: false - xy: 602, 158 + xy: 612, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice2 rotate: false - xy: 612, 158 + xy: 622, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice3 rotate: false - xy: 622, 158 + xy: 632, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand1 rotate: false - xy: 632, 158 + xy: 572, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand2 rotate: false - xy: 572, 148 + xy: 582, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand3 rotate: false - xy: 582, 148 + xy: 592, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow1 rotate: false - xy: 592, 148 + xy: 602, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow2 rotate: false - xy: 602, 148 + xy: 612, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow3 rotate: false - xy: 612, 148 + xy: 622, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone1 rotate: false - xy: 622, 148 + xy: 632, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone2 rotate: false - xy: 632, 148 + xy: 645, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone3 rotate: false - xy: 645, 168 + xy: 655, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass1 rotate: false - xy: 655, 168 + xy: 642, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass2 rotate: false - xy: 642, 158 + xy: 642, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass3 rotate: false - xy: 642, 148 + xy: 652, 158 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice1 rotate: false - xy: 652, 158 + xy: 652, 148 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice2 rotate: false - xy: 652, 148 + xy: 570, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice3 rotate: false - xy: 570, 138 + xy: 580, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand1 rotate: false - xy: 580, 138 + xy: 590, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand2 rotate: false - xy: 590, 138 + xy: 600, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand3 rotate: false - xy: 600, 138 + xy: 610, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow1 rotate: false - xy: 610, 138 + xy: 620, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow2 rotate: false - xy: 620, 138 + xy: 630, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow3 rotate: false - xy: 630, 138 + xy: 640, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone1 rotate: false - xy: 640, 138 + xy: 650, 138 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone2 rotate: false - xy: 650, 138 + xy: 567, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone3 rotate: false - xy: 567, 128 + xy: 567, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass1 rotate: false - xy: 567, 118 + xy: 577, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass2 rotate: false - xy: 577, 128 + xy: 567, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass3 rotate: false - xy: 567, 108 + xy: 577, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice1 rotate: false - xy: 577, 118 + xy: 587, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice2 rotate: false - xy: 587, 128 + xy: 577, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice3 rotate: false - xy: 577, 108 + xy: 587, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand1 rotate: false - xy: 587, 118 + xy: 597, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand2 rotate: false - xy: 597, 128 + xy: 587, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand3 rotate: false - xy: 587, 108 + xy: 597, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow1 rotate: false - xy: 597, 118 + xy: 607, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow2 rotate: false - xy: 607, 128 + xy: 597, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow3 rotate: false - xy: 597, 108 + xy: 607, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone1 rotate: false - xy: 607, 118 + xy: 617, 128 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone2 rotate: false - xy: 617, 128 + xy: 607, 108 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone3 rotate: false - xy: 607, 108 + xy: 617, 118 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4108,112 +4108,112 @@ vtol index: -1 item-biomatter rotate: false - xy: 721, 161 + xy: 731, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-blast-compound rotate: false - xy: 731, 161 + xy: 775, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-carbide rotate: false - xy: 775, 302 + xy: 785, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 785, 302 + xy: 795, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 795, 302 + xy: 507, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-phase-matter rotate: false - xy: 507, 181 + xy: 505, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plastanium rotate: false - xy: 505, 171 + xy: 517, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-pyratite rotate: false - xy: 517, 181 + xy: 527, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-sand rotate: false - xy: 527, 181 + xy: 515, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 515, 171 + xy: 537, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 537, 181 + xy: 525, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-surge-alloy rotate: false - xy: 525, 171 + xy: 547, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 547, 181 + xy: 535, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 535, 171 + xy: 557, 181 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-tungsten rotate: false - xy: 557, 181 + xy: 545, 171 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquid-icon rotate: false - xy: 522, 161 + xy: 532, 161 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4976,6 +4976,13 @@ icon-none orig: 10, 10 offset: 0, 0 index: -1 +icon-nullitem + rotate: false + xy: 721, 161 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 icon-pause rotate: false xy: 476, 80 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 367ec17fe6..76494d94a4 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/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index 9bdae7e9ef..c8faa59ad6 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -47,7 +47,6 @@ public class Recipes implements ContentList{ new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.lead, 6)); //advanced carbide transporation - //new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.carbide, 2), new ItemStack(Items.tungsten, 2)); new Recipe(distribution, DistributionBlocks.distributor, new ItemStack(Items.carbide, 8), new ItemStack(Items.tungsten, 8)); new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.carbide, 4), new ItemStack(Items.tungsten, 4)); new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.carbide, 4), new ItemStack(Items.tungsten, 8)); @@ -105,8 +104,8 @@ public class Recipes implements ContentList{ new Recipe(power, PowerBlocks.nuclearReactor, new ItemStack(Items.lead, 600), new ItemStack(Items.silicon, 400), new ItemStack(Items.carbide, 300), new ItemStack(Items.thorium, 300)); //new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.carbide, 50)); - new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 50)); - new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 70)); + //new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 50)); + new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.carbide, 40), new ItemStack(Items.silicon, 70)); new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.carbide, 500), new ItemStack(Items.thorium, 350)); //DRILLS, PRODUCERS diff --git a/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java b/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java index d3946f8339..854769e3fa 100644 --- a/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/StorageBlocks.java @@ -4,11 +4,10 @@ import io.anuke.mindustry.type.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.storage.CoreBlock; import io.anuke.mindustry.world.blocks.storage.SortedUnloader; -import io.anuke.mindustry.world.blocks.storage.Unloader; import io.anuke.mindustry.world.blocks.storage.Vault; public class StorageBlocks extends BlockList implements ContentList{ - public static Block core, vault, unloader, sortedunloader; + public static Block core, vault, unloader; @Override public void load(){ @@ -22,11 +21,7 @@ public class StorageBlocks extends BlockList implements ContentList{ itemCapacity = 2000; }}; - unloader = new Unloader("unloader"){{ - speed = 5; - }}; - - sortedunloader = new SortedUnloader("sortedunloader"){{ + unloader = new SortedUnloader("unloader"){{ speed = 5; }}; } diff --git a/core/src/io/anuke/mindustry/io/TypeIO.java b/core/src/io/anuke/mindustry/io/TypeIO.java index 34475643ea..20307d4ef3 100644 --- a/core/src/io/anuke/mindustry/io/TypeIO.java +++ b/core/src/io/anuke/mindustry/io/TypeIO.java @@ -259,12 +259,13 @@ public class TypeIO{ @WriteClass(Item.class) public static void writeItem(ByteBuffer buffer, Item item){ - buffer.put((byte) item.id); + buffer.put(item == null ? -1 : (byte) item.id); } @ReadClass(Item.class) public static Item readItem(ByteBuffer buffer){ - return Item.getByID(buffer.get()); + byte id = buffer.get(); + return id == -1 ? null : Item.getByID(id); } @WriteClass(Recipe.class) diff --git a/core/src/io/anuke/mindustry/world/BaseBlock.java b/core/src/io/anuke/mindustry/world/BaseBlock.java index 466996ddae..21fd327573 100644 --- a/core/src/io/anuke/mindustry/world/BaseBlock.java +++ b/core/src/io/anuke/mindustry/world/BaseBlock.java @@ -255,7 +255,7 @@ public abstract class BaseBlock{ return false; } - private void incrementDump(Tile tile, int prox){ + protected void incrementDump(Tile tile, int prox){ tile.setDump((byte) ((tile.getDump() + 1) % prox)); } diff --git a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java index 6456b886ad..ba9a5c4be4 100644 --- a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java @@ -207,7 +207,7 @@ public class BuildBlock extends Block{ builderID = builder.getID(); } - if(progress >= 1f){ + if(progress >= 1f || debug){ CallBlocks.onConstructFinish(tile, recipe.result, builderID, tile.getRotation(), tile.getTeam()); } } @@ -233,7 +233,7 @@ public class BuildBlock extends Block{ progress = Mathf.clamp(progress - amount); - if(progress <= 0){ + if(progress <= 0 || debug){ CallBlocks.onDeconstructFinish(tile, this.recipe == null ? previous : this.recipe.result); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/SelectionTrait.java b/core/src/io/anuke/mindustry/world/blocks/SelectionTrait.java index 45ba5bb105..d4ced9e265 100644 --- a/core/src/io/anuke/mindustry/world/blocks/SelectionTrait.java +++ b/core/src/io/anuke/mindustry/world/blocks/SelectionTrait.java @@ -1,10 +1,10 @@ package io.anuke.mindustry.world.blocks; -import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.utils.Array; import io.anuke.mindustry.type.Item; import io.anuke.ucore.function.Consumer; import io.anuke.ucore.function.Supplier; +import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.scene.style.TextureRegionDrawable; import io.anuke.ucore.scene.ui.ButtonGroup; import io.anuke.ucore.scene.ui.ImageButton; @@ -15,22 +15,34 @@ import static io.anuke.mindustry.Vars.control; public interface SelectionTrait{ default void buildItemTable(Table table, Supplier holder, Consumer consumer){ + buildItemTable(table, false, holder, consumer); + } + + default void buildItemTable(Table table, boolean nullItem, Supplier holder, Consumer consumer){ Array items = Item.all(); ButtonGroup group = new ButtonGroup<>(); Table cont = new Table(); + cont.defaults().size(38, 42).padBottom(-5.1f); int i = 0; + if(nullItem){ + ImageButton button = cont.addImageButton("white", "toggle", 24, () -> consumer.accept(null)).group(group).get(); + button.getStyle().imageUp = new TextureRegionDrawable(Draw.region("icon-nullitem")); + button.setChecked(holder.get() == null); + + i ++; + } + for(Item item : items){ if(!control.database().isUnlocked(item)) continue; - final int f = i; - ImageButton button = cont.addImageButton("white", "toggle", 24, () -> consumer.accept(items.get(f))) - .size(38, 42).padBottom(-5.1f).group(group).get(); - button.getStyle().imageUp = new TextureRegionDrawable(new TextureRegion(items.get(i).region)); - button.setChecked(holder.get().id == f); + ImageButton button = cont.addImageButton("white", "toggle", 24, () -> consumer.accept(item)) + .group(group).get(); + button.getStyle().imageUp = new TextureRegionDrawable(item.region); + button.setChecked(holder.get() == item); if(i++ % 4 == 3){ cont.row(); diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Router.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Router.java deleted file mode 100644 index 5994982a77..0000000000 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Router.java +++ /dev/null @@ -1,55 +0,0 @@ -package io.anuke.mindustry.world.blocks.distribution; - -import io.anuke.mindustry.type.Item; -import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.meta.BlockGroup; -import io.anuke.ucore.core.Timers; - -public class Router extends Block{ - - public Router(String name){ - super(name); - update = true; - solid = true; - itemCapacity = 20; - hasItems = true; - group = BlockGroup.transportation; - autoSleep = true; - } - - @Override - public void update(Tile tile){ - int iterations = Math.max(1, (int) (Timers.delta() + 0.4f)); - boolean moved = tile.entity.items.total() > 0; - - for(int i = 0; i < iterations; i++){ - if(tile.entity.items.total() > 0){ - tryDump(tile); - moved = true; - } - } - - if(!moved){ - tile.entity.sleep(); - } - } - - @Override - public boolean canDump(Tile tile, Tile to, Item item){ - return !(to.block() instanceof Router) || ((float) to.target().entity.items.total() / to.target().block().itemCapacity) < ((float) tile.entity.items.total() / to.target().block().itemCapacity); - } - - @Override - public void handleItem(Item item, Tile tile, Tile source){ - super.handleItem(item, tile, source); - tile.entity.wakeUp(); - } - - @Override - public boolean acceptItem(Item item, Tile tile, Tile source){ - int items = tile.entity.items.total(); - return items < itemCapacity; - } - -} diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/SortedUnloader.java b/core/src/io/anuke/mindustry/world/blocks/storage/SortedUnloader.java index 00cf65918c..20363f7f31 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/SortedUnloader.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/SortedUnloader.java @@ -1,5 +1,6 @@ package io.anuke.mindustry.world.blocks.storage; +import com.badlogic.gdx.graphics.Color; import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Remote; import io.anuke.mindustry.content.Items; @@ -24,8 +25,6 @@ public class SortedUnloader extends Unloader implements SelectionTrait{ configurable = true; } - //TODO call event - @Remote(targets = Loc.both, called = Loc.both, in = In.blocks, forward = true) public static void setSortedUnloaderItem(Player player, Tile tile, Item item){ SortedUnloaderEntity entity = tile.entity(); @@ -39,7 +38,7 @@ public class SortedUnloader extends Unloader implements SelectionTrait{ if(entity.items.total() == 0 && entity.timer.get(timerUnload, speed)){ tile.allNearby(other -> { if(other.block() instanceof StorageBlock && entity.items.total() == 0 && - ((StorageBlock) other.block()).hasItem(other, entity.sortItem)){ + ((entity.sortItem == null && other.entity.items.total() > 0) || ((StorageBlock) other.block()).hasItem(other, entity.sortItem))){ offloadNear(tile, ((StorageBlock) other.block()).removeItem(other, entity.sortItem)); } }); @@ -56,7 +55,7 @@ public class SortedUnloader extends Unloader implements SelectionTrait{ SortedUnloaderEntity entity = tile.entity(); - Draw.color(entity.sortItem.color); + Draw.color(entity.sortItem == null ? Color.WHITE : entity.sortItem.color); Draw.rect("blank", tile.worldx(), tile.worldy(), 2f, 2f); Draw.color(); } @@ -64,7 +63,7 @@ public class SortedUnloader extends Unloader implements SelectionTrait{ @Override public void buildTable(Tile tile, Table table){ SortedUnloaderEntity entity = tile.entity(); - buildItemTable(table, () -> entity.sortItem, item -> CallBlocks.setSortedUnloaderItem(null, tile, item)); + buildItemTable(table, true, () -> entity.sortItem, item -> CallBlocks.setSortedUnloaderItem(null, tile, item)); } @Override @@ -73,16 +72,17 @@ public class SortedUnloader extends Unloader implements SelectionTrait{ } public static class SortedUnloaderEntity extends TileEntity{ - public Item sortItem = Items.tungsten; + public Item sortItem = null; @Override public void write(DataOutputStream stream) throws IOException{ - stream.writeByte(sortItem.id); + stream.writeByte(sortItem == null ? -1 : sortItem.id); } @Override public void read(DataInputStream stream) throws IOException{ - sortItem = Item.all().get(stream.readByte()); + byte id = stream.readByte(); + sortItem = id == -1 ? null : Item.all().get(id); } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/Vault.java b/core/src/io/anuke/mindustry/world/blocks/storage/Vault.java index 16e23306ea..73b8bbd003 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/Vault.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/Vault.java @@ -1,6 +1,9 @@ package io.anuke.mindustry.world.blocks.storage; +import com.badlogic.gdx.utils.Array; +import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.world.Edges; import io.anuke.mindustry.world.Tile; import io.anuke.ucore.core.Timers; @@ -34,12 +37,53 @@ public class Vault extends StorageBlock{ return tile.entity.items.total() < itemCapacity; } + @Override + public boolean tryDump(Tile tile, Item todump){ + TileEntity entity = tile.entity; + if(entity == null || !hasItems || tile.entity.items.total() == 0 || (todump != null && !entity.items.has(todump))) + return false; + + Array proximity = entity.proximity(); + int dump = tile.getDump(); + + if(proximity.size == 0) return false; + + for(int i = 0; i < proximity.size; i++){ + Tile other = proximity.get((i + dump) % proximity.size); + Tile in = Edges.getFacingEdge(tile, other); + + if(other == null || !(other.block() instanceof StorageBlock)) continue; + + if(other.block() instanceof Vault){ + + for(int ii = 0; ii < Item.all().size; ii++){ + Item item = Item.getByID(ii); + + if(entity.items.has(item) && other.block().acceptItem(item, other, in) && canDump(tile, other, item)){ + other.block().handleItem(item, other, in); + tile.entity.items.remove(item, 1); + incrementDump(tile, proximity.size); + return true; + } + } + }else{ + + if(other.block().acceptItem(todump, other, in) && canDump(tile, other, todump)){ + other.block().handleItem(todump, other, in); + tile.entity.items.remove(todump, 1); + incrementDump(tile, proximity.size); + return true; + } + } + + incrementDump(tile, proximity.size); + } + + return false; + } + @Override public boolean canDump(Tile tile, Tile to, Item item){ - to = to.target(); - if(!(to.block() instanceof StorageBlock)) return false; - return !(to.block() instanceof Vault) || (float) to.entity.items.total() / to.block().itemCapacity < (float) tile.entity.items.total() / itemCapacity; - } }