diff --git a/build.gradle b/build.gradle index 3433cb161f..41c2c5e07b 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ allprojects { apply plugin: "eclipse" apply plugin: "idea" - version = '1.0' + version = 'release' ext { appName = "Mindustry" gdxVersion = '1.9.6' diff --git a/core/assets-raw/sprites/blocks/enemyspawn.png b/core/assets-raw/sprites/blocks/enemyspawn.png new file mode 100644 index 0000000000..e401b6eaef Binary files /dev/null and b/core/assets-raw/sprites/blocks/enemyspawn.png differ diff --git a/core/assets-raw/sprites/blocks/playerspawn.png b/core/assets-raw/sprites/blocks/playerspawn.png new file mode 100644 index 0000000000..448213f999 Binary files /dev/null and b/core/assets-raw/sprites/blocks/playerspawn.png differ diff --git a/core/assets-raw/sprites/ui/scroll-horizontal.9.png b/core/assets-raw/sprites/ui/scroll-horizontal.9.png index 6569566c4b..71469bb2e8 100644 Binary files a/core/assets-raw/sprites/ui/scroll-horizontal.9.png and b/core/assets-raw/sprites/ui/scroll-horizontal.9.png differ diff --git a/core/assets-raw/sprites/ui/scroll-knob-horizontal.9.png b/core/assets-raw/sprites/ui/scroll-knob-horizontal.9.png index 87f546a539..699845f70e 100644 Binary files a/core/assets-raw/sprites/ui/scroll-knob-horizontal.9.png and b/core/assets-raw/sprites/ui/scroll-knob-horizontal.9.png differ diff --git a/core/assets-raw/sprites/ui/scroll-knob-vertical.9.png b/core/assets-raw/sprites/ui/scroll-knob-vertical.9.png index c5ac231c50..eb8e698147 100644 Binary files a/core/assets-raw/sprites/ui/scroll-knob-vertical.9.png and b/core/assets-raw/sprites/ui/scroll-knob-vertical.9.png differ diff --git a/core/assets-raw/sprites/ui/selection.png b/core/assets-raw/sprites/ui/selection.png index e779aea9b1..a8ed5d2767 100644 Binary files a/core/assets-raw/sprites/ui/selection.png and b/core/assets-raw/sprites/ui/selection.png differ diff --git a/core/assets-raw/sprites/ui/separator.png b/core/assets-raw/sprites/ui/separator.png deleted file mode 100644 index 114704cbce..0000000000 Binary files a/core/assets-raw/sprites/ui/separator.png and /dev/null differ diff --git a/core/assets-raw/sprites/ui/slider-vertical.png b/core/assets-raw/sprites/ui/slider-vertical.png index e4139783a0..5ec9736ba6 100644 Binary files a/core/assets-raw/sprites/ui/slider-vertical.png and b/core/assets-raw/sprites/ui/slider-vertical.png differ diff --git a/core/assets/maps/maps.json b/core/assets/maps/maps.json index fcfbde3d3d..6150de5f22 100644 --- a/core/assets/maps/maps.json +++ b/core/assets/maps/maps.json @@ -87,7 +87,7 @@ { "id": 12, "name": "tutorial", - "visible": true, + "visible": false, "flipBase": false, "backgroundColor": "646464" } diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 621a57163f..5d792246a9 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -13,1190 +13,1204 @@ backgrounds/background index: -1 blank rotate: false - xy: 92, 91 + xy: 744, 314 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 blocks/blackrock1 rotate: false - xy: 349, 91 + xy: 646, 238 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackrockshadow1 rotate: false - xy: 370, 103 + xy: 646, 228 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone1 rotate: false - xy: 349, 81 + xy: 635, 222 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone2 rotate: false - xy: 359, 91 + xy: 625, 174 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstone3 rotate: false - xy: 380, 103 + xy: 733, 264 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock1 rotate: false - xy: 359, 81 + xy: 728, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock2 rotate: false - xy: 390, 103 + xy: 728, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneblock3 rotate: false - xy: 400, 103 + xy: 728, 234 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/blackstoneedge rotate: false - xy: 1011, 499 + xy: 519, 201 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/block rotate: false - xy: 420, 103 + xy: 738, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/block-2x2 rotate: false - xy: 661, 292 + xy: 761, 404 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/block-3x3 rotate: false - xy: 125, 38 + xy: 393, 105 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 blocks/chainturret rotate: false - xy: 679, 292 + xy: 742, 385 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/chainturret-icon rotate: false - xy: 648, 284 + xy: 1012, 501 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/coal1 rotate: false - xy: 440, 103 + xy: 743, 264 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal2 rotate: false - xy: 450, 103 + xy: 748, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coal3 rotate: false - xy: 460, 103 + xy: 748, 244 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coaldrill rotate: false - xy: 470, 103 + xy: 748, 234 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator rotate: false - xy: 229, 67 + xy: 801, 454 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalgenerator-top rotate: false - xy: 239, 67 + xy: 801, 444 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/coalpurifier rotate: false - xy: 249, 67 + xy: 801, 434 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/combustiongenerator rotate: false - xy: 259, 67 + xy: 801, 424 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/compositewall rotate: false - xy: 269, 67 + xy: 797, 410 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduit rotate: false - xy: 279, 67 + xy: 797, 400 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitbottom rotate: false - xy: 289, 67 + xy: 333, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduitliquid rotate: false - xy: 299, 67 + xy: 343, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conduittop rotate: false - xy: 309, 67 + xy: 353, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyor rotate: false - xy: 319, 67 + xy: 363, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyormove rotate: false - xy: 329, 67 + xy: 373, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/conveyortunnel rotate: false - xy: 339, 67 + xy: 383, 91 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/core rotate: false - xy: 524, 219 + xy: 445, 105 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 blocks/cross rotate: false - xy: 349, 71 + xy: 393, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/crucible rotate: false - xy: 359, 71 + xy: 403, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/deepwater rotate: false - xy: 575, 167 + xy: 413, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt1 rotate: false - xy: 575, 157 + xy: 423, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt2 rotate: false - xy: 575, 147 + xy: 433, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirt3 rotate: false - xy: 660, 268 + xy: 443, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/dirtedge rotate: false - xy: 178, 94 + xy: 519, 187 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/door rotate: false - xy: 670, 268 + xy: 453, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/door-large rotate: false - xy: 697, 291 + xy: 724, 364 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/door-large-icon rotate: false - xy: 680, 268 + xy: 463, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/door-large-open rotate: false - xy: 234, 113 + xy: 742, 367 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/door-open rotate: false - xy: 480, 103 + xy: 473, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/doubleturret rotate: false - xy: 558, 177 + xy: 709, 279 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/duriumwall rotate: false - xy: 490, 105 + xy: 483, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/duriumwall-large rotate: false - xy: 252, 113 + xy: 724, 346 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/duriumwall-large-icon rotate: false - xy: 225, 57 + xy: 656, 222 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/enemyspawn + rotate: false + xy: 666, 222 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/flameturret rotate: false - xy: 570, 177 + xy: 721, 281 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/fluxpump rotate: false - xy: 245, 57 + xy: 649, 202 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass1 rotate: false - xy: 255, 57 + xy: 659, 212 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass2 rotate: false - xy: 265, 57 + xy: 649, 192 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grass3 rotate: false - xy: 275, 57 + xy: 659, 202 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock1 rotate: false - xy: 285, 57 + xy: 659, 192 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassblock2 rotate: false - xy: 295, 57 + xy: 669, 212 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/grassedge rotate: false - xy: 630, 266 + xy: 547, 201 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/ice1 rotate: false - xy: 305, 57 + xy: 669, 202 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ice2 rotate: false - xy: 315, 57 + xy: 669, 192 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ice3 rotate: false - xy: 325, 57 + xy: 676, 222 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iceedge rotate: false - xy: 600, 250 + xy: 547, 187 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/icerock1 rotate: false - xy: 335, 57 + xy: 679, 212 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerock2 rotate: false - xy: 502, 110 + xy: 679, 202 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerockshadow1 rotate: false - xy: 512, 110 + xy: 679, 192 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow1 rotate: false - xy: 512, 110 + xy: 679, 192 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/icerockshadow2 rotate: false - xy: 805, 446 + xy: 649, 182 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow2 rotate: false - xy: 805, 446 + xy: 649, 182 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron1 rotate: false - xy: 151, 44 + xy: 309, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron2 rotate: false - xy: 161, 58 + xy: 319, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron3 rotate: false - xy: 171, 58 + xy: 393, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/irondrill rotate: false - xy: 161, 48 + xy: 403, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ironwall rotate: false - xy: 171, 48 + xy: 413, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/junction rotate: false - xy: 181, 52 + xy: 423, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/laserturret rotate: false - xy: 301, 89 + xy: 613, 184 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/lava rotate: false - xy: 580, 199 + xy: 433, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/lavaedge rotate: false - xy: 197, 55 + xy: 568, 213 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/lavasmelter rotate: false - xy: 580, 189 + xy: 443, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquiditemjunction rotate: false - xy: 582, 179 + xy: 453, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidjunction rotate: false - xy: 590, 199 + xy: 463, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidrouter rotate: false - xy: 590, 189 + xy: 473, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/machineturret rotate: false - xy: 322, 101 + xy: 625, 184 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/megarepairturret rotate: false - xy: 301, 77 + xy: 637, 210 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mortarturret rotate: false - xy: 313, 89 + xy: 637, 198 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/mossblock rotate: false - xy: 585, 169 + xy: 493, 88 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/mossstone rotate: false - xy: 585, 169 + xy: 493, 88 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/nuclearreactor rotate: false - xy: 550, 219 + xy: 471, 105 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 blocks/nuclearreactor-center rotate: false - xy: 727, 422 + xy: 779, 464 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 blocks/nuclearreactor-icon rotate: false - xy: 585, 149 + xy: 513, 90 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/nuclearreactor-lights rotate: false - xy: 753, 422 + xy: 727, 422 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 blocks/nuclearreactor-small rotate: false - xy: 396, 113 + xy: 904, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/oil rotate: false - xy: 595, 169 + xy: 523, 90 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/oiledge rotate: false - xy: 660, 278 + xy: 561, 199 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/oilrefinery rotate: false - xy: 595, 159 + xy: 747, 291 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/omnidrill rotate: false - xy: 595, 149 + xy: 745, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/plasmaturret rotate: false - xy: 334, 101 + xy: 637, 186 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 +blocks/playerspawn + rotate: false + xy: 757, 291 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 blocks/powerbooster rotate: false - xy: 349, 61 + xy: 755, 281 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyor rotate: false - xy: 359, 61 + xy: 493, 78 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyormove rotate: false - xy: 561, 139 + xy: 503, 78 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaser rotate: false - xy: 802, 376 + xy: 513, 80 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlasercorner rotate: false - xy: 161, 38 + xy: 523, 80 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaserrouter rotate: false - xy: 171, 38 + xy: 753, 271 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduit rotate: false - xy: 181, 42 + xy: 683, 233 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduitbottom rotate: false - xy: 157, 28 + xy: 693, 233 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pulseconduittop rotate: false - xy: 167, 28 + xy: 686, 223 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pump rotate: false - xy: 157, 18 + xy: 696, 223 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/repairturret rotate: false - xy: 313, 77 + xy: 733, 274 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/rock1 rotate: false - xy: 191, 45 + xy: 689, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rock2 rotate: false - xy: 201, 45 + xy: 689, 203 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/router rotate: false - xy: 211, 45 + xy: 689, 193 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator rotate: false - xy: 571, 137 + xy: 689, 183 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator-top rotate: false - xy: 521, 132 + xy: 699, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand1 rotate: false - xy: 518, 122 + xy: 699, 203 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand2 rotate: false - xy: 531, 135 + xy: 699, 193 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand3 rotate: false - xy: 541, 135 + xy: 699, 183 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock1 rotate: false - xy: 551, 135 + xy: 716, 223 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock2 rotate: false - xy: 561, 129 + xy: 709, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock3 rotate: false - xy: 571, 127 + xy: 709, 203 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandedge rotate: false - xy: 674, 278 + xy: 561, 185 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/shadow rotate: false - xy: 325, 89 + xy: 721, 269 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/shieldgenerator rotate: false - xy: 191, 35 + xy: 709, 183 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shotgunturret rotate: false - xy: 346, 101 + xy: 716, 257 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/shrub rotate: false - xy: 177, 22 + xy: 719, 193 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shrubshadow rotate: false - xy: 221, 45 + xy: 719, 183 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/smelter rotate: false - xy: 221, 35 + xy: 726, 223 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sniperturret rotate: false - xy: 325, 77 + xy: 716, 245 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/snow1 rotate: false - xy: 231, 47 + xy: 736, 224 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow2 rotate: false - xy: 231, 37 + xy: 746, 224 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow3 rotate: false - xy: 241, 47 + xy: 729, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock1 rotate: false - xy: 241, 37 + xy: 729, 203 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock2 rotate: false - xy: 251, 47 + xy: 729, 193 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock3 rotate: false - xy: 251, 37 + xy: 729, 183 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowedge rotate: false - xy: 563, 189 + xy: 575, 199 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/sorter rotate: false - xy: 261, 47 + xy: 739, 214 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyor rotate: false - xy: 261, 37 + xy: 739, 204 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyormove rotate: false - xy: 271, 47 + xy: 739, 194 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelwall rotate: false - xy: 271, 37 + xy: 739, 184 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelwall-large rotate: false - xy: 414, 113 + xy: 922, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/steelwall-large-icon rotate: false - xy: 281, 47 + xy: 749, 214 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone1 rotate: false - xy: 281, 37 + xy: 749, 204 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone2 rotate: false - xy: 291, 47 + xy: 749, 194 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone3 rotate: false - xy: 291, 37 + xy: 749, 184 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock1 rotate: false - xy: 301, 47 + xy: 756, 224 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock2 rotate: false - xy: 301, 37 + xy: 759, 214 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock3 rotate: false - xy: 311, 47 + xy: 759, 204 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonedrill rotate: false - xy: 311, 37 + xy: 759, 194 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneedge rotate: false - xy: 561, 163 + xy: 575, 185 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/stoneformer rotate: false - xy: 321, 47 + xy: 759, 184 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonewall rotate: false - xy: 321, 37 + xy: 519, 126 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter rotate: false - xy: 331, 47 + xy: 519, 116 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter-top rotate: false - xy: 331, 37 + xy: 625, 164 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/thermalgenerator rotate: false - xy: 581, 137 + xy: 637, 176 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titancannon rotate: false - xy: 779, 430 + xy: 753, 422 size: 24, 24 orig: 24, 24 offset: 0, 0 index: -1 blocks/titancannon-icon rotate: false - xy: 337, 89 + xy: 716, 233 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/titanium1 rotate: false - xy: 581, 127 + xy: 635, 166 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium2 rotate: false - xy: 591, 139 + xy: 647, 172 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium3 rotate: false - xy: 591, 129 + xy: 657, 172 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumdrill rotate: false - xy: 522, 112 + xy: 667, 172 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumpurifier rotate: false - xy: 528, 122 + xy: 677, 172 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumshieldwall rotate: false - xy: 538, 125 + xy: 645, 162 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumwall rotate: false - xy: 548, 125 + xy: 655, 162 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumwall-large rotate: false - xy: 881, 495 + xy: 994, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 blocks/titaniumwall-large-icon rotate: false - xy: 532, 112 + xy: 665, 162 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/turret rotate: false - xy: 358, 101 + xy: 601, 172 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 blocks/uranium1 rotate: false - xy: 177, 12 + xy: 645, 152 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium2 rotate: false - xy: 187, 22 + xy: 655, 152 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium3 rotate: false - xy: 187, 12 + xy: 665, 152 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uraniumdrill rotate: false - xy: 197, 25 + xy: 675, 152 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/water rotate: false - xy: 197, 15 + xy: 513, 70 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/wateredge rotate: false - xy: 561, 149 + xy: 513, 100 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 blocks/waveturret rotate: false - xy: 337, 77 + xy: 613, 172 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 bullet rotate: false - xy: 430, 103 + xy: 738, 234 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1210,7 +1224,7 @@ chainbullet index: -1 circle rotate: false - xy: 519, 178 + xy: 742, 403 size: 17, 17 orig: 17, 17 offset: 0, 0 @@ -1224,238 +1238,238 @@ circle2 index: -1 enemies/blastenemy-t1 rotate: false - xy: 899, 497 + xy: 173, 92 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/blastenemy-t2 rotate: false - xy: 915, 497 + xy: 715, 293 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/blastenemy-t3 rotate: false - xy: 931, 497 + xy: 728, 330 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/empenemy-t1 rotate: false - xy: 947, 497 + xy: 728, 314 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/empenemy-t2 rotate: false - xy: 963, 497 + xy: 744, 333 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/empenemy-t3 rotate: false - xy: 979, 497 + xy: 744, 317 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/enemy-t1 rotate: false - xy: 995, 497 + xy: 582, 229 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/targetenemy-t1 rotate: false - xy: 995, 497 + xy: 582, 229 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/enemy-t2 rotate: false - xy: 1011, 485 + xy: 533, 201 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 enemies/enemy-t3 rotate: false - xy: 616, 266 + xy: 533, 187 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 enemies/fastenemy-t1 rotate: false - xy: 563, 203 + xy: 497, 98 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/fastenemy-t2 rotate: false - xy: 715, 293 + xy: 597, 280 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/fastenemy-t3 rotate: false - xy: 722, 406 + xy: 613, 280 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/flamerenemy-t1 rotate: false - xy: 722, 390 + xy: 629, 280 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/flamerenemy-t2 rotate: false - xy: 738, 406 + xy: 645, 280 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/flamerenemy-t3 rotate: false - xy: 738, 390 + xy: 661, 276 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/fortressenemy-t1 rotate: false - xy: 95, 8 + xy: 779, 442 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 enemies/fortressenemy-t2 rotate: false - xy: 519, 197 + xy: 779, 420 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 enemies/fortressenemy-t3 rotate: false - xy: 541, 197 + xy: 497, 114 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 enemies/healerenemy-t1 rotate: false - xy: 754, 406 + xy: 677, 276 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/healerenemy-t2 rotate: false - xy: 754, 390 + xy: 592, 264 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/healerenemy-t3 rotate: false - xy: 181, 78 + xy: 592, 248 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/mortarenemy-t1 rotate: false - xy: 786, 382 + xy: 189, 89 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/mortarenemy-t2 rotate: false - xy: 529, 161 + xy: 205, 89 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/mortarenemy-t3 rotate: false - xy: 529, 145 + xy: 221, 89 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/rapidenemy-t1 rotate: false - xy: 545, 161 + xy: 237, 89 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/rapidenemy-t2 rotate: false - xy: 545, 145 + xy: 253, 89 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/rapidenemy-t3 rotate: false - xy: 600, 280 + xy: 731, 298 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/tankenemy-t1 rotate: false - xy: 616, 280 + xy: 747, 301 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/tankenemy-t2 rotate: false - xy: 600, 264 + xy: 524, 215 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/tankenemy-t3 rotate: false - xy: 632, 280 + xy: 540, 215 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 enemies/titanenemy-t1 rotate: false - xy: 432, 113 + xy: 940, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 enemies/titanenemy-t2 rotate: false - xy: 450, 113 + xy: 958, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 enemies/titanenemy-t3 rotate: false - xy: 468, 113 + xy: 976, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -1469,105 +1483,105 @@ enemyarrow index: -1 icon-coal rotate: false - xy: 805, 436 + xy: 659, 182 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-dirium rotate: false - xy: 805, 426 + xy: 669, 182 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-iron rotate: false - xy: 802, 416 + xy: 679, 182 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-steel rotate: false - xy: 802, 406 + xy: 269, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-stone rotate: false - xy: 802, 396 + xy: 279, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-titanium rotate: false - xy: 802, 386 + xy: 289, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-uranium rotate: false - xy: 151, 54 + xy: 299, 87 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laser rotate: false - xy: 577, 189 + xy: 596, 215 size: 1, 12 orig: 1, 12 offset: 0, 0 index: -1 laserend rotate: false - xy: 538, 177 + xy: 722, 402 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 laserfull rotate: false - xy: 576, 225 + xy: 722, 382 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 mechs/mech-standard rotate: false - xy: 211, 55 + xy: 582, 215 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shell rotate: false - xy: 181, 32 + xy: 709, 193 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 201, 35 + xy: 719, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 211, 35 + xy: 719, 203 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 542, 115 + xy: 675, 162 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1630,7 +1644,7 @@ ui/button-map-over index: -1 ui/button-select rotate: false - xy: 155, 68 + xy: 419, 105 size: 24, 24 split: 4, 4, 4, 4 orig: 24, 24 @@ -1645,70 +1659,70 @@ ui/check-off index: -1 ui/check-on rotate: false - xy: 779, 456 + xy: 273, 97 size: 28, 32 orig: 28, 32 offset: 0, 0 index: -1 ui/check-over rotate: false - xy: 95, 60 + xy: 303, 97 size: 28, 32 orig: 28, 32 offset: 0, 0 index: -1 ui/clear rotate: false - xy: 648, 272 + xy: 556, 215 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/cursor rotate: false - xy: 592, 245 + xy: 645, 222 size: 4, 4 orig: 4, 4 offset: 0, 0 index: -1 ui/icon-areaDelete rotate: false - xy: 226, 101 + xy: 733, 286 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-arrow rotate: false - xy: 579, 209 + xy: 608, 264 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-arrow-left rotate: false - xy: 238, 101 + xy: 656, 232 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-arrow-right rotate: false - xy: 229, 89 + xy: 668, 232 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-cancel rotate: false - xy: 181, 62 + xy: 608, 248 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-check rotate: false - xy: 486, 115 + xy: 624, 264 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1736,259 +1750,259 @@ ui/icon-close-over index: -1 ui/icon-crafting rotate: false - xy: 250, 101 + xy: 1012, 489 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-cursor rotate: false - xy: 229, 77 + xy: 704, 263 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-defense rotate: false - xy: 241, 89 + xy: 704, 251 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-discord rotate: false - xy: 502, 120 + xy: 624, 248 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-distribution rotate: false - xy: 262, 101 + xy: 704, 239 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-donate rotate: false - xy: 770, 406 + xy: 640, 264 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-fill rotate: false - xy: 270, 113 + xy: 742, 349 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 ui/icon-hold rotate: false - xy: 241, 77 + xy: 589, 203 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-holdDelete rotate: false - xy: 253, 89 + xy: 589, 191 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-info rotate: false - xy: 274, 101 + xy: 599, 220 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-load rotate: false - xy: 770, 390 + xy: 640, 248 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-loading rotate: false - xy: 288, 113 + xy: 779, 402 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 ui/icon-menu rotate: false - xy: 253, 77 + xy: 611, 220 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-none rotate: false - xy: 265, 89 + xy: 623, 220 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-pause rotate: false - xy: 286, 101 + xy: 601, 208 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-pencil rotate: false - xy: 306, 113 + xy: 661, 292 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 ui/icon-pick rotate: false - xy: 324, 113 + xy: 679, 292 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 ui/icon-play rotate: false - xy: 265, 77 + xy: 601, 196 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-play-2 rotate: false - xy: 194, 101 + xy: 598, 232 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-power rotate: false - xy: 277, 89 + xy: 613, 208 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-production rotate: false - xy: 298, 101 + xy: 613, 196 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-quit rotate: false - xy: 210, 101 + xy: 614, 232 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-redo rotate: false - xy: 342, 113 + xy: 697, 291 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 ui/icon-rotate rotate: false - xy: 197, 85 + xy: 630, 232 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-rotate-arrow rotate: false - xy: 197, 69 + xy: 693, 275 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-rotate-left rotate: false - xy: 213, 85 + xy: 656, 260 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-rotate-right rotate: false - xy: 213, 69 + xy: 672, 260 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-save rotate: false - xy: 125, 22 + xy: 656, 244 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-settings rotate: false - xy: 277, 77 + xy: 625, 208 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-terrain rotate: false - xy: 141, 22 + xy: 672, 244 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-tools rotate: false - xy: 786, 414 + xy: 688, 259 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-touch rotate: false - xy: 289, 89 + xy: 625, 196 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-touchDelete rotate: false - xy: 310, 101 + xy: 589, 179 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-tutorial rotate: false - xy: 786, 398 + xy: 688, 243 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 ui/icon-undo rotate: false - xy: 360, 113 + xy: 564, 227 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 ui/icon-weapon rotate: false - xy: 289, 77 + xy: 601, 184 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 ui/icon-zoom rotate: false - xy: 378, 113 + xy: 886, 495 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2033,20 +2047,19 @@ ui/scroll index: -1 ui/scroll-horizontal rotate: false - xy: 592, 251 - size: 6, 34 - split: 2, 2, 0, 34 - pad: 0, 5, 5, 4 - orig: 6, 34 + xy: 236, 105 + size: 35, 24 + split: 6, 5, 10, 10 + orig: 35, 24 offset: 0, 0 index: -1 ui/scroll-knob-horizontal rotate: false - xy: 521, 142 - size: 6, 34 - split: 2, 2, 0, 34 - pad: 0, 5, 13, 12 - orig: 6, 34 + xy: 194, 105 + size: 40, 24 + split: 10, 6, 0, 24 + pad: -1, -1, 10, 10 + orig: 40, 24 offset: 0, 0 index: -1 ui/scroll-knob-vertical @@ -2059,21 +2072,14 @@ ui/scroll-knob-vertical index: -1 ui/selection rotate: false - xy: 576, 222 - size: 1, 1 - orig: 1, 1 - offset: 0, 0 - index: -1 -ui/separator - rotate: false - xy: 576, 219 + xy: 724, 343 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 ui/slider rotate: false - xy: 558, 125 + xy: 680, 234 size: 1, 8 orig: 1, 8 offset: 0, 0 @@ -2101,21 +2107,21 @@ ui/slider-knob-over index: -1 ui/slider-vertical rotate: false - xy: 151, 41 + xy: 706, 226 size: 8, 1 orig: 8, 1 offset: 0, 0 index: -1 ui/text-editor rotate: false - xy: 194, 117 + xy: 524, 231 size: 38, 12 orig: 38, 12 offset: 0, 0 index: -1 ui/text-exit rotate: false - xy: 855, 499 + xy: 147, 94 size: 24, 12 orig: 24, 12 offset: 0, 0 @@ -2129,7 +2135,7 @@ ui/text-load index: -1 ui/text-play rotate: false - xy: 147, 94 + xy: 855, 499 size: 29, 12 orig: 29, 12 offset: 0, 0 @@ -2171,7 +2177,7 @@ ui/text-tutorial index: -1 ui/textfield rotate: false - xy: 125, 64 + xy: 363, 101 size: 28, 28 split: 6, 6, 6, 6 orig: 28, 28 @@ -2179,7 +2185,7 @@ ui/textfield index: -1 ui/textfield-over rotate: false - xy: 95, 30 + xy: 333, 101 size: 28, 28 split: 2, 2, 2, 2 orig: 28, 28 @@ -2187,7 +2193,7 @@ ui/textfield-over index: -1 ui/white rotate: false - xy: 519, 219 + xy: 722, 422 size: 3, 3 orig: 3, 3 offset: 0, 0 @@ -2210,42 +2216,42 @@ ui/window-empty index: -1 weapons/blaster rotate: false - xy: 410, 103 + xy: 738, 254 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/flamer rotate: false - xy: 235, 57 + xy: 649, 212 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/mortar rotate: false - xy: 592, 179 + xy: 483, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/multigun rotate: false - xy: 585, 159 + xy: 503, 88 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/railgun rotate: false - xy: 167, 18 + xy: 706, 229 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster rotate: false - xy: 552, 115 + xy: 635, 156 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 3a2d6eb16f..ddfb6297ef 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/assets/ui/uiskin.json b/core/assets/ui/uiskin.json index 1292905b42..4d850c4d67 100644 --- a/core/assets/ui/uiskin.json +++ b/core/assets/ui/uiskin.json @@ -49,6 +49,7 @@ io.anuke.ucore.scene.ui.ImageTextButton$ImageTextButtonStyle: { }, io.anuke.ucore.scene.ui.ScrollPane$ScrollPaneStyle: { default: {background: border, vScroll: scroll, vScrollKnob: scroll-knob-vertical}, + horizontal: {background: border, vScroll: scroll, vScrollKnob: scroll-knob-vertical, hScroll: scroll-horizontal, hScrollKnob: scroll-knob-horizontal}, volume: {background: button-map, vScroll: scroll, vScrollKnob: scroll-knob-vertical}, clear: {vScroll: scroll, vScrollKnob: scroll-knob-vertical} }, diff --git a/core/src/io/anuke/mindustry/Mindustry.java b/core/src/io/anuke/mindustry/Mindustry.java index 7645a2970b..c5aa9ff0ff 100644 --- a/core/src/io/anuke/mindustry/Mindustry.java +++ b/core/src/io/anuke/mindustry/Mindustry.java @@ -30,7 +30,8 @@ public class Mindustry extends ModuleCore { DefenseBlocks.compositewall, DistributionBlocks.conduit, ProductionBlocks.coaldrill, - WeaponBlocks.chainturret + WeaponBlocks.chainturret, + SpecialBlocks.enemySpawn }; @Override diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 9a77033ec6..c358dcc053 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -160,6 +160,8 @@ public class Control extends Module{ } public void play(){ + if(core == null) return; + renderer.clearTiles(); player.x = core.worldx(); @@ -435,7 +437,7 @@ public class Control extends Module{ @Override public void update(){ - if(debug){ + if(debug && GameState.is(State.playing)){ //debug actions if(Inputs.keyUp(Keys.P)){ Effects.effect(Fx.shellsmoke, player); diff --git a/core/src/io/anuke/mindustry/core/UI.java b/core/src/io/anuke/mindustry/core/UI.java index b8260a5b62..3475b4d695 100644 --- a/core/src/io/anuke/mindustry/core/UI.java +++ b/core/src/io/anuke/mindustry/core/UI.java @@ -449,10 +449,18 @@ public class UI extends SceneModule{ editorDialog.show(); } - public MapEditorDialog getEditor(){ + public MapEditorDialog getEditorDialog(){ return editorDialog; } + public MapEditor getEditor(){ + return editor; + } + + public void reloadLevels(){ + ((LevelDialog)levels).reload(); + } + public boolean isEditing(){ return editorDialog.getScene() != null; } diff --git a/core/src/io/anuke/mindustry/core/World.java b/core/src/io/anuke/mindustry/core/World.java index 0d80a5cb9d..1553f12dd9 100644 --- a/core/src/io/anuke/mindustry/core/World.java +++ b/core/src/io/anuke/mindustry/core/World.java @@ -158,6 +158,8 @@ public class World extends Module{ this.seed = seed; Generator.generate(map.pixmap, tiles); + if(control.getCore() == null) return; + //TODO multiblock core control.getInput().placeBlock(control.getCore().x, control.getCore().y, ProductionBlocks.core, 0, false, false); diff --git a/core/src/io/anuke/mindustry/mapeditor/EditorTool.java b/core/src/io/anuke/mindustry/mapeditor/EditorTool.java index 0699ae5812..edd1be18fc 100644 --- a/core/src/io/anuke/mindustry/mapeditor/EditorTool.java +++ b/core/src/io/anuke/mindustry/mapeditor/EditorTool.java @@ -59,7 +59,7 @@ public enum EditorTool{ public void touched(MapEditor editor, int x, int y){ Block block = ColorMapper.get(editor.pixmap().getPixel(x, y)).dominant(); editor.setDrawBlock(block); - Vars.ui.getEditor().updateSelectedBlock(); + Vars.ui.getEditorDialog().updateSelectedBlock(); } }, zoom; diff --git a/core/src/io/anuke/mindustry/mapeditor/MapEditor.java b/core/src/io/anuke/mindustry/mapeditor/MapEditor.java index cb28feac05..99021f5e35 100644 --- a/core/src/io/anuke/mindustry/mapeditor/MapEditor.java +++ b/core/src/io/anuke/mindustry/mapeditor/MapEditor.java @@ -13,8 +13,9 @@ import io.anuke.mindustry.world.blocks.Blocks; import io.anuke.ucore.graphics.Pixmaps; public class MapEditor{ - public static final int[] validMapSizes = {64, 128, 256}; + public static final int[] validMapSizes = {128, 256, 512}; public static final int[] brushSizes = {1, 2, 3, 4, 5, 9, 15}; + public static final int maxSpawnpoints = 15; private Pixmap[] brushPixmaps = new Pixmap[brushSizes.length]; @@ -36,6 +37,10 @@ public class MapEditor{ } } + public Map getMap(){ + return map; + } + public void updateTexture(){ texture.draw(pixmap, 0, 0); } @@ -156,10 +161,18 @@ public class MapEditor{ return pixmap; } - public void resize(int mapSize){ - Pixmap out = Pixmaps.resize(pixmap, mapSize, mapSize); + public void resize(int width, int height){ + Pixmap out = Pixmaps.resize(pixmap, width, height); pixmap.dispose(); pixmap = out; - texture.draw(pixmap, 0, 0); + texture.dispose(); + texture = new Texture(out); + + if(filterPixmap != null){ + filterPixmap.dispose(); + filterTexture.dispose(); + filterPixmap = null; + filterTexture = null; + } } } diff --git a/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java b/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java index 30c5fdd95b..55e7bc36a2 100644 --- a/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java +++ b/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java @@ -1,12 +1,17 @@ package io.anuke.mindustry.mapeditor; +import com.badlogic.gdx.graphics.Pixmap; + +import io.anuke.mindustry.Vars; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.ColorMapper; import io.anuke.mindustry.world.ColorMapper.BlockPair; import io.anuke.mindustry.world.Map; import io.anuke.mindustry.world.blocks.Blocks; +import io.anuke.mindustry.world.blocks.SpecialBlocks; import io.anuke.ucore.core.Core; import io.anuke.ucore.core.Draw; +import io.anuke.ucore.core.Timers; import io.anuke.ucore.scene.builders.*; import io.anuke.ucore.scene.ui.*; import io.anuke.ucore.scene.ui.layout.Table; @@ -16,6 +21,10 @@ public class MapEditorDialog extends Dialog{ private MapEditor editor; private MapView view; private MapGenerateDialog dialog; + private MapLoadDialog loadDialog; + private MapSaveDialog saveDialog; + private MapResizeDialog resizeDialog; + private ButtonGroup blockgroup; public MapEditorDialog(MapEditor editor){ @@ -24,6 +33,34 @@ public class MapEditorDialog extends Dialog{ dialog = new MapGenerateDialog(editor); view = new MapView(editor); + loadDialog = new MapLoadDialog(map -> { + editor.beginEdit(map); + }); + + resizeDialog = new MapResizeDialog(editor, (x, y) -> { + Pixmap pix = editor.pixmap(); + if(!(pix.getWidth() == x && pix.getHeight() == y)){ + Vars.ui.showLoading(); + Timers.run(10f, ()->{ + editor.resize(x, y); + Vars.ui.hideLoading(); + }); + } + }); + + saveDialog = new MapSaveDialog(name -> { + Vars.ui.showLoading(); + if(verifyMap()){ + editor.getMap().name = name; + Timers.run(10f, () -> { + Vars.world.maps().saveAndReload(editor.getMap(), editor.pixmap()); + Vars.ui.hideLoading(); + }); + }else{ + Vars.ui.hideLoading(); + } + }); + setFillParent(true); clearChildren(); @@ -48,7 +85,6 @@ public class MapEditorDialog extends Dialog{ } i++; } - } public void build(){ @@ -68,13 +104,13 @@ public class MapEditorDialog extends Dialog{ row(); new imagebutton("icon-load", isize, () -> { - + loadDialog.show(); }).text("load map"); row(); new imagebutton("icon-save", isize, ()->{ - + saveDialog.show(); }).text("save map"); row(); @@ -92,7 +128,7 @@ public class MapEditorDialog extends Dialog{ row(); new imagebutton("icon-cursor", 10f*3f, () -> { - + resizeDialog.show(); }).text("resize").padTop(4f); row(); @@ -150,6 +186,38 @@ public class MapEditorDialog extends Dialog{ }}.grow().end(); } + private boolean verifyMap(){ + int psc = ColorMapper.getColor(SpecialBlocks.playerSpawn); + int esc = ColorMapper.getColor(SpecialBlocks.enemySpawn); + + int playerSpawns = 0; + int enemySpawns = 0; + Pixmap pix = editor.pixmap(); + + for(int x = 0; x < pix.getWidth(); x ++){ + for(int y = 0; y < pix.getHeight(); y ++){ + int i = pix.getPixel(x, y); + if(i == psc) playerSpawns ++; + if(i == esc) enemySpawns ++; + } + } + + if(playerSpawns == 0){ + Vars.ui.showError("This map has no player spawnpoint!"); + return false; + }else if(playerSpawns > 1){ + Vars.ui.showError("Maps cannot have more than one\nplayer spawnpoint!"); + return false; + } + + if(enemySpawns > MapEditor.maxSpawnpoints){ + Vars.ui.showError("Cannot have more than\n" + MapEditor.maxSpawnpoints + " enemy spawnpoints!"); + return false; + } + + return true; + } + private void addBlockSelection(Table table){ Table content = new Table(); ScrollPane pane = new ScrollPane(content, "volume"); @@ -174,6 +242,8 @@ public class MapEditorDialog extends Dialog{ } } + group.getButtons().get(3).setChecked(true); + Table extra = new Table("button"); extra.addWrap(() -> editor.getDrawBlock().name).width(120f).center(); table.add(extra).growX(); diff --git a/core/src/io/anuke/mindustry/mapeditor/MapLoadDialog.java b/core/src/io/anuke/mindustry/mapeditor/MapLoadDialog.java new file mode 100644 index 0000000000..fdfb7bed9c --- /dev/null +++ b/core/src/io/anuke/mindustry/mapeditor/MapLoadDialog.java @@ -0,0 +1,63 @@ +package io.anuke.mindustry.mapeditor; + +import io.anuke.mindustry.Vars; +import io.anuke.mindustry.ui.BorderImage; +import io.anuke.mindustry.ui.FloatingDialog; +import io.anuke.mindustry.world.Map; +import io.anuke.ucore.function.Consumer; +import io.anuke.ucore.scene.ui.ButtonGroup; +import io.anuke.ucore.scene.ui.ScrollPane; +import io.anuke.ucore.scene.ui.TextButton; +import io.anuke.ucore.scene.ui.layout.Table; +import io.anuke.ucore.scene.ui.layout.Unit; + +public class MapLoadDialog extends FloatingDialog{ + Map selected = Vars.world.maps().getMap(0); + + public MapLoadDialog(Consumer loader) { + super("load map"); + ButtonGroup group = new ButtonGroup<>(); + + int maxcol = 3; + + int i = 0; + + Table table = new Table(); + table.defaults().size(200f, 90f).units(Unit.dp).pad(4f); + table.pad(Unit.dp.inPixels(10f)); + + ScrollPane pane = new ScrollPane(table, "horizontal"); + pane.setFadeScrollBars(false); + + for(Map map : Vars.world.maps().list()){ + if(!map.visible) continue; + + TextButton button = new TextButton(map.name, "toggle"); + button.add(new BorderImage(map.texture, 2f)).size(Unit.dp.inPixels(16*4f)); + button.getCells().reverse(); + button.clicked(() -> selected = map); + button.getLabelCell().grow().left().padLeft(5f).units(Unit.dp); + group.add(button); + table.add(button); + if(++i % maxcol == 0) table.row(); + } + + content().add("Select a map to load:"); + content().row(); + content().add(pane); + + TextButton button = new TextButton("Load"); + button.setDisabled(() -> selected == null); + button.clicked(() -> { + if(selected != null){ + loader.accept(selected); + hide(); + } + }); + + buttons().defaults().size(200f, 50f).units(Unit.dp); + buttons().addButton("Cancel", this::hide); + buttons().add(button); + } + +} diff --git a/core/src/io/anuke/mindustry/mapeditor/MapResizeDialog.java b/core/src/io/anuke/mindustry/mapeditor/MapResizeDialog.java new file mode 100644 index 0000000000..82244f6db5 --- /dev/null +++ b/core/src/io/anuke/mindustry/mapeditor/MapResizeDialog.java @@ -0,0 +1,67 @@ +package io.anuke.mindustry.mapeditor; + +import com.badlogic.gdx.graphics.Pixmap; +import com.badlogic.gdx.utils.Align; + +import io.anuke.mindustry.ui.FloatingDialog; +import io.anuke.ucore.function.BiConsumer; +import io.anuke.ucore.scene.ui.ButtonGroup; +import io.anuke.ucore.scene.ui.TextButton; +import io.anuke.ucore.scene.ui.layout.Table; +import io.anuke.ucore.scene.ui.layout.Unit; + +public class MapResizeDialog extends FloatingDialog{ + int width, height; + + public MapResizeDialog(MapEditor editor, BiConsumer cons){ + super("resize map"); + shown(() -> { + Pixmap pix = editor.pixmap(); + width = pix.getWidth(); + height = pix.getHeight(); + + Table table = new Table(); + + for(int d = 0; d < 2; d ++){ + boolean w = d == 0; + int curr = d == 0 ? pix.getWidth() : pix.getHeight(); + int idx = 0; + for(int i = 0; i < MapEditor.validMapSizes.length; i ++) + if(MapEditor.validMapSizes[i] == curr) idx = i; + + table.add(d == 0 ? "Width: ": "Height: "); + ButtonGroup group = new ButtonGroup<>(); + for(int i = 0; i < MapEditor.validMapSizes.length; i ++){ + int size = MapEditor.validMapSizes[i]; + TextButton button = new TextButton(size + "", "toggle"); + button.clicked(() -> { + if(w) + width = size; + else + height = size; + }); + group.add(button); + if(i == idx) button.setChecked(true); + table.add(button).size(100f, 54f).pad(2f).units(Unit.dp); + } + + table.row(); + } + + content().add(() -> + width + height > 512 ? "[scarlet]Warning!\n[]Maps larger than 256 units may be laggy and unstable." : "" + ).get().setAlignment(Align.center, Align.center); + content().row(); + content().add(table); + + }); + + buttons().defaults().size(200f, 50f).units(Unit.dp); + buttons().addButton("Cancel", this::hide); + buttons().addButton("Resize", () -> { + cons.accept(width, height); + hide(); + }); + + } +} diff --git a/core/src/io/anuke/mindustry/mapeditor/MapSaveDialog.java b/core/src/io/anuke/mindustry/mapeditor/MapSaveDialog.java new file mode 100644 index 0000000000..b54f05600b --- /dev/null +++ b/core/src/io/anuke/mindustry/mapeditor/MapSaveDialog.java @@ -0,0 +1,57 @@ +package io.anuke.mindustry.mapeditor; + +import io.anuke.mindustry.Vars; +import io.anuke.mindustry.ui.FloatingDialog; +import io.anuke.mindustry.world.Map; +import io.anuke.ucore.function.Consumer; +import io.anuke.ucore.scene.ui.TextButton; +import io.anuke.ucore.scene.ui.TextField; +import io.anuke.ucore.scene.ui.layout.Unit; + +public class MapSaveDialog extends FloatingDialog{ + private TextField field; + + public MapSaveDialog(Consumer cons){ + super("Save Map"); + field = new TextField(); + + shown(() -> { + content().clear(); + content().add(() ->{ + Map map = Vars.world.maps().getMap(field.getText()); + if(map != null){ + if(map.custom){ + return "[accent]Warning!\nThis overwrites an existing map."; + }else{ + return "[crimson]Cannot overwrite default map!"; + } + } + return ""; + }).colspan(2); + content().row(); + content().add("Map Name: "); + content().add(field).size(220f, 48f); + }); + + buttons().defaults().size(200f, 50f).pad(2f).units(Unit.dp); + buttons().addButton("Cancel", this::hide); + + TextButton button = new TextButton("Save"); + button.clicked(() -> { + if(!invalid()){ + cons.accept(field.getText()); + hide(); + } + }); + button.setDisabled(this::invalid); + buttons().add(button); + } + + private boolean invalid(){ + if(field.getText().isEmpty()){ + return true; + } + Map map = Vars.world.maps().getMap(field.getText()); + return map != null && !map.custom; + } +} diff --git a/core/src/io/anuke/mindustry/mapeditor/MapView.java b/core/src/io/anuke/mindustry/mapeditor/MapView.java index f478ac767a..87b764af07 100644 --- a/core/src/io/anuke/mindustry/mapeditor/MapView.java +++ b/core/src/io/anuke/mindustry/mapeditor/MapView.java @@ -120,12 +120,12 @@ public class MapView extends Element implements GestureListener{ float centery = y + height/2 + offsety * zoom; batch.flush(); - ScissorStack.pushScissors(Tmp.r1.set(x + width/2 - size/2, y + height/2 - size/2, size, size)); + boolean pop = ScissorStack.pushScissors(Tmp.r1.set(x + width/2 - size/2, y + height/2 - size/2, size, size)); batch.draw(editor.texture(), centerx - sclsize/2, centery - sclsize/2, sclsize, sclsize); batch.flush(); - ScissorStack.popScissors(); + if(pop) ScissorStack.popScissors(); Draw.color(Colors.get("accent")); Draw.thick(Unit.dp.inPixels(3f)); @@ -134,7 +134,7 @@ public class MapView extends Element implements GestureListener{ } private boolean active(){ - return Core.scene.getKeyboardFocus().isDescendantOf(Vars.ui.getEditor()) && Vars.ui.isEditing() && tool == EditorTool.zoom; + return Core.scene.getKeyboardFocus() != null && Core.scene.getKeyboardFocus().isDescendantOf(Vars.ui.getEditorDialog()) && Vars.ui.isEditing() && tool == EditorTool.zoom; } @Override diff --git a/core/src/io/anuke/mindustry/ui/BorderImage.java b/core/src/io/anuke/mindustry/ui/BorderImage.java index 4b15783ab0..52b4730df5 100644 --- a/core/src/io/anuke/mindustry/ui/BorderImage.java +++ b/core/src/io/anuke/mindustry/ui/BorderImage.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.ui; import com.badlogic.gdx.graphics.Colors; +import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; import io.anuke.ucore.core.Draw; @@ -8,6 +9,18 @@ import io.anuke.ucore.scene.ui.Image; import io.anuke.ucore.scene.ui.layout.Unit; public class BorderImage extends Image{ + private float thickness = 3f; + + public BorderImage(){} + + public BorderImage(Texture texture){ + super(texture); + } + + public BorderImage(Texture texture, float thick){ + super(texture); + thickness = thick; + } @Override public void draw(Batch batch, float alpha){ @@ -17,7 +30,7 @@ public class BorderImage extends Image{ float scaleY = getScaleY(); Draw.color(Colors.get("accent")); - Draw.thick(Unit.dp.inPixels(3f)); + Draw.thick(Unit.dp.inPixels(thickness)); Draw.linerect(x + imageX, y + imageY, imageWidth * scaleX, imageHeight * scaleY); Draw.reset(); } diff --git a/core/src/io/anuke/mindustry/ui/LevelDialog.java b/core/src/io/anuke/mindustry/ui/LevelDialog.java index 9ed61d1b81..837d6f8531 100644 --- a/core/src/io/anuke/mindustry/ui/LevelDialog.java +++ b/core/src/io/anuke/mindustry/ui/LevelDialog.java @@ -23,11 +23,16 @@ public class LevelDialog extends FloatingDialog{ super("Level Select"); getTitleTable().getCell(title()).growX().center(); getTitleTable().center(); + addCloseButton(); + setup(); + } + + public void reload(){ + content().clear(); setup(); } void setup(){ - addCloseButton(); Table maps = new Table(); ScrollPane pane = new ScrollPane(maps); pane.setFadeScrollBars(false); diff --git a/core/src/io/anuke/mindustry/world/ColorMapper.java b/core/src/io/anuke/mindustry/world/ColorMapper.java index 011addbc80..8c696dd6ce 100644 --- a/core/src/io/anuke/mindustry/world/ColorMapper.java +++ b/core/src/io/anuke/mindustry/world/ColorMapper.java @@ -7,11 +7,14 @@ import com.badlogic.gdx.utils.IntMap.Entry; import com.badlogic.gdx.utils.ObjectIntMap; import io.anuke.mindustry.world.blocks.Blocks; +import io.anuke.mindustry.world.blocks.SpecialBlocks; public class ColorMapper{ private static ObjectIntMap reverseColors = new ObjectIntMap<>(); private static Array pairs = new Array<>(); private static IntMap colors = map( + "ff0000", pair(Blocks.dirt, SpecialBlocks.enemySpawn), + "00ff00", pair(Blocks.stone, SpecialBlocks.playerSpawn), "323232", pair(Blocks.stone), "646464", pair(Blocks.stone, Blocks.stoneblock), "50965a", pair(Blocks.grass), diff --git a/core/src/io/anuke/mindustry/world/Generator.java b/core/src/io/anuke/mindustry/world/Generator.java index ceff64f2e8..66444db661 100644 --- a/core/src/io/anuke/mindustry/world/Generator.java +++ b/core/src/io/anuke/mindustry/world/Generator.java @@ -6,16 +6,17 @@ import com.badlogic.gdx.utils.IntMap; import com.badlogic.gdx.utils.ObjectMap; import io.anuke.mindustry.Vars; +import io.anuke.mindustry.core.GameState; +import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.enemies.TargetEnemy; import io.anuke.mindustry.world.ColorMapper.BlockPair; import io.anuke.mindustry.world.blocks.Blocks; +import io.anuke.mindustry.world.blocks.SpecialBlocks; import io.anuke.ucore.graphics.Hue; import io.anuke.ucore.noise.Noise; import io.anuke.ucore.util.Mathf; public class Generator{ - static final int spawn = Color.rgba8888(Color.RED); - static final int start = Color.rgba8888(Color.GREEN); static final ObjectMap rocks = new ObjectMap(){{ put(Blocks.stone, Blocks.rock); put(Blocks.snow, Blocks.icerock); @@ -25,6 +26,7 @@ public class Generator{ /**Returns world size.*/ public static void generate(Pixmap pixmap, Tile[][] tiles){ + boolean hasenemies = true, hascore = false;; Noise.setSeed(Vars.world.getSeed()); @@ -39,11 +41,16 @@ public class Generator{ if(pair != null){ block = pair.wall; floor = pair.floor; - }else if(color == start){ + } + + if(block == SpecialBlocks.playerSpawn){ + block = Blocks.air; Vars.control.setCore(Vars.world.tile(x, y)); - }else if(color == spawn){ + hascore = true; + }else if(block == SpecialBlocks.enemySpawn){ + block = Blocks.air; Vars.control.addSpawnPoint(Vars.world.tile(x, y)); - floor = Blocks.dirt; + hasenemies = true; } if(block == Blocks.air && Mathf.chance(0.025) && rocks.containsKey(floor)){ @@ -78,6 +85,16 @@ public class Generator{ tiles[x][y].setFloor(floor); } } + + if(!hascore){ + GameState.set(State.menu); + Vars.ui.showError("[orange]Invalid map:[] this map has no core!"); + } + + if(!hasenemies){ + GameState.set(State.menu); + Vars.ui.showError("[orange]Invalid map:[] this map has no enemy spawnpoints!"); + } } private static IntMap map(Object...objects){ diff --git a/core/src/io/anuke/mindustry/world/Map.java b/core/src/io/anuke/mindustry/world/Map.java index 34047f06d8..a9e5bd9350 100644 --- a/core/src/io/anuke/mindustry/world/Map.java +++ b/core/src/io/anuke/mindustry/world/Map.java @@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.Texture; public class Map{ - public int id; + public int id = -1; public String name; public boolean visible = true; public boolean flipBase = false; diff --git a/core/src/io/anuke/mindustry/world/Maps.java b/core/src/io/anuke/mindustry/world/Maps.java index 2fc96f679b..d9b3cb5599 100644 --- a/core/src/io/anuke/mindustry/world/Maps.java +++ b/core/src/io/anuke/mindustry/world/Maps.java @@ -10,6 +10,7 @@ import com.badlogic.gdx.utils.Json.Serializer; import com.badlogic.gdx.utils.JsonWriter.OutputType; import io.anuke.mindustry.Vars; +import io.anuke.ucore.core.Settings; import io.anuke.ucore.graphics.Pixmaps; public class Maps implements Disposable{ @@ -49,17 +50,59 @@ public class Maps implements Disposable{ } } } + + public void saveAndReload(Map map, Pixmap out){ + if(map.pixmap != null && out != map.pixmap && map.texture != null){ + map.texture.dispose(); + map.texture = new Texture(out); + }else if (out == map.pixmap){ + map.texture.draw(out, 0, 0); + } + map.pixmap = out; + if(map.texture == null) map.texture = new Texture(map.pixmap); + + if(map.id == -1){ + if(mapNames.containsKey(map.name)){ + map.id = mapNames.get(map.name).id; + }else{ + map.id = ++lastID; + } + } + + if(!Settings.has("hiscore" + map.name)){ + Settings.defaults("hiscore" + map.name, 0); + } + + saveCustomMap(map); + Vars.ui.reloadLevels(); + //TODO reload map dialog + } public void saveMaps(Array array, FileHandle file){ json.toJson(new ArrayContainer(array), file); } public void saveCustomMap(Map toSave){ + toSave.custom = true; Array out = new Array<>(); + boolean added = false; for(Map map : maps.values()){ - if(map.custom) - out.add(map); + if(map.custom){ + if(map.name.equals(toSave.name)){ + out.add(toSave); + added = true; + }else{ + out.add(map); + } + } } + if(!added){ + out.add(toSave); + } + maps.remove(toSave.id); + mapNames.remove(toSave.name); + maps.put(toSave.id, toSave); + mapNames.put(toSave.name, toSave); Pixmaps.write(toSave.pixmap, Vars.customMapDirectory.child(toSave.name + ".png")); saveMaps(out, Vars.customMapDirectory.child("maps.json")); } @@ -73,6 +116,7 @@ public class Maps implements Disposable{ map.texture = new Texture(map.pixmap); maps.put(map.id, map); mapNames.put(map.name, map); + lastID = Math.max(lastID, map.id); } } return true; diff --git a/core/src/io/anuke/mindustry/world/blocks/SpecialBlocks.java b/core/src/io/anuke/mindustry/world/blocks/SpecialBlocks.java new file mode 100644 index 0000000000..6868089d92 --- /dev/null +++ b/core/src/io/anuke/mindustry/world/blocks/SpecialBlocks.java @@ -0,0 +1,9 @@ +package io.anuke.mindustry.world.blocks; + +import io.anuke.mindustry.world.Block; + +public class SpecialBlocks{ + public static final Block + playerSpawn = new Block("playerspawn"), + enemySpawn = new Block("enemyspawn"); +} diff --git a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java index 5255629a85..df311e91c8 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java @@ -19,10 +19,9 @@ import io.anuke.ucore.scene.ui.layout.Table; import io.anuke.ucore.scene.ui.layout.Unit; import io.anuke.ucore.util.Mathf; -//TODO public class Teleporter extends Block implements Configurable{ - public static final int colors = 4; public static final Color[] colorArray = {Color.ROYAL, Color.ORANGE, Color.SCARLET, Color.FOREST, Color.PURPLE, Color.GOLD, Color.PINK}; + public static final int colors = colorArray.length; private static Array removal = new Array<>(); private static Array returns = new Array<>(); @@ -71,16 +70,13 @@ public class Teleporter extends Block implements Configurable{ TeleporterEntity entity = tile.entity(); table.addIButton("icon-arrow-left", Unit.dp.inPixels(10*3), ()->{ - entity.color --; - if(entity.color < 0) - entity.color += 4; + entity.color = (byte)Mathf.mod(entity.color - 1, colors); }); table.add().size(40f).units(Unit.dp); table.addIButton("icon-arrow-right", Unit.dp.inPixels(10*3), ()->{ - entity.color ++; - entity.color %= 4; + entity.color = (byte)Mathf.mod(entity.color + 1, colors); }); } diff --git a/desktop/mindustry-maps/custom.png b/desktop/mindustry-maps/custom.png new file mode 100644 index 0000000000..9cafbf199f Binary files /dev/null and b/desktop/mindustry-maps/custom.png differ diff --git a/desktop/mindustry-maps/maps.json b/desktop/mindustry-maps/maps.json index 9e26dfeeb6..ff76b43a3c 100644 --- a/desktop/mindustry-maps/maps.json +++ b/desktop/mindustry-maps/maps.json @@ -1 +1 @@ -{} \ No newline at end of file +{"maps":[{"id":13,"name":"custom","custom":true},{"id":14,"name":"wowmap","custom":true},{"id":15,"name":"moremap","custom":true},{"id":16,"name":"trash","custom":true},{"id":17,"name":"wonderifthisworks","custom":true}]} \ No newline at end of file diff --git a/desktop/mindustry-maps/moremap.png b/desktop/mindustry-maps/moremap.png new file mode 100644 index 0000000000..9ba9e46745 Binary files /dev/null and b/desktop/mindustry-maps/moremap.png differ diff --git a/desktop/mindustry-maps/trash.png b/desktop/mindustry-maps/trash.png new file mode 100644 index 0000000000..b0ec0968b0 Binary files /dev/null and b/desktop/mindustry-maps/trash.png differ diff --git a/desktop/mindustry-maps/wonderifthisworks.png b/desktop/mindustry-maps/wonderifthisworks.png new file mode 100644 index 0000000000..ff50c808d1 Binary files /dev/null and b/desktop/mindustry-maps/wonderifthisworks.png differ diff --git a/desktop/mindustry-maps/wowmap.png b/desktop/mindustry-maps/wowmap.png new file mode 100644 index 0000000000..2470f5158a Binary files /dev/null and b/desktop/mindustry-maps/wowmap.png differ