diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index a810c61946..952ab5d82e 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -23,6 +23,7 @@ import mindustry.gen.*; import mindustry.input.*; import mindustry.io.*; import mindustry.io.SaveIO.*; +import mindustry.maps.*; import mindustry.maps.Map; import mindustry.net.*; import mindustry.type.*; @@ -322,6 +323,13 @@ public class Control implements ApplicationListener, Loadable{ return; } + //set spawn for sector damage to use + Tile spawn = world.tile(sector.info.spawnPosition); + spawn.setBlock(Blocks.coreShard, state.rules.defaultTeam); + + //add extra damage. + SectorDamage.apply(1f); + //reset wave so things are more fair state.wave = 1; @@ -331,8 +339,8 @@ public class Control implements ApplicationListener, Loadable{ //kill all units, since they should be dead anyway Groups.unit.clear(); Groups.fire.clear(); + Groups.puddle.clear(); - Tile spawn = world.tile(sector.info.spawnPosition); Schematics.placeLaunchLoadout(spawn.x, spawn.y); //set up camera/player locations diff --git a/core/src/mindustry/entities/GroupDefs.java b/core/src/mindustry/entities/GroupDefs.java index 3ddef67d65..8f98a69442 100644 --- a/core/src/mindustry/entities/GroupDefs.java +++ b/core/src/mindustry/entities/GroupDefs.java @@ -12,5 +12,6 @@ class GroupDefs{ @GroupDef(value = Syncc.class, mapping = true) G sync; @GroupDef(value = Drawc.class) G draw; @GroupDef(value = Firec.class) G fire; + @GroupDef(value = Puddlec.class) G puddle; @GroupDef(value = WeatherStatec.class) G weather; } diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index a384dd18b2..7d94602844 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -317,11 +317,11 @@ public abstract class BulletType extends Content{ } public Bullet create(Bullet parent, float x, float y, float angle){ - return create(parent.owner(), parent.team, x, y, angle); + return create(parent.owner, parent.team, x, y, angle); } public Bullet create(Bullet parent, float x, float y, float angle, float velocityScl, float lifeScale){ - return create(parent.owner(), parent.team, x, y, angle, velocityScl, lifeScale); + return create(parent.owner, parent.team, x, y, angle, velocityScl, lifeScale); } public Bullet create(Bullet parent, float x, float y, float angle, float velocityScl){ diff --git a/core/src/mindustry/game/Universe.java b/core/src/mindustry/game/Universe.java index b8f27b5f73..b19fcee6da 100644 --- a/core/src/mindustry/game/Universe.java +++ b/core/src/mindustry/game/Universe.java @@ -208,6 +208,8 @@ public class Universe{ //add production, making sure that it's capped sector.info.production.each((item, stat) -> sector.info.items.add(item, Math.min((int)(stat.mean * newSecondsPassed * scl), sector.info.storageCapacity - sector.info.items.get(item)))); + //prevent negative values with unloaders + sector.info.items.checkNegative(); sector.saveInfo(); } diff --git a/core/src/mindustry/io/SaveVersion.java b/core/src/mindustry/io/SaveVersion.java index 76e3b1cc5c..85fe4a3e31 100644 --- a/core/src/mindustry/io/SaveVersion.java +++ b/core/src/mindustry/io/SaveVersion.java @@ -286,7 +286,7 @@ public abstract class SaveVersion extends SaveFileReader{ public void writeEntities(DataOutput stream) throws IOException{ //write team data with entities. - Seq data = state.teams.getActive(); + Seq data = state.teams.getActive().and(Team.sharded.data()); stream.writeInt(data.size); for(TeamData team : data){ stream.writeInt(team.team.id); diff --git a/core/src/mindustry/maps/SectorDamage.java b/core/src/mindustry/maps/SectorDamage.java index a86bc47356..22f19c3e4d 100644 --- a/core/src/mindustry/maps/SectorDamage.java +++ b/core/src/mindustry/maps/SectorDamage.java @@ -356,7 +356,7 @@ public class SectorDamage{ for(Tile tile : tiles){ if((tile.block() instanceof CoreBlock && tile.team() == state.rules.waveTeam) || tile.overlay() == Blocks.spawn){ frontier.add(tile); - values[tile.x][tile.y] = fraction * 80; + values[tile.x][tile.y] = fraction * 23; } } diff --git a/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java b/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java index 12b3f6d691..2a0982a069 100644 --- a/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java +++ b/core/src/mindustry/world/blocks/power/ItemLiquidGenerator.java @@ -92,6 +92,11 @@ public class ItemLiquidGenerator extends PowerGenerator{ return generateTime > 0; } + @Override + public float ambientVolume(){ + return Mathf.clamp(productionEfficiency); + } + @Override public void updateTile(){ //Note: Do not use this delta when calculating the amount of power or the power efficiency, but use it for resource consumption if necessary. diff --git a/gradle.properties b/gradle.properties index ba9e4fa2a9..75d6273d77 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=9446f0f01b2a1b25abf870a32bf839bc486b12e3 +archash=a30c7164ce621554b73610ac84ada418e4500a5c