This repository has been archived by the owner on Feb 20, 2022. It is now read-only.
forked from jmckay/rotp-public
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.5.1. Added governor options GUI (stock Swing version with bad look…
… & feel)
- Loading branch information
1 parent
7063560
commit 64bc170
Showing
10 changed files
with
301 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package rotp.model.game; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Governor options. | ||
*/ | ||
public class GovernorOptions implements Serializable { | ||
public enum GatesGovernor { | ||
None, | ||
Rich, | ||
All | ||
} | ||
// keep backwards compatibility with system properties | ||
private boolean governorOnByDefault = !"false".equalsIgnoreCase(System.getProperty("defaultgovernor", "true"));; | ||
private boolean autotransport = !"false".equalsIgnoreCase(System.getProperty("autotransport", "true")); | ||
private GatesGovernor gates = "false".equalsIgnoreCase(System.getProperty("autogate", "true")) ? GatesGovernor.None : GatesGovernor.Rich; | ||
|
||
public GovernorOptions() { | ||
} | ||
|
||
public boolean isGovernorOnByDefault() { | ||
return governorOnByDefault; | ||
} | ||
|
||
public boolean isAutotransport() { | ||
return autotransport; | ||
} | ||
|
||
public GatesGovernor getGates() { | ||
return gates; | ||
} | ||
|
||
public void setGovernorOnByDefault(boolean governorOnByDefault) { | ||
this.governorOnByDefault = governorOnByDefault; | ||
} | ||
|
||
public void setAutotransport(boolean autotransport) { | ||
this.autotransport = autotransport; | ||
} | ||
|
||
public void setGates(GatesGovernor gates) { | ||
this.gates = gates; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.