mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-08-03 16:39:37 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -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.*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ public class Boulder extends Block{
|
||||
super(name);
|
||||
breakable = true;
|
||||
alwaysReplace = true;
|
||||
|
||||
deconstructThreshold = 0.35f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user