mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-20 09:17:19 +07:00
Unlock necessary blocks before landing
This commit is contained in:
parent
b281f29f01
commit
5a2d69278b
Binary file not shown.
@ -57,6 +57,12 @@ public class Planets{
|
||||
totalRadius += 2.6f;
|
||||
lightSrcTo = 0.5f;
|
||||
lightDstFrom = 0.2f;
|
||||
|
||||
unlockedOnLand.addAll(
|
||||
Blocks.plasmaBore, Blocks.duct,
|
||||
Blocks.turbineCondenser, Blocks.breach,
|
||||
Blocks.coreCitadel
|
||||
);
|
||||
}};
|
||||
|
||||
//TODO names
|
||||
|
@ -91,6 +91,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<>();
|
||||
/** 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. */
|
||||
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
|
||||
//schematic selection and cost handled by listener
|
||||
listener.get(sector);
|
||||
//unlock right before launch
|
||||
sector.planet.unlockedOnLand.each(UnlockableContent::unlock);
|
||||
control.playSector(sector);
|
||||
}else{
|
||||
//sector should have base here
|
||||
|
Loading…
Reference in New Issue
Block a user