Minor reformatting

This commit is contained in:
Anuken
2021-07-01 17:06:35 -04:00
parent bc7085826e
commit 0b3dddcc9e
3 changed files with 18 additions and 17 deletions

View File

@@ -114,22 +114,6 @@ public class Rules{
/** special tags for additional info. */
public StringMap tags = new StringMap();
/** A team-specific ruleset. */
public static class TeamRule{
/** Whether to use building AI. */
public boolean ai;
/** TODO Tier of blocks/designs that the AI uses for building. [0, 1] */
public float aiTier = 1f;
/** Whether, when AI is enabled, ships should be spawned from the core. */
public boolean aiCoreSpawn = true;
/** If true, blocks don't require power or resources. */
public boolean cheat;
/** If true, resources are not consumed when building. */
public boolean infiniteResources;
/** If true, this team has infinite unit ammo. */
public boolean infiniteAmmo;
}
/** Copies this ruleset exactly. Not efficient at all, do not use often. */
public Rules copy(){
return JsonIO.copy(this);
@@ -150,6 +134,22 @@ public class Rules{
}
}
/** A team-specific ruleset. */
public static class TeamRule{
/** Whether to use building AI. */
public boolean ai;
/** TODO Tier of blocks/designs that the AI uses for building. [0, 1] */
public float aiTier = 1f;
/** Whether, when AI is enabled, ships should be spawned from the core. */
public boolean aiCoreSpawn = true;
/** If true, blocks don't require power or resources. */
public boolean cheat;
/** If true, resources are not consumed when building. */
public boolean infiniteResources;
/** If true, this team has infinite unit ammo. */
public boolean infiniteAmmo;
}
/** A simple map for storing TeamRules in an efficient way without hashing. */
public static class TeamRules implements JsonSerializable{
final TeamRule[] values = new TeamRule[Team.all.length];

View File

@@ -212,7 +212,7 @@ public class CustomRulesDialog extends BaseDialog{
main.table(t -> {
t.left();
t.add(text).left().padRight(5);
t.field((integer ? (int)prov.get() : prov.get()) + "", s -> cons.get(Strings.parseInt(s)))
t.field((integer ? prov.get() : prov.get()) + "", s -> cons.get(Strings.parseInt(s)))
.padRight(100f)
.valid(f -> Strings.parseInt(f) >= min && Strings.parseInt(f) <= max).width(120f).left().addInputDialog();
}).padTop(0);

View File

@@ -23,6 +23,7 @@ public interface Payload extends Position{
float size();
float x();
float y();
/** @return whether this payload was dumped. */