This commit is contained in:
Anuken
2020-09-25 18:49:31 -04:00
parent 059b72b3e2
commit dc30993898
5 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ public class FlyingAI extends AIController{
moveTo(target, unit.range() * 0.8f); moveTo(target, unit.range() * 0.8f);
unit.lookAt(target); unit.lookAt(target);
}else{ }else{
attack(80f); attack(100f);
} }
} }
+1 -1
View File
@@ -885,7 +885,7 @@ public class UnitTypes implements ContentList{
weapons.add(new Weapon(){{ weapons.add(new Weapon(){{
y = 0f; y = 0f;
x = 2f; x = 2f;
reload = 15f; reload = 13f;
ejectEffect = Fx.shellEjectSmall; ejectEffect = Fx.shellEjectSmall;
bullet = Bullets.standardCopper; bullet = Bullets.standardCopper;
shootSound = Sounds.shoot; shootSound = Sounds.shoot;
+2 -1
View File
@@ -170,12 +170,13 @@ public class Weathers implements ContentList{
sandstorm = new Weather("sandstorm"){ sandstorm = new Weather("sandstorm"){
TextureRegion region; TextureRegion region;
float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f; float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f;
float force = 0.45f; float force = 0.4f;
Color color = Color.valueOf("f7cba4"); Color color = Color.valueOf("f7cba4");
Texture noise; Texture noise;
{ {
attrs.set(Attribute.light, -0.1f); attrs.set(Attribute.light, -0.1f);
opacityMultiplier = 0.85f;
} }
@Override @Override
+5 -4
View File
@@ -17,7 +17,8 @@ import static mindustry.Vars.*;
public abstract class Weather extends UnlockableContent{ public abstract class Weather extends UnlockableContent{
/** Default duration of this weather event in ticks. */ /** 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(); public Attributes attrs = new Attributes();
//internals //internals
@@ -122,7 +123,7 @@ public abstract class Weather extends UnlockableContent{
/** Creates a weather entry with some approximate weather values. */ /** Creates a weather entry with some approximate weather values. */
public WeatherEntry(Weather weather){ 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){ 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){ if(renderer.weatherAlpha() > 0.0001f){
Draw.draw(Layer.weather, () -> { Draw.draw(Layer.weather, () -> {
weather.rand.setSeed(0); weather.rand.setSeed(0);
Draw.alpha(renderer.weatherAlpha() * opacity); Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier);
weather.drawOver(self()); weather.drawOver(self());
Draw.reset(); Draw.reset();
}); });
Draw.draw(Layer.debris, () -> { Draw.draw(Layer.debris, () -> {
weather.rand.setSeed(0); weather.rand.setSeed(0);
Draw.alpha(renderer.weatherAlpha() * opacity); Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier);
weather.drawUnder(self()); weather.drawUnder(self());
Draw.reset(); Draw.reset();
}); });
+4 -1
View File
@@ -105,7 +105,10 @@ public class Build{
int wx = dx + offsetx + x, wy = dy + offsety + y; int wx = dx + offsetx + x, wy = dy + offsety + y;
Tile check = world.tile(wx, wy); 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;
} }
} }
} }