mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-26 06:27:22 +07:00
Fixed cross-planet hidden items
This commit is contained in:
parent
ac68edda40
commit
98f17e15ae
@ -61,6 +61,7 @@ public class Planets{
|
||||
totalRadius += 2.6f;
|
||||
lightSrcTo = 0.5f;
|
||||
lightDstFrom = 0.2f;
|
||||
hiddenItems.addAll(Items.serpuloItems).removeAll(Items.erekirItems);
|
||||
|
||||
unlockedOnLand.add(Blocks.coreBastion);
|
||||
}};
|
||||
@ -98,12 +99,14 @@ public class Planets{
|
||||
new HexSkyMesh(this, 11, 0.15f, 0.13f, 5, new Color().set(Pal.spore).mul(0.9f).a(0.75f), 2, 0.45f, 0.9f, 0.38f),
|
||||
new HexSkyMesh(this, 1, 0.6f, 0.16f, 5, Color.white.cpy().lerp(Pal.spore, 0.55f).a(0.75f), 2, 0.45f, 1f, 0.41f)
|
||||
);
|
||||
|
||||
atmosphereColor = Color.valueOf("3c1b8f");
|
||||
atmosphereRadIn = 0.02f;
|
||||
atmosphereRadOut = 0.3f;
|
||||
startSector = 15;
|
||||
alwaysUnlocked = true;
|
||||
landCloudColor = Pal.spore.cpy().a(0.5f);
|
||||
hiddenItems.addAll(Items.erekirItems).removeAll(Items.serpuloItems);
|
||||
}};
|
||||
|
||||
verilus = makeAsteroid("verlius", sun, Blocks.stoneWall, Blocks.iceWall, 0.5f, 12, 2f, gen -> {
|
||||
|
@ -125,6 +125,10 @@ public class Logic implements ApplicationListener{
|
||||
core.items.set(item, core.block.itemCapacity);
|
||||
}
|
||||
}
|
||||
|
||||
//set up hidden items
|
||||
state.rules.hiddenBuildItems.clear();
|
||||
state.rules.hiddenBuildItems.addAll(state.rules.sector.planet.hiddenItems);
|
||||
}
|
||||
|
||||
//save settings
|
||||
|
@ -304,6 +304,8 @@ public class World{
|
||||
}
|
||||
|
||||
state.rules.cloudColor = sector.planet.landCloudColor;
|
||||
state.rules.hiddenBuildItems.clear();
|
||||
state.rules.hiddenBuildItems.addAll(sector.planet.hiddenItems);
|
||||
sector.info.resources = content.toSeq();
|
||||
sector.info.resources.sort(Structs.comps(Structs.comparing(Content::getContentType), Structs.comparingInt(c -> c.id)));
|
||||
sector.saveInfo();
|
||||
|
@ -400,10 +400,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
|
||||
decoration(0.017f);
|
||||
|
||||
//not allowed
|
||||
//TODO use Items.serpuloItems
|
||||
state.rules.hiddenBuildItems.addAll(Items.copper, Items.titanium, Items.coal, Items.lead, Items.blastCompound, Items.pyratite, Items.sporePod, Items.metaglass, Items.plastanium);
|
||||
|
||||
//it is very hot
|
||||
state.rules.attributes.set(Attribute.heat, 0.8f);
|
||||
state.rules.environment = sector.planet.defaultEnv;
|
||||
|
@ -98,6 +98,8 @@ public class Planet extends UnlockableContent{
|
||||
public @Nullable TechNode techTree;
|
||||
/** Planets that can be launched to from this one. Made mutual in init(). */
|
||||
public Seq<Planet> launchCandidates = new Seq<>();
|
||||
/** Items not available on this planet. */
|
||||
public Seq<Item> hiddenItems = new Seq<>();
|
||||
/** Content (usually planet-specific) that is unlocked upon landing here. */
|
||||
public Seq<UnlockableContent> unlockedOnLand = new Seq<>();
|
||||
/** Loads the mesh. Clientside only. Defaults to a boring sphere mesh. */
|
||||
|
Loading…
Reference in New Issue
Block a user