mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-21 01:37:13 +07:00
Disable world processor rule
This commit is contained in:
parent
60fb2e537f
commit
f7175540f8
@ -1082,6 +1082,7 @@ rules.infiniteresources = Infinite Resources
|
||||
rules.onlydepositcore = Only Allow Core Depositing
|
||||
rules.reactorexplosions = Reactor Explosions
|
||||
rules.coreincinerates = Core Incinerates Overflow
|
||||
rules.disableworldprocessors = Disable World Processors
|
||||
rules.schematic = Schematics Allowed
|
||||
rules.wavetimer = Wave Timer
|
||||
rules.waves = Waves
|
||||
|
@ -62,6 +62,8 @@ public class Rules{
|
||||
public float unitDamageMultiplier = 1f;
|
||||
/** Whether to allow units to build with logic. */
|
||||
public boolean logicUnitBuild = true;
|
||||
/** If true, world processors no longer update. Used for testing. */
|
||||
public boolean disableWorldProcessors = false;
|
||||
/** How much health blocks start with. */
|
||||
public float blockHealthMultiplier = 1f;
|
||||
/** How much damage blocks (turrets) deal. */
|
||||
|
@ -155,6 +155,7 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
check("@rules.schematic", b -> rules.schematicsAllowed = b, () -> rules.schematicsAllowed);
|
||||
check("@rules.coreincinerates", b -> rules.coreIncinerates = b, () -> rules.coreIncinerates);
|
||||
check("@rules.cleanupdeadteams", b -> rules.cleanupDeadTeams = b, () -> rules.cleanupDeadTeams, () -> rules.pvp);
|
||||
check("@rules.disableworldprocessors", b -> rules.disableWorldProcessors = b, () -> rules.disableWorldProcessors);
|
||||
number("@rules.buildcostmultiplier", false, f -> rules.buildCostMultiplier = f, () -> rules.buildCostMultiplier, () -> !rules.infiniteResources);
|
||||
number("@rules.buildspeedmultiplier", f -> rules.buildSpeedMultiplier = f, () -> rules.buildSpeedMultiplier, 0.001f, 50f);
|
||||
number("@rules.deconstructrefundmultiplier", false, f -> rules.deconstructRefundMultiplier = f, () -> rules.deconstructRefundMultiplier, () -> !rules.infiniteResources);
|
||||
|
@ -494,6 +494,8 @@ public class LogicBlock extends Block{
|
||||
ipt = instructionsPerTick;
|
||||
}
|
||||
|
||||
if(state.rules.disableWorldProcessors && privileged) return;
|
||||
|
||||
if(enabled && executor.initialized()){
|
||||
accumulator += edelta() * ipt * efficiency;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user