Update ConstructBlock.java
This commit is contained in:
committed by
GitHub
parent
3eac8cb6ad
commit
435f15a450
@@ -19,7 +19,6 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.environment.*;
|
|
||||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||||
import mindustry.world.modules.*;
|
import mindustry.world.modules.*;
|
||||||
|
|
||||||
@@ -290,10 +289,7 @@ public class ConstructBlock extends Block{
|
|||||||
|
|
||||||
progress = Mathf.clamp(progress - amount);
|
progress = Mathf.clamp(progress - amount);
|
||||||
|
|
||||||
// fast forward boulder deconstruction when visually already gone
|
if(progress <= previous.deconstructThreshold || state.rules.infiniteResources){
|
||||||
if(progress <= 0.35f && previous instanceof Boulder) progress = 0;
|
|
||||||
|
|
||||||
if(progress <= 0 || state.rules.infiniteResources){
|
|
||||||
if(lastBuilder == null) lastBuilder = builder;
|
if(lastBuilder == null) lastBuilder = builder;
|
||||||
Call.deconstructFinish(tile, this.cblock == null ? previous : this.cblock, lastBuilder);
|
Call.deconstructFinish(tile, this.cblock == null ? previous : this.cblock, lastBuilder);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user