Support for team-specific multipliers (no UI)

This commit is contained in:
Anuken
2021-08-11 21:18:48 -04:00
parent 4fc18d35ce
commit 0cac972061
7 changed files with 48 additions and 12 deletions

View File

@@ -124,11 +124,13 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{
return;
}
float bs = 1f / entity.buildCost * Time.delta * type.buildSpeed * buildSpeedMultiplier * state.rules.buildSpeed(team);
//otherwise, update it.
if(current.breaking){
entity.deconstruct(self(), core, 1f / entity.buildCost * Time.delta * type.buildSpeed * buildSpeedMultiplier * state.rules.buildSpeedMultiplier);
entity.deconstruct(self(), core, bs);
}else{
entity.construct(self(), core, 1f / entity.buildCost * Time.delta * type.buildSpeed * buildSpeedMultiplier * state.rules.buildSpeedMultiplier, current.config);
entity.construct(self(), core, bs, current.config);
}
current.stuck = Mathf.equal(current.progress, entity.progress);