TEMPEST.114 Posted February 6, 2023 Posted February 6, 2023 We can't get access to this data from the scripting engine because it's outside in other files. Yet the game 'does' know about it all. It just needs exposing to the lua scripting engine. Thanks
Chump Posted February 7, 2023 Posted February 7, 2023 16 hours ago, Elphaba said: We can't get access to this data from the scripting engine because it's outside in other files. You can access the Beacons.lua, Radio.lua, etc. dofile(string.format("./Mods/terrains/%s/Radio.lua", env.mission.theatre)) -- makes the "radio" table available if radio then for _, r in ipairs(radio) do -- do stuff like: r.frequency.UHF[2] end end 1
TEMPEST.114 Posted February 8, 2023 Author Posted February 8, 2023 19 hours ago, Chump said: You can access the Beacons.lua, Radio.lua, etc. dofile(string.format("./Mods/terrains/%s/Radio.lua", env.mission.theatre)) -- makes the "radio" table available if radio then for _, r in ipairs(radio) do -- do stuff like: r.frequency.UHF[2] end end Wait, doesn't that mean I have to de-sanitise DCS to get access to dofile?
Chump Posted February 8, 2023 Posted February 8, 2023 5 hours ago, Elphaba said: Wait, doesn't that mean I have to de-sanitise DCS to get access to dofile? Indeed it does. It will need the usage of require. --_G['require'] = nil
TEMPEST.114 Posted February 8, 2023 Author Posted February 8, 2023 4 hours ago, Chump said: Indeed it does. It will need the usage of require. --_G['require'] = nil Thank you for your help, but then my point still stands. We shouldn't have to do that to get access to this data.
Recommended Posts