Always use luau numbers, not lua integers for translation layer

This commit is contained in:
Filip Tibell 2023-03-10 13:37:42 +01:00
parent 078c08eabf
commit 7261ca90ef
No known key found for this signature in database

View file

@ -156,8 +156,8 @@ impl<'lua> FromRbxVariantLua<'lua> for LuaValue<'lua> {
match variant {
// Primitives
Rbx::Bool(b) => Ok(LuaValue::Boolean(*b)),
Rbx::Int64(i) => Ok(LuaValue::Integer(*i as i32)),
Rbx::Int32(i) => Ok(LuaValue::Integer(*i)),
Rbx::Int64(i) => Ok(LuaValue::Number(*i as f64)),
Rbx::Int32(i) => Ok(LuaValue::Number(*i as f64)),
Rbx::Float64(n) => Ok(LuaValue::Number(*n)),
Rbx::Float32(n) => Ok(LuaValue::Number(*n as f64)),
Rbx::String(s) => Ok(LuaValue::String(