Describe the bug
When loading a savegame that contains overridden cursors the cursors should be set automatically. This is also forseen in the coding, however the cursors are being reset before the overridden cursors are set and this clears the overriden_cursors Dictionary.
To Reproduce
Set a breakpoint in function Egoventure._load() in line
for cursor_type in state.overridden_cursors:
Load a savegame that contains overridden cursors.
In debugger you can see that variable p_state.overridden_cursors contains entries, but state.overridden_cursors is empty.
Reason
The Cursors.reset() that is being called before handling the overridden cursors clears the overridden cursors in the state
Suggested fix
In EgoVenture._load() function change:
for cursor_type in state.overridden_cursors:
var _cursor = state.overridden_cursors[cursor_type]
Cursors.override(cursor_type, _cursor.texture, _cursor.hotspot)
into
for cursor_type in p_state.overridden_cursors:
var _cursor = p_state.overridden_cursors[cursor_type]
Cursors.override(cursor_type, _cursor.texture, _cursor.hotspot)
In case you agree I'll submit a pull request with the change.
Describe the bug When loading a savegame that contains overridden cursors the cursors should be set automatically. This is also forseen in the coding, however the cursors are being reset before the overridden cursors are set and this clears the overriden_cursors Dictionary.
To Reproduce
for cursor_type in state.overridden_cursors:
Reason The Cursors.reset() that is being called before handling the overridden cursors clears the overridden cursors in the state
Suggested fix In EgoVenture._load() function change:
into
In case you agree I'll submit a pull request with the change.