• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you create personalized picture books for kids in seconds. Give it a try and let me know what you think!
Wonders Screen

Wonders Screen 1.5

I implemented the code that @beezany supplied and I believe the mod is loading, as I see options for it under Options > Add-ons, but I don't see the wonder screen icon still. Is anyone else having this issue?

Edit: Not sure what changed, but the Wonder Screen icon appeared after restarting the game a few times. Thanks for your help keeping this really valuable mod alive, @beezany
 
Last edited:
If the fix beezany just posted doesn't work for you and you got the mod through steam, you're probably dealing with the same crap I was dealing with. Steam reverted the mod back to it's original files from before patch 1.24. So instead of having to do the same fixes for patch 1.24 yourself I'm posting all fixes from patch 1.24 and 1.30. here
 

Attachments

yes, there is a change to the Options screen that is breaking mods with config options.

for @KayleeR's mods, you can work around the problem by adding this code to
alt-wonders-screen/code/wonders-screen-options.js
right before the Options.addInitCallback call on line 68.

JavaScript:
// fix Options initialization
Options.addInitCallback = function(callback) {
    if (this.optionsReInitCallbacks.length && !this.optionsInitCallbacks.length) {
        throw new Error("Options already initialized, cannot add init callback");
    }
    this.optionsInitCallbacks.push(callback);
    this.optionsReInitCallbacks.push(callback);
}
Update 1.3.1 fixed this bug, so my workaround is no longer necessary. i recommend removing the "fix Options initialization" patch from your local versions (and any of your own mods that use it) because it's risky for multiple mods to patch the same vanilla code
 
Update 1.3.1 fixed this bug, so my workaround is no longer necessary. i recommend removing the "fix Options initialization" patch from your local versions (and any of your own mods that use it) because it's risky for multiple mods to patch the same vanilla code
Awesome, thank you! Just for clarity, are we to leave the fix from post #26 in?
Spoiler :

the 1.2.4 game update refactored the ui codebase and broke almost all mods. often you just need to update some import statements, and i've been fixing that for some of the mods i use regularly. here are my diffs for Claimed Wonders and the Wonders Screen. hope it helps you!
Diff:
diff -r old/code/wonder-tracker.js new/code/wonder-tracker.js
3c3
< import { Icon } from '/core/ui/utilities/utilities-image.js';
---
> import { Icon } from '/core/ui/utilities/utilities-image.chunk.js';
Diff:
diff -r old/code/mod-options-decorator.js new/code/mod-options-decorator.js
3c3
< import { CategoryData, CategoryType } from '/core/ui/options/options-helpers.js';
---
> import { d as CategoryData, C as CategoryType } from '/core/ui/options/editors/index.chunk.js';
diff -r old/code/wonders-screen-model.js new/code/wonders-screen-model.js
1,2c1,2
< import { Icon } from '/core/ui/utilities/utilities-image.js';
< import { ComponentID } from '/core/ui/utilities/utilities-component-id.js';
---
> import { Icon } from '/core/ui/utilities/utilities-image.chunk.js';
> import { C as ComponentID } from '/core/ui/utilities/utilities-component-id.chunk.js';
diff -r old/code/wonders-screen-options.js new/code/wonders-screen-options.js
3,5c3,4
< import '/core/ui/options/options.js';  // make sure this loads first
< import { CategoryType } from '/core/ui/options/options-helpers.js';
< import { Options, OptionType } from '/core/ui/options/model-options.js';
---
> import '/core/ui/options/screen-options.js';  // make sure this loads first
> import { O as Options, a as OptionType, C as CategoryType } from '/core/ui/options/editors/index.chunk.js';
diff -r old/code/wonders-screen.js new/code/wonders-screen.js
1,4c1,4
< import Panel from '/core/ui/panel-support.js';
< import Databind from '/core/ui/utilities/utilities-core-databinding.js';
< import { InputEngineEventName } from '/core/ui/input/input-support.js';
< import { MustGetElement } from '/core/ui/utilities/utilities-dom.js';
---
> import { P as Panel } from '/core/ui/panel-support.chunk.js';
> import { D as Databind } from '/core/ui/utilities/utilities-core-databinding.chunk.js';
> import { b as InputEngineEventName } from '/core/ui/input/input-support.chunk.js';
> import { MustGetElement } from '/core/ui/utilities/utilities-dom.chunk.js';
 
Back
Top Bottom