Misc tech tree & block stuff
This commit is contained in:
@@ -4445,7 +4445,7 @@ public class Blocks{
|
|||||||
consumePower(2f);
|
consumePower(2f);
|
||||||
size = 3;
|
size = 3;
|
||||||
//TODO expand this list
|
//TODO expand this list
|
||||||
filter = Seq.with(Blocks.tungstenWallLarge, Blocks.berylliumWallLarge, Blocks.carbideWallLarge, Blocks.reinforcedLiquidContainer, Blocks.reinforcedContainer, Blocks.beamNode);
|
filter = Seq.with(Blocks.tungstenWallLarge, Blocks.berylliumWallLarge, Blocks.carbideWallLarge, Blocks.reinforcedSurgeWallLarge, Blocks.reinforcedLiquidContainer, Blocks.reinforcedContainer, Blocks.beamNode);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//yes this block is pretty much useless
|
//yes this block is pretty much useless
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public class TechTree{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String localizedName(){
|
public String localizedName(){
|
||||||
return Core.bundle.get("techtree." + name);
|
return Core.bundle.get("techtree." + name, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setupRequirements(ItemStack[] requirements){
|
public void setupRequirements(ItemStack[] requirements){
|
||||||
|
|||||||
@@ -886,7 +886,7 @@ public class ContentParser{
|
|||||||
researchName = research.asString();
|
researchName = research.asString();
|
||||||
customRequirements = null;
|
customRequirements = null;
|
||||||
}else{
|
}else{
|
||||||
researchName = research.getString("parent");
|
researchName = research.getString("parent", null);
|
||||||
customRequirements = research.has("requirements") ? parser.readValue(ItemStack[].class, research.get("requirements")) : null;
|
customRequirements = research.has("requirements") ? parser.readValue(ItemStack[].class, research.get("requirements")) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -922,6 +922,12 @@ public class ContentParser{
|
|||||||
node.setupRequirements(unlock.researchRequirements());
|
node.setupRequirements(unlock.researchRequirements());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(research.getBoolean("root", false)){
|
||||||
|
node.name = research.getString("name", unlock.name);
|
||||||
|
node.requiresUnlock = research.getBoolean("requiresUnlock", false);
|
||||||
|
TechTree.roots.add(node);
|
||||||
|
}else{
|
||||||
|
if(researchName != null){
|
||||||
//find parent node.
|
//find parent node.
|
||||||
TechNode parent = TechTree.all.find(t -> t.content.name.equals(researchName) || t.content.name.equals(currentMod.name + "-" + researchName) || t.content.name.equals(SaveVersion.mapFallback(researchName)));
|
TechNode parent = TechTree.all.find(t -> t.content.name.equals(researchName) || t.content.name.equals(currentMod.name + "-" + researchName) || t.content.name.equals(SaveVersion.mapFallback(researchName)));
|
||||||
|
|
||||||
@@ -935,6 +941,10 @@ public class ContentParser{
|
|||||||
//reparent the node
|
//reparent the node
|
||||||
node.parent = parent;
|
node.parent = parent;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
Log.warn(unlock.name + " is not a root node, and does not have a `parent: ` property. Ignoring.");
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public class PayloadDeconstructor extends PayloadBlock{
|
|||||||
time += edelta();
|
time += edelta();
|
||||||
|
|
||||||
for(int i = 0; i < reqs.length; i++){
|
for(int i = 0; i < reqs.length; i++){
|
||||||
accum[i] += reqs[i].amount * state.rules.deconstructRefundMultiplier * realShift;
|
accum[i] += reqs[i].amount * (payload instanceof BuildPayload ? state.rules.buildCostMultiplier : 1f) * realShift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ org.gradle.caching=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=dfcb21ce56
|
archash=ef9d6ac655
|
||||||
|
|||||||
Reference in New Issue
Block a user