This commit is contained in:
Anuken
2020-07-30 10:51:43 -04:00
parent bc8f02666a
commit c3a073fbbf
10 changed files with 119 additions and 39 deletions

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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();