map setting refund (#1709)
This commit is contained in:
@@ -44,6 +44,8 @@ public class Rules{
|
||||
public float buildCostMultiplier = 1f;
|
||||
/** Multiplier for building speed. */
|
||||
public float buildSpeedMultiplier = 1f;
|
||||
/** Multiplier for percentage of materials refunded when deconstructing */
|
||||
public float deconstructRefundMultiplier = 0.5f;
|
||||
/** No-build zone around enemy core radius. */
|
||||
public float enemyCoreBuildRadius = 400f;
|
||||
/** Radius around enemy wave drop zones.*/
|
||||
|
||||
@@ -142,6 +142,7 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
check("$rules.reactorexplosions", b -> rules.reactorExplosions = b, () -> rules.reactorExplosions);
|
||||
number("$rules.buildcostmultiplier", false, f -> rules.buildCostMultiplier = f, () -> rules.buildCostMultiplier, () -> !rules.infiniteResources);
|
||||
number("$rules.buildspeedmultiplier", f -> rules.buildSpeedMultiplier = f, () -> rules.buildSpeedMultiplier);
|
||||
number("$rules.deconstructrefundmultiplier", false, f -> rules.deconstructRefundMultiplier = f, () -> rules.deconstructRefundMultiplier, () -> !rules.infiniteResources);
|
||||
number("$rules.blockhealthmultiplier", f -> rules.blockHealthMultiplier = f, () -> rules.blockHealthMultiplier);
|
||||
|
||||
main.addButton("$configure",
|
||||
|
||||
@@ -252,7 +252,7 @@ public class BuildBlock extends Block{
|
||||
}
|
||||
|
||||
public void deconstruct(Unit builder, @Nullable TileEntity core, float amount){
|
||||
float deconstructMultiplier = 0.5f;
|
||||
float deconstructMultiplier = state.rules.deconstructRefundMultiplier;
|
||||
|
||||
if(cblock != null){
|
||||
ItemStack[] requirements = cblock.requirements;
|
||||
|
||||
Reference in New Issue
Block a user