Fix #11796: Unable to use sharedStorage (#11798)

isUserConfig must only be true for configuration not sharedStorage
This commit is contained in:
Ted John 2020-05-23 17:22:09 +01:00 committed by GitHub
parent 3859689595
commit 82371fb003
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -22,12 +22,17 @@ namespace OpenRCT2::Scripting
class ScConfiguration class ScConfiguration
{ {
private: private:
bool _isUserConfig{ true }; bool _isUserConfig{};
DukValue _backingObject; DukValue _backingObject;
public: public:
ScConfiguration() = default; // context.configuration
ScConfiguration()
: _isUserConfig(true)
{
}
// context.sharedStorage
ScConfiguration(const DukValue& backingObject) ScConfiguration(const DukValue& backingObject)
: _backingObject(backingObject) : _backingObject(backingObject)
{ {