Fixed cross-planet hidden items
This commit is contained in:
@@ -61,6 +61,7 @@ public class Planets{
|
|||||||
totalRadius += 2.6f;
|
totalRadius += 2.6f;
|
||||||
lightSrcTo = 0.5f;
|
lightSrcTo = 0.5f;
|
||||||
lightDstFrom = 0.2f;
|
lightDstFrom = 0.2f;
|
||||||
|
hiddenItems.addAll(Items.serpuloItems).removeAll(Items.erekirItems);
|
||||||
|
|
||||||
unlockedOnLand.add(Blocks.coreBastion);
|
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, 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)
|
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");
|
atmosphereColor = Color.valueOf("3c1b8f");
|
||||||
atmosphereRadIn = 0.02f;
|
atmosphereRadIn = 0.02f;
|
||||||
atmosphereRadOut = 0.3f;
|
atmosphereRadOut = 0.3f;
|
||||||
startSector = 15;
|
startSector = 15;
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
landCloudColor = Pal.spore.cpy().a(0.5f);
|
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 -> {
|
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);
|
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
|
//save settings
|
||||||
|
|||||||
@@ -304,6 +304,8 @@ public class World{
|
|||||||
}
|
}
|
||||||
|
|
||||||
state.rules.cloudColor = sector.planet.landCloudColor;
|
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 = content.toSeq();
|
||||||
sector.info.resources.sort(Structs.comps(Structs.comparing(Content::getContentType), Structs.comparingInt(c -> c.id)));
|
sector.info.resources.sort(Structs.comps(Structs.comparing(Content::getContentType), Structs.comparingInt(c -> c.id)));
|
||||||
sector.saveInfo();
|
sector.saveInfo();
|
||||||
|
|||||||
@@ -400,10 +400,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
decoration(0.017f);
|
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
|
//it is very hot
|
||||||
state.rules.attributes.set(Attribute.heat, 0.8f);
|
state.rules.attributes.set(Attribute.heat, 0.8f);
|
||||||
state.rules.environment = sector.planet.defaultEnv;
|
state.rules.environment = sector.planet.defaultEnv;
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ public class Planet extends UnlockableContent{
|
|||||||
public @Nullable TechNode techTree;
|
public @Nullable TechNode techTree;
|
||||||
/** Planets that can be launched to from this one. Made mutual in init(). */
|
/** Planets that can be launched to from this one. Made mutual in init(). */
|
||||||
public Seq<Planet> launchCandidates = new Seq<>();
|
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. */
|
/** Content (usually planet-specific) that is unlocked upon landing here. */
|
||||||
public Seq<UnlockableContent> unlockedOnLand = new Seq<>();
|
public Seq<UnlockableContent> unlockedOnLand = new Seq<>();
|
||||||
/** Loads the mesh. Clientside only. Defaults to a boring sphere mesh. */
|
/** Loads the mesh. Clientside only. Defaults to a boring sphere mesh. */
|
||||||
|
|||||||
Reference in New Issue
Block a user