Team-colored shields
This commit is contained in:
@@ -200,7 +200,7 @@ public class BuildBlock extends Block{
|
||||
setConstruct(previous, cblock);
|
||||
}
|
||||
|
||||
float maxProgress = core == null || team.rules().infiniteResources ? amount : checkRequired(core.items(), amount, false);
|
||||
float maxProgress = core == null || team.rules().infiniteResources ? amount : checkRequired(core.items, amount, false);
|
||||
|
||||
for(int i = 0; i < cblock.requirements.length; i++){
|
||||
int reqamount = Math.round(state.rules.buildCostMultiplier * cblock.requirements[i].amount);
|
||||
@@ -208,7 +208,7 @@ public class BuildBlock extends Block{
|
||||
totalAccumulator[i] = Math.min(totalAccumulator[i] + reqamount * maxProgress, reqamount);
|
||||
}
|
||||
|
||||
maxProgress = core == null || team.rules().infiniteResources ? maxProgress : checkRequired(core.items(), maxProgress, true);
|
||||
maxProgress = core == null || team.rules().infiniteResources ? maxProgress : checkRequired(core.items, maxProgress, true);
|
||||
|
||||
progress = Mathf.clamp(progress + maxProgress);
|
||||
builderID = builder.id();
|
||||
|
||||
@@ -158,19 +158,12 @@ public class ForceProjector extends Block{
|
||||
|
||||
Draw.z(Layer.shields);
|
||||
|
||||
Draw.color(Pal.accent);
|
||||
Draw.color(team.color, Color.white, Mathf.clamp(hit));
|
||||
|
||||
if(Core.settings.getBool("animatedshields")){
|
||||
Fill.poly(x, y, 6, radius);
|
||||
|
||||
Draw.z(Layer.shields + 0.01f);
|
||||
|
||||
if(hit > 0){
|
||||
Draw.color(Color.white);
|
||||
Draw.alpha(1f);
|
||||
Fill.poly(x, y, 6, radius);
|
||||
Draw.color();
|
||||
}
|
||||
}else{
|
||||
Lines.stroke(1.5f);
|
||||
Draw.alpha(0.09f + Mathf.clamp(0.08f * hit));
|
||||
|
||||
Reference in New Issue
Block a user