Fixed #11126
This commit is contained in:
@@ -258,6 +258,8 @@ public class ConstructBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void construct(Unit builder, @Nullable Building core, float amount, Object config){
|
public void construct(Unit builder, @Nullable Building core, float amount, Object config){
|
||||||
|
if(accumulator == null || totalAccumulator == null) return;
|
||||||
|
|
||||||
wasConstructing = true;
|
wasConstructing = true;
|
||||||
activeDeconstruct = false;
|
activeDeconstruct = false;
|
||||||
|
|
||||||
@@ -313,6 +315,8 @@ public class ConstructBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deconstruct(Unit builder, @Nullable CoreBuild core, float amount){
|
public void deconstruct(Unit builder, @Nullable CoreBuild core, float amount){
|
||||||
|
if(accumulator == null || totalAccumulator == null) return;
|
||||||
|
|
||||||
//reset accumulated resources when switching modes
|
//reset accumulated resources when switching modes
|
||||||
if(wasConstructing){
|
if(wasConstructing){
|
||||||
Arrays.fill(accumulator, 0);
|
Arrays.fill(accumulator, 0);
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=6af1f6a2f9
|
archash=071fdffaf2
|
||||||
|
|||||||
Reference in New Issue
Block a user