mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c0c4d5d97c
1 changed files with 13 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue