mchlnix / SMB3-Foundry

SMB3 Level Editor in Python
GNU General Public License v3.0
91 stars 12 forks source link

Use working-directory-independent paths #154

Closed TomaSajt closed 1 year ago

TomaSajt commented 1 year ago

This PR fixes the accessing of the data directory by using file-relative Paths and foundry.root_dir

After this, you can run the script without having the repo as the working directory

In the smb3parse module, I didn't use root_dir because that would have imported from foundry. Should I keep it this way or should I import from foundry?

mchlnix commented 1 year ago

Hey, sorry. Didn't see the notification pop up. There should definitely not be any foundry imports in smb3parse, that's correct.

mchlnix commented 1 year ago

Good catch with the enemy dict. The code in 'parser' could probably be removed, since it's just debug code to see if it works at all.