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

@@ -16,6 +16,7 @@ public class ErekirTechTree{
var costMultipliers = new ObjectFloatMap<Item>();
costMultipliers.put(Items.silicon, 7);
costMultipliers.put(Items.surgeAlloy, 4);
costMultipliers.put(Items.phaseFabric, 4);
costMultipliers.put(Items.thorium, 8);
costMultipliers.put(Items.graphite, 6);

View File

@@ -1,6 +1,7 @@
package mindustry.content;
import arc.graphics.*;
import arc.struct.*;
import mindustry.type.*;
public class Items{
@@ -9,6 +10,9 @@ public class Items{
phaseFabric, surgeAlloy, sporePod, sand, blastCompound, pyratite, metaglass,
beryllium, tungsten, oxide, carbide, fissileMatter, dormantCyst;
//TODO remove, these are for debugging only
public static final Seq<Item> serpuloItems = new Seq<>(), erekirItems = new Seq<>();
public static void load(){
copper = new Item("copper", Color.valueOf("d99d73")){{
hardness = 1;
@@ -124,5 +128,15 @@ public class Items{
dormantCyst = new Item("dormant-cyst", Color.valueOf("df824d")){{
flammability = 0.1f;
}};
serpuloItems.addAll(
scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium,
phaseFabric, surgeAlloy, sporePod, sand, blastCompound, pyratite, metaglass
);
erekirItems.addAll(
scrap, graphite, thorium, silicon, phaseFabric, surgeAlloy, sand,
beryllium, tungsten, oxide, carbide, fissileMatter, dormantCyst
);
}
}

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;
}