Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2022-09-16 19:36:07 -04:00

View File

@@ -47,6 +47,8 @@ public class Item extends UnlockableContent implements Senseable{
/** If true, this material is used by buildings. If false, this material will be incinerated in certain cores. */ /** If true, this material is used by buildings. If false, this material will be incinerated in certain cores. */
public boolean buildable = true; public boolean buildable = true;
public boolean hidden = false; public boolean hidden = false;
/** For mods. Adds this item to the listed planets' hidden items Seq. */
public @Nullable Planet[] hiddenOnPlanets;
public Item(String name, Color color){ public Item(String name, Color color){
super(name); super(name);
@@ -57,6 +59,17 @@ public class Item extends UnlockableContent implements Senseable{
this(name, new Color(Color.black)); this(name, new Color(Color.black));
} }
@Override
public void init(){
super.init();
if(hiddenOnPlanets != null){
for(Planet planet : hiddenOnPlanets){
planet.hiddenItems.add(this);
}
}
}
@Override @Override
public boolean isHidden(){ public boolean isHidden(){
return hidden; return hidden;