Testing liquids/items in tech tree

This commit is contained in:
Anuken
2020-06-20 22:21:43 -04:00
parent 2082976783
commit a0f0640729
4 changed files with 106 additions and 105 deletions
+33 -29
View File
@@ -140,6 +140,38 @@ public class TechTree implements ContentList{
}); });
node(mechanicalDrill, () -> { node(mechanicalDrill, () -> {
node(Liquids.water, () -> {
node(mechanicalPump, () -> {
node(conduit, () -> {
node(liquidJunction, () -> {
node(liquidRouter, () -> {
node(liquidTank);
node(bridgeConduit);
node(pulseConduit, () -> {
node(phaseConduit, () -> {
});
node(platedConduit, () -> {
});
});
node(rotaryPump, () -> {
node(thermalPump, () -> {
});
});
});
});
});
});
});
node(Items.coal, () -> {
node(graphitePress, () -> { node(graphitePress, () -> {
node(pneumaticDrill, () -> { node(pneumaticDrill, () -> {
node(cultivator, () -> { node(cultivator, () -> {
@@ -204,35 +236,6 @@ public class TechTree implements ContentList{
}); });
}); });
node(mechanicalPump, () -> {
node(conduit, () -> {
node(liquidJunction, () -> {
node(liquidRouter, () -> {
node(liquidTank);
node(bridgeConduit);
node(pulseConduit, () -> {
node(phaseConduit, () -> {
});
node(platedConduit, () -> {
});
});
node(rotaryPump, () -> {
node(thermalPump, () -> {
});
});
});
});
});
});
node(combustionGenerator, () -> { node(combustionGenerator, () -> {
node(powerNode, () -> { node(powerNode, () -> {
node(powerNodeLarge, () -> { node(powerNodeLarge, () -> {
@@ -288,6 +291,7 @@ public class TechTree implements ContentList{
}); });
}); });
}); });
});
} }
private static TechNode node(UnlockableContent content, Runnable children){ private static TechNode node(UnlockableContent content, Runnable children){
+1 -1
View File
@@ -112,6 +112,7 @@ public class Weathers implements ContentList{
Tmp.r1.grow(padding); Tmp.r1.grow(padding);
Core.camera.bounds(Tmp.r2); Core.camera.bounds(Tmp.r2);
int total = (int)(Tmp.r1.area() / density * state.intensity()) / 2; int total = (int)(Tmp.r1.area() / density * state.intensity()) / 2;
Lines.stroke(0.75f);
float t = Time.time() / 22f; float t = Time.time() / 22f;
@@ -141,7 +142,6 @@ public class Weathers implements ContentList{
Draw.color(Color.royal, Color.white, 0.3f); Draw.color(Color.royal, Color.white, 0.3f);
Draw.alpha(Mathf.slope(life) * state.opacity()); Draw.alpha(Mathf.slope(life) * state.opacity());
Lines.stroke(1f);
float space = 45f; float space = 45f;
for(int j : new int[]{-1, 1}){ for(int j : new int[]{-1, 1}){
Tmp.v1.trns(90f + j*space, 1f + 5f * life); Tmp.v1.trns(90f + j*space, 1f + 5f * life);
+2 -4
View File
@@ -480,13 +480,11 @@ public class Mods implements Loadable{
}catch(Throwable e){ }catch(Throwable e){
Core.app.post(() -> { Core.app.post(() -> {
Log.err("Error loading main script @ for mod @.", main.name(), mod.meta.name); Log.err("Error loading main script @ for mod @.", main.name(), mod.meta.name);
e.printStackTrace(); Log.err(e);
}); });
} }
}else{ }else{
Core.app.post(() -> { Core.app.post(() -> Log.err("No main.js found for mod @.", mod.meta.name));
Log.err("No main.js found for mod @.", mod.meta.name);
});
} }
} }
}); });
@@ -206,15 +206,14 @@ public class Drill extends Block{
} }
public class DrillEntity extends TileEntity{ public class DrillEntity extends TileEntity{
float progress; public float progress;
int index; public int index;
float warmup; public float warmup;
float timeDrilled; public float timeDrilled;
float lastDrillSpeed; public float lastDrillSpeed;
int dominantItems;
Item dominantItem;
public int dominantItems;
public Item dominantItem;
@Override @Override
public boolean shouldConsume(){ public boolean shouldConsume(){