mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fixed JTAC script not working after changes made to lua files
This commit is contained in:
parent
44dcdcc8bb
commit
f381bf85a4
@ -263,6 +263,13 @@ class Operation:
|
|||||||
trigger.add_action(DoScriptFile(fileref))
|
trigger.add_action(DoScriptFile(fileref))
|
||||||
self.current_mission.triggerrules.triggers.append(trigger)
|
self.current_mission.triggerrules.triggers.append(trigger)
|
||||||
|
|
||||||
|
# Inject Ciribob's JTACAutoLase if not done already in the plugins
|
||||||
|
if not "JTACAutoLase.lua" in listOfPluginsScripts : # don't load the script twice
|
||||||
|
trigger = TriggerStart(comment="Load JTACAutoLase.lua script")
|
||||||
|
fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/JTACAutoLase.lua")
|
||||||
|
trigger.add_action(DoScriptFile(fileref))
|
||||||
|
self.current_mission.triggerrules.triggers.append(trigger)
|
||||||
|
|
||||||
# set a LUA table with data from Liberation that we want to set
|
# set a LUA table with data from Liberation that we want to set
|
||||||
# at the moment it contains Liberation's install path, and an overridable definition for the JTACAutoLase function
|
# at the moment it contains Liberation's install path, and an overridable definition for the JTACAutoLase function
|
||||||
# later, we'll add data about the units and points having been generated, in order to facilitate the configuration of the plugin lua scripts
|
# later, we'll add data about the units and points having been generated, in order to facilitate the configuration of the plugin lua scripts
|
||||||
@ -301,13 +308,6 @@ end
|
|||||||
trigger.add_action(DoScriptFile(fileref))
|
trigger.add_action(DoScriptFile(fileref))
|
||||||
self.current_mission.triggerrules.triggers.append(trigger)
|
self.current_mission.triggerrules.triggers.append(trigger)
|
||||||
|
|
||||||
# Inject Ciribob's JTACAutoLase if not done already in the plugins
|
|
||||||
if not "JTACAutoLase.lua" in listOfPluginsScripts : # don't load the script twice
|
|
||||||
trigger = TriggerStart(comment="Load JTACAutoLase.lua script")
|
|
||||||
fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/JTACAutoLase.lua")
|
|
||||||
trigger.add_action(DoScriptFile(fileref))
|
|
||||||
self.current_mission.triggerrules.triggers.append(trigger)
|
|
||||||
|
|
||||||
# add a configuration for JTACAutoLase and start lasing for all JTACs
|
# add a configuration for JTACAutoLase and start lasing for all JTACs
|
||||||
smoke = "true"
|
smoke = "true"
|
||||||
if hasattr(self.game.settings, "jtac_smoke_on"):
|
if hasattr(self.game.settings, "jtac_smoke_on"):
|
||||||
@ -318,6 +318,7 @@ end
|
|||||||
-- setting and starting JTACs
|
-- setting and starting JTACs
|
||||||
env.info("DCSLiberation|: setting and starting JTACs")
|
env.info("DCSLiberation|: setting and starting JTACs")
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for jtac in jtacs:
|
for jtac in jtacs:
|
||||||
lua += f"if dcsLiberation.JTACAutoLase then dcsLiberation.JTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle') end\n"
|
lua += f"if dcsLiberation.JTACAutoLase then dcsLiberation.JTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle') end\n"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user