Skip to content
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

Mod doesn't work in 1.2 beta #9

Open
gouldilox opened this issue Feb 9, 2022 · 3 comments
Open

Mod doesn't work in 1.2 beta #9

gouldilox opened this issue Feb 9, 2022 · 3 comments

Comments

@gouldilox
Copy link

gouldilox commented Feb 9, 2022

Any chance of an update for game version 1.2?

Edited: The mod DOES work, but the in-game interface does not. I can still edit the json file

@Firk1n
Copy link

Firk1n commented Mar 5, 2022

Same for me, although I also couldn't get it to work via the json file.

@Decair
Copy link
Owner

Decair commented Mar 6, 2022

Unfortunately, I've been sucked into other things outside of WOTR & modding (haven't had WOTR installed since I last played in Nov), not sure when I might get to this.

If anyone else wishes to take a crack at it & submit a PR (or to just fork the mod to address), feel free.

@TMPhoenix
Copy link

TMPhoenix commented Mar 18, 2022

Currently not at a system where I can do a pull request, but I believe the (or at least one of the) issue(s) is the CreateString function... I believe this might work as a replacement:

    public static LocalizedString CreateString(string key, string value) {
        // See if we used the text previously.
        // (It's common for many features to use the same localized text.
        // In that case, we reuse the old entry instead of making a new one.)
        LocalizedString localized;
        if (textToLocalizedString.TryGetValue(value, out localized)) {
            return localized;
        }
        var strings = LocalizationManager.CurrentPack.m_Strings;
        LocalizationPack.StringEntry oldValue;
        if (strings.TryGetValue(key, out oldValue) && value != oldValue.Text) {
       #if DEBUG
            Main.Log($"Info: duplicate localized string `{key}`, different text.");
       #endif
        }
        LocalizationManager.CurrentPack.PutString(key, value);
        localized = new LocalizedString {
            m_Key = key
        };
        textToLocalizedString[value] = localized;
        return localized;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants