Issue Data
|
Issue #23016: Property CurrentWorkshopID on WorkshopParentScript is not updated properly
Certain functions on WorkshopScript and WorkshopParentScript will skip certain operations if the workshop they run on is not the workshop the player is currently staying at.
This is handled by several properties that are set to the current workshop if the player activates a workbench or if a reset starts running: - CurrentWorkshop: a refAlias on WorkshopParent quest; this holds the ref of the current workshop - currentWorkshopID: an int property on WorkshopParentScript: this holds the workshopID of the current workshop - WorkshopCurrentWorkshopID: a global: this holds the workshopID of the current workshop too Having a global that stores the current workshop's ID too suggests that it may be used by condition checks (it is not used by any scripts though, other than WorkshopScript and WorkshopParentScript themselves).. This is all done because certain operations (e.g. on resource objects or workshop stats) are unsafe if the respective workshop is not loaded. In the worst case, running operations on an unloaded workshop may result in certain workshop stats values becoming zero. Consequently, the aforementioned properties should be reset to 'none' and -1, respectively, if the player leaves a workshop location - but they aren't. They always keep the values of the workshop last visited by the player. |
Related Issues: 24122