From dc3099389855ad54246864779aad2c1a363c1c87 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 25 Sep 2020 18:49:31 -0400 Subject: [PATCH] Fixed #2729 --- core/src/mindustry/ai/types/FlyingAI.java | 2 +- core/src/mindustry/content/UnitTypes.java | 2 +- core/src/mindustry/content/Weathers.java | 3 ++- core/src/mindustry/type/Weather.java | 9 +++++---- core/src/mindustry/world/Build.java | 5 ++++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/ai/types/FlyingAI.java b/core/src/mindustry/ai/types/FlyingAI.java index 1237966425..0758f9016a 100644 --- a/core/src/mindustry/ai/types/FlyingAI.java +++ b/core/src/mindustry/ai/types/FlyingAI.java @@ -16,7 +16,7 @@ public class FlyingAI extends AIController{ moveTo(target, unit.range() * 0.8f); unit.lookAt(target); }else{ - attack(80f); + attack(100f); } } diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 0891cbabd9..06757e39c7 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -885,7 +885,7 @@ public class UnitTypes implements ContentList{ weapons.add(new Weapon(){{ y = 0f; x = 2f; - reload = 15f; + reload = 13f; ejectEffect = Fx.shellEjectSmall; bullet = Bullets.standardCopper; shootSound = Sounds.shoot; diff --git a/core/src/mindustry/content/Weathers.java b/core/src/mindustry/content/Weathers.java index 6f59edbed0..b4853ac33f 100644 --- a/core/src/mindustry/content/Weathers.java +++ b/core/src/mindustry/content/Weathers.java @@ -170,12 +170,13 @@ public class Weathers implements ContentList{ sandstorm = new Weather("sandstorm"){ TextureRegion region; float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f; - float force = 0.45f; + float force = 0.4f; Color color = Color.valueOf("f7cba4"); Texture noise; { attrs.set(Attribute.light, -0.1f); + opacityMultiplier = 0.85f; } @Override diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index 5e7eedc6bc..98d0a9f7e2 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -17,7 +17,8 @@ import static mindustry.Vars.*; public abstract class Weather extends UnlockableContent{ /** Default duration of this weather event in ticks. */ - public float duration = 9f * Time.toMinutes; + public float duration = 8f * Time.toMinutes; + public float opacityMultiplier = 1f; public Attributes attrs = new Attributes(); //internals @@ -122,7 +123,7 @@ public abstract class Weather extends UnlockableContent{ /** Creates a weather entry with some approximate weather values. */ public WeatherEntry(Weather weather){ - this(weather, weather.duration * 1f, weather.duration * 3f, weather.duration / 2f, weather.duration * 1.5f); + this(weather, weather.duration * 3f, weather.duration * 6f, weather.duration / 2f, weather.duration * 1.5f); } public WeatherEntry(Weather weather, float minFrequency, float maxFrequency, float minDuration, float maxDuration){ @@ -177,14 +178,14 @@ public abstract class Weather extends UnlockableContent{ if(renderer.weatherAlpha() > 0.0001f){ Draw.draw(Layer.weather, () -> { weather.rand.setSeed(0); - Draw.alpha(renderer.weatherAlpha() * opacity); + Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier); weather.drawOver(self()); Draw.reset(); }); Draw.draw(Layer.debris, () -> { weather.rand.setSeed(0); - Draw.alpha(renderer.weatherAlpha() * opacity); + Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier); weather.drawUnder(self()); Draw.reset(); }); diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 7f9182a211..97666142e0 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -105,7 +105,10 @@ public class Build{ int wx = dx + offsetx + x, wy = dy + offsety + y; Tile check = world.tile(wx, wy); - if(check == null || !check.interactable(team) || (!check.block.alwaysReplace && check.block != tile.block && !(check.block.size == 1 && type.canReplace(check.block)))) return false; + if(check == null || + (check.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) || + !check.interactable(team) || + (!check.block.alwaysReplace && check.block != tile.block && !(check.block.size == 1 && type.canReplace(check.block)))) return false; } } }