Allow building shard cores in maps with core zone tiles

This commit is contained in:
Anuken 2024-09-30 22:14:07 -04:00
parent 567b515611
commit 074aad3ba2
3 changed files with 4 additions and 1 deletions

Binary file not shown.

View File

@ -2871,7 +2871,7 @@ public class Blocks{
//region storage
coreShard = new CoreBlock("core-shard"){{
requirements(Category.effect, BuildVisibility.editorOnly, with(Items.copper, 1000, Items.lead, 800));
requirements(Category.effect, BuildVisibility.coreZoneOnly, with(Items.copper, 1000, Items.lead, 800));
alwaysUnlocked = true;
isFirstTier = true;
@ -2879,6 +2879,7 @@ public class Blocks{
health = 1100;
itemCapacity = 4000;
size = 3;
buildCostMultiplier = 2f;
unitCapModifier = 8;
}};

View File

@ -2,6 +2,7 @@ package mindustry.world.meta;
import arc.func.*;
import mindustry.*;
import mindustry.content.*;
public class BuildVisibility{
public static final BuildVisibility
@ -10,6 +11,7 @@ public class BuildVisibility{
shown = new BuildVisibility(() -> true),
debugOnly = new BuildVisibility(() -> false),
editorOnly = new BuildVisibility(() -> Vars.state.rules.editor),
coreZoneOnly = new BuildVisibility(() -> Vars.indexer.isBlockPresent(Blocks.coreZone)),
worldProcessorOnly = new BuildVisibility(() -> Vars.state.rules.editor || Vars.state.rules.allowEditWorldProcessors),
sandboxOnly = new BuildVisibility(() -> Vars.state == null || Vars.state.rules.infiniteResources),
campaignOnly = new BuildVisibility(() -> Vars.state == null || Vars.state.isCampaign()),