Proper interplanetary launch

This commit is contained in:
Anuken
2022-01-23 14:37:08 -05:00
parent 3574e40a08
commit 4497f7ab3a
11 changed files with 66 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
package mindustry.content;
import arc.*;
import arc.func.*;
import arc.scene.style.*;
import arc.struct.*;
import arc.util.*;
@@ -140,6 +141,14 @@ public class TechTree{
all.add(this);
}
/** Recursively iterates through everything that is a child of this node. Includes itself. */
public void each(Cons<TechNode> consumer){
consumer.get(this);
for(var child : children){
child.each(consumer);
}
}
public Drawable icon(){
return icon == null ? new TextureRegionDrawable(content.uiIcon) : icon;
}