roblox_emulator: implement __newindex Int32
This commit is contained in:
parent
8b6166f48e
commit
e6fb8437b3
@ -371,6 +371,10 @@ impl mlua::UserData for Instance{
|
|||||||
let typed_value=value.as_boolean().ok_or_else(||mlua::Error::runtime("Expected boolean"))?;
|
let typed_value=value.as_boolean().ok_or_else(||mlua::Error::runtime("Expected boolean"))?;
|
||||||
rbx_types::Variant::Bool(typed_value)
|
rbx_types::Variant::Bool(typed_value)
|
||||||
},
|
},
|
||||||
|
rbx_reflection::DataType::Value(rbx_types::VariantType::Int32)=>{
|
||||||
|
let typed_value=value.as_i32().ok_or_else(||mlua::Error::runtime("Expected Int32"))?;
|
||||||
|
rbx_types::Variant::Int32(typed_value)
|
||||||
|
},
|
||||||
rbx_reflection::DataType::Value(rbx_types::VariantType::String)=>{
|
rbx_reflection::DataType::Value(rbx_types::VariantType::String)=>{
|
||||||
let typed_value=value.as_str().ok_or_else(||mlua::Error::runtime("Expected string"))?;
|
let typed_value=value.as_str().ok_or_else(||mlua::Error::runtime("Expected string"))?;
|
||||||
rbx_types::Variant::String(typed_value.to_owned())
|
rbx_types::Variant::String(typed_value.to_owned())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user