Bugfixes
This commit is contained in:
@@ -23,6 +23,7 @@ import mindustry.gen.*;
|
|||||||
import mindustry.input.*;
|
import mindustry.input.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
import mindustry.io.SaveIO.*;
|
import mindustry.io.SaveIO.*;
|
||||||
|
import mindustry.maps.*;
|
||||||
import mindustry.maps.Map;
|
import mindustry.maps.Map;
|
||||||
import mindustry.net.*;
|
import mindustry.net.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
@@ -322,6 +323,13 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
return;
|
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
|
//reset wave so things are more fair
|
||||||
state.wave = 1;
|
state.wave = 1;
|
||||||
|
|
||||||
@@ -331,8 +339,8 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
//kill all units, since they should be dead anyway
|
//kill all units, since they should be dead anyway
|
||||||
Groups.unit.clear();
|
Groups.unit.clear();
|
||||||
Groups.fire.clear();
|
Groups.fire.clear();
|
||||||
|
Groups.puddle.clear();
|
||||||
|
|
||||||
Tile spawn = world.tile(sector.info.spawnPosition);
|
|
||||||
Schematics.placeLaunchLoadout(spawn.x, spawn.y);
|
Schematics.placeLaunchLoadout(spawn.x, spawn.y);
|
||||||
|
|
||||||
//set up camera/player locations
|
//set up camera/player locations
|
||||||
|
|||||||
@@ -12,5 +12,6 @@ class GroupDefs<G>{
|
|||||||
@GroupDef(value = Syncc.class, mapping = true) G sync;
|
@GroupDef(value = Syncc.class, mapping = true) G sync;
|
||||||
@GroupDef(value = Drawc.class) G draw;
|
@GroupDef(value = Drawc.class) G draw;
|
||||||
@GroupDef(value = Firec.class) G fire;
|
@GroupDef(value = Firec.class) G fire;
|
||||||
|
@GroupDef(value = Puddlec.class) G puddle;
|
||||||
@GroupDef(value = WeatherStatec.class) G weather;
|
@GroupDef(value = WeatherStatec.class) G weather;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,11 +317,11 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Bullet create(Bullet parent, float x, float y, float angle){
|
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){
|
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){
|
public Bullet create(Bullet parent, float x, float y, float angle, float velocityScl){
|
||||||
|
|||||||
@@ -208,6 +208,8 @@ public class Universe{
|
|||||||
|
|
||||||
//add production, making sure that it's capped
|
//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))));
|
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();
|
sector.saveInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ public abstract class SaveVersion extends SaveFileReader{
|
|||||||
|
|
||||||
public void writeEntities(DataOutput stream) throws IOException{
|
public void writeEntities(DataOutput stream) throws IOException{
|
||||||
//write team data with entities.
|
//write team data with entities.
|
||||||
Seq<TeamData> data = state.teams.getActive();
|
Seq<TeamData> data = state.teams.getActive().and(Team.sharded.data());
|
||||||
stream.writeInt(data.size);
|
stream.writeInt(data.size);
|
||||||
for(TeamData team : data){
|
for(TeamData team : data){
|
||||||
stream.writeInt(team.team.id);
|
stream.writeInt(team.team.id);
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ public class SectorDamage{
|
|||||||
for(Tile tile : tiles){
|
for(Tile tile : tiles){
|
||||||
if((tile.block() instanceof CoreBlock && tile.team() == state.rules.waveTeam) || tile.overlay() == Blocks.spawn){
|
if((tile.block() instanceof CoreBlock && tile.team() == state.rules.waveTeam) || tile.overlay() == Blocks.spawn){
|
||||||
frontier.add(tile);
|
frontier.add(tile);
|
||||||
values[tile.x][tile.y] = fraction * 80;
|
values[tile.x][tile.y] = fraction * 23;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ public class ItemLiquidGenerator extends PowerGenerator{
|
|||||||
return generateTime > 0;
|
return generateTime > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float ambientVolume(){
|
||||||
|
return Mathf.clamp(productionEfficiency);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTile(){
|
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.
|
//Note: Do not use this delta when calculating the amount of power or the power efficiency, but use it for resource consumption if necessary.
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=9446f0f01b2a1b25abf870a32bf839bc486b12e3
|
archash=a30c7164ce621554b73610ac84ada418e4500a5c
|
||||||
|
|||||||
Reference in New Issue
Block a user