mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Tone down failure message for missing plugin file.
This looked an awful lot like an error, but it's the common case.
This commit is contained in:
parent
f381bf85a4
commit
a44cbe5972
@ -236,18 +236,19 @@ class Operation:
|
|||||||
|
|
||||||
# Inject Plugins Lua Scripts
|
# Inject Plugins Lua Scripts
|
||||||
listOfPluginsScripts = []
|
listOfPluginsScripts = []
|
||||||
try:
|
plugin_file_path = Path("./resources/scripts/plugins/__plugins.lst")
|
||||||
with open("./resources/scripts/plugins/__plugins.lst", "r") as a_file:
|
if plugin_file_path.exists():
|
||||||
for line in a_file:
|
for line in plugin_file_path.read_text().splitlines():
|
||||||
name = line.strip()
|
name = line.strip()
|
||||||
if not name.startswith( '#' ):
|
if not name.startswith( '#' ):
|
||||||
trigger = TriggerStart(comment="Load " + name)
|
trigger = TriggerStart(comment="Load " + name)
|
||||||
listOfPluginsScripts.append(name)
|
listOfPluginsScripts.append(name)
|
||||||
fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/plugins/" + name)
|
fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/plugins/" + name)
|
||||||
trigger.add_action(DoScriptFile(fileref))
|
trigger.add_action(DoScriptFile(fileref))
|
||||||
self.current_mission.triggerrules.triggers.append(trigger)
|
self.current_mission.triggerrules.triggers.append(trigger)
|
||||||
except Exception as e:
|
else:
|
||||||
print(e)
|
logging.info(
|
||||||
|
f"Not loading plugins, {plugin_file_path} does not exist")
|
||||||
|
|
||||||
# Inject Mist Script if not done already in the plugins
|
# Inject Mist Script if not done already in the plugins
|
||||||
if not "mist.lua" in listOfPluginsScripts and not "mist_4_3_74.lua" in listOfPluginsScripts: # don't load the script twice
|
if not "mist.lua" in listOfPluginsScripts and not "mist_4_3_74.lua" in listOfPluginsScripts: # don't load the script twice
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user