diff --git a/core/assets/shaders/space.frag b/core/assets/shaders/space.frag index b071f9390c..4b95cf7438 100755 --- a/core/assets/shaders/space.frag +++ b/core/assets/shaders/space.frag @@ -1,6 +1,6 @@ #define HIGHP #define NSCALE 2700.0 -#define CAMSCALE (NSCALE*5) +#define CAMSCALE (NSCALE*5.0) uniform sampler2D u_texture; uniform sampler2D u_stars; diff --git a/core/src/mindustry/editor/EditorTile.java b/core/src/mindustry/editor/EditorTile.java index b3a9010ada..5ff533325d 100644 --- a/core/src/mindustry/editor/EditorTile.java +++ b/core/src/mindustry/editor/EditorTile.java @@ -96,7 +96,14 @@ public class EditorTile extends Tile{ super.recache(); } } - + + @Override + protected void changed(){ + if(state.isGame()){ + super.changed(); + } + } + @Override protected void changeEntity(Team team, Prov entityprov, int rotation){ if(skip()){ diff --git a/core/src/mindustry/entities/EntityCollisions.java b/core/src/mindustry/entities/EntityCollisions.java index 2d8402e92c..b4139991a4 100644 --- a/core/src/mindustry/entities/EntityCollisions.java +++ b/core/src/mindustry/entities/EntityCollisions.java @@ -127,7 +127,7 @@ public class EntityCollisions{ public static boolean legsSolid(int x, int y){ Tile tile = world.tile(x, y); - return tile == null || tile.staticDarkness() >= 2; + return tile == null || tile.staticDarkness() >= 2 || tile.floor().solid; } public static boolean waterSolid(int x, int y){ diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 6cc6827424..6c506ef6de 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1165,10 +1165,6 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, proximity.add(tile); } - for(Building other : tmpTiles){ - other.onProximityUpdate(); - } - onProximityAdded(); onProximityUpdate(); diff --git a/core/src/mindustry/game/DefaultWaves.java b/core/src/mindustry/game/DefaultWaves.java index 6317a59c51..699b7c3258 100644 --- a/core/src/mindustry/game/DefaultWaves.java +++ b/core/src/mindustry/game/DefaultWaves.java @@ -70,10 +70,12 @@ public class DefaultWaves{ shieldScaling = 20f; }}, - new SpawnGroup(mace){{ + new SpawnGroup(spiroct){{ begin = 45; spacing = 3; - unitScaling = 2; + unitScaling = 1; + max = 10; + shieldScaling = 10f; effect = StatusEffects.overdrive; }}, @@ -92,15 +94,16 @@ public class DefaultWaves{ shieldScaling = 20f; }}, - new SpawnGroup(dagger){{ + new SpawnGroup(quasar){{ begin = 82; spacing = 3; unitAmount = 4; unitScaling = 3; + shieldScaling = 30f; effect = StatusEffects.overdrive; }}, - new SpawnGroup(dagger){{ + new SpawnGroup(pulsar){{ begin = 41; spacing = 5; unitAmount = 1; @@ -146,6 +149,8 @@ public class DefaultWaves{ unitAmount = 4; unitScaling = 3; spacing = 5; + shields = 100f; + shieldScaling = 10f; effect = StatusEffects.overdrive; }}, @@ -157,7 +162,7 @@ public class DefaultWaves{ max = 16; }}, - new SpawnGroup(horizon){{ + new SpawnGroup(nova){{ begin = 53; unitAmount = 2; unitScaling = 3; @@ -176,6 +181,7 @@ public class DefaultWaves{ unitAmount = 1; unitScaling = 1; spacing = 30; + shieldScaling = 10f; }}, new SpawnGroup(reign){{ @@ -183,6 +189,7 @@ public class DefaultWaves{ unitAmount = 1; unitScaling = 1; spacing = 40; + shieldScaling = 10f; }}, new SpawnGroup(antumbra){{ @@ -190,6 +197,15 @@ public class DefaultWaves{ unitAmount = 1; unitScaling = 1; spacing = 40; + shieldScaling = 10f; + }}, + + new SpawnGroup(vela){{ + begin = 100; + unitAmount = 1; + unitScaling = 1; + spacing = 30; + shieldScaling = 20f; }}, new SpawnGroup(horizon){{ @@ -197,6 +213,18 @@ public class DefaultWaves{ unitAmount = 2; unitScaling = 3; spacing = 4; + shields = 40f; + shieldScaling = 20f; + + }}, + + new SpawnGroup(atrax){{ + begin = 210; + unitAmount = 1; + unitScaling = 1; + spacing = 35; + shields = 1000; + shieldScaling = 35f; }} ); } @@ -234,6 +262,7 @@ public class DefaultWaves{ int next = Mathf.random(8, 16); float shieldAmount = Math.max((i - shieldStart) * shieldsPerWave, 0); + int space = start == 0 ? 1 : Mathf.random(1, 2); //main progression out.add(new SpawnGroup(curSpecies[Math.min(curTier, curSpecies.length - 1)]){{ @@ -244,6 +273,7 @@ public class DefaultWaves{ unitScaling = Mathf.random(1f, 2f); shields = shieldAmount; shieldScaling = shieldsPerWave; + spacing = space; }}); //extra progression that tails out, blends in diff --git a/core/src/mindustry/game/SpawnGroup.java b/core/src/mindustry/game/SpawnGroup.java index fda8514d48..0d61cdfb1f 100644 --- a/core/src/mindustry/game/SpawnGroup.java +++ b/core/src/mindustry/game/SpawnGroup.java @@ -51,6 +51,7 @@ public class SpawnGroup implements Serializable{ /** Returns the amount of units spawned on a specific wave. */ public int getUnitsSpawned(int wave){ + if(spacing == 0) spacing = 1; if(wave < begin || wave > end || (wave - begin) % spacing != 0){ return 0; } diff --git a/core/src/mindustry/world/Tile.java b/core/src/mindustry/world/Tile.java index 7478f81db4..30baffd36e 100644 --- a/core/src/mindustry/world/Tile.java +++ b/core/src/mindustry/world/Tile.java @@ -496,24 +496,8 @@ public class Tile implements Position, QuadTreeObject, Displayable{ protected void changeEntity(Team team, Prov entityprov, int rotation){ if(build != null){ - int size = build.block.size; build.remove(); build = null; - - //update edge entities - tileSet.clear(); - - for(Point2 edge : Edges.getEdges(size)){ - Building other = world.build(x + edge.x, y + edge.y); - if(other != null){ - tileSet.add(other); - } - } - - //update proximity, since multiblock was just removed - for(Building t : tileSet){ - t.updateProximity(); - } } if(block.hasBuilding()){ diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 37c0ba7ebd..c535f27135 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -351,8 +351,9 @@ public abstract class Turret extends Block{ AmmoEntry entry = ammo.peek(); entry.amount -= ammoPerShot; - if(entry.amount == 0) ammo.pop(); + if(entry.amount <= 0) ammo.pop(); totalAmmo -= ammoPerShot; + totalAmmo = Math.max(totalAmmo, 0); Time.run(reloadTime / 2f, this::ejectEffects); return entry.type(); } @@ -364,7 +365,7 @@ public abstract class Turret extends Block{ /** @return whether the turret has ammo. */ public boolean hasAmmo(){ - return ammo.size > 0 && ammo.peek().amount >= ammoPerShot; + return ammo.size > 0 && ammo.peek().amount >= 1; } protected void updateShooting(){