Making DrawBlock more generic

This commit is contained in:
Anuken
2021-11-16 19:55:13 -05:00
parent 8d05b878d7
commit 25f44f86f8
34 changed files with 263 additions and 186 deletions

View File

@@ -379,6 +379,20 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return power != null && (block.consumes.has(ConsumeType.power) && !block.consumes.getPower().buffered) ? power.status : 1f;
}
/**
* @return the building's 'warmup', a smooth value from 0 to 1.
* usually used for crafters and things that need to spin up before reaching full efficiency.
* many blocks will just return 0.
* */
public float warmup(){
return 0f;
}
/** @return total time this block has been producing something; non-crafter blocks usually return Time.time. */
public float totalProgress(){
return Time.time;
}
public BlockStatus status(){
return cons.status();
}