TaledensInvManagerUpdated icon indicating copy to clipboard operation
TaledensInvManagerUpdated copied to clipboard

Quota panels resetting on world load

Open Laserzwei opened this issue 6 years ago • 0 comments

Custom entries to the Quota panel will be reset to the default setting set by the script every time the world gets (re-)loaded.

This is related to Panel-Public Title, either getting lost or not readable by scripts on world (re-)load.

So what happens is: https://github.com/luvies/TaledensInvManagerUpdated/blob/3824f9b766fefae007f697fe1a61b231721f4349/src/Script.cs#L1644 Expects to find a quota panel with "QUOTAS" in its title, but doesn't. That keeps the variable height with a value of 0 and prevents the StringBuilder sb from being filled. Which in the end leads to the paneltext being overwritten with an empty text in the very first pass of the script. The next pass will then write the default Quotas, basically resetting them.

Proposed fix: Ditch & panel2.GetPublicTitle().ToUpper().Contains("QUOTAS")

Laserzwei avatar Mar 21 '19 09:03 Laserzwei