From e4150adae8d2ada218b1a1c6f8e38155ef13869c Mon Sep 17 00:00:00 2001 From: Mark Benson Date: Mon, 25 Sep 2023 10:59:50 +0100 Subject: [PATCH] testing configurers in addTo() --- .../main/java/VASSAL/build/module/PlayerRoster.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java b/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java index 0b80de4492..d23ee0525c 100644 --- a/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java +++ b/vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java @@ -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, "");