Fixed some landing pad state not saving / Renamed pad 'heat' to 'cooldown'
This commit is contained in:
@@ -1114,6 +1114,7 @@ bar.capacity = Capacity: {0}
|
|||||||
bar.unitcap = {0} {1}/{2}
|
bar.unitcap = {0} {1}/{2}
|
||||||
bar.liquid = Liquid
|
bar.liquid = Liquid
|
||||||
bar.heat = Heat
|
bar.heat = Heat
|
||||||
|
bar.cooldown = Cooldown
|
||||||
bar.instability = Instability
|
bar.instability = Instability
|
||||||
bar.heatamount = Heat: {0}
|
bar.heatamount = Heat: {0}
|
||||||
bar.heatpercent = Heat: {0} ({1}%)
|
bar.heatpercent = Heat: {0} ({1}%)
|
||||||
|
|||||||
@@ -6376,7 +6376,7 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
landingPad = new LandingPad("landing-pad"){{
|
landingPad = new LandingPad("landing-pad"){{
|
||||||
requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.copper, 300, Items.graphite, 200, Items.titanium, 150));
|
requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.copper, 200, Items.graphite, 100, Items.titanium, 100));
|
||||||
size = 4;
|
size = 4;
|
||||||
|
|
||||||
itemCapacity = 100;
|
itemCapacity = 100;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class LandingPad extends Block{
|
|||||||
|
|
||||||
public @Load(value = "@-pod", fallback = "advanced-launch-pad-pod") TextureRegion podRegion;
|
public @Load(value = "@-pod", fallback = "advanced-launch-pad-pod") TextureRegion podRegion;
|
||||||
public float arrivalDuration = 150f;
|
public float arrivalDuration = 150f;
|
||||||
public float cooldownTime = 180f;
|
public float cooldownTime = 150f;
|
||||||
public float consumeLiquidAmount = 100f;
|
public float consumeLiquidAmount = 100f;
|
||||||
public Liquid consumeLiquid = Liquids.water;
|
public Liquid consumeLiquid = Liquids.water;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ public class LandingPad extends Block{
|
|||||||
|
|
||||||
addLiquidBar(consumeLiquid);
|
addLiquidBar(consumeLiquid);
|
||||||
//TODO: does cooldown even need to exist?
|
//TODO: does cooldown even need to exist?
|
||||||
addBar("heat", (LandingPadBuild entity) -> new Bar("bar.heat", Pal.lightOrange, () -> entity.cooldown));
|
addBar("cooldown", (LandingPadBuild entity) -> new Bar("bar.cooldown", Pal.lightOrange, () -> entity.cooldown));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -377,12 +377,23 @@ public class LandingPad extends Block{
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte version(){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(Reads read, byte revision){
|
public void read(Reads read, byte revision){
|
||||||
super.read(read, revision);
|
super.read(read, revision);
|
||||||
config = TypeIO.readItem(read);
|
config = TypeIO.readItem(read);
|
||||||
priority = read.i();
|
priority = read.i();
|
||||||
cooldown = read.f();
|
cooldown = read.f();
|
||||||
|
|
||||||
|
if(revision >= 1){
|
||||||
|
arriving = TypeIO.readItem(read);
|
||||||
|
arrivingTimer = read.f();
|
||||||
|
liquidRemoved = read.f();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -391,6 +402,10 @@ public class LandingPad extends Block{
|
|||||||
TypeIO.writeItem(write, config);
|
TypeIO.writeItem(write, config);
|
||||||
write.i(priority);
|
write.i(priority);
|
||||||
write.f(cooldown);
|
write.f(cooldown);
|
||||||
|
|
||||||
|
TypeIO.writeItem(write, arriving);
|
||||||
|
write.f(arrivingTimer);
|
||||||
|
write.f(liquidRemoved);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user