This commit is contained in:
Anuken
2025-02-07 20:49:21 -05:00
parent 28283b45e4
commit 88cfb10621
3 changed files with 3 additions and 1 deletions

View File

@ -99,6 +99,7 @@ public class TechTree{
public TechNode(@Nullable TechNode parent, UnlockableContent content, ItemStack[] requirements){ public TechNode(@Nullable TechNode parent, UnlockableContent content, ItemStack[] requirements){
if(parent != null){ if(parent != null){
parent.children.add(this); parent.children.add(this);
planet = parent.planet;
researchCostMultipliers = parent.researchCostMultipliers; researchCostMultipliers = parent.researchCostMultipliers;
}else if(researchCostMultipliers == null){ }else if(researchCostMultipliers == null){
researchCostMultipliers = new ObjectFloatMap<>(); researchCostMultipliers = new ObjectFloatMap<>();

View File

@ -1224,6 +1224,7 @@ public class ContentParser{
} }
//reparent the node //reparent the node
node.parent = parent; node.parent = parent;
node.planet = parent.planet;
} }
}else{ }else{
Log.warn(unlock.name + " is not a root node, and does not have a `parent: ` property. Ignoring."); Log.warn(unlock.name + " is not a root node, and does not have a `parent: ` property. Ignoring.");

View File

@ -132,7 +132,7 @@ public class ColorPicker extends BaseDialog{
hexField = t.field(current.toString(), value -> { hexField = t.field(current.toString(), value -> {
try{ try{
current.set(Color.valueOf(value).a(a)); Color.valueOf(current, value);
current.toHsv(values); current.toHsv(values);
h = values[0]; h = values[0];
s = values[1]; s = values[1];