diff --git a/core/assets-raw/sprites/units/drone.png b/core/assets-raw/sprites/units/drone.png index 91820fdb38..18367666ce 100644 Binary files a/core/assets-raw/sprites/units/drone.png and b/core/assets-raw/sprites/units/drone.png differ diff --git a/core/assets-raw/sprites/units/monsoon.png b/core/assets-raw/sprites/units/monsoon.png new file mode 100644 index 0000000000..2c89a57c48 Binary files /dev/null and b/core/assets-raw/sprites/units/monsoon.png differ diff --git a/core/assets-raw/sprites/units/scout.png b/core/assets-raw/sprites/units/scout.png index 6a3ad810dd..25474f4e5a 100644 Binary files a/core/assets-raw/sprites/units/scout.png and b/core/assets-raw/sprites/units/scout.png differ diff --git a/core/assets-raw/sprites/units/titan-base.png b/core/assets-raw/sprites/units/titan-base.png new file mode 100644 index 0000000000..fb5830f3ff Binary files /dev/null and b/core/assets-raw/sprites/units/titan-base.png differ diff --git a/core/assets-raw/sprites/units/titan-leg.png b/core/assets-raw/sprites/units/titan-leg.png new file mode 100644 index 0000000000..eb21e7da28 Binary files /dev/null and b/core/assets-raw/sprites/units/titan-leg.png differ diff --git a/core/assets-raw/sprites/units/titan.png b/core/assets-raw/sprites/units/titan.png new file mode 100644 index 0000000000..fe5f33de7f Binary files /dev/null and b/core/assets-raw/sprites/units/titan.png differ diff --git a/core/assets-raw/sprites/units/vtol-booster-1.png b/core/assets-raw/sprites/units/vtol-booster-1.png deleted file mode 100644 index 509bba3e21..0000000000 Binary files a/core/assets-raw/sprites/units/vtol-booster-1.png and /dev/null differ diff --git a/core/assets-raw/sprites/units/vtol-booster-2.png b/core/assets-raw/sprites/units/vtol-booster-2.png deleted file mode 100644 index c98ed041f5..0000000000 Binary files a/core/assets-raw/sprites/units/vtol-booster-2.png and /dev/null differ diff --git a/core/assets-raw/sprites/units/vtol.png b/core/assets-raw/sprites/units/vtol.png index 7497dee1d0..d33f701bb9 100644 Binary files a/core/assets-raw/sprites/units/vtol.png and b/core/assets-raw/sprites/units/vtol.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index ed2a5622ed..325906e4ec 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -13,28 +13,28 @@ background index: -1 conveyor-arrow rotate: false - xy: 487, 40 + xy: 712, 167 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-arrow rotate: false - xy: 787, 381 + xy: 787, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-bridge rotate: false - xy: 777, 371 + xy: 797, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-end rotate: false - xy: 837, 415 + xy: 777, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -90,42 +90,42 @@ blast-drill-top index: -1 carbide-drill rotate: false - xy: 355, 25 + xy: 747, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 carbide-drill-rotator rotate: false - xy: 365, 25 + xy: 757, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 carbide-drill-top rotate: false - xy: 375, 25 + xy: 767, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laser-drill rotate: false - xy: 315, 63 + xy: 333, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 laser-drill-rotator rotate: false - xy: 333, 81 + xy: 333, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 laser-drill-top rotate: false - xy: 333, 63 + xy: 351, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -188,49 +188,49 @@ plasma-drill-top index: -1 tungsten-drill rotate: false - xy: 967, 390 + xy: 485, 102 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-rotator rotate: false - xy: 957, 370 + xy: 495, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-top rotate: false - xy: 967, 380 + xy: 505, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-extractor rotate: false - xy: 297, 45 + xy: 387, 45 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 water-extractor-liquid rotate: false - xy: 315, 45 + xy: 405, 45 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 water-extractor-rotator rotate: false - xy: 333, 45 + xy: 423, 45 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 water-extractor-top rotate: false - xy: 351, 45 + xy: 243, 27 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -272,609 +272,609 @@ block-icon-blackstone index: -1 blackstone2 rotate: false - xy: 649, 232 + xy: 839, 429 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone3 rotate: false - xy: 659, 233 + xy: 849, 429 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneedge rotate: false - xy: 755, 340 + xy: 755, 358 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 coal1 rotate: false - xy: 385, 25 + xy: 712, 227 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal2 rotate: false - xy: 395, 25 + xy: 712, 217 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal3 rotate: false - xy: 447, 38 + xy: 712, 207 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt2 rotate: false - xy: 437, 29 + xy: 435, 125 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt3 rotate: false - xy: 447, 28 + xy: 435, 115 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirtedge rotate: false - xy: 683, 225 + xy: 706, 275 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 grass-cliff-edge rotate: false - xy: 760, 262 + xy: 710, 145 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass-cliff-edge-1 rotate: false - xy: 770, 264 + xy: 710, 135 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass-cliff-edge-2 rotate: false - xy: 722, 263 + xy: 661, 140 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass-cliff-side rotate: false - xy: 714, 189 + xy: 661, 130 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass2 rotate: false - xy: 487, 30 + xy: 445, 106 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass3 rotate: false - xy: 497, 30 + xy: 710, 155 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassedge rotate: false - xy: 686, 211 + xy: 734, 292 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 ice-cliff-edge rotate: false - xy: 767, 420 + xy: 671, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice-cliff-edge-1 rotate: false - xy: 767, 410 + xy: 681, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice-cliff-edge-2 rotate: false - xy: 767, 400 + xy: 671, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice-cliff-side rotate: false - xy: 767, 390 + xy: 671, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice2 rotate: false - xy: 724, 189 + xy: 661, 120 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice3 rotate: false - xy: 734, 189 + xy: 661, 110 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iceedge rotate: false - xy: 672, 197 + xy: 748, 290 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 icerock2 rotate: false - xy: 767, 380 + xy: 681, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow1 rotate: false - xy: 767, 370 + xy: 681, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow1 rotate: false - xy: 767, 370 + xy: 681, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow2 rotate: false - xy: 767, 360 + xy: 691, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow2 rotate: false - xy: 767, 360 + xy: 691, 131 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lavaedge rotate: false - xy: 686, 197 + xy: 748, 276 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 lead1 rotate: false - xy: 817, 401 + xy: 797, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead2 rotate: false - xy: 827, 405 + xy: 807, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 807, 391 + xy: 777, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor2 rotate: false - xy: 837, 405 + xy: 827, 415 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor3 rotate: false - xy: 847, 407 + xy: 797, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor4 rotate: false - xy: 817, 391 + xy: 807, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor5 rotate: false - xy: 827, 395 + xy: 817, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor6 rotate: false - xy: 807, 381 + xy: 827, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalflooredge rotate: false - xy: 714, 213 + xy: 686, 209 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 oiledge rotate: false - xy: 714, 199 + xy: 672, 195 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 rock2 rotate: false - xy: 927, 393 + xy: 989, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge rotate: false - xy: 917, 373 + xy: 987, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-1 rotate: false - xy: 927, 383 + xy: 997, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-edge-2 rotate: false - xy: 937, 393 + xy: 987, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand-cliff-side rotate: false - xy: 947, 403 + xy: 997, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 947, 413 + xy: 1009, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 907, 363 + xy: 987, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandedge rotate: false - xy: 728, 213 + xy: 658, 187 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shrubshadow rotate: false - xy: 937, 383 + xy: 1007, 387 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge rotate: false - xy: 937, 373 + xy: 997, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-1 rotate: false - xy: 947, 383 + xy: 1007, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-edge-2 rotate: false - xy: 937, 363 + xy: 727, 243 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow-cliff-side rotate: false - xy: 947, 373 + xy: 737, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 947, 393 + xy: 1007, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 927, 363 + xy: 987, 367 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowedge rotate: false - xy: 639, 110 + xy: 658, 173 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 spaceedge rotate: false - xy: 653, 110 + xy: 672, 167 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 stone-cliff-edge rotate: false - xy: 897, 353 + xy: 757, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-1 rotate: false - xy: 907, 353 + xy: 767, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-2 rotate: false - xy: 917, 353 + xy: 777, 246 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-side rotate: false - xy: 927, 353 + xy: 455, 122 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 947, 363 + xy: 717, 241 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 887, 353 + xy: 747, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneedge rotate: false - xy: 827, 435 + xy: 686, 167 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 thorium1 rotate: false - xy: 937, 353 + xy: 455, 112 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium2 rotate: false - xy: 947, 353 + xy: 465, 122 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 957, 420 + xy: 465, 112 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 957, 410 + xy: 475, 122 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 967, 420 + xy: 475, 112 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 957, 400 + xy: 485, 122 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten1 rotate: false - xy: 957, 390 + xy: 455, 102 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten2 rotate: false - xy: 967, 400 + xy: 465, 102 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten3 rotate: false - xy: 957, 380 + xy: 475, 102 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge rotate: false - xy: 957, 360 + xy: 515, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-1 rotate: false - xy: 967, 370 + xy: 525, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-2 rotate: false - xy: 967, 360 + xy: 535, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-side rotate: false - xy: 957, 350 + xy: 545, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 wateredge rotate: false - xy: 437, 49 + xy: 734, 264 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 block-border rotate: false - xy: 487, 50 + xy: 869, 429 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-elevation rotate: false - xy: 827, 425 + xy: 879, 429 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 combustion-generator-top rotate: false - xy: 827, 425 + xy: 879, 429 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-middle rotate: false - xy: 417, 37 + xy: 959, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump-liquid rotate: false - xy: 417, 37 + xy: 959, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-slope rotate: false - xy: 427, 37 + xy: 969, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 border rotate: false - xy: 437, 39 + xy: 979, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-liquid rotate: false - xy: 467, 38 + xy: 712, 187 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 cross-1 rotate: false - xy: 497, 40 + xy: 777, 256 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 cross-2 rotate: false - xy: 417, 99 + xy: 499, 121 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -895,7 +895,7 @@ cross-4 index: -1 enemyspawn rotate: false - xy: 477, 28 + xy: 445, 116 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -909,49 +909,49 @@ nuclearreactor-shadow index: -1 place-arrow rotate: false - xy: 917, 393 + xy: 977, 400 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 927, 403 + xy: 967, 380 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ripples rotate: false - xy: 451, 48 + xy: 899, 441 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 rubble-1-0 rotate: false - xy: 405, 63 + xy: 423, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 rubble-1-1 rotate: false - xy: 423, 81 + xy: 423, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 rubble-2-0 rotate: false - xy: 423, 63 + xy: 261, 37 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 rubble-2-1 rotate: false - xy: 261, 37 + xy: 279, 43 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -972,14 +972,14 @@ rubble-3-1 index: -1 shadow-1 rotate: false - xy: 489, 72 + xy: 947, 441 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 shadow-2 rotate: false - xy: 209, 132 + xy: 587, 212 size: 18, 18 orig: 18, 18 offset: 0, 0 @@ -1014,119 +1014,119 @@ shadow-6 index: -1 shadow-round-1 rotate: false - xy: 489, 60 + xy: 827, 425 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 shadow-round-2 rotate: false - xy: 587, 212 + xy: 1001, 473 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 bridgeconduit-arrow rotate: false - xy: 295, 25 + xy: 989, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconduit-bridge rotate: false - xy: 305, 25 + xy: 999, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconduit-end rotate: false - xy: 315, 25 + xy: 1009, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor-arrow rotate: false - xy: 325, 25 + xy: 717, 251 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor-bridge rotate: false - xy: 335, 25 + xy: 727, 253 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor-end rotate: false - xy: 345, 25 + xy: 737, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-bottom rotate: false - xy: 457, 38 + xy: 712, 197 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-top rotate: false - xy: 477, 38 + xy: 712, 177 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-arrow rotate: false - xy: 827, 415 + xy: 777, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-bridge rotate: false - xy: 807, 401 + xy: 807, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-end rotate: false - xy: 797, 391 + xy: 817, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter rotate: false - xy: 797, 381 + xy: 787, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-bottom rotate: false - xy: 787, 371 + xy: 797, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-liquid rotate: false - xy: 777, 361 + xy: 807, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-top rotate: false - xy: 857, 417 + xy: 817, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1154,14 +1154,14 @@ liquidtank-top index: -1 pulseconduit-bottom rotate: false - xy: 937, 413 + xy: 977, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-top rotate: false - xy: 947, 423 + xy: 977, 380 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1266,7 +1266,7 @@ nuclear-reactor-lights index: -1 rtg-generator-top rotate: false - xy: 937, 403 + xy: 999, 407 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1287,210 +1287,210 @@ block-icon-alloy-fuser index: -1 alloy-smelter rotate: false - xy: 677, 339 + xy: 679, 319 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-alloy-smelter rotate: false - xy: 677, 339 + xy: 679, 319 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 arc-smelter rotate: false - xy: 195, 106 + xy: 679, 301 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-arc-smelter rotate: false - xy: 195, 106 + xy: 679, 301 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 biomattercompressor rotate: false - xy: 255, 109 + xy: 195, 106 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 biomattercompressor-frame0 rotate: false - xy: 463, 132 + xy: 255, 109 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 biomattercompressor-frame1 rotate: false - xy: 481, 132 + xy: 463, 132 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 biomattercompressor-frame2 rotate: false - xy: 499, 139 + xy: 481, 132 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 biomattercompressor-liquid rotate: false - xy: 517, 139 + xy: 499, 139 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 biomattercompressor-top rotate: false - xy: 535, 139 + xy: 517, 139 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blast-mixer rotate: false - xy: 553, 139 + xy: 535, 139 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-blast-mixer rotate: false - xy: 553, 139 + xy: 535, 139 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 centrifuge-liquid rotate: false - xy: 381, 99 + xy: 399, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 cryofluidmixer-bottom rotate: false - xy: 571, 121 + xy: 589, 136 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 cryofluidmixer-liquid rotate: false - xy: 589, 136 + xy: 589, 118 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 cryofluidmixer-top rotate: false - xy: 589, 118 + xy: 607, 120 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 cultivator rotate: false - xy: 607, 120 + xy: 625, 124 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 cultivator-middle rotate: false - xy: 625, 124 + xy: 643, 124 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 cultivator-top rotate: false - xy: 643, 124 + xy: 737, 426 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 lavasmelter rotate: false - xy: 847, 417 + xy: 787, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-weaver rotate: false - xy: 351, 81 + xy: 351, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 phase-weaver-bottom rotate: false - xy: 351, 63 + xy: 369, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 phase-weaver-weave rotate: false - xy: 369, 81 + xy: 369, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 plasteel-compressor-top rotate: false - xy: 369, 63 + xy: 387, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 poweralloysmelter-top rotate: false - xy: 387, 81 + xy: 387, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 powersmelter-top rotate: false - xy: 387, 63 + xy: 405, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 silicon-smelter-top rotate: false - xy: 387, 63 + xy: 405, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 pulverizer rotate: false - xy: 897, 363 + xy: 957, 370 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 907, 373 + xy: 967, 370 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator-liquid rotate: false - xy: 917, 363 + xy: 1007, 397 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1504,21 +1504,21 @@ core-open index: -1 block-1 rotate: false - xy: 659, 223 + xy: 859, 429 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-2 rotate: false - xy: 571, 139 + xy: 553, 139 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-2-top rotate: false - xy: 695, 339 + xy: 571, 139 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -1567,35 +1567,35 @@ arc-heat index: -1 crux rotate: false - xy: 499, 121 + xy: 517, 121 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 crux-heat rotate: false - xy: 517, 121 + xy: 535, 121 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 crux-panel-left rotate: false - xy: 535, 121 + xy: 553, 121 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 crux-panel-right rotate: false - xy: 553, 121 + xy: 571, 121 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 duo rotate: false - xy: 467, 28 + xy: 445, 126 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1616,28 +1616,28 @@ spectre index: -1 hail rotate: false - xy: 743, 342 + xy: 743, 360 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 scatter rotate: false - xy: 743, 342 + xy: 743, 360 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 lancer rotate: false - xy: 465, 60 + xy: 875, 439 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 lancer-heat rotate: false - xy: 477, 60 + xy: 887, 441 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1651,56 +1651,56 @@ meltdown index: -1 scatter-heat rotate: false - xy: 463, 48 + xy: 911, 441 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 scorch rotate: false - xy: 475, 48 + xy: 923, 441 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 scorch-shoot rotate: false - xy: 489, 84 + xy: 935, 441 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 swarmer rotate: false - xy: 279, 43 + xy: 297, 45 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 wave rotate: false - xy: 369, 45 + xy: 261, 19 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 wave-liquid rotate: false - xy: 387, 45 + xy: 279, 25 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 dronefactory-top rotate: false - xy: 791, 431 + xy: 809, 431 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 dronefactory-top-open rotate: false - xy: 809, 431 + xy: 731, 408 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -1714,28 +1714,28 @@ mech-factory index: -1 dart-ship-factory-open rotate: false - xy: 737, 426 + xy: 755, 430 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 delta-mech-factory-open rotate: false - xy: 755, 430 + xy: 773, 431 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 reconstructor-open rotate: false - xy: 405, 81 + xy: 405, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 repairpoint-turret rotate: false - xy: 917, 383 + xy: 977, 370 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1749,14 +1749,14 @@ ship-factory index: -1 door-large-open rotate: false - xy: 773, 431 + xy: 791, 431 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 door-open rotate: false - xy: 457, 28 + xy: 435, 105 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1812,21 +1812,21 @@ clear index: -1 enemyarrow rotate: false - xy: 750, 263 + xy: 649, 232 size: 8, 7 orig: 8, 7 offset: 0, 0 index: -1 error rotate: false - xy: 672, 211 + xy: 720, 277 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 laser rotate: false - xy: 1021, 499 + xy: 655, 186 size: 1, 12 orig: 1, 12 offset: 0, 0 @@ -1847,7 +1847,7 @@ laserfull index: -1 minelaser rotate: false - xy: 1017, 459 + xy: 1021, 499 size: 1, 12 orig: 1, 12 offset: 0, 0 @@ -1903,49 +1903,49 @@ shell index: -1 shell-back rotate: false - xy: 435, 99 + xy: 661, 162 size: 9, 9 orig: 9, 9 offset: 0, 0 index: -1 shot rotate: false - xy: 927, 373 + xy: 997, 377 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 transfer rotate: false - xy: 435, 121 + xy: 1017, 459 size: 1, 12 orig: 1, 12 offset: 0, 0 index: -1 transfer-arrow rotate: false - xy: 967, 410 + xy: 485, 112 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 transfer-end rotate: false - xy: 1001, 473 + xy: 677, 337 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 block-icon-arc rotate: false - xy: 713, 341 + xy: 632, 160 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-biomattercompressor rotate: false - xy: 679, 321 + xy: 697, 339 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -1959,112 +1959,112 @@ block-icon-blast-drill index: -1 block-icon-bridgeconduit rotate: false - xy: 883, 441 + xy: 889, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconduit rotate: false - xy: 883, 441 + xy: 889, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-bridgeconveyor rotate: false - xy: 893, 443 + xy: 899, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bridgeconveyor rotate: false - xy: 893, 443 + xy: 899, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-carbide-drill rotate: false - xy: 903, 443 + xy: 909, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-carbide-wall rotate: false - xy: 913, 443 + xy: 919, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 carbide-wall rotate: false - xy: 913, 443 + xy: 919, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-carbide-wall-large rotate: false - xy: 679, 303 + xy: 697, 321 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 carbide-wall-large rotate: false - xy: 679, 303 + xy: 697, 321 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-centrifuge rotate: false - xy: 697, 321 + xy: 697, 303 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 centrifuge rotate: false - xy: 697, 321 + xy: 697, 303 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-combustion-generator rotate: false - xy: 923, 443 + xy: 929, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 combustion-generator rotate: false - xy: 923, 443 + xy: 929, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-conduit rotate: false - xy: 933, 443 + xy: 939, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-conveyor rotate: false - xy: 943, 443 + xy: 949, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyor rotate: false - xy: 943, 443 + xy: 949, 431 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2085,7 +2085,7 @@ core index: -1 block-icon-cryofluidmixer rotate: false - xy: 697, 303 + xy: 715, 341 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2113,154 +2113,154 @@ dart-ship-factory index: -1 block-icon-deepwater rotate: false - xy: 953, 443 + xy: 297, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 deepwater rotate: false - xy: 953, 443 + xy: 297, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-deflector-wall rotate: false - xy: 963, 440 + xy: 307, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 deflector-wall rotate: false - xy: 963, 440 + xy: 307, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 phase-wall rotate: false - xy: 963, 440 + xy: 307, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-phase-wall rotate: false - xy: 963, 440 + xy: 307, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-deflector-wall-large rotate: false - xy: 632, 160 + xy: 273, 109 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 deflector-wall-large rotate: false - xy: 632, 160 + xy: 273, 109 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 phase-wall-large rotate: false - xy: 632, 160 + xy: 273, 109 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-phase-wall-large rotate: false - xy: 632, 160 + xy: 273, 109 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-delta-mech-factory rotate: false - xy: 273, 109 + xy: 291, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 delta-mech-factory rotate: false - xy: 273, 109 + xy: 291, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-dirt rotate: false - xy: 973, 440 + xy: 317, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt1 rotate: false - xy: 973, 440 + xy: 317, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-door rotate: false - xy: 494, 110 + xy: 327, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 door rotate: false - xy: 494, 110 + xy: 327, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-door-large rotate: false - xy: 291, 117 + xy: 309, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 door-large rotate: false - xy: 291, 117 + xy: 309, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-dronefactory rotate: false - xy: 309, 117 + xy: 327, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-droppoint rotate: false - xy: 494, 100 + xy: 337, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 droppoint rotate: false - xy: 494, 100 + xy: 337, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-duo rotate: false - xy: 504, 111 + xy: 347, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2281,112 +2281,112 @@ block-icon-fusion-reactor index: -1 block-icon-grass rotate: false - xy: 514, 111 + xy: 357, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass1 rotate: false - xy: 514, 111 + xy: 357, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-hail rotate: false - xy: 504, 101 + xy: 367, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-ice rotate: false - xy: 524, 111 + xy: 377, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice1 rotate: false - xy: 524, 111 + xy: 377, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-icerock rotate: false - xy: 514, 101 + xy: 387, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerock1 rotate: false - xy: 514, 101 + xy: 387, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-incinerator rotate: false - xy: 534, 111 + xy: 397, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 incinerator rotate: false - xy: 534, 111 + xy: 397, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-itemsource rotate: false - xy: 524, 101 + xy: 407, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 itemsource rotate: false - xy: 524, 101 + xy: 407, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-itemvoid rotate: false - xy: 544, 111 + xy: 417, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 itemvoid rotate: false - xy: 544, 111 + xy: 417, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-junction rotate: false - xy: 534, 101 + xy: 427, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 junction rotate: false - xy: 534, 101 + xy: 427, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-lancer rotate: false - xy: 327, 117 + xy: 345, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2407,84 +2407,84 @@ large-solar-panel index: -1 block-icon-laser-drill rotate: false - xy: 345, 117 + xy: 363, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-laserconduit rotate: false - xy: 554, 111 + xy: 295, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit rotate: false - xy: 554, 111 + xy: 295, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-laserconveyor rotate: false - xy: 544, 101 + xy: 305, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor rotate: false - xy: 544, 101 + xy: 305, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-lava rotate: false - xy: 564, 111 + xy: 315, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lava rotate: false - xy: 564, 111 + xy: 315, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-liquidjunction rotate: false - xy: 554, 101 + xy: 325, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidjunction rotate: false - xy: 554, 101 + xy: 325, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-liquidrouter rotate: false - xy: 574, 111 + xy: 335, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-liquidsource rotate: false - xy: 564, 101 + xy: 345, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidsource rotate: false - xy: 564, 101 + xy: 345, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2519,14 +2519,14 @@ core-top index: -1 block-icon-mechanical-pump rotate: false - xy: 574, 101 + xy: 355, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 mechanical-pump rotate: false - xy: 574, 101 + xy: 355, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2540,42 +2540,42 @@ block-icon-meltdown index: -1 block-icon-melter rotate: false - xy: 584, 108 + xy: 365, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 melter rotate: false - xy: 584, 108 + xy: 365, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-metalfloor rotate: false - xy: 594, 108 + xy: 375, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor1 rotate: false - xy: 594, 108 + xy: 375, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-multiplexer rotate: false - xy: 363, 117 + xy: 381, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 multiplexer rotate: false - xy: 363, 117 + xy: 381, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2596,14 +2596,14 @@ nuclear-reactor index: -1 block-icon-oil rotate: false - xy: 584, 98 + xy: 385, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oil rotate: false - xy: 584, 98 + xy: 385, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2617,35 +2617,35 @@ block-icon-oil-extractor index: -1 block-icon-oilrefinery rotate: false - xy: 594, 98 + xy: 395, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oilrefinery rotate: false - xy: 594, 98 + xy: 395, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-overflowgate rotate: false - xy: 497, 50 + xy: 405, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 overflowgate rotate: false - xy: 497, 50 + xy: 405, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-phase-weaver rotate: false - xy: 381, 117 + xy: 399, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2659,133 +2659,133 @@ block-icon-plasma-drill index: -1 block-icon-plasteel-compressor rotate: false - xy: 399, 117 + xy: 417, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 plasteel-compressor rotate: false - xy: 399, 117 + xy: 417, 117 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-power-node rotate: false - xy: 837, 425 + xy: 415, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 power-node rotate: false - xy: 837, 425 + xy: 415, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-power-node-large rotate: false - xy: 417, 117 + xy: 213, 98 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 power-node-large rotate: false - xy: 417, 117 + xy: 213, 98 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-powerinfinite rotate: false - xy: 847, 427 + xy: 425, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powerinfinite rotate: false - xy: 847, 427 + xy: 425, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-powervoid rotate: false - xy: 857, 427 + xy: 772, 266 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powervoid rotate: false - xy: 857, 427 + xy: 772, 266 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-pulseconduit rotate: false - xy: 867, 427 + xy: 959, 440 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-pulverizer rotate: false - xy: 877, 427 + xy: 969, 440 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-reconstructor rotate: false - xy: 213, 98 + xy: 231, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 dronefactory rotate: false - xy: 213, 98 + xy: 231, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 reconstructor rotate: false - xy: 213, 98 + xy: 231, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-repairpoint rotate: false - xy: 766, 294 + xy: 979, 440 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 repairpoint rotate: false - xy: 766, 294 + xy: 979, 440 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-resupplypoint rotate: false - xy: 766, 284 + xy: 959, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 resupplypoint rotate: false - xy: 766, 284 + xy: 959, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2799,399 +2799,399 @@ block-icon-ripple index: -1 block-icon-rock rotate: false - xy: 766, 274 + xy: 969, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rock1 rotate: false - xy: 766, 274 + xy: 969, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-rotary-pump rotate: false - xy: 231, 99 + xy: 207, 80 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 rotary-pump rotate: false - xy: 231, 99 + xy: 207, 80 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-router rotate: false - xy: 604, 108 + xy: 979, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 604, 108 + xy: 979, 430 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-rtg-generator rotate: false - xy: 604, 98 + xy: 989, 437 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtg-generator rotate: false - xy: 604, 98 + xy: 989, 437 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sand rotate: false - xy: 614, 110 + xy: 999, 437 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand1 rotate: false - xy: 614, 110 + xy: 999, 437 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-scorch rotate: false - xy: 614, 100 + xy: 1009, 437 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-separator rotate: false - xy: 624, 100 + xy: 989, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator rotate: false - xy: 624, 100 + xy: 989, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-shrub rotate: false - xy: 634, 100 + xy: 999, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shrub rotate: false - xy: 634, 100 + xy: 999, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-silicon-smelter rotate: false - xy: 207, 80 + xy: 207, 62 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 silicon-smelter rotate: false - xy: 207, 80 + xy: 207, 62 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-smelter rotate: false - xy: 644, 100 + xy: 1009, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 smelter rotate: false - xy: 644, 100 + xy: 1009, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-snow rotate: false - xy: 654, 100 + xy: 437, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow1 rotate: false - xy: 654, 100 + xy: 437, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-solar-panel rotate: false - xy: 664, 100 + xy: 435, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 solar-panel rotate: false - xy: 664, 100 + xy: 435, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sortedunloader rotate: false - xy: 297, 35 + xy: 839, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sortedunloader rotate: false - xy: 297, 35 + xy: 839, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-sorter rotate: false - xy: 307, 35 + xy: 849, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sorter rotate: false - xy: 307, 35 + xy: 849, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-space rotate: false - xy: 317, 35 + xy: 859, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 space rotate: false - xy: 317, 35 + xy: 859, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-splitter rotate: false - xy: 327, 35 + xy: 869, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 splitter rotate: false - xy: 327, 35 + xy: 869, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-stone rotate: false - xy: 337, 35 + xy: 879, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone1 rotate: false - xy: 337, 35 + xy: 879, 419 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-stoneformer rotate: false - xy: 347, 35 + xy: 889, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneformer rotate: false - xy: 347, 35 + xy: 889, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-swarmer rotate: false - xy: 207, 62 + xy: 207, 44 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-thermal-generator rotate: false - xy: 207, 44 + xy: 206, 26 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 thermal-generator rotate: false - xy: 207, 44 + xy: 206, 26 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-thermal-pump rotate: false - xy: 206, 26 + xy: 632, 142 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 thermal-pump rotate: false - xy: 206, 26 + xy: 632, 142 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-thermite-mixer rotate: false - xy: 632, 142 + xy: 291, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 thermite-mixer rotate: false - xy: 632, 142 + xy: 291, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-thorium-wall rotate: false - xy: 357, 35 + xy: 899, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium-wall rotate: false - xy: 357, 35 + xy: 899, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-thorium-wall-large rotate: false - xy: 291, 99 + xy: 309, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 thorium-wall-large rotate: false - xy: 291, 99 + xy: 309, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-titanium-conveyor rotate: false - xy: 367, 35 + xy: 909, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium-conveyor rotate: false - xy: 367, 35 + xy: 909, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-tungsten-drill rotate: false - xy: 377, 35 + xy: 919, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-tungsten-wall rotate: false - xy: 387, 35 + xy: 929, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-wall rotate: false - xy: 387, 35 + xy: 929, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-tungsten-wall-large rotate: false - xy: 309, 99 + xy: 327, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 tungsten-wall-large rotate: false - xy: 309, 99 + xy: 327, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-turbine-generator rotate: false - xy: 327, 99 + xy: 345, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 turbine-generator rotate: false - xy: 327, 99 + xy: 345, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-unloader rotate: false - xy: 397, 35 + xy: 939, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 unloader rotate: false - xy: 397, 35 + xy: 939, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3226,714 +3226,742 @@ warpgate index: -1 block-icon-water rotate: false - xy: 407, 37 + xy: 949, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water rotate: false - xy: 407, 37 + xy: 949, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 block-icon-water-extractor rotate: false - xy: 345, 99 + xy: 363, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-icon-wave rotate: false - xy: 363, 99 + xy: 381, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 mech-icon-alpha-mech rotate: false - xy: 657, 181 + xy: 762, 290 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-dart-ship rotate: false - xy: 697, 225 + xy: 762, 276 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-delta-mech rotate: false - xy: 711, 227 + xy: 672, 223 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-halberd-ship rotate: false - xy: 700, 211 + xy: 672, 209 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-javelin-ship rotate: false - xy: 700, 211 + xy: 672, 209 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-trident-ship rotate: false - xy: 700, 211 + xy: 672, 209 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-omega-mech rotate: false - xy: 700, 197 + xy: 686, 223 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 mech-icon-tau-mech rotate: false - xy: 700, 197 + xy: 686, 223 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 ore-coal-grass1 rotate: false - xy: 797, 371 + xy: 807, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-grass2 rotate: false - xy: 787, 361 + xy: 817, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-grass3 rotate: false - xy: 867, 417 + xy: 827, 395 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice1 rotate: false - xy: 857, 407 + xy: 817, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice2 rotate: false - xy: 837, 395 + xy: 827, 385 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-ice3 rotate: false - xy: 847, 397 + xy: 837, 409 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand1 rotate: false - xy: 817, 381 + xy: 837, 399 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand2 rotate: false - xy: 827, 385 + xy: 847, 409 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-sand3 rotate: false - xy: 807, 371 + xy: 837, 389 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow1 rotate: false - xy: 797, 361 + xy: 847, 399 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow2 rotate: false - xy: 877, 417 + xy: 857, 409 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-snow3 rotate: false - xy: 867, 407 + xy: 847, 389 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone1 rotate: false - xy: 857, 397 + xy: 857, 399 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone2 rotate: false - xy: 837, 385 + xy: 867, 409 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-coal-stone3 rotate: false - xy: 847, 387 + xy: 857, 389 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass1 rotate: false - xy: 817, 371 + xy: 867, 399 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass2 rotate: false - xy: 827, 375 + xy: 877, 409 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-grass3 rotate: false - xy: 807, 361 + xy: 867, 389 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice1 rotate: false - xy: 877, 407 + xy: 877, 399 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice2 rotate: false - xy: 867, 397 + xy: 877, 389 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-ice3 rotate: false - xy: 857, 387 + xy: 827, 375 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand1 rotate: false - xy: 837, 375 + xy: 837, 379 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand2 rotate: false - xy: 847, 377 + xy: 847, 379 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-sand3 rotate: false - xy: 817, 361 + xy: 857, 379 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow1 rotate: false - xy: 827, 365 + xy: 867, 379 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow2 rotate: false - xy: 877, 397 + xy: 877, 379 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-snow3 rotate: false - xy: 867, 387 + xy: 837, 369 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone1 rotate: false - xy: 857, 377 + xy: 847, 369 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone2 rotate: false - xy: 837, 365 + xy: 857, 369 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-lead-stone3 rotate: false - xy: 847, 367 + xy: 867, 369 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass1 rotate: false - xy: 877, 387 + xy: 877, 369 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass2 rotate: false - xy: 867, 377 + xy: 445, 9 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-grass3 rotate: false - xy: 857, 367 + xy: 889, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice1 rotate: false - xy: 877, 377 + xy: 899, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice2 rotate: false - xy: 867, 367 + xy: 909, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-ice3 rotate: false - xy: 877, 367 + xy: 919, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand1 rotate: false - xy: 827, 355 + xy: 929, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand2 rotate: false - xy: 837, 355 + xy: 939, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-sand3 rotate: false - xy: 847, 357 + xy: 949, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow1 rotate: false - xy: 857, 357 + xy: 959, 410 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow2 rotate: false - xy: 867, 357 + xy: 969, 410 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-snow3 rotate: false - xy: 877, 357 + xy: 979, 410 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone1 rotate: false - xy: 893, 433 + xy: 887, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone2 rotate: false - xy: 903, 433 + xy: 887, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-thorium-stone3 rotate: false - xy: 913, 433 + xy: 897, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass1 rotate: false - xy: 923, 433 + xy: 887, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass2 rotate: false - xy: 933, 433 + xy: 897, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-grass3 rotate: false - xy: 943, 433 + xy: 907, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice1 rotate: false - xy: 953, 433 + xy: 887, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice2 rotate: false - xy: 963, 430 + xy: 897, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-ice3 rotate: false - xy: 973, 430 + xy: 907, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand1 rotate: false - xy: 887, 423 + xy: 917, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand2 rotate: false - xy: 887, 413 + xy: 897, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-sand3 rotate: false - xy: 897, 423 + xy: 907, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow1 rotate: false - xy: 887, 403 + xy: 917, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow2 rotate: false - xy: 897, 413 + xy: 927, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-snow3 rotate: false - xy: 907, 423 + xy: 907, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone1 rotate: false - xy: 887, 393 + xy: 917, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone2 rotate: false - xy: 897, 403 + xy: 927, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-titanium-stone3 rotate: false - xy: 907, 413 + xy: 937, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass1 rotate: false - xy: 917, 423 + xy: 917, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass2 rotate: false - xy: 887, 383 + xy: 927, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-grass3 rotate: false - xy: 897, 393 + xy: 937, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice1 rotate: false - xy: 907, 403 + xy: 947, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice2 rotate: false - xy: 917, 413 + xy: 927, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-ice3 rotate: false - xy: 927, 423 + xy: 937, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand1 rotate: false - xy: 887, 373 + xy: 947, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand2 rotate: false - xy: 897, 383 + xy: 937, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-sand3 rotate: false - xy: 907, 393 + xy: 947, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow1 rotate: false - xy: 917, 403 + xy: 947, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow2 rotate: false - xy: 927, 413 + xy: 957, 400 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-snow3 rotate: false - xy: 937, 423 + xy: 957, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone1 rotate: false - xy: 887, 363 + xy: 967, 400 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone2 rotate: false - xy: 897, 373 + xy: 957, 380 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ore-tungsten-stone3 rotate: false - xy: 907, 383 + xy: 967, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 +unit-icon-scout + rotate: false + xy: 706, 261 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +unit-icon-titan + rotate: false + xy: 369, 45 + size: 16, 16 + orig: 16, 16 + offset: 0, 0 + index: -1 +unit-icon-vtol + rotate: false + xy: 720, 263 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +vtol + rotate: false + xy: 720, 263 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 item-biomatter rotate: false - xy: 787, 421 + xy: 691, 111 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-blast-compound rotate: false - xy: 777, 411 + xy: 671, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-carbide rotate: false - xy: 797, 421 + xy: 681, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 787, 411 + xy: 691, 101 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 777, 401 + xy: 607, 110 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-phase-matter rotate: false - xy: 807, 421 + xy: 767, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plasteel rotate: false - xy: 817, 421 + xy: 767, 410 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-sand rotate: false - xy: 797, 411 + xy: 767, 400 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 787, 401 + xy: 767, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 777, 391 + xy: 767, 380 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-surge-alloy rotate: false - xy: 807, 411 + xy: 777, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thermite rotate: false - xy: 797, 401 + xy: 787, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 787, 391 + xy: 777, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 777, 381 + xy: 797, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-tungsten rotate: false - xy: 817, 411 + xy: 787, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4010,56 +4038,56 @@ scout-leg index: -1 delta-mech rotate: false - xy: 715, 241 + xy: 658, 201 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 delta-mech-leg rotate: false - xy: 669, 225 + xy: 706, 289 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 omega-mech rotate: false - xy: 725, 227 + xy: 686, 195 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 tau-mech rotate: false - xy: 725, 227 + xy: 686, 195 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 dart-ship rotate: false - xy: 701, 241 + xy: 658, 215 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 halberd-ship rotate: false - xy: 658, 195 + xy: 734, 278 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 javelin-ship rotate: false - xy: 658, 195 + xy: 734, 278 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 trident-ship rotate: false - xy: 658, 195 + xy: 734, 278 size: 12, 12 orig: 12, 12 offset: 0, 0 @@ -4208,7 +4236,7 @@ check-over index: -1 clear rotate: false - xy: 731, 342 + xy: 731, 360 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4236,7 +4264,7 @@ discord-banner-over index: -1 controller-cursor rotate: false - xy: 399, 99 + xy: 417, 99 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4278,49 +4306,49 @@ icon-areaDelete index: -1 icon-arrow rotate: false - xy: 731, 408 + xy: 731, 390 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-arrow-16 rotate: false - xy: 731, 408 + xy: 731, 390 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-arrow-down rotate: false - xy: 738, 294 + xy: 659, 229 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-left rotate: false - xy: 738, 282 + xy: 748, 264 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-right rotate: false - xy: 738, 270 + xy: 760, 264 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-up rotate: false - xy: 438, 124 + xy: 705, 249 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-back rotate: false - xy: 731, 390 + xy: 731, 372 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -4334,49 +4362,49 @@ icon-ban index: -1 icon-break rotate: false - xy: 731, 372 + xy: 733, 342 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-cancel rotate: false - xy: 731, 354 + xy: 733, 324 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-chat rotate: false - xy: 450, 124 + xy: 703, 237 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-check rotate: false - xy: 733, 324 + xy: 733, 306 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-crafting rotate: false - xy: 446, 112 + xy: 700, 225 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-cursor rotate: false - xy: 446, 100 + xy: 700, 213 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-defense rotate: false - xy: 462, 120 + xy: 700, 201 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4397,7 +4425,7 @@ icon-discord index: -1 icon-distribution rotate: false - xy: 474, 120 + xy: 700, 189 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -4425,483 +4453,483 @@ icon-editor index: -1 icon-egg rotate: false - xy: 405, 47 + xy: 297, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-elevation rotate: false - xy: 733, 306 + xy: 225, 80 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-eraser rotate: false - xy: 225, 80 + xy: 225, 62 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-exit rotate: false - xy: 421, 47 + xy: 313, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-file rotate: false - xy: 225, 62 + xy: 225, 44 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-file-image rotate: false - xy: 225, 44 + xy: 224, 26 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-file-text rotate: false - xy: 279, 27 + xy: 329, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-fill rotate: false - xy: 224, 26 + xy: 749, 408 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-floppy rotate: false - xy: 626, 285 + xy: 345, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-floppy-16 rotate: false - xy: 749, 408 + xy: 749, 390 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-folder rotate: false - xy: 624, 269 + xy: 361, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-folder-parent rotate: false - xy: 642, 285 + xy: 377, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-github rotate: false - xy: 640, 269 + xy: 393, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-google-play rotate: false - xy: 658, 289 + xy: 409, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-grid rotate: false - xy: 749, 390 + xy: 749, 372 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-hold rotate: false - xy: 486, 120 + xy: 700, 177 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-holdDelete rotate: false - xy: 458, 108 + xy: 700, 165 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-home rotate: false - xy: 674, 287 + xy: 425, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-host rotate: false - xy: 690, 287 + xy: 279, 9 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-info rotate: false - xy: 470, 108 + xy: 650, 150 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-itch.io rotate: false - xy: 706, 287 + xy: 626, 285 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-items-none rotate: false - xy: 777, 421 + xy: 691, 121 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-line rotate: false - xy: 749, 372 + xy: 751, 340 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-link rotate: false - xy: 722, 289 + xy: 624, 269 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-liquid rotate: false - xy: 482, 108 + xy: 662, 150 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-load rotate: false - xy: 750, 288 + xy: 642, 285 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-load-image rotate: false - xy: 749, 354 + xy: 751, 322 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-load-map rotate: false - xy: 751, 322 + xy: 751, 304 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-loading rotate: false - xy: 751, 304 + xy: 243, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-logic rotate: false - xy: 458, 96 + xy: 674, 155 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-menu rotate: false - xy: 470, 96 + xy: 686, 155 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-menu-large rotate: false - xy: 243, 81 + xy: 243, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-none rotate: false - xy: 482, 96 + xy: 698, 153 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-pause rotate: false - xy: 441, 87 + xy: 674, 143 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-pencil rotate: false - xy: 243, 63 + xy: 243, 45 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-pencil-small rotate: false - xy: 722, 273 + xy: 640, 269 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-pick rotate: false - xy: 243, 45 + xy: 261, 91 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-play rotate: false - xy: 441, 75 + xy: 686, 143 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-play-2 rotate: false - xy: 639, 242 + xy: 658, 289 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-players rotate: false - xy: 441, 63 + xy: 698, 141 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-power rotate: false - xy: 453, 84 + xy: 625, 112 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-production rotate: false - xy: 453, 72 + xy: 637, 112 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-quit rotate: false - xy: 642, 216 + xy: 674, 285 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-redo rotate: false - xy: 261, 91 + xy: 261, 73 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-refresh rotate: false - xy: 642, 200 + xy: 658, 273 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rename rotate: false - xy: 641, 184 + xy: 674, 269 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-resize rotate: false - xy: 261, 73 + xy: 261, 55 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-rotate rotate: false - xy: 750, 272 + xy: 639, 242 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-arrow rotate: false - xy: 658, 273 + xy: 657, 257 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-left rotate: false - xy: 674, 271 + xy: 655, 241 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-right rotate: false - xy: 690, 271 + xy: 673, 253 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-save rotate: false - xy: 706, 271 + xy: 671, 237 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-save-image rotate: false - xy: 261, 55 + xy: 279, 79 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-save-map rotate: false - xy: 279, 79 + xy: 279, 61 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-settings rotate: false - xy: 465, 84 + xy: 649, 112 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-terrain rotate: false - xy: 279, 61 + xy: 297, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-tools rotate: false - xy: 657, 257 + xy: 690, 285 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-touch rotate: false - xy: 465, 72 + xy: 827, 437 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-touchDelete rotate: false - xy: 477, 84 + xy: 839, 439 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-trash rotate: false - xy: 673, 255 + xy: 690, 269 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-trash-16 rotate: false - xy: 297, 81 + xy: 297, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-trello rotate: false - xy: 689, 255 + xy: 689, 253 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-tutorial rotate: false - xy: 705, 255 + xy: 687, 237 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-undo rotate: false - xy: 297, 63 + xy: 315, 81 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-units rotate: false - xy: 477, 72 + xy: 851, 439 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-weapon rotate: false - xy: 453, 60 + xy: 863, 439 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-wiki rotate: false - xy: 669, 239 + xy: 642, 216 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-zoom rotate: false - xy: 315, 81 + xy: 315, 63 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-zoom-small rotate: false - xy: 685, 239 + xy: 642, 200 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -5074,56 +5102,77 @@ window-empty index: -1 drone rotate: false - xy: 658, 209 + xy: 720, 291 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 +unit-icon-drone + rotate: false + xy: 720, 291 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +monsoon + rotate: false + xy: 209, 132 + size: 18, 18 + orig: 18, 18 + offset: 0, 0 + index: -1 +unit-icon-monsoon + rotate: false + xy: 209, 132 + size: 18, 18 + orig: 18, 18 + offset: 0, 0 + index: -1 scout rotate: false - xy: 728, 199 + xy: 672, 181 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 -vtol +titan rotate: false - xy: 841, 437 - size: 12, 12 - orig: 12, 12 + xy: 315, 45 + size: 16, 16 + orig: 16, 16 offset: 0, 0 index: -1 -vtol-booster-1 +titan-base rotate: false - xy: 855, 437 - size: 12, 12 - orig: 12, 12 + xy: 333, 45 + size: 16, 16 + orig: 16, 16 offset: 0, 0 index: -1 -vtol-booster-2 +titan-leg rotate: false - xy: 869, 437 - size: 12, 12 - orig: 12, 12 + xy: 351, 45 + size: 16, 16 + orig: 16, 16 offset: 0, 0 index: -1 vtol-flame rotate: false - xy: 435, 110 + xy: 650, 162 size: 9, 9 orig: 9, 9 offset: 0, 0 index: -1 blaster-equip rotate: false - xy: 655, 243 + xy: 641, 186 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 625, 110 + xy: 686, 181 size: 12, 12 orig: 12, 12 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 69f2d542d2..8bd2993cdf 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/AmmoTypes.java b/core/src/io/anuke/mindustry/content/AmmoTypes.java index 39ce0cdf62..fae25a1942 100644 --- a/core/src/io/anuke/mindustry/content/AmmoTypes.java +++ b/core/src/io/anuke/mindustry/content/AmmoTypes.java @@ -2,6 +2,7 @@ package io.anuke.mindustry.content; import com.badlogic.gdx.utils.Array; import io.anuke.mindustry.content.bullets.*; +import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.AmmoType; @@ -9,7 +10,7 @@ import io.anuke.mindustry.type.ContentList; public class AmmoTypes implements ContentList { public static AmmoType bulletTungsten, bulletLead, bulletCarbide, bulletThorium, bulletSilicon, bulletThermite, - shotgunTungsten, + shotgunTungsten, bombExplosive, bombIncendiary, flakLead, flakExplosive, flakPlastic, flakSurge, missileExplosive, missileIncindiary, missileSurge, artilleryCarbide, artilleryThorium, artilleryPlastic, artilleryHoming, artilleryIncindiary, basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid; @@ -63,6 +64,16 @@ public class AmmoTypes implements ContentList { recoil = 1f; }}; + bombExplosive = new AmmoType(Items.blastCompound, WeaponBullets.bombExplosive, 3) {{ + shootEffect = Fx.none; + smokeEffect = Fx.none; + }}; + + bombIncendiary = new AmmoType(Items.thermite, WeaponBullets.bombIncendiary, 3) {{ + shootEffect = Fx.none; + smokeEffect = Fx.none; + }}; + //flak flakLead = new AmmoType(Items.lead, FlakBullets.lead, 5) {{ diff --git a/core/src/io/anuke/mindustry/content/UnitTypes.java b/core/src/io/anuke/mindustry/content/UnitTypes.java index 442b4f3d85..8b002f41c9 100644 --- a/core/src/io/anuke/mindustry/content/UnitTypes.java +++ b/core/src/io/anuke/mindustry/content/UnitTypes.java @@ -2,19 +2,16 @@ package io.anuke.mindustry.content; import com.badlogic.gdx.utils.Array; import io.anuke.mindustry.entities.units.UnitType; -import io.anuke.mindustry.entities.units.types.Drone; -import io.anuke.mindustry.entities.units.types.Scout; -import io.anuke.mindustry.entities.units.types.Vtol; +import io.anuke.mindustry.entities.units.types.*; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentList; -import io.anuke.mindustry.type.StatusEffect; public class UnitTypes implements ContentList { - public static UnitType drone, scout, vtol; + public static UnitType drone, scout, vtol, monsoon, titan; @Override public void load() { - drone = new UnitType("drone", team -> new Drone(drone, team)){{ + drone = new UnitType("drone", Drone.class, Drone::new){{ isFlying = true; drag = 0.01f; speed = 0.2f; @@ -23,26 +20,43 @@ public class UnitTypes implements ContentList { range = 50f; }}; - scout = new UnitType("scout", team -> new Scout(scout, team)){{ + scout = new UnitType("scout", Scout.class, Scout::new){{ maxVelocity = 1.1f; speed = 0.2f; drag = 0.4f; range = 40f; - setAmmo(AmmoTypes.bulletLead); + weapon = Weapons.blaster; }}; - vtol = new UnitType("vtol", team -> new Vtol(vtol, team)){{ + titan = new UnitType("titan", Titan.class, Titan::new){{ + maxVelocity = 0.8f; + speed = 0.18f; + drag = 0.4f; + range = 10f; + weapon = Weapons.shockgun; + }}; + + vtol = new UnitType("vtol", Vtol.class, Vtol::new){{ speed = 0.3f; - maxVelocity = 2f; + maxVelocity = 2.1f; drag = 0.01f; isFlying = true; reload = 7; - setAmmo(AmmoTypes.bulletLead); + }}; + + monsoon = new UnitType("monsoon", Monsoon.class, Monsoon::new){{ + health = 300; + speed = 0.2f; + maxVelocity = 1.5f; + drag = 0.01f; + isFlying = true; + reload = 7; + weapon = Weapons.bomber; }}; } @Override public Array getAll() { - return StatusEffect.all(); + return UnitType.all(); } } diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 611d4b28a3..8d6787a3e1 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.content; import com.badlogic.gdx.utils.Array; +import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentList; @@ -8,7 +9,7 @@ import io.anuke.mindustry.type.Upgrade; import io.anuke.mindustry.type.Weapon; public class Weapons implements ContentList { - public static Weapon blaster, shockgun, sapper, swarmer; + public static Weapon blaster, shockgun, sapper, swarmer, bomber; @Override public void load() { @@ -48,6 +49,17 @@ public class Weapons implements ContentList { ejectEffect = ShootFx.shellEjectSmall; setAmmo(AmmoTypes.bulletThermite); }}; + + bomber = new Weapon("bomber") {{ + length = 0f; + width = 2f; + reload = 5f; + roundrobin = true; + ejectEffect = Fx.none; + velocityRnd = 1f; + inaccuracy = 40f; + setAmmo(AmmoTypes.bombExplosive); + }}; } @Override diff --git a/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java b/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java index 30081173ac..b222b554d3 100644 --- a/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/WeaponBullets.java @@ -1,10 +1,19 @@ package io.anuke.mindustry.content.bullets; +import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.mindustry.entities.bullet.BasicBulletType; +import io.anuke.mindustry.entities.bullet.BombBulletType; +import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; +import io.anuke.mindustry.entities.effect.Fire; +import io.anuke.mindustry.graphics.Palette; +import io.anuke.mindustry.world.Tile; +import io.anuke.ucore.util.Mathf; + +import static io.anuke.mindustry.Vars.world; public class WeaponBullets extends BulletList { - public static BulletType tungstenShotgun; + public static BulletType tungstenShotgun, bombExplosive, bombIncendiary; @Override public void load() { @@ -17,5 +26,37 @@ public class WeaponBullets extends BulletList { drag = 0.04f; } }; + + bombExplosive = new BombBulletType(20f, 20f, "shell"){ + { + bulletWidth = 9f; + bulletHeight = 13f; + hiteffect = BulletFx.flakExplosion; + } + }; + + bombIncendiary = new BombBulletType(20f, 20f, "shell"){ + { + bulletWidth = 9f; + bulletHeight = 13f; + hiteffect = BulletFx.flakExplosion; + backColor = Palette.darkFlame; + frontColor = Palette.lightFlame; + } + + @Override + public void hit(Bullet b, float x, float y) { + super.hit(b, x, y); + + for (int i = 0; i < 3; i++) { + float cx = x + Mathf.range(10f); + float cy = y + Mathf.range(10f); + Tile tile = world.tileWorld(cx, cy); + if(tile != null){ + Fire.create(tile); + } + } + } + }; } } diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index 9549733bcc..b1fa30328b 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -15,13 +15,8 @@ import io.anuke.mindustry.entities.effect.ItemDrop; import io.anuke.mindustry.entities.effect.Puddle; import io.anuke.mindustry.entities.traits.TypeTrait; import io.anuke.mindustry.entities.units.UnitType; -import io.anuke.mindustry.entities.units.types.Drone; -import io.anuke.mindustry.entities.units.types.Scout; -import io.anuke.mindustry.entities.units.types.Vtol; import io.anuke.mindustry.game.Content; -import io.anuke.mindustry.type.ContentList; -import io.anuke.mindustry.type.Liquid; -import io.anuke.mindustry.type.StatusEffect; +import io.anuke.mindustry.type.*; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.ColorMapper; import io.anuke.ucore.core.Effects; @@ -60,6 +55,7 @@ public class ContentLoader { new TurretBullets(), new WeaponBullets(), + //ammotypes new AmmoTypes(), @@ -117,8 +113,8 @@ public class ContentLoader { Log.info("--- CONTENT INFO ---"); Log.info("Blocks loaded: {0}\nItems loaded: {1}\nLiquids loaded: {2}\nUpgrades loaded: {3}\nUnits loaded: {4}\nAmmo types loaded: {5}\nBullet types loaded: {6}\nStatus effects loaded: {7}\nRecipes loaded: {8}\nEffects loaded: {9}\nTotal content classes: {10}", - Block.all().size, io.anuke.mindustry.type.Item.all().size, Liquid.all().size, - io.anuke.mindustry.type.Mech.all().size, UnitType.getAllTypes().size, io.anuke.mindustry.type.AmmoType.all().size, BulletType.all().size, StatusEffect.all().size, io.anuke.mindustry.type.Recipe.all().size, Effects.all().size, content.length); + Block.all().size, Item.all().size, Liquid.all().size, Mech.all().size, UnitType.all().size, + AmmoType.all().size, BulletType.all().size, StatusEffect.all().size, Recipe.all().size, Effects.all().size, content.length); Log.info("-------------------"); @@ -138,15 +134,13 @@ public class ContentLoader { //TODO clear all content. } - /**Registers sync IDs for all types of sync entities.*/ + /**Registers sync IDs for all types of sync entities. + * Do not register units here!*/ private static void registerTypes(){ - Player.typeID = TypeTrait.registerType(Player::new); - Drone.typeID = TypeTrait.registerType(Drone::new); - Vtol.typeID = TypeTrait.registerType(Vtol::new); - Scout.typeID = TypeTrait.registerType(Scout::new); - ItemDrop.typeID = TypeTrait.registerType(ItemDrop::new); - Fire.typeID = TypeTrait.registerType(Fire::new); - Puddle.typeID = TypeTrait.registerType(Puddle::new); - Bullet.typeID = TypeTrait.registerType(Bullet::new); + TypeTrait.registerType(Player.class, Player::new); + TypeTrait.registerType(ItemDrop.class, ItemDrop::new); + TypeTrait.registerType(Fire.class, Fire::new); + TypeTrait.registerType(Puddle.class, Puddle::new); + TypeTrait.registerType(Bullet.class, Bullet::new); } } diff --git a/core/src/io/anuke/mindustry/entities/Damage.java b/core/src/io/anuke/mindustry/entities/Damage.java index 729b8f836f..514b34e48e 100644 --- a/core/src/io/anuke/mindustry/entities/Damage.java +++ b/core/src/io/anuke/mindustry/entities/Damage.java @@ -16,6 +16,7 @@ import io.anuke.ucore.core.Effects.Effect; import io.anuke.ucore.core.Timers; import io.anuke.ucore.entities.impl.SolidEntity; import io.anuke.ucore.function.Consumer; +import io.anuke.ucore.function.Predicate; import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Physics; import io.anuke.ucore.util.Translator; @@ -108,8 +109,10 @@ public class Damage { } /**Damages all entities and blocks in a radius that are enemies of the team.*/ - public static void damageUnits(Team team, float x, float y, float size, float damage, Consumer acceptor) { + public static void damageUnits(Team team, float x, float y, float size, float damage, Predicate predicate, Consumer acceptor) { Consumer cons = entity -> { + if(!predicate.test(entity)) return; + entity.getHitbox(hitrect); if (!hitrect.overlaps(rect)) { return; @@ -134,13 +137,14 @@ public class Damage { /**Damages all entities and blocks in a radius that are enemies of the team.*/ public static void damage(Team team, float x, float y, float radius, float damage){ Consumer cons = entity -> { - if(entity.distanceTo(x, y) > radius){ + if(entity.team == team || entity.distanceTo(x, y) > radius){ return; } float amount = calculateDamage(x, y, entity.x, entity.y, radius, damage); entity.damage(amount); //TODO better velocity displacement - entity.getVelocity().add(tr.set(entity.x - x, entity.y - y).setLength(damage*2f)); + float dst = tr.set(entity.x - x, entity.y - y).len(); + entity.getVelocity().add(tr.setLength((1f-dst/radius) * 2f)); }; rect.setSize(radius *2).setCenter(x, y); diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 32477fa02e..3a6cc041b7 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -11,20 +11,14 @@ import io.anuke.annotations.Annotations.Remote; import io.anuke.mindustry.Vars; import io.anuke.mindustry.entities.effect.ItemDrop; import io.anuke.mindustry.entities.effect.ScorchDecal; -import io.anuke.mindustry.entities.traits.BuilderTrait; -import io.anuke.mindustry.entities.traits.CarriableTrait; -import io.anuke.mindustry.entities.traits.CarryTrait; -import io.anuke.mindustry.entities.traits.TargetTrait; +import io.anuke.mindustry.entities.traits.*; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.gen.CallEntity; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Trail; import io.anuke.mindustry.net.In; import io.anuke.mindustry.net.Net; -import io.anuke.mindustry.type.Item; -import io.anuke.mindustry.type.ItemStack; -import io.anuke.mindustry.type.Mech; -import io.anuke.mindustry.type.Upgrade; +import io.anuke.mindustry.type.*; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.Floor; @@ -34,10 +28,7 @@ import io.anuke.ucore.entities.EntityGroup; import io.anuke.ucore.entities.trait.SolidTrait; import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Lines; -import io.anuke.ucore.util.Angles; -import io.anuke.ucore.util.Mathf; -import io.anuke.ucore.util.ThreadQueue; -import io.anuke.ucore.util.Timer; +import io.anuke.ucore.util.*; import java.io.DataInput; import java.io.DataOutput; @@ -45,11 +36,10 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; -public class Player extends Unit implements BuilderTrait, CarryTrait { - public static int typeID = -1; +public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTrait { + private static final int timerShootLeft = 0; + private static final int timerShootRight = 1; - public static final int timerShootLeft = 0; - public static final int timerShootRight = 1; public static final int timerSync = 2; //region instance variables, constructor @@ -90,6 +80,21 @@ public class Player extends Unit implements BuilderTrait, CarryTrait { //region unit and event overrides, utility methods + @Override + public Timer getTimer() { + return timer; + } + + @Override + public int getShootTimer(boolean left) { + return left ? timerShootLeft : timerShootRight; + } + + @Override + public Weapon getWeapon() { + return mech.weapon; + } + @Override public float getMinePower() { return mech.mineSpeed; @@ -123,11 +128,6 @@ public class Player extends Unit implements BuilderTrait, CarryTrait { } } - @Override - public int getTypeID() { - return typeID; - } - @Override public CarriableTrait getCarry() { return carrying; @@ -538,8 +538,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait { protected void updateShooting(){ if(isShooting()){ - mech.weapon.update(this, true, pointerX, pointerY); - mech.weapon.update(this, false, pointerX, pointerY); + mech.weapon.update(this, pointerX, pointerY); } } diff --git a/core/src/io/anuke/mindustry/entities/Unit.java b/core/src/io/anuke/mindustry/entities/Unit.java index 0500feb549..c09b763c93 100644 --- a/core/src/io/anuke/mindustry/entities/Unit.java +++ b/core/src/io/anuke/mindustry/entities/Unit.java @@ -31,7 +31,7 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.state; import static io.anuke.mindustry.Vars.world; -public abstract class Unit extends DestructibleEntity implements SaveTrait, TargetTrait, SyncTrait, DrawTrait, TeamTrait, CarriableTrait { +public abstract class Unit extends DestructibleEntity implements SaveTrait, TargetTrait, SyncTrait, DrawTrait, TeamTrait, CarriableTrait, InventoryTrait { /**total duration of hit flash effect*/ public static final float hitDuration = 9f; /**Percision divisor of velocity, used when writing. For example a value of '2' would mean the percision is 1/2 = 0.5-size chunks.*/ @@ -53,6 +53,11 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ protected float hitTime; protected float drownTime; + @Override + public UnitInventory getInventory() { + return inventory; + } + @Override public float getRotation() { return rotation; @@ -191,7 +196,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ public void avoidOthers(float avoidRange){ EntityPhysics.getNearby(getGroup(), x, y, avoidRange*2f, t -> { - if(t == this || (t instanceof Unit && ((Unit) t).isDead())) return; + if(t == this || (t instanceof Unit && (((Unit) t).isDead() || (((Unit) t).isFlying() != isFlying())))) return; float dst = distanceTo(t); if(dst > avoidRange) return; velocity.add(moveVector.set(x, y).sub(t.getX(), t.getY()).setLength(1f * (1f - (dst / avoidRange)))); diff --git a/core/src/io/anuke/mindustry/entities/bullet/BombBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BombBulletType.java new file mode 100644 index 0000000000..5682477e49 --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/bullet/BombBulletType.java @@ -0,0 +1,16 @@ +package io.anuke.mindustry.entities.bullet; + +public class BombBulletType extends BasicBulletType { + + public BombBulletType(float damage, float radius, String sprite) { + super(0.7f, 0, sprite); + splashDamageRadius = radius; + splashDamage = damage; + collidesTiles = false; + collides = false; + bulletShrink = 0.7f; + lifetime = 30f; + drag = 0.05f; + keepVelocity = false; + } +} diff --git a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java index 1d48b7ae6c..d0231f2a18 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java +++ b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java @@ -27,8 +27,6 @@ import static io.anuke.mindustry.Vars.bulletGroup; import static io.anuke.mindustry.Vars.world; public class Bullet extends BulletEntity implements TeamTrait, SyncTrait{ - public static int typeID = -1; - private static Vector2 vector = new Vector2(); private Team team; @@ -56,7 +54,9 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT bullet.data = data; bullet.velocity.set(0, type.speed).setAngle(angle).scl(velocityScl); - bullet.velocity.add(owner instanceof VelocityTrait ? ((VelocityTrait)owner).getVelocity() : Vector2.Zero); + if(type.keepVelocity){ + bullet.velocity.add(owner instanceof VelocityTrait ? ((VelocityTrait)owner).getVelocity() : Vector2.Zero); + } bullet.hitbox.setSize(type.hitsize); bullet.team = team; @@ -119,11 +119,6 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT return super.getDamage(); } - @Override - public int getTypeID() { - return typeID; - } - @Override public boolean isSyncing(){ return type.syncable; diff --git a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java index 69c7b5b8a6..e402ab00a1 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java @@ -29,6 +29,8 @@ public abstract class BulletType extends BaseBulletType implements Conte public boolean collidesTiles = true; /**Whether this bullet types collides with anything at all.*/ public boolean collides = true; + /**Whether velocity is inherited from the shooter.*/ + public boolean keepVelocity = true; public BulletType(float speed, float damage){ this.id = lastid ++; diff --git a/core/src/io/anuke/mindustry/entities/effect/Fire.java b/core/src/io/anuke/mindustry/entities/effect/Fire.java index 96b71bf15b..db9576cba3 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Fire.java +++ b/core/src/io/anuke/mindustry/entities/effect/Fire.java @@ -34,8 +34,6 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable private static final IntMap map = new IntMap<>(); private static final float baseLifetime = 1000f; - public static int typeID = -1; - private int loadedPosition = -1; private Tile tile; private Block block; @@ -71,11 +69,6 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable /**Deserialization use only!*/ public Fire(){} - @Override - public int getTypeID() { - return typeID; - } - @Override public float lifetime() { return lifetime; @@ -137,11 +130,7 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable if(damage){ entity.damage(0.4f); } - Damage.damageUnits(null, tile.worldx(), tile.worldy(), tilesize, 3f, unit -> { - if(!unit.isFlying()) { - unit.applyEffect(StatusEffects.burning, 0.8f); - } - }); + Damage.damageUnits(null, tile.worldx(), tile.worldy(), tilesize, 3f, unit -> !unit.isFlying(), unit -> unit.applyEffect(StatusEffects.burning, 0.8f)); } } diff --git a/core/src/io/anuke/mindustry/entities/effect/ItemDrop.java b/core/src/io/anuke/mindustry/entities/effect/ItemDrop.java index 87bed3b206..5858ab2040 100644 --- a/core/src/io/anuke/mindustry/entities/effect/ItemDrop.java +++ b/core/src/io/anuke/mindustry/entities/effect/ItemDrop.java @@ -37,8 +37,6 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; public class ItemDrop extends SolidEntity implements SaveTrait, SyncTrait, DrawTrait, VelocityTrait, TimeTrait, TargetTrait, Poolable { - public static int typeID = -1; - private static final float sinkLifetime = 80f; private Interpolator interpolator = new Interpolator(); @@ -98,11 +96,6 @@ public class ItemDrop extends SolidEntity implements SaveTrait, SyncTrait, DrawT return Team.none; } - @Override - public int getTypeID() { - return typeID; - } - @Override public float lifetime() { return 60*60; diff --git a/core/src/io/anuke/mindustry/entities/effect/Puddle.java b/core/src/io/anuke/mindustry/entities/effect/Puddle.java index 4496176cb6..d88e9578ed 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Puddle.java +++ b/core/src/io/anuke/mindustry/entities/effect/Puddle.java @@ -49,8 +49,6 @@ public class Puddle extends BaseEntity implements SaveTrait, Poolable, DrawTrait private static final Rectangle rect2 = new Rectangle(); private static int seeds; - public static int typeID = -1; - private int loadedPosition = -1; private float updateTime; @@ -269,11 +267,6 @@ public class Puddle extends BaseEntity implements SaveTrait, Poolable, DrawTrait reset(); } - @Override - public int getTypeID() { - return typeID; - } - @Override public void write(DataOutput data) throws IOException { data.writeFloat(x); diff --git a/core/src/io/anuke/mindustry/entities/traits/InventoryTrait.java b/core/src/io/anuke/mindustry/entities/traits/InventoryTrait.java new file mode 100644 index 0000000000..506ca6bd6a --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/traits/InventoryTrait.java @@ -0,0 +1,7 @@ +package io.anuke.mindustry.entities.traits; + +import io.anuke.mindustry.entities.UnitInventory; + +public interface InventoryTrait { + UnitInventory getInventory(); +} diff --git a/core/src/io/anuke/mindustry/entities/traits/ShooterTrait.java b/core/src/io/anuke/mindustry/entities/traits/ShooterTrait.java new file mode 100644 index 0000000000..c51eae473d --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/traits/ShooterTrait.java @@ -0,0 +1,12 @@ +package io.anuke.mindustry.entities.traits; + +import io.anuke.mindustry.type.Weapon; +import io.anuke.ucore.entities.trait.VelocityTrait; +import io.anuke.ucore.util.Timer; + +public interface ShooterTrait extends VelocityTrait, TeamTrait, InventoryTrait{ + + Timer getTimer(); + int getShootTimer(boolean left); + Weapon getWeapon(); +} diff --git a/core/src/io/anuke/mindustry/entities/traits/TypeTrait.java b/core/src/io/anuke/mindustry/entities/traits/TypeTrait.java index 443821d119..076c2d05b3 100644 --- a/core/src/io/anuke/mindustry/entities/traits/TypeTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/TypeTrait.java @@ -1,18 +1,24 @@ package io.anuke.mindustry.entities.traits; import com.badlogic.gdx.utils.Array; +import com.badlogic.gdx.utils.ObjectIntMap; import io.anuke.ucore.function.Supplier; public interface TypeTrait { int[] lastRegisteredID = {0}; Array> registeredTypes = new Array<>(); + ObjectIntMap> typeToID = new ObjectIntMap<>(); /**Register and return a type ID. The supplier should return a fresh instace of that type.*/ - static int registerType(Supplier supplier){ + static void registerType(Class type, Supplier supplier){ + if(typeToID.get(type, -1) != -1){ + throw new RuntimeException("Type is already registered: '" + type + "'!"); + } + registeredTypes.add(supplier); int result = lastRegisteredID[0]; + typeToID.put(type, result); lastRegisteredID[0] ++; - return result; } /**Registers a syncable type by ID.*/ @@ -23,6 +29,11 @@ public interface TypeTrait { return registeredTypes.get(id); } - /**Returns the type ID of this entity used for intstantiation. Should be < BYTE_MAX.*/ - int getTypeID(); + /**Returns the type ID of this entity used for intstantiation. Should be < BYTE_MAX. + * Do not override!*/ + default int getTypeID(){ + int id = typeToID.get(getClass(), -1); + if(id == -1) throw new RuntimeException("Class of type '" + getClass() + "' is not registered! Did you forget to register it in ContentLoader#registerTypes()?"); + return id; + } } diff --git a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java index 82364d39c6..8e71ca2211 100644 --- a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java @@ -1,7 +1,6 @@ package io.anuke.mindustry.entities.units; import com.badlogic.gdx.graphics.g2d.TextureRegion; -import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.ObjectSet; import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Remote; @@ -10,24 +9,22 @@ import io.anuke.mindustry.content.fx.ExplosionFx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.Units; -import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.effect.ScorchDecal; +import io.anuke.mindustry.entities.traits.ShooterTrait; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.game.TeamInfo.TeamData; import io.anuke.mindustry.gen.CallEntity; import io.anuke.mindustry.net.In; import io.anuke.mindustry.net.Net; -import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.type.Weapon; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.units.UnitFactory.UnitFactoryEntity; import io.anuke.mindustry.world.meta.BlockFlag; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Timers; import io.anuke.ucore.entities.EntityGroup; -import io.anuke.ucore.graphics.Draw; -import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Geometry; import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Timer; @@ -38,13 +35,13 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; -public abstract class BaseUnit extends Unit{ - private static int timerIndex = 0; +public abstract class BaseUnit extends Unit implements ShooterTrait{ + protected static int timerIndex = 0; protected static final int timerTarget = timerIndex++; - protected static final int timerReload = timerIndex++; - protected static final Array nearbyCores = new Array<>(); + protected static final int timerShootLeft = timerIndex++; + protected static final int timerShootRight = timerIndex++; protected UnitType type; protected Timer timer = new Timer(5); @@ -55,7 +52,10 @@ public abstract class BaseUnit extends Unit{ protected Squad squad; protected int spawner = -1; - public BaseUnit(UnitType type, Team team){ + /**Initialize the type and team of this unit. Only call once!*/ + public void init(UnitType type, Team team){ + if(this.type != null) throw new RuntimeException("This unit is already initialized!"); + this.type = type; this.team = team; } @@ -111,11 +111,6 @@ public abstract class BaseUnit extends Unit{ target = null; } } - - public void shoot(AmmoType type, float rotation){ - CallEntity.onUnitShoot(this, type, rotation); - } - public void targetClosestAllyFlag(BlockFlag flag){ if(target != null) return; @@ -154,9 +149,24 @@ public abstract class BaseUnit extends Unit{ return null; } + @Override + public Timer getTimer() { + return timer; + } + + @Override + public int getShootTimer(boolean left) { + return left ? timerShootLeft : timerShootRight; + } + + @Override + public Weapon getWeapon() { + return type.weapon; + } + @Override public TextureRegion getIconRegion() { - return Draw.region(type.name); + return type.iconRegion; } @Override @@ -195,12 +205,12 @@ public abstract class BaseUnit extends Unit{ @Override public boolean acceptsAmmo(Item item) { - return type.ammo.containsKey(item) && inventory.canAcceptAmmo(type.ammo.get(item)); + return getWeapon().getAmmoType(item) != null && inventory.canAcceptAmmo(getWeapon().getAmmoType(item)); } @Override public void addAmmo(Item item) { - inventory.addAmmo(type.ammo.get(item)); + inventory.addAmmo(getWeapon().getAmmoType(item)); } @Override @@ -340,19 +350,6 @@ public abstract class BaseUnit extends Unit{ super.onDeath(); } - @Remote(called = Loc.server, in = In.entities) - public static void onUnitShoot(BaseUnit unit, AmmoType type, float rotation){ - if(unit == null) return; - - Bullet.create(type.bullet, unit, - unit.x + Angles.trnsx(rotation, unit.type.shootTranslation), - unit.y + Angles.trnsy(rotation, unit.type.shootTranslation), rotation); - Effects.effect(type.shootEffect, unit.x + Angles.trnsx(rotation, unit.type.shootTranslation), - unit.y + Angles.trnsy(rotation, unit.type.shootTranslation), rotation, unit); - Effects.effect(type.smokeEffect, unit.x + Angles.trnsx(rotation, unit.type.shootTranslation), - unit.y + Angles.trnsy(rotation, unit.type.shootTranslation), rotation, unit); - } - @Remote(called = Loc.server, in = In.entities) public static void onUnitDeath(BaseUnit unit){ if(unit == null) return; diff --git a/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java b/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java index e042f31ef9..756533825d 100644 --- a/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/FlyingUnit.java @@ -5,9 +5,9 @@ import io.anuke.mindustry.entities.Predict; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.traits.CarriableTrait; import io.anuke.mindustry.entities.traits.CarryTrait; -import io.anuke.mindustry.game.Team; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Trail; +import io.anuke.mindustry.net.Net; import io.anuke.mindustry.type.AmmoType; import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.world.Tile; @@ -29,10 +29,6 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{ protected Trail trail = new Trail(8); protected CarriableTrait carrying; - public FlyingUnit(UnitType type, Team team) { - super(type, team); - } - //instantiation only public FlyingUnit(){ @@ -60,6 +56,8 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{ updateRotation(); trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness), y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness)); + + wobble(); } @Override @@ -114,15 +112,15 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{ return 60; } - @Override - public void removed() { - dropCarry(); - } + protected void wobble(){ + if(Net.client()) return; - @Override - public void onDeath() { - super.onDeath(); - dropCarry(); + x += Mathf.sin(Timers.time() + id * 999, 25f, 0.07f); + y += Mathf.cos(Timers.time() + id * 999, 25f, 0.07f); + + if (velocity.len() <= 0.2f) { + rotation += Mathf.sin(Timers.time() + id * 99, 10f, 8f); + } } protected void updateRotation(){ @@ -237,14 +235,14 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{ }else{ attack(150f); - if (timer.get(timerReload, type.reload) && Mathf.angNear(angleTo(target), rotation, 13f) + if ((Mathf.angNear(angleTo(target), rotation, 15f) || !inventory.getAmmo().bullet.keepVelocity) //bombers don't care about rotation && distanceTo(target) < inventory.getAmmo().getRange()) { AmmoType ammo = inventory.getAmmo(); inventory.useAmmo(); Vector2 to = Predict.intercept(FlyingUnit.this, target, ammo.bullet.speed); - shoot(ammo, Angles.moveToward(rotation, angleTo(to.x, to.y), maxAim)); + getWeapon().update(FlyingUnit.this, to.x, to.y); } } } diff --git a/core/src/io/anuke/mindustry/entities/units/GroundUnit.java b/core/src/io/anuke/mindustry/entities/units/GroundUnit.java index dc2a333027..849a22c943 100644 --- a/core/src/io/anuke/mindustry/entities/units/GroundUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/GroundUnit.java @@ -8,6 +8,8 @@ import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.type.AmmoType; +import io.anuke.mindustry.type.Upgrade; +import io.anuke.mindustry.type.Weapon; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.Floor; import io.anuke.mindustry.world.meta.BlockFlag; @@ -18,21 +20,26 @@ import io.anuke.ucore.util.Geometry; import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Translator; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + import static io.anuke.mindustry.Vars.world; public abstract class GroundUnit extends BaseUnit { protected static Translator vec = new Translator(); protected static float maxAim = 30f; + protected static final int timerReloadAlt = timerIndex++; + protected float walkTime; protected float baseRotation; + protected Weapon weapon; - public GroundUnit(UnitType type, Team team) { - super(type, team); - } - - public GroundUnit(){ - + @Override + public void init(UnitType type, Team team) { + super.init(type, team); + this.weapon = type.weapon; } @Override @@ -64,6 +71,11 @@ public abstract class GroundUnit extends BaseUnit { } } + @Override + public Weapon getWeapon() { + return weapon; + } + @Override public void draw() { Draw.alpha(hitTime / hitDuration); @@ -79,7 +91,7 @@ public abstract class GroundUnit extends BaseUnit { } for (int i : Mathf.signs) { - Draw.rect(type.name + "-leg", + Draw.rect(type.legRegion, x + Angles.trnsx(baseRotation, ft * i), y + Angles.trnsy(baseRotation, ft * i), 12f * i, 12f - Mathf.clamp(ft * i, 0, 2), baseRotation - 90); @@ -91,9 +103,17 @@ public abstract class GroundUnit extends BaseUnit { Draw.tint(Color.WHITE); } - Draw.rect(type.name + "-base", x, y, baseRotation- 90); + Draw.rect(type.baseRegion, x, y, baseRotation- 90); - Draw.rect(type.name, x, y, rotation -90); + Draw.rect(type.region, x, y, rotation -90); + + for (int i : Mathf.signs) { + float tra = rotation - 90, trY = - weapon.getRecoil(this, i > 0) + type.weaponOffsetY; + float w = i > 0 ? -12 : 12; + Draw.rect(weapon.equipRegion, + x + Angles.trnsx(tra, type.weaponOffsetX * i, trY), + y + Angles.trnsy(tra, type.weaponOffsetX * i, trY), w, 12, rotation - 90); + } Draw.alpha(1f); } @@ -114,6 +134,34 @@ public abstract class GroundUnit extends BaseUnit { } } + @Override + public void write(DataOutput data) throws IOException { + super.write(data); + data.writeByte(weapon.id); + } + + @Override + public void read(DataInput data, long time) throws IOException { + super.read(data, time); + weapon = Upgrade.getByID(data.readByte()); + } + + @Override + public void writeSave(DataOutput stream) throws IOException { + stream.writeByte(weapon.id); + super.writeSave(stream); + } + + @Override + public void readSave(DataInput stream) throws IOException{ + weapon = Upgrade.getByID(weapon.id); + super.readSave(stream); + } + + public void setWeapon(Weapon weapon){ + this.weapon = weapon; + } + protected void moveToCore(){ Tile tile = world.tileWorld(x, y); if(tile == null) return; @@ -191,15 +239,13 @@ public abstract class GroundUnit extends BaseUnit { rotate(angleTo(target)); } - if (timer.get(timerReload, type.reload) && Mathf.angNear(angleTo(target), rotation, 13f) - && distanceTo(target) < inventory.getAmmo().getRange()) { + if (Mathf.angNear(angleTo(target), rotation, 13f) && distanceTo(target) < inventory.getAmmo().getRange()) { AmmoType ammo = inventory.getAmmo(); - inventory.useAmmo(); rotate(angleTo(target)); Vector2 to = Predict.intercept(GroundUnit.this, target, ammo.bullet.speed); - shoot(ammo, Angles.moveToward(rotation, angleTo(to.x, to.y), maxAim)); + getWeapon().update(GroundUnit.this, to.x, to.y); } }else{ moveToCore(); diff --git a/core/src/io/anuke/mindustry/entities/units/UnitType.java b/core/src/io/anuke/mindustry/entities/units/UnitType.java index afaf647075..0a97d8a102 100644 --- a/core/src/io/anuke/mindustry/entities/units/UnitType.java +++ b/core/src/io/anuke/mindustry/entities/units/UnitType.java @@ -1,16 +1,22 @@ package io.anuke.mindustry.entities.units; +import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.utils.Array; -import com.badlogic.gdx.utils.ObjectMap; +import io.anuke.mindustry.content.Weapons; +import io.anuke.mindustry.entities.traits.TypeTrait; +import io.anuke.mindustry.game.Content; import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.type.AmmoType; -import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.game.UnlockableContent; +import io.anuke.mindustry.type.Weapon; +import io.anuke.ucore.function.Supplier; +import io.anuke.ucore.graphics.Draw; -public class UnitType { +//TODO merge unit type with mech +public class UnitType implements UnlockableContent{ private static byte lastid = 0; private static Array types = new Array<>(); - protected final UnitCreator creator; + protected final Supplier constructor; public final String name; public final byte id; @@ -21,7 +27,6 @@ public class UnitType { public float speed = 0.4f; public float range = 160; public float rotatespeed = 0.1f; - public float shootTranslation = 4f; public float baseRotateSpeed = 0.1f; public float mass = 1f; public boolean isFlying; @@ -34,35 +39,58 @@ public class UnitType { public int ammoCapacity = 100; public int itemCapacity = 30; public int mineLevel = 2; - public ObjectMap ammo = new ObjectMap<>(); + public Weapon weapon = Weapons.blaster; + public float weaponOffsetX, weaponOffsetY; - public UnitType(String name, UnitCreator creator){ + public TextureRegion iconRegion, legRegion, baseRegion, region; + + public UnitType(String name, Class type, Supplier mainConstructor){ this.id = lastid++; this.name = name; - this.creator = creator; + this.constructor = mainConstructor; types.add(this); + + TypeTrait.registerType(type, mainConstructor); } - public BaseUnit create(Team team){ - return creator.create(team); - } + @Override + public void load() { + iconRegion = Draw.region("unit-icon-" + name); + region = Draw.region(name); - protected void setAmmo(AmmoType... types){ - for(AmmoType type : types){ - ammo.put(type.item, type); + if(!isFlying) { + legRegion = Draw.region(name + "-leg"); + baseRegion = Draw.region(name + "-base"); } } - public interface UnitCreator{ - BaseUnit create(Team team); + @Override + public String getContentTypeName() { + return "unit-type"; + } + + @Override + public String getContentName() { + return name; + } + + @Override + public Array getAll() { + return types; + } + + public BaseUnit create(Team team){ + BaseUnit unit = constructor.get(); + unit.init(this, team); + return unit; } public static UnitType getByID(byte id){ return types.get(id); } - public static Array getAllTypes(){ + public static Array all(){ return types; } } diff --git a/core/src/io/anuke/mindustry/entities/units/types/Drone.java b/core/src/io/anuke/mindustry/entities/units/types/Drone.java index b1e256f60b..599413708f 100644 --- a/core/src/io/anuke/mindustry/entities/units/types/Drone.java +++ b/core/src/io/anuke/mindustry/entities/units/types/Drone.java @@ -12,9 +12,7 @@ import io.anuke.mindustry.entities.traits.BuilderTrait; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.FlyingUnit; import io.anuke.mindustry.entities.units.UnitState; -import io.anuke.mindustry.entities.units.UnitType; import io.anuke.mindustry.game.EventType.BlockBuildEvent; -import io.anuke.mindustry.game.Team; import io.anuke.mindustry.gen.CallEntity; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.type.Item; @@ -41,8 +39,6 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; public class Drone extends FlyingUnit implements BuilderTrait { - public static int typeID = -1; - protected static ObjectSet toMine; protected static float healSpeed = 0.1f; protected static float discoverRange = 120f; @@ -71,19 +67,14 @@ public class Drone extends FlyingUnit implements BuilderTrait { } } }); + + initialized = true; } { initEvents(); } - public Drone(UnitType type, Team team) { - super(type, team); - } - - public Drone(){ - } - private void notifyPlaced(BuildEntity entity){ float timeToBuild = entity.recipe.cost; float dist = Math.min(entity.distanceTo(x, y) - placeDistance, 0); @@ -94,11 +85,6 @@ public class Drone extends FlyingUnit implements BuilderTrait { } } - @Override - public int getTypeID() { - return typeID; - } - @Override public float getBuildPower(Tile tile) { return 0.3f; @@ -231,7 +217,9 @@ public class Drone extends FlyingUnit implements BuilderTrait { build = new UnitState(){ public void entered() { - target = null; + if(!(target instanceof BuildEntity)){ + target = null; + } } public void update() { @@ -310,6 +298,12 @@ public class Drone extends FlyingUnit implements BuilderTrait { findItem(); } + //core full + if(targetItem != null && entity.tile.block().acceptStack(targetItem, 1, entity.tile, Drone.this) == 0){ + setState(repair); + return; + } + //if inventory is full, drop it off. if(inventory.isFull()){ setState(drop); @@ -395,10 +389,12 @@ public class Drone extends FlyingUnit implements BuilderTrait { TileEntity tile = (TileEntity)target; - if(distanceTo(target) < type.range - && tile.tile.block().acceptStack(inventory.getItem().item, inventory.getItem().amount, tile.tile, Drone.this) == inventory.getItem().amount){ - CallEntity.transferItemTo(inventory.getItem().item, inventory.getItem().amount, x, y, tile.tile); - inventory.clearItem(); + if(distanceTo(target) < type.range){ + if(tile.tile.block().acceptStack(inventory.getItem().item, inventory.getItem().amount, tile.tile, Drone.this) == inventory.getItem().amount) { + CallEntity.transferItemTo(inventory.getItem().item, inventory.getItem().amount, x, y, tile.tile); + inventory.clearItem(); + } + setState(repair); } diff --git a/core/src/io/anuke/mindustry/entities/units/types/Monsoon.java b/core/src/io/anuke/mindustry/entities/units/types/Monsoon.java new file mode 100644 index 0000000000..09db7fc53a --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/units/types/Monsoon.java @@ -0,0 +1,7 @@ +package io.anuke.mindustry.entities.units.types; + +import io.anuke.mindustry.entities.units.FlyingUnit; + +public class Monsoon extends FlyingUnit { + +} diff --git a/core/src/io/anuke/mindustry/entities/units/types/Scout.java b/core/src/io/anuke/mindustry/entities/units/types/Scout.java index 711ee6684a..765dbfbb12 100644 --- a/core/src/io/anuke/mindustry/entities/units/types/Scout.java +++ b/core/src/io/anuke/mindustry/entities/units/types/Scout.java @@ -1,22 +1,7 @@ package io.anuke.mindustry.entities.units.types; import io.anuke.mindustry.entities.units.GroundUnit; -import io.anuke.mindustry.entities.units.UnitType; -import io.anuke.mindustry.game.Team; public class Scout extends GroundUnit { - public static int typeID = -1; - public Scout(UnitType type, Team team) { - super(type, team); - } - - public Scout(){ - - } - - @Override - public int getTypeID() { - return typeID; - } } diff --git a/core/src/io/anuke/mindustry/entities/units/types/Titan.java b/core/src/io/anuke/mindustry/entities/units/types/Titan.java new file mode 100644 index 0000000000..e2c6a845bc --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/units/types/Titan.java @@ -0,0 +1,7 @@ +package io.anuke.mindustry.entities.units.types; + +import io.anuke.mindustry.entities.units.GroundUnit; + +public class Titan extends GroundUnit{ + +} diff --git a/core/src/io/anuke/mindustry/entities/units/types/Vtol.java b/core/src/io/anuke/mindustry/entities/units/types/Vtol.java index 33c731e524..370446b148 100644 --- a/core/src/io/anuke/mindustry/entities/units/types/Vtol.java +++ b/core/src/io/anuke/mindustry/entities/units/types/Vtol.java @@ -1,55 +1,7 @@ package io.anuke.mindustry.entities.units.types; import io.anuke.mindustry.entities.units.FlyingUnit; -import io.anuke.mindustry.entities.units.UnitType; -import io.anuke.mindustry.game.Team; -import io.anuke.mindustry.net.Net; -import io.anuke.ucore.core.Timers; -import io.anuke.ucore.graphics.Draw; -import io.anuke.ucore.util.Mathf; public class Vtol extends FlyingUnit { - public static int typeID = -1; - - public Vtol(UnitType type, Team team) { - super(type, team); - } - - public Vtol(){ - - } - - @Override - public int getTypeID() { - return typeID; - } - - @Override - public void draw() { - Draw.alpha(hitTime / hitDuration); - - Draw.rect("vtol", x, y, rotation - 90); - - for(int i : Mathf.signs){ - Draw.rect("vtol-booster-1", x, y, 12*i, 12, rotation - 90); - Draw.rect("vtol-booster-2", x, y, 12*i, 12, rotation - 90); - } - - Draw.alpha(1f); - } - - @Override - public void update() { - super.update(); - - if(Net.client()) return; - - x += Mathf.sin(Timers.time() + id * 999, 25f, 0.07f); - y += Mathf.cos(Timers.time() + id * 999, 25f, 0.07f); - - if (velocity.len() <= 0.2f) { - rotation += Mathf.sin(Timers.time() + id * 99, 10f, 8f); - } - } } diff --git a/core/src/io/anuke/mindustry/io/TypeIO.java b/core/src/io/anuke/mindustry/io/TypeIO.java index 6945182e75..be1eb8020b 100644 --- a/core/src/io/anuke/mindustry/io/TypeIO.java +++ b/core/src/io/anuke/mindustry/io/TypeIO.java @@ -10,6 +10,7 @@ import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.entities.traits.CarriableTrait; import io.anuke.mindustry.entities.traits.CarryTrait; +import io.anuke.mindustry.entities.traits.ShooterTrait; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.net.Packets.AdminAction; @@ -57,6 +58,19 @@ public class TypeIO { return (Unit)Entities.getGroup(gid).getByID(id); } + @WriteClass(ShooterTrait.class) + public static void writeShooter(ByteBuffer buffer, ShooterTrait trait){ + buffer.put((byte)trait.getGroup().getID()); + buffer.putInt(trait.getID()); + } + + @ReadClass(ShooterTrait.class) + public static ShooterTrait readShooter(ByteBuffer buffer){ + byte gid = buffer.get(); + int id = buffer.getInt(); + return (ShooterTrait) Entities.getGroup(gid).getByID(id); + } + @WriteClass(Bullet.class) public static void writeBullet(ByteBuffer buffer, Bullet bullet){ buffer.putInt(bullet.getID()); @@ -90,6 +104,9 @@ public class TypeIO { @WriteClass(CarryTrait.class) public static void writeCarry(ByteBuffer buffer, CarryTrait unit){ + if(unit == null){ + buffer.put((byte)-1); + } buffer.put((byte)unit.getGroup().getID()); buffer.putInt(unit.getID()); } @@ -97,6 +114,9 @@ public class TypeIO { @ReadClass(CarryTrait.class) public static CarryTrait readCarry(ByteBuffer buffer){ byte gid = buffer.get(); + if(gid == -1){ + return null; + } int id = buffer.getInt(); return (CarryTrait)Entities.getGroup(gid).getByID(id); } diff --git a/core/src/io/anuke/mindustry/type/Mech.java b/core/src/io/anuke/mindustry/type/Mech.java index cc896f2004..cde4998224 100644 --- a/core/src/io/anuke/mindustry/type/Mech.java +++ b/core/src/io/anuke/mindustry/type/Mech.java @@ -5,6 +5,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion; import io.anuke.mindustry.content.Weapons; import io.anuke.ucore.graphics.Draw; +//TODO merge unit type with mech public class Mech extends Upgrade { public boolean flying; @@ -44,6 +45,6 @@ public class Mech extends Upgrade { } region = Draw.region(name); - iconRegion = Draw.optional("mech-icon-"+ name); + iconRegion = Draw.region("mech-icon-"+ name); } } diff --git a/core/src/io/anuke/mindustry/type/Recipe.java b/core/src/io/anuke/mindustry/type/Recipe.java index 5077b61699..03d97745b4 100644 --- a/core/src/io/anuke/mindustry/type/Recipe.java +++ b/core/src/io/anuke/mindustry/type/Recipe.java @@ -6,6 +6,8 @@ import io.anuke.mindustry.Vars; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.game.UnlockableContent; import io.anuke.mindustry.world.Block; +import io.anuke.ucore.util.Bundles; +import io.anuke.ucore.util.Log; import static io.anuke.mindustry.Vars.debug; import static io.anuke.mindustry.Vars.headless; @@ -50,6 +52,15 @@ public class Recipe implements UnlockableContent{ return this; } + @Override + public void init() { + if(!Bundles.has("block." + result.name + ".name")) { + Log.err("WARNING: Recipe block '{0}' does not have a formal name defined.", result.name); + }else if(result.fullDescription == null){ + Log.err("WARNING: Recipe block '{0}' does not have a description defined.", result.name); + } + } + @Override public String getContentName() { return result.name; diff --git a/core/src/io/anuke/mindustry/type/Weapon.java b/core/src/io/anuke/mindustry/type/Weapon.java index 2bbe2331d3..e5477068bf 100644 --- a/core/src/io/anuke/mindustry/type/Weapon.java +++ b/core/src/io/anuke/mindustry/type/Weapon.java @@ -7,8 +7,8 @@ import io.anuke.annotations.Annotations.Remote; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.fx.Fx; import io.anuke.mindustry.entities.Player; -import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.bullet.Bullet; +import io.anuke.mindustry.entities.traits.ShooterTrait; import io.anuke.mindustry.gen.CallEntity; import io.anuke.mindustry.net.In; import io.anuke.mindustry.net.Net; @@ -38,8 +38,10 @@ public class Weapon extends Upgrade { protected float shake = 0f; /**visual weapon knockback.*/ protected float recoil = 1.5f; - /**shoot barrel length*/ + /**shoot barrel y offset*/ protected float length = 3f; + /**shoot barrel x offset.*/ + protected float width = 4f; /**fraction of velocity that is random*/ protected float velocityRnd = 0f; /**whether to shoot the weapons in different arms one after another, rather than all at once*/ @@ -59,43 +61,58 @@ public class Weapon extends Upgrade { region = Draw.region(name); } - public void update(Player p, boolean left, float pointerX, float pointerY){ - int t = left ? Player.timerShootLeft : Player.timerShootRight; - int t2 = !left ? Player.timerShootLeft : Player.timerShootRight; - if(p.inventory.hasAmmo() && p.timer.get(t, reload)){ + public void update(ShooterTrait shooter, float pointerX, float pointerY){ + update(shooter, true, pointerX, pointerY); + update(shooter, false, pointerX, pointerY); + } + + private void update(ShooterTrait shooter, boolean left, float pointerX, float pointerY){ + if(shooter.getInventory().hasAmmo() && shooter.getTimer().get(shooter.getShootTimer(left), reload)){ if(roundrobin){ - p.timer.reset(t2, reload/2f); + shooter.getTimer().reset(shooter.getShootTimer(!left), reload/2f); } - tr.set(pointerX, pointerY).sub(p.x, p.y); + tr.set(pointerX, pointerY).sub(shooter.getX(), shooter.getY()); if(tr.len() < minPlayerDist) tr.setLength(minPlayerDist); - float cx = tr.x + p.x, cy = tr.y + p.y; + float cx = tr.x + shooter.getX(), cy = tr.y + shooter.getY(); float ang = tr.angle(); - tr.trns(ang - 90, 4f * Mathf.sign(left), length + 1f); + tr.trns(ang - 90, width * Mathf.sign(left), length); - shoot(p, p.x + tr.x, p.y + tr.y, Angles.angle(p.x + tr.x, p.y + tr.y, cx, cy), left); + shoot(shooter, shooter.getX() + tr.x, shooter.getY() + tr.y, Angles.angle(shooter.getX() + tr.x, shooter.getY() + tr.y, cx, cy), left); } } - public float getRecoil(Player player, boolean left){ - return (1f-Mathf.clamp(player.timer.getTime(left ? Player.timerShootLeft : Player.timerShootRight)/reload))*recoil; + public float getRecoil(ShooterTrait player, boolean left){ + return (1f-Mathf.clamp(player.getTimer().getTime(player.getShootTimer(left))/reload))*recoil; + } + + public float getRecoil() { + return recoil; } public float getReload(){ return reload; } - public void shoot(Player p, float x, float y, float angle, boolean left){ + public void shoot(ShooterTrait p, float x, float y, float angle, boolean left){ if(Net.client()){ //call it directly, don't invoke on server - shootDirect(p, this, x, y, angle, left); + shootDirect(p, x, y, angle, left); }else{ - CallEntity.onShootWeapon(p, this, x, y, angle, left); + if(p instanceof Player){ //players need special weapon handling logic + CallEntity.onPlayerShootWeapon((Player)p, x, y, angle, left); + }else{ + CallEntity.onGenericShootWeapon(p, x, y, angle, left); + } } - p.inventory.useAmmo(); + p.getInventory().useAmmo(); + } + + public Iterable getAcceptedItems(){ + return ammoMap.keys(); } public AmmoType getAmmoType(Item item){ @@ -108,39 +125,46 @@ public class Weapon extends Upgrade { } } - void bullet(Unit owner, float x, float y, float angle){ + void bullet(ShooterTrait owner, float x, float y, float angle){ tr.trns(angle, 3f); - Bullet.create(owner.inventory.getAmmo().bullet, owner, owner.getTeam(), x + tr.x, y + tr.y, angle, (1f-velocityRnd) + Mathf.random(velocityRnd)); + Bullet.create(owner.getInventory().getAmmo().bullet, owner, owner.getTeam(), x + tr.x, y + tr.y, angle, (1f-velocityRnd) + Mathf.random(velocityRnd)); } @Remote(targets = Loc.server, called = Loc.both, in = In.entities, unreliable = true) - public static void onShootWeapon(Player player, Weapon weapon, float x, float y, float rotation, boolean left){ + public static void onPlayerShootWeapon(Player player, float x, float y, float rotation, boolean left){ //clients do not see their own shoot events: they are simulated completely clientside to prevent laggy visuals //messing with the firerate or any other stats does not affect the server (take that, script kiddies!) if(Net.client() && player == Vars.players[0]){ return; } - shootDirect(player, weapon, x, y, rotation, left); + shootDirect(player, x, y, rotation, left); } - public static void shootDirect(Player player, Weapon weapon, float x, float y, float rotation, boolean left){ - Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> weapon.bullet(player, x, y, f + Mathf.range(weapon.inaccuracy))); + @Remote(targets = Loc.server, called = Loc.both, in = In.entities, unreliable = true) + public static void onGenericShootWeapon(ShooterTrait shooter, float x, float y, float rotation, boolean left){ + shootDirect(shooter, x, y, rotation, left); + } - AmmoType type = player.inventory.getAmmo(); + public static void shootDirect(ShooterTrait shooter, float x, float y, float rotation, boolean left){ + Weapon weapon = shooter.getWeapon(); + + Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> weapon.bullet(shooter, x, y, f + Mathf.range(weapon.inaccuracy))); + + AmmoType type = shooter.getInventory().getAmmo(); weapon.tr.trns(rotation + 180f, type.recoil); - player.getVelocity().add(weapon.tr); + shooter.getVelocity().add(weapon.tr); weapon.tr.trns(rotation, 3f); Effects.shake(weapon.shake, weapon.shake, x, y); Effects.effect(weapon.ejectEffect, x, y, rotation * -Mathf.sign(left)); - Effects.effect(type.shootEffect, x + weapon.tr.x, y + weapon.tr.y, rotation, player); - Effects.effect(type.smokeEffect, x + weapon.tr.x, y + weapon.tr.y, rotation, player); + Effects.effect(type.shootEffect, x + weapon.tr.x, y + weapon.tr.y, rotation, shooter); + Effects.effect(type.smokeEffect, x + weapon.tr.x, y + weapon.tr.y, rotation, shooter); //reset timer for remote players - player.timer.get(left ? Player.timerShootLeft : Player.timerShootRight, weapon.reload); + shooter.getTimer().get(shooter.getShootTimer(left), weapon.reload); } } diff --git a/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java b/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java index 9a50e6af9e..097e88e3a5 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/DebugFragment.java @@ -2,20 +2,21 @@ package io.anuke.mindustry.ui.fragments; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; -import io.anuke.mindustry.content.AmmoTypes; -import io.anuke.mindustry.content.UnitTypes; import io.anuke.mindustry.content.bullets.TurretBullets; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.units.BaseUnit; +import io.anuke.mindustry.entities.units.UnitType; import io.anuke.mindustry.net.Net; +import io.anuke.mindustry.ui.dialogs.FloatingDialog; import io.anuke.ucore.core.Timers; import io.anuke.ucore.entities.EntityGroup; import io.anuke.ucore.scene.Group; import io.anuke.ucore.scene.builders.button; import io.anuke.ucore.scene.builders.label; import io.anuke.ucore.scene.builders.table; +import io.anuke.ucore.scene.style.TextureRegionDrawable; import io.anuke.ucore.scene.ui.Label; import io.anuke.ucore.scene.ui.ScrollPane; import io.anuke.ucore.scene.ui.layout.Table; @@ -71,18 +72,21 @@ public class DebugFragment implements Fragment { row(); new button("death", () -> player.damage(99999, false)); row(); - new button("spawnf", () -> { - BaseUnit unit = UnitTypes.vtol.create(player.getTeam()); - unit.set(player.x, player.y); - unit.add(); - }); - row(); - new button("spawng", () ->{ - BaseUnit unit = UnitTypes.scout.create(player.getTeam()); - unit.set(player.x, player.y); - unit.inventory.addAmmo(AmmoTypes.bulletLead); - unit.setWave(); - unit.add(); + new button("spawn", () -> { + FloatingDialog dialog = new FloatingDialog("debug spawn"); + for(UnitType type : UnitType.all()){ + dialog.content().addImageButton("white", 40, () -> { + dialog.hide(); + BaseUnit unit = type.create(player.getTeam()); + unit.inventory.addAmmo(type.weapon.getAmmoType(type.weapon.getAcceptedItems().iterator().next())); + unit.setWave(); + unit.set(player.x, player.y); + unit.add(); + }).get().getStyle().imageUp = new TextureRegionDrawable(type.iconRegion); + } + dialog.addCloseButton(); + dialog.setFillParent(false); + dialog.show(); }); row(); }}.end(); diff --git a/core/src/io/anuke/mindustry/world/Build.java b/core/src/io/anuke/mindustry/world/Build.java index 3bae5e8d82..01bd8ed6e4 100644 --- a/core/src/io/anuke/mindustry/world/Build.java +++ b/core/src/io/anuke/mindustry/world/Build.java @@ -98,8 +98,6 @@ public class Build { //just in case if(tile == null) return; - threads.run(() -> Events.fire(BlockBuildEvent.class, team, tile)); - Block result = recipe.result; Block previous = tile.block(); @@ -144,6 +142,8 @@ public class Build { } } } + + threads.runDelay(() -> Events.fire(BlockBuildEvent.class, team, tile)); } /**Returns whether a tile can be placed at this location by this team.*/ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java b/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java index fceba0722b..1f39e386f9 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java @@ -5,7 +5,6 @@ import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.Bullet; -import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.Wall; @@ -69,7 +68,7 @@ public class DeflectorWall extends Wall { bullet.getVelocity().y *= -1; } - bullet.updateVelocity(BulletType.getByID(bullet.getTypeID()).drag); + bullet.updateVelocity(0f); bullet.resetOwner(entity, Team.none); bullet.scaleTime(1f); bullet.supressCollision(); diff --git a/packer/src/io/anuke/mindustry/GenRegion.java b/packer/src/io/anuke/mindustry/GenRegion.java new file mode 100644 index 0000000000..0bca16cdd4 --- /dev/null +++ b/packer/src/io/anuke/mindustry/GenRegion.java @@ -0,0 +1,15 @@ +package io.anuke.mindustry; + +import com.badlogic.gdx.graphics.g2d.TextureRegion; + +public class GenRegion extends TextureRegion { + public String name; + public boolean invalid; + public ImageContext context; + + public static void validate(TextureRegion region){ + if(((GenRegion)region).invalid){ + ((GenRegion) region).context.err("Region does not exist: {0}", ((GenRegion)region).name); + } + } +} diff --git a/packer/src/io/anuke/mindustry/Generators.java b/packer/src/io/anuke/mindustry/Generators.java index 51605373ee..4c60a2e57b 100644 --- a/packer/src/io/anuke/mindustry/Generators.java +++ b/packer/src/io/anuke/mindustry/Generators.java @@ -2,6 +2,7 @@ package io.anuke.mindustry; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.TextureRegion; +import io.anuke.mindustry.entities.units.UnitType; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Mech; import io.anuke.mindustry.type.Upgrade; @@ -63,6 +64,28 @@ public class Generators { } }); + context.generate("unit-icons", () -> { + for(UnitType type : UnitType.all()){ + + type.load(); + type.weapon.load(); + + Image image = context.get(type.region); + + if(!type.isFlying){ + image.draw(type.baseRegion); + image.draw(type.legRegion); + image.draw(type.legRegion, true, false); + image.draw(type.region); + + image.draw(type.weapon.equipRegion, -(int)type.weaponOffsetX, (int)type.weaponOffsetY, false, false); + image.draw(type.weapon.equipRegion, (int)type.weaponOffsetX, (int)type.weaponOffsetY, true, false); + } + + image.save("unit-icon-" + type.name); + } + }); + context.generate("ore-icons", () -> { for(Block block : Block.all()){ if(!(block instanceof OreBlock)) continue; diff --git a/packer/src/io/anuke/mindustry/Image.java b/packer/src/io/anuke/mindustry/Image.java index 441d9abd62..a088aa19c5 100644 --- a/packer/src/io/anuke/mindustry/Image.java +++ b/packer/src/io/anuke/mindustry/Image.java @@ -64,6 +64,8 @@ public class Image { } public void draw(TextureRegion region, int x, int y, boolean flipx, boolean flipy){ + GenRegion.validate(region); + int ofx = 0, ofy = 0; if(x < 0){ diff --git a/packer/src/io/anuke/mindustry/ImageContext.java b/packer/src/io/anuke/mindustry/ImageContext.java index 9a5a316f45..d4583a1b70 100644 --- a/packer/src/io/anuke/mindustry/ImageContext.java +++ b/packer/src/io/anuke/mindustry/ImageContext.java @@ -35,7 +35,11 @@ public class ImageContext { for(Region region : data.getRegions()){ int x = region.left, y = region.top, width = region.width, height = region.height; - regionCache.put(region.name, new TextureRegion(){ + regionCache.put(region.name, new GenRegion(){ + { + name = region.name; + context = ImageContext.this; + } @Override public int getRegionX(){ @@ -62,6 +66,13 @@ public class ImageContext { Core.atlas = new Atlas(){ @Override public TextureRegion getRegion(String name){ + if(!regionCache.containsKey(name)){ + GenRegion region = new GenRegion(); + region.name = name; + region.context = ImageContext.this; + region.invalid = true; + return region; + } return regionCache.get(name); } @@ -87,6 +98,8 @@ public class ImageContext { } public Image get(TextureRegion region){ + GenRegion.validate(region); + return new Image(image, region); }