Closed SomeTroglodyte closed 3 years ago
If you want add civilopedia to main menu. My suggestion is just add ruleset mod menu above and refreshed every changing mod selection. Also make it hidden when game was loaded.
civilopedia to main menu
Nope, not what I said. "engine", not the screen.
if the engine is used from main menu
What benefit using "that engine" from main menu?
Way to reproduce:
From main menu, load or start a game with vanilla. no mods, religion enabled
Go into Civilopedia, look at Great Prophet -> Holy site is linked
Quit Unciv and restart
From main menu, load or start a game with DeCiv redux
Go into Civilopedia, Promotions, Accuracy
Load or start a game with vanilla. no mods, religion enabled
Go into Civilopedia, look at Great Prophet -> Holy site is not linked
Another note to self, though anybody is welcome to patch...
As the title says. That auto-mapping is done in
FormattedLine.Companion
using a cache map initializedby lazy
from the current ruleset. Consequences are:Possible approach: Drop the nice lazy and implement caching more traditionally. Let the 'CivilopediaText' modules receive a notification when the ruleset changes like ImageGetter gets (Or, monitor a ruleset change by comparing hashes on every access - no thanks). Manage cache rebuild using that.
fun invalidateCache
with enough hooks===
???