This commit is contained in:
Anuken
2022-07-03 09:43:15 -04:00
parent 4c9a3def1d
commit 3b1930777f

View File

@@ -228,6 +228,7 @@ public class UnitAssembler extends PayloadBlock{
public float progress, warmup, droneWarmup, powerWarmup, sameTypeWarmup; public float progress, warmup, droneWarmup, powerWarmup, sameTypeWarmup;
public float invalidWarmup = 0f; public float invalidWarmup = 0f;
public int currentTier = 0; public int currentTier = 0;
public int lastTier = -2;
public boolean wasOccupied = false; public boolean wasOccupied = false;
public float droneProgress, totalDroneProgress; public float droneProgress, totalDroneProgress;
@@ -275,10 +276,8 @@ public class UnitAssembler extends PayloadBlock{
break; break;
} }
} }
if(currentTier != max){
progress=0; currentTier = max;
currentTier = max;
}
} }
public UnitType unit(){ public UnitType unit(){
@@ -340,6 +339,15 @@ public class UnitAssembler extends PayloadBlock{
readUnits.clear(); readUnits.clear();
} }
if(lastTier != currentTier){
if(lastTier >= 0f){
progress = 0f;
}
lastTier =
lastTier == -2 ? -1 : currentTier;
}
//read newly synced drones on client end //read newly synced drones on client end
if(units.size < dronesCreated && whenSyncedUnits.size > 0){ if(units.size < dronesCreated && whenSyncedUnits.size > 0){
whenSyncedUnits.each(id -> { whenSyncedUnits.each(id -> {