mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
correction :
skipping plugin work orders did not work
This commit is contained in:
parent
e0319a4047
commit
0477247cf2
@ -148,23 +148,23 @@ class Operation:
|
|||||||
logging.debug(
|
logging.debug(
|
||||||
f"Skipping already loaded {script} for {plugin_mnemonic}"
|
f"Skipping already loaded {script} for {plugin_mnemonic}"
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
self.plugin_scripts.append(script_mnemonic)
|
||||||
|
|
||||||
self.plugin_scripts.append(script_mnemonic)
|
plugin_path = Path("./resources/plugins", plugin_mnemonic)
|
||||||
|
|
||||||
plugin_path = Path("./resources/plugins", plugin_mnemonic)
|
script_path = Path(plugin_path, script)
|
||||||
|
if not script_path.exists():
|
||||||
|
logging.error(
|
||||||
|
f"Cannot find {script_path} for plugin {plugin_mnemonic}"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
script_path = Path(plugin_path, script)
|
trigger = TriggerStart(comment=f"Load {script_mnemonic}")
|
||||||
if not script_path.exists():
|
filename = script_path.resolve()
|
||||||
logging.error(
|
fileref = self.current_mission.map_resource.add_resource_file(filename)
|
||||||
f"Cannot find {script_path} for plugin {plugin_mnemonic}"
|
trigger.add_action(DoScriptFile(fileref))
|
||||||
)
|
self.current_mission.triggerrules.triggers.append(trigger)
|
||||||
return
|
|
||||||
|
|
||||||
trigger = TriggerStart(comment=f"Load {script_mnemonic}")
|
|
||||||
filename = script_path.resolve()
|
|
||||||
fileref = self.current_mission.map_resource.add_resource_file(filename)
|
|
||||||
trigger.add_action(DoScriptFile(fileref))
|
|
||||||
self.current_mission.triggerrules.triggers.append(trigger)
|
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
radio_registry = RadioRegistry()
|
radio_registry = RadioRegistry()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user