Minor reformatting
This commit is contained in:
@@ -114,22 +114,6 @@ public class Rules{
|
|||||||
/** special tags for additional info. */
|
/** special tags for additional info. */
|
||||||
public StringMap tags = new StringMap();
|
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. */
|
/** Copies this ruleset exactly. Not efficient at all, do not use often. */
|
||||||
public Rules copy(){
|
public Rules copy(){
|
||||||
return JsonIO.copy(this);
|
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. */
|
/** A simple map for storing TeamRules in an efficient way without hashing. */
|
||||||
public static class TeamRules implements JsonSerializable{
|
public static class TeamRules implements JsonSerializable{
|
||||||
final TeamRule[] values = new TeamRule[Team.all.length];
|
final TeamRule[] values = new TeamRule[Team.all.length];
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
main.table(t -> {
|
main.table(t -> {
|
||||||
t.left();
|
t.left();
|
||||||
t.add(text).left().padRight(5);
|
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)
|
.padRight(100f)
|
||||||
.valid(f -> Strings.parseInt(f) >= min && Strings.parseInt(f) <= max).width(120f).left().addInputDialog();
|
.valid(f -> Strings.parseInt(f) >= min && Strings.parseInt(f) <= max).width(120f).left().addInputDialog();
|
||||||
}).padTop(0);
|
}).padTop(0);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public interface Payload extends Position{
|
|||||||
float size();
|
float size();
|
||||||
|
|
||||||
float x();
|
float x();
|
||||||
|
|
||||||
float y();
|
float y();
|
||||||
|
|
||||||
/** @return whether this payload was dumped. */
|
/** @return whether this payload was dumped. */
|
||||||
|
|||||||
Reference in New Issue
Block a user