Skip to content

Commit

Permalink
testing configurers in addTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
riverwanderer committed Sep 25, 2023
1 parent ab630e5 commit e4150ad
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,16 @@ public void addTo(Buildable b) {

// Module control features: set required string prefs so that module designers don't need to.
// Designers will be able to use Set Global Property without further set up.
final String Demo = "Demo";
final BooleanConfigurer bConfig = new BooleanConfigurer(VassalRandomSide, VassalRandomSide, false);
pr.addOption(null, bConfig);
pr.addOption(Demo, bConfig);
StringConfigurer sConfig = new StringConfigurer(VassalForceSide, VassalForceSide, null);
pr.addOption(null, sConfig);
pr.addOption(Demo, sConfig);
// testing this works
sConfig = new StringConfigurer("TestCfg", "TestCfg", "this tests out lovely");
pr.addOption(sConfig);
sConfig = new StringConfigurer("TestCfg", "TestCfg2", "this tests out better");
pr.addOption("TEST", sConfig);
pr.addOption(Demo, sConfig);
sConfig = new StringConfigurer("TestCfg2", "TestCfg2", "this tests out better");
pr.addOption(Demo, sConfig);
// Initialise otherwise values might persist
pr.setValue(VassalRandomSide, false);
pr.setValue(VassalForceSide, "");
Expand Down

0 comments on commit e4150ad

Please sign in to comment.