roblox_emulator: implement __newindex ContentId
This commit is contained in:
parent
081c95190f
commit
d722bcb46f
@ -342,6 +342,10 @@ impl mlua::UserData for Instance{
|
||||
let typed_value:crate::runner::color_sequence::ColorSequence=*value.as_userdata().ok_or_else(||mlua::Error::runtime("Expected ColorSequence"))?.borrow()?;
|
||||
rbx_types::Variant::ColorSequence(typed_value.into())
|
||||
},
|
||||
rbx_reflection::DataType::Value(rbx_types::VariantType::ContentId)=>{
|
||||
let typed_value=value.as_str().ok_or_else(||mlua::Error::runtime("Expected string"))?.to_owned();
|
||||
rbx_types::Variant::ContentId(typed_value.into())
|
||||
},
|
||||
other=>return Err(mlua::Error::runtime(format!("Unimplemented property type: {other:?}"))),
|
||||
};
|
||||
// the index is known to be a real property at this point
|
||||
|
Loading…
x
Reference in New Issue
Block a user