Bugfixes
This commit is contained in:
@@ -24,11 +24,12 @@ public class Shaders{
|
||||
public static PlanetShader planet;
|
||||
public static PlanetGridShader planetGrid;
|
||||
public static AtmosphereShader atmosphere;
|
||||
public static MeshShader mesh = new MeshShader();
|
||||
public static MeshShader mesh;
|
||||
public static Shader unlit;
|
||||
public static Shader screenspace;
|
||||
|
||||
public static void init(){
|
||||
mesh = new MeshShader();
|
||||
blockbuild = new BlockBuild();
|
||||
try{
|
||||
shield = new ShieldShader();
|
||||
|
||||
@@ -66,7 +66,7 @@ public abstract class LegacySaveVersion extends SaveVersion{
|
||||
readChunk(stream, true, in -> {
|
||||
byte version = in.readByte();
|
||||
//legacy impl of Building#read()
|
||||
tile.build.health(stream.readUnsignedShort());
|
||||
tile.build.health = stream.readUnsignedShort();
|
||||
byte packedrot = stream.readByte();
|
||||
byte team = Pack.leftByte(packedrot) == 8 ? stream.readByte() : Pack.leftByte(packedrot);
|
||||
byte rotation = Pack.rightByte(packedrot);
|
||||
|
||||
@@ -3,11 +3,11 @@ package mindustry.maps;
|
||||
import arc.*;
|
||||
import arc.assets.*;
|
||||
import arc.assets.loaders.*;
|
||||
import arc.struct.*;
|
||||
import arc.struct.IntSet.*;
|
||||
import arc.files.*;
|
||||
import arc.func.*;
|
||||
import arc.graphics.*;
|
||||
import arc.struct.IntSet.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.*;
|
||||
import arc.util.async.*;
|
||||
@@ -15,7 +15,7 @@ import arc.util.io.*;
|
||||
import arc.util.serialization.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.io.*;
|
||||
@@ -87,7 +87,7 @@ public class Maps{
|
||||
});
|
||||
|
||||
if(Core.assets != null){
|
||||
((CustomLoader) Core.assets.getLoader(Content.class)).loaded = this::createAllPreviews;
|
||||
((CustomLoader)Core.assets.getLoader(ContentLoader.class)).loaded = this::createAllPreviews;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ public class BuildBlock extends Block{
|
||||
});
|
||||
}
|
||||
|
||||
public boolean construct(Unitc builder, @Nullable Building core, float amount, boolean configured){
|
||||
public boolean construct(Unit builder, @Nullable Building core, float amount, boolean configured){
|
||||
if(cblock == null){
|
||||
kill();
|
||||
return false;
|
||||
@@ -211,10 +211,10 @@ public class BuildBlock extends Block{
|
||||
maxProgress = core == null || team.rules().infiniteResources ? maxProgress : checkRequired(core.items, maxProgress, true);
|
||||
|
||||
progress = Mathf.clamp(progress + maxProgress);
|
||||
builderID = builder.id();
|
||||
builderID = builder.id;
|
||||
|
||||
if(progress >= 1f || state.rules.infiniteResources){
|
||||
constructed(tile, cblock, builderID, (byte)rotation, builder.team(), configured);
|
||||
constructed(tile, cblock, builderID, (byte)rotation, builder.team, configured);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -79,7 +79,7 @@ public class OverdriveProjector extends Block{
|
||||
phaseHeat = Mathf.lerpDelta(phaseHeat, Mathf.num(cons.optionalValid()), 0.1f);
|
||||
}
|
||||
|
||||
if(timer(timerUse, useTime) && efficiency() > 0){
|
||||
if(timer(timerUse, useTime) && efficiency() > 0 && consValid()){
|
||||
consume();
|
||||
}
|
||||
|
||||
|
||||
@@ -395,6 +395,7 @@ public abstract class Turret extends Block{
|
||||
@Override
|
||||
public void read(Reads read, byte revision){
|
||||
super.read(read, revision);
|
||||
|
||||
if(revision == 1){
|
||||
reload = read.f();
|
||||
rotation = read.f();
|
||||
|
||||
Reference in New Issue
Block a user