diff --git a/core/assets-raw/sprites/blocks/environment/ice-cliff-edge-1.png b/core/assets-raw/sprites/blocks/environment/ice-cliff-edge-1.png new file mode 100644 index 0000000000..752311f80d Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ice-cliff-edge-1.png differ diff --git a/core/assets-raw/sprites/blocks/environment/ice-cliff-edge-2.png b/core/assets-raw/sprites/blocks/environment/ice-cliff-edge-2.png new file mode 100644 index 0000000000..fb2b33d3f8 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ice-cliff-edge-2.png differ diff --git a/core/assets-raw/sprites/blocks/environment/ice-cliff-edge.png b/core/assets-raw/sprites/blocks/environment/ice-cliff-edge.png new file mode 100644 index 0000000000..2819b78843 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ice-cliff-edge.png differ diff --git a/core/assets-raw/sprites/blocks/environment/ice-cliff-side.png b/core/assets-raw/sprites/blocks/environment/ice-cliff-side.png new file mode 100644 index 0000000000..fba14c2f59 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ice-cliff-side.png differ diff --git a/core/assets-raw/sprites/blocks/environment/sand-cliff-edge-1.png b/core/assets-raw/sprites/blocks/environment/sand-cliff-edge-1.png new file mode 100644 index 0000000000..7811175144 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/sand-cliff-edge-1.png differ diff --git a/core/assets-raw/sprites/blocks/environment/sand-cliff-edge-2.png b/core/assets-raw/sprites/blocks/environment/sand-cliff-edge-2.png new file mode 100644 index 0000000000..9b19b6e2e4 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/sand-cliff-edge-2.png differ diff --git a/core/assets-raw/sprites/blocks/environment/sand-cliff-edge.png b/core/assets-raw/sprites/blocks/environment/sand-cliff-edge.png new file mode 100644 index 0000000000..26a01f04a1 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/sand-cliff-edge.png differ diff --git a/core/assets-raw/sprites/blocks/environment/sand-cliff-side.png b/core/assets-raw/sprites/blocks/environment/sand-cliff-side.png new file mode 100644 index 0000000000..5468b77b59 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/sand-cliff-side.png differ diff --git a/core/assets-raw/sprites/blocks/environment/snow-cliff-edge-1.png b/core/assets-raw/sprites/blocks/environment/snow-cliff-edge-1.png new file mode 100644 index 0000000000..5355ae6578 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/snow-cliff-edge-1.png differ diff --git a/core/assets-raw/sprites/blocks/environment/snow-cliff-edge-2.png b/core/assets-raw/sprites/blocks/environment/snow-cliff-edge-2.png new file mode 100644 index 0000000000..566b5c2989 Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/snow-cliff-edge-2.png differ diff --git a/core/assets-raw/sprites/blocks/environment/snow-cliff-edge.png b/core/assets-raw/sprites/blocks/environment/snow-cliff-edge.png new file mode 100644 index 0000000000..c99aafe67d Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/snow-cliff-edge.png differ diff --git a/core/assets-raw/sprites/blocks/environment/snow-cliff-side.png b/core/assets-raw/sprites/blocks/environment/snow-cliff-side.png new file mode 100644 index 0000000000..8fb62c768f Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/snow-cliff-side.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 13d86dc936..3caf351d3b 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -20,21 +20,21 @@ conveyor-arrow index: -1 laserconveyor-arrow rotate: false - xy: 787, 401 + xy: 787, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-bridge rotate: false - xy: 797, 411 + xy: 797, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconveyor-end rotate: false - xy: 807, 421 + xy: 807, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -188,21 +188,21 @@ plasma-drill-top index: -1 tungsten-drill rotate: false - xy: 847, 365 + xy: 847, 355 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-rotator rotate: false - xy: 787, 351 + xy: 837, 343 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten-drill-top rotate: false - xy: 787, 341 + xy: 847, 345 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -375,6 +375,34 @@ grassedge orig: 12, 12 offset: 0, 0 index: -1 +ice-cliff-edge + rotate: false + xy: 615, 100 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +ice-cliff-edge-1 + rotate: false + xy: 625, 100 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +ice-cliff-edge-2 + rotate: false + xy: 635, 100 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +ice-cliff-side + rotate: false + xy: 645, 100 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 ice2 rotate: false xy: 647, 110 @@ -398,35 +426,35 @@ iceedge index: -1 icerock2 rotate: false - xy: 615, 100 + xy: 657, 110 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow1 rotate: false - xy: 625, 100 + xy: 655, 100 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow1 rotate: false - xy: 625, 100 + xy: 655, 100 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow2 rotate: false - xy: 635, 100 + xy: 641, 204 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow2 rotate: false - xy: 635, 100 + xy: 641, 204 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -440,49 +468,49 @@ lavaedge index: -1 lead2 rotate: false - xy: 787, 391 + xy: 827, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 797, 401 + xy: 777, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor2 rotate: false - xy: 787, 381 + xy: 827, 413 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor3 rotate: false - xy: 797, 391 + xy: 777, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor4 rotate: false - xy: 807, 401 + xy: 787, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor5 rotate: false - xy: 817, 411 + xy: 797, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 metalfloor6 rotate: false - xy: 827, 413 + xy: 807, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -503,21 +531,49 @@ oiledge index: -1 rock2 rotate: false - xy: 787, 361 + xy: 827, 393 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +sand-cliff-edge + rotate: false + xy: 827, 383 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +sand-cliff-edge-1 + rotate: false + xy: 807, 361 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +sand-cliff-edge-2 + rotate: false + xy: 817, 371 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +sand-cliff-side + rotate: false + xy: 827, 373 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 807, 381 + xy: 807, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 817, 391 + xy: 817, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -531,21 +587,49 @@ sandedge index: -1 shrubshadow rotate: false - xy: 827, 383 + xy: 837, 403 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +snow-cliff-edge + rotate: false + xy: 837, 363 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +snow-cliff-edge-1 + rotate: false + xy: 847, 425 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +snow-cliff-edge-2 + rotate: false + xy: 847, 415 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +snow-cliff-side + rotate: false + xy: 847, 405 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 817, 371 + xy: 837, 383 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 827, 373 + xy: 837, 373 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -566,42 +650,42 @@ spaceedge index: -1 stone-cliff-edge rotate: false - xy: 837, 423 + xy: 847, 375 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-1 rotate: false - xy: 837, 413 + xy: 847, 365 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-edge-2 rotate: false - xy: 837, 403 + xy: 787, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone-cliff-side rotate: false - xy: 837, 393 + xy: 787, 341 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 817, 361 + xy: 847, 395 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 827, 363 + xy: 847, 385 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -615,70 +699,70 @@ stoneedge index: -1 thorium2 rotate: false - xy: 837, 383 + xy: 797, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 837, 373 + xy: 797, 341 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 837, 363 + xy: 807, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 847, 425 + xy: 807, 341 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten2 rotate: false - xy: 847, 385 + xy: 827, 343 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tungsten3 rotate: false - xy: 847, 375 + xy: 837, 353 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge rotate: false - xy: 807, 351 + xy: 725, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-1 rotate: false - xy: 807, 341 + xy: 859, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-edge-2 rotate: false - xy: 817, 351 + xy: 869, 427 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water-cliff-side rotate: false - xy: 827, 353 + xy: 857, 417 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -790,14 +874,14 @@ nuclearreactor-shadow index: -1 place-arrow rotate: false - xy: 777, 371 + xy: 817, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 787, 371 + xy: 827, 403 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -965,49 +1049,49 @@ conduit-top index: -1 laserconduit-arrow rotate: false - xy: 787, 411 + xy: 797, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-bridge rotate: false - xy: 797, 421 + xy: 807, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserconduit-end rotate: false - xy: 777, 401 + xy: 777, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter rotate: false - xy: 807, 411 + xy: 787, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-bottom rotate: false - xy: 817, 421 + xy: 797, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-liquid rotate: false - xy: 827, 423 + xy: 807, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-top rotate: false - xy: 777, 381 + xy: 817, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1035,14 +1119,14 @@ liquidtank-top index: -1 pulseconduit-bottom rotate: false - xy: 797, 381 + xy: 777, 361 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-top rotate: false - xy: 807, 391 + xy: 787, 361 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1147,7 +1231,7 @@ nuclear-reactor-lights index: -1 rtg-generator-top rotate: false - xy: 797, 371 + xy: 797, 361 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1322,7 +1406,7 @@ extractor index: -1 lavasmelter rotate: false - xy: 777, 391 + xy: 817, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1357,28 +1441,28 @@ silicon-smelter-top index: -1 pulverizer rotate: false - xy: 817, 401 + xy: 797, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer-rotator rotate: false - xy: 827, 403 + xy: 807, 381 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 separator-liquid rotate: false - xy: 827, 393 + xy: 817, 361 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 siliconextractor rotate: false - xy: 807, 361 + xy: 837, 393 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1630,7 +1714,7 @@ reconstructor-open index: -1 repairpoint-turret rotate: false - xy: 777, 361 + xy: 817, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1763,7 +1847,7 @@ shell-back index: -1 shot rotate: false - xy: 817, 381 + xy: 837, 413 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1777,7 +1861,7 @@ transfer index: -1 transfer-arrow rotate: false - xy: 847, 415 + xy: 817, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2468,6 +2552,20 @@ coal1 orig: 8, 8 offset: 0, 0 index: -1 +block-icon-ore-coal-ice + rotate: false + xy: 343, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +block-icon-ore-coal-sand + rotate: false + xy: 343, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 block-icon-ore-coal-stone rotate: false xy: 343, 23 @@ -2489,6 +2587,20 @@ lead1 orig: 8, 8 offset: 0, 0 index: -1 +block-icon-ore-lead-ice + rotate: false + xy: 333, 3 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +block-icon-ore-lead-sand + rotate: false + xy: 333, 3 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 block-icon-ore-lead-stone rotate: false xy: 333, 3 @@ -2510,6 +2622,20 @@ thorium1 orig: 8, 8 offset: 0, 0 index: -1 +block-icon-ore-thorium-ice + rotate: false + xy: 343, 13 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +block-icon-ore-thorium-sand + rotate: false + xy: 343, 13 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 block-icon-ore-thorium-stone rotate: false xy: 343, 13 @@ -2531,6 +2657,20 @@ titanium1 orig: 8, 8 offset: 0, 0 index: -1 +block-icon-ore-titanium-ice + rotate: false + xy: 353, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +block-icon-ore-titanium-sand + rotate: false + xy: 353, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 block-icon-ore-titanium-stone rotate: false xy: 353, 23 @@ -2552,6 +2692,20 @@ tungsten1 orig: 8, 8 offset: 0, 0 index: -1 +block-icon-ore-tungsten-ice + rotate: false + xy: 343, 3 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +block-icon-ore-tungsten-sand + rotate: false + xy: 343, 3 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 block-icon-ore-tungsten-stone rotate: false xy: 343, 3 @@ -3240,105 +3394,105 @@ mech-icon-trident-ship index: -1 item-biomatter rotate: false - xy: 657, 110 + xy: 641, 184 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-blast-compound rotate: false - xy: 655, 100 + xy: 641, 174 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-carbide rotate: false - xy: 641, 204 + xy: 641, 164 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 641, 194 + xy: 641, 154 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 641, 184 + xy: 767, 420 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-phase-matter rotate: false - xy: 641, 174 + xy: 767, 410 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plasteel rotate: false - xy: 641, 164 + xy: 767, 400 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-sand rotate: false - xy: 641, 154 + xy: 767, 390 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 767, 420 + xy: 777, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 767, 410 + xy: 787, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-surge-alloy rotate: false - xy: 767, 400 + xy: 777, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thermite rotate: false - xy: 767, 390 + xy: 787, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 777, 421 + xy: 797, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 787, 421 + xy: 777, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-tungsten rotate: false - xy: 777, 411 + xy: 787, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -3977,7 +4131,7 @@ icon-itch.io index: -1 icon-items-none rotate: false - xy: 645, 100 + xy: 641, 194 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -4563,42 +4717,42 @@ generic-weapon index: -1 shockgun rotate: false - xy: 797, 361 + xy: 827, 363 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 807, 371 + xy: 837, 423 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster rotate: false - xy: 847, 405 + xy: 827, 353 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster-equip rotate: false - xy: 847, 395 + xy: 817, 341 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan rotate: false - xy: 797, 351 + xy: 705, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan-equip rotate: false - xy: 797, 341 + xy: 715, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 05287f9d3b..5bf6d44027 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/blocks/Blocks.java b/core/src/io/anuke/mindustry/content/blocks/Blocks.java index 638b5d777b..c6a0007a09 100644 --- a/core/src/io/anuke/mindustry/content/blocks/Blocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/Blocks.java @@ -117,15 +117,19 @@ public class Blocks extends BlockList implements ContentList{ sand = new Floor("sand") {{ drops = new ItemStack(Items.sand, 1); minimapColor = Color.valueOf("988a67"); + hasOres = true; }}; ice = new Floor("ice") {{ - dragMultiplier = 0.2f; + dragMultiplier = 0.3f; + speedMultiplier = 0.4f; minimapColor = Color.valueOf("c4e3e7"); + hasOres = true; }}; snow = new Floor("snow"){{ minimapColor = Color.valueOf("c2d1d2"); + hasOres = true; }}; grass = new Floor("grass"){{ diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index ac2d7613e5..b0b2dd4303 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -110,6 +110,10 @@ public class ContentLoader { contentSet.add(list.getAll()); } + if(Block.all().size >= 256){ + throw new IllegalArgumentException("THE TIME HAS COME. More than 256 blocks have been created.."); + } + 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, diff --git a/core/src/io/anuke/mindustry/ui/dialogs/LevelDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/LevelDialog.java index c329bbb779..33eeeac887 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/LevelDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/LevelDialog.java @@ -125,13 +125,13 @@ public class LevelDialog extends FloatingDialog{ maps.addImageButton("icon-editor", 16*4, () -> { hide(); - MapTileData data = WorldGenerator.generate(); - Map map = new Map("generated-map", new MapMeta(0, new ObjectMap<>(), data.width(), data.height(), null), true, () -> null); - ui.loadfrag.show(); Timers.run(5f, () -> { threads.run(() -> { + MapTileData data = WorldGenerator.generate(); + Map map = new Map("generated-map", new MapMeta(0, new ObjectMap<>(), data.width(), data.height(), null), true, () -> null); + logic.reset(); world.beginMapLoad(); diff --git a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java index e614d9e903..8295d9e532 100644 --- a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java @@ -17,7 +17,7 @@ public class OreBlock extends Floor { this.base = base; this.variants = 3; this.minimapColor = ore.color; - this.blends = block -> false; + this.blends = block -> block instanceof OreBlock && ((OreBlock) block).base != base; this.edge = base.name; } @@ -32,6 +32,8 @@ public class OreBlock extends Floor { Draw.rect(variants > 0 ? (drops.item.name + rand) : name, tile.worldx(), tile.worldy() - 1); Draw.color(); Draw.rect(variants > 0 ? (drops.item.name + rand) : name, tile.worldx(), tile.worldy()); + + drawEdges(tile, false); } @Override @@ -49,11 +51,6 @@ public class OreBlock extends Floor { base.drawEdges(tile, true); } - @Override - protected void drawEdges(Tile tile, boolean sameLayer){ - base.drawEdges(tile, sameLayer); - } - @Override public boolean blendOverride(Block block) { return block == base; diff --git a/core/src/io/anuke/mindustry/world/mapgen/WorldGenerator.java b/core/src/io/anuke/mindustry/world/mapgen/WorldGenerator.java index 2cfbeb2902..1b18345c4d 100644 --- a/core/src/io/anuke/mindustry/world/mapgen/WorldGenerator.java +++ b/core/src/io/anuke/mindustry/world/mapgen/WorldGenerator.java @@ -140,22 +140,30 @@ public class WorldGenerator { SeedRandom random = new SeedRandom(Mathf.random(99999)); - MapTileData data = new MapTileData(300, 300); + MapTileData data = new MapTileData(400, 400); TileDataMarker marker = data.newDataMarker(); ObjectMap decoration = new ObjectMap<>(); decoration.put(Blocks.grass, Blocks.shrub); decoration.put(Blocks.stone, Blocks.rock); + decoration.put(Blocks.ice, Blocks.icerock); + decoration.put(Blocks.snow, Blocks.icerock); + decoration.put(Blocks.blackstone, Blocks.blackrock); + + //TODO implement improved, more interesting generation for (int x = 0; x < data.width(); x++) { for (int y = 0; y < data.height(); y++) { marker.floor = (byte)Blocks.stone.id; + double elevation = sim.octaveNoise2D(3, 0.5, 1f/100, x, y) * 4.1 - 1; + double temp = sim3.octaveNoise2D(7, 0.53, 1f/320f, x, y); + double r = sim2.octaveNoise2D(1, 0.6, 1f/70, x, y); - double elevation = sim.octaveNoise2D(3, 0.5, 1f/70, x, y) * 4 - 1.2; double edgeDist = Math.max(data.width()/2, data.height()/2) - Math.max(Math.abs(x - data.width()/2), Math.abs(y - data.height()/2)); double dst = Vector2.dst(data.width()/2, data.height()/2, x, y); + double elevDip = 20; double border = 14; @@ -163,12 +171,23 @@ public class WorldGenerator { elevation += (border - edgeDist)/6.0; } - if(sim3.octaveNoise2D(6, 0.5, 1f/120f, x, y) > 0.5){ + if(temp < 0.35){ + marker.floor = (byte)Blocks.snow.id; + }else if(temp < 0.45){ + marker.floor = (byte)Blocks.stone.id; + }else if(temp < 0.7){ marker.floor = (byte)Blocks.grass.id; + }else if(temp < 0.8){ + marker.floor = (byte)Blocks.sand.id; + }else if(temp < 0.9){ + marker.floor = (byte)Blocks.blackstone.id; + elevation = 0f; + }else{ + marker.floor = (byte)Blocks.lava.id; } - if(dst < 20){ - elevation = 0; + if(dst < elevDip){ + elevation -= (elevDip - dst)/elevDip * 4.0; }else if(r > 0.9){ marker.floor = (byte)Blocks.water.id; elevation = 0;