Removed something pointless
This commit is contained in:
@@ -324,22 +324,6 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
buildGroups();
|
||||
}).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f).row();
|
||||
|
||||
//spawn positions are clunky and thus experimental for now
|
||||
if(experimental){
|
||||
//health fractions are generally not useful
|
||||
t.table(p -> {
|
||||
p.stack(new Slider(0f, 1f, 0.01f, false){{
|
||||
setValue(group.healthFraction);
|
||||
moved(val -> group.healthFraction = val);
|
||||
}}, new Label("", Styles.outlineLabel){{
|
||||
update(() -> setText(Core.bundle.format("waves.health", (int)(group.healthFraction * 100))));
|
||||
touchable = Touchable.disabled;
|
||||
setAlignment(Align.center);
|
||||
setColor(Color.white);
|
||||
}}).width(300f).height(44f);
|
||||
}).row();
|
||||
}
|
||||
|
||||
t.table(a -> {
|
||||
a.add("@waves.spawn").padRight(8);
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ public class MapObjectives{
|
||||
|
||||
}
|
||||
|
||||
/** Basic mission display text. */
|
||||
/** Basic mission display text. If null, falls back to standard text. */
|
||||
public @Nullable String text(){
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@ public class SpawnGroup implements JsonSerializable, Cloneable{
|
||||
public int unitAmount = 1;
|
||||
/** If not -1, the unit will only spawn in spawnpoints with these packed coordinates. */
|
||||
public int spawn = -1;
|
||||
/** Fraction of health that unit is spawned with. */
|
||||
public float healthFraction = 1f;
|
||||
/** Seq of payloads that this unit will spawn with. */
|
||||
public @Nullable Seq<UnitType> payloads;
|
||||
/** Status effect applied to the spawned unit. Null to disable. */
|
||||
@@ -93,7 +91,6 @@ public class SpawnGroup implements JsonSerializable, Cloneable{
|
||||
}
|
||||
|
||||
unit.shield = getShield(wave);
|
||||
unit.health = unit.maxHealth * healthFraction;
|
||||
|
||||
//load up spawn payloads
|
||||
if(payloads != null && unit instanceof Payloadc pay){
|
||||
@@ -121,7 +118,6 @@ public class SpawnGroup implements JsonSerializable, Cloneable{
|
||||
if(unitAmount != 1) json.writeValue("amount", unitAmount);
|
||||
if(effect != null) json.writeValue("effect", effect.name);
|
||||
if(spawn != -1) json.writeValue("spawn", spawn);
|
||||
if(healthFraction != 1f) json.writeValue("healthFraction", healthFraction);
|
||||
if(payloads != null && payloads.size > 0){
|
||||
json.writeValue("payloads", payloads.map(u -> u.name).toArray(String.class));
|
||||
}
|
||||
@@ -142,7 +138,6 @@ public class SpawnGroup implements JsonSerializable, Cloneable{
|
||||
shieldScaling = data.getFloat("shieldScaling", 0);
|
||||
unitAmount = data.getInt("amount", 1);
|
||||
spawn = data.getInt("spawn", -1);
|
||||
healthFraction = data.getFloat("healthFraction", 1f);
|
||||
if(data.has("payloads")){
|
||||
payloads = Seq.with(json.readValue(String[].class, data.get("payloads"))).map(s -> content.getByName(ContentType.unit, s));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user