Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2020-12-02 13:02:35 -05:00
3 changed files with 10 additions and 6 deletions

View File

@ -193,6 +193,8 @@ public class Block extends UnlockableContent{
public BuildVisibility buildVisibility = BuildVisibility.hidden;
/** Multiplier for speed of building this block. */
public float buildCostMultiplier = 1f;
/** Build completion at which deconstruction finishes. */
public float deconstructThreshold = 0f;
/** Multiplier for cost of research in tech tree. */
public float researchCostMultiplier = 1;
/** Whether this block has instant transfer.*/

View File

@ -289,7 +289,7 @@ public class ConstructBlock extends Block{
progress = Mathf.clamp(progress - amount);
if(progress <= 0 || state.rules.infiniteResources){
if(progress <= (previous == null ? 0 : previous.deconstructThreshold) || state.rules.infiniteResources){
if(lastBuilder == null) lastBuilder = builder;
Call.deconstructFinish(tile, this.cblock == null ? previous : this.cblock, lastBuilder);
}

View File

@ -12,6 +12,8 @@ public class Boulder extends Block{
super(name);
breakable = true;
alwaysReplace = true;
deconstructThreshold = 0.35f;
}
@Override