Merge remote-tracking branch 'origin/master'

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

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. */
public boolean buildable = true;
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){
super(name);
@ -57,6 +59,17 @@ public class Item extends UnlockableContent implements Senseable{
this(name, new Color(Color.black));
}
@Override
public void init(){
super.init();
if(hiddenOnPlanets != null){
for(Planet planet : hiddenOnPlanets){
planet.hiddenItems.add(this);
}
}
}
@Override
public boolean isHidden(){
return hidden;