-
Notifications
You must be signed in to change notification settings - Fork 493
Fix for mods not being properly reloaded on Windows from saved game #5422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
myk002
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the fix into the core function that is returning the incorrect string. Thank you for helping us track this down!
|
@myk002 |
|
That commit was merged after 51.11-r1.2 was tagged. Try the |
|
@myk002 |
|
Ah, are you saying that the paths returned from |
|
That seems to be what is happening. I guess I don't know exactly how you guys want to plug up all the window's backslash holes. |
No, Pathnames as pathnames should be represented in Lua as userdata objects wrapping a The issue goes beyond backslashes; Windows pathnames are encoded in UCS-2, not UTF-8. There are UCS-2 codepoints that have 0x2f ( Perhaps we should just add the I just checked the code for |
bollocks, let me fix that then. I'll get that change pushed to the |
Steam mods with lua scripts in the "scripts_modactive" directory of a mod were not being properly reloaded after the initial load. That is, the script-manager purges these scripts from
dfhack.internal.scriptsbefore reloading them (more specifically to register their onStateChange). This purge wasn't being done since the file path wasn't being recognized on windows, thus dfhack mods weren't being loaded in games from resumed saves (if DF wasn't shut down before then). This change simply adds the correct windows file path as a key to access the script. It may be better to standardize all OS's paths used as keys indfhack.internal.scriptsbut it isn't clear to me the locations where all these files are being added, so this is the simple solution.