mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-22 05:38:19 +07:00
Unlock necessary blocks before landing
This commit is contained in:
Binary file not shown.
@ -57,6 +57,12 @@ public class Planets{
|
|||||||
totalRadius += 2.6f;
|
totalRadius += 2.6f;
|
||||||
lightSrcTo = 0.5f;
|
lightSrcTo = 0.5f;
|
||||||
lightDstFrom = 0.2f;
|
lightDstFrom = 0.2f;
|
||||||
|
|
||||||
|
unlockedOnLand.addAll(
|
||||||
|
Blocks.plasmaBore, Blocks.duct,
|
||||||
|
Blocks.turbineCondenser, Blocks.breach,
|
||||||
|
Blocks.coreCitadel
|
||||||
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO names
|
//TODO names
|
||||||
|
@ -91,6 +91,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<>();
|
||||||
|
/** 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. */
|
/** Loads the mesh. Clientside only. Defaults to a boring sphere mesh. */
|
||||||
protected Prov<GenericMesh> meshLoader = () -> new ShaderSphereMesh(this, Shaders.unlit, 2), cloudMeshLoader = () -> null;
|
protected Prov<GenericMesh> meshLoader = () -> new ShaderSphereMesh(this, Shaders.unlit, 2), cloudMeshLoader = () -> null;
|
||||||
|
|
||||||
|
@ -1137,6 +1137,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
//TODO animation
|
//TODO animation
|
||||||
//schematic selection and cost handled by listener
|
//schematic selection and cost handled by listener
|
||||||
listener.get(sector);
|
listener.get(sector);
|
||||||
|
//unlock right before launch
|
||||||
|
sector.planet.unlockedOnLand.each(UnlockableContent::unlock);
|
||||||
control.playSector(sector);
|
control.playSector(sector);
|
||||||
}else{
|
}else{
|
||||||
//sector should have base here
|
//sector should have base here
|
||||||
|
Reference in New Issue
Block a user