From 53b784f5e1b6508ff959be2b0698ef028fc25328 Mon Sep 17 00:00:00 2001 From: damies13 Date: Sat, 19 Aug 2023 00:07:15 +1000 Subject: [PATCH] Now the default scenario values are passed through to the agent Issue #163 --- rfswarm_manager/rfswarm.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rfswarm_manager/rfswarm.py b/rfswarm_manager/rfswarm.py index 240bb1631..2595b9373 100644 --- a/rfswarm_manager/rfswarm.py +++ b/rfswarm_manager/rfswarm.py @@ -455,7 +455,9 @@ class RFSwarmBase: save_ini = True - excludelibrariesdefault = "String,OperatingSystem,perftest" + # https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_manager.md#exclude-libraries + # default (BuiltIn,String,OperatingSystem,perftest) + excludelibrariesdefault = "BuiltIn,String,OperatingSystem,perftest" scriptcount = 0 scriptlist: Any = [{}] @@ -2979,9 +2981,17 @@ def run_start_threads(self): if "excludelibraries" in grp: base.robot_schedule["Agents"][nxtagent][grurid]["excludelibraries"] = grp["excludelibraries"] + else: + if "excludelibraries" in base.scriptdefaults: + base.robot_schedule["Agents"][nxtagent][grurid]["excludelibraries"] = base.scriptdefaults["excludelibraries"] + else: + base.robot_schedule["Agents"][nxtagent][grurid]["excludelibraries"] = base.excludelibrariesdefault if "robotoptions" in grp: base.robot_schedule["Agents"][nxtagent][grurid]["robotoptions"] = grp["robotoptions"] + else: + if "robotoptions" in base.scriptdefaults: + base.robot_schedule["Agents"][nxtagent][grurid]["robotoptions"] = base.scriptdefaults["robotoptions"] base.Agents[nxtagent]["AssignedRobots"] += 1 base.debugmsg(5, "base.Agents[", nxtagent, "][AssignedRobots]:", base.Agents[nxtagent]["AssignedRobots"])