diff --git a/core/src/mindustry/maps/planet/AsteroidGenerator.java b/core/src/mindustry/maps/planet/AsteroidGenerator.java index 70b266e2dd..d2f7605253 100644 --- a/core/src/mindustry/maps/planet/AsteroidGenerator.java +++ b/core/src/mindustry/maps/planet/AsteroidGenerator.java @@ -16,12 +16,13 @@ public class AsteroidGenerator extends BlankPlanetGenerator{ public void generate(){ int seed = state.rules.sector.planet.id; int sx = width/2, sy = height/2; + Rand rand = new Rand(seed); pass((x, y) -> { floor = Blocks.space; - if(Simplex.noise2d(seed, 5, 0.6f, 1f/ 100f, x, y) + Mathf.dst(x, y, sx, sy) / (float)width / 2f > 0.7f){ - floor = Blocks.stone; + if(Simplex.noise2d(seed, 5, 0.5f, 1f / 120f, x, y) - Mathf.dst(x, y, sx, sy) / (width/2f) > 0f){ + floor = rand.chance(0.02) ? Blocks.craters : Blocks.stone; } }); diff --git a/core/src/mindustry/world/blocks/defense/ForceProjector.java b/core/src/mindustry/world/blocks/defense/ForceProjector.java index 092d6c2520..4042e22c2c 100644 --- a/core/src/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/mindustry/world/blocks/defense/ForceProjector.java @@ -54,6 +54,7 @@ public class ForceProjector extends Block{ ambientSound = Sounds.shield; ambientSoundVolume = 0.08f; consumes.add(new ConsumeCoolant(0.1f)).boost().update(false); + envEnabled |= Env.space; } @Override diff --git a/core/src/mindustry/world/blocks/defense/MendProjector.java b/core/src/mindustry/world/blocks/defense/MendProjector.java index 036863d530..c4721340d9 100644 --- a/core/src/mindustry/world/blocks/defense/MendProjector.java +++ b/core/src/mindustry/world/blocks/defense/MendProjector.java @@ -36,6 +36,7 @@ public class MendProjector extends Block{ hasItems = true; emitLight = true; lightRadius = 50f; + envEnabled |= Env.space; } @Override diff --git a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java index 8611801979..e94d6a73c9 100644 --- a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java @@ -41,6 +41,7 @@ public class OverdriveProjector extends Block{ canOverdrive = false; emitLight = true; lightRadius = 50f; + envEnabled |= Env.space; } @Override diff --git a/core/src/mindustry/world/blocks/logic/LogicDisplay.java b/core/src/mindustry/world/blocks/logic/LogicDisplay.java index 871ab82944..2c54d1d1cf 100644 --- a/core/src/mindustry/world/blocks/logic/LogicDisplay.java +++ b/core/src/mindustry/world/blocks/logic/LogicDisplay.java @@ -36,6 +36,7 @@ public class LogicDisplay extends Block{ solid = true; group = BlockGroup.logic; drawDisabled = false; + envEnabled = Env.any; } @Override diff --git a/core/src/mindustry/world/blocks/logic/MemoryBlock.java b/core/src/mindustry/world/blocks/logic/MemoryBlock.java index cff63b98a3..3868b80935 100644 --- a/core/src/mindustry/world/blocks/logic/MemoryBlock.java +++ b/core/src/mindustry/world/blocks/logic/MemoryBlock.java @@ -14,6 +14,7 @@ public class MemoryBlock extends Block{ solid = true; group = BlockGroup.logic; drawDisabled = false; + envEnabled = Env.any; } @Override diff --git a/core/src/mindustry/world/blocks/logic/SwitchBlock.java b/core/src/mindustry/world/blocks/logic/SwitchBlock.java index 60e5db6dc7..ac9780a16b 100644 --- a/core/src/mindustry/world/blocks/logic/SwitchBlock.java +++ b/core/src/mindustry/world/blocks/logic/SwitchBlock.java @@ -17,6 +17,7 @@ public class SwitchBlock extends Block{ drawDisabled = false; autoResetEnabled = false; group = BlockGroup.logic; + envEnabled = Env.any; config(Boolean.class, (SwitchBuild entity, Boolean b) -> entity.enabled = b); } diff --git a/core/src/mindustry/world/blocks/power/LightBlock.java b/core/src/mindustry/world/blocks/power/LightBlock.java index 8a88a8e017..238df47aee 100644 --- a/core/src/mindustry/world/blocks/power/LightBlock.java +++ b/core/src/mindustry/world/blocks/power/LightBlock.java @@ -11,6 +11,7 @@ import mindustry.gen.*; import mindustry.graphics.*; import mindustry.logic.*; import mindustry.world.*; +import mindustry.world.meta.*; import static mindustry.Vars.*; @@ -25,6 +26,7 @@ public class LightBlock extends Block{ update = true; configurable = true; saveConfig = true; + envEnabled |= Env.space; config(Integer.class, (LightBuild tile, Integer value) -> tile.color = value); } diff --git a/core/src/mindustry/world/blocks/production/Pump.java b/core/src/mindustry/world/blocks/production/Pump.java index fd150ba38a..98c87553a3 100644 --- a/core/src/mindustry/world/blocks/production/Pump.java +++ b/core/src/mindustry/world/blocks/production/Pump.java @@ -20,6 +20,7 @@ public class Pump extends LiquidBlock{ super(name); group = BlockGroup.liquids; floating = true; + envEnabled = Env.terrestrial; } @Override diff --git a/core/src/mindustry/world/blocks/units/RepairPoint.java b/core/src/mindustry/world/blocks/units/RepairPoint.java index 1e8e9c9ddf..3ca61ec0d7 100644 --- a/core/src/mindustry/world/blocks/units/RepairPoint.java +++ b/core/src/mindustry/world/blocks/units/RepairPoint.java @@ -59,6 +59,8 @@ public class RepairPoint extends Block{ outlineIcon = true; //yeah, this isn't the same thing, but it's close enough group = BlockGroup.projectors; + + envEnabled |= Env.space; } @Override