X-Plane / XLua

Ultra-Minimal Lua Plugin for X-Plane
MIT License
31 stars 18 forks source link

Feature request: get acf path #7

Open todirbg opened 2 years ago

todirbg commented 2 years ago

Hello, great to see xLua is updated! Can we have a function to get the path to the current acf like in this fork https://github.com/aeroc7/XLua ? This is extremely useful for read/write config files from the acf folder for example. Regards!

Danita commented 2 years ago

@todirbg On XP12 there's the sim/aircraft/view/acf_relative_path you can use for this.

todirbg commented 2 years ago

This is great news :) I still think it will be better if we could have direct access to that in xlua as a function or as a global variable like SIM_PERIOD is.

Danita commented 2 years ago

Better in which way? What would be the advantage?

todirbg commented 2 years ago

For one it will be backward compatible with xp11. I just think it is a cleaner solution.