Fixed not being able to set to a string indexed userdata value.
This commit is contained in:
parent
eacdb8a593
commit
de39464b33
|
@ -74,6 +74,12 @@ namespace Porygon::UserData {
|
|||
delete value;
|
||||
}
|
||||
|
||||
void SetIndexValue(const Utilities::HashedString *key, const EvalValue *value) const override {
|
||||
auto field = _userData->Get()->GetField(key->GetHash());
|
||||
field->Set(_obj, value);
|
||||
delete value;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline void* GetObjectPointer() const{
|
||||
return _obj;
|
||||
}
|
||||
|
@ -82,7 +88,6 @@ namespace Porygon::UserData {
|
|||
EvalValue* Cast(shared_ptr<const ScriptType> castType) const final{
|
||||
return _userData->Get()->Cast(_obj, castType.get());
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue