@adiholick/nvstudio-mcp 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +775 -146
- package/dist/roblox-bridge.js +349 -71
- package/dist/task-queue.js +57 -6
- package/dist/ws-gateway.js +579 -0
- package/package.json +4 -2
- package/public/index.html +16 -2
- package/studio-plugin/Main.server.lua +484 -53
- package/studio-plugin/get_properties.lua +25 -2
- package/studio-plugin/nvstudio_mcp.rbxmx +509 -55
|
@@ -40,9 +40,32 @@ return function(targetInstance, data, ctx, targetPath)
|
|
|
40
40
|
tryProp(prop)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
-- Attributes & Tags
|
|
43
|
+
-- Attributes & Tags (sanitasi tipe non-JSON agar tidak throw error di JSONEncode)
|
|
44
44
|
pcall(function()
|
|
45
|
-
|
|
45
|
+
local rawAttrs = targetInstance:GetAttributes()
|
|
46
|
+
local safeAttrs = {}
|
|
47
|
+
for k, val in pairs(rawAttrs) do
|
|
48
|
+
if typeof(val) == "Vector3" then
|
|
49
|
+
safeAttrs[k] = {math.round(val.X*100)/100, math.round(val.Y*100)/100, math.round(val.Z*100)/100}
|
|
50
|
+
elseif typeof(val) == "Color3" then
|
|
51
|
+
safeAttrs[k] = {math.round(val.R * 255), math.round(val.G * 255), math.round(val.B * 255)}
|
|
52
|
+
elseif typeof(val) == "CFrame" then
|
|
53
|
+
safeAttrs[k] = tostring(val)
|
|
54
|
+
elseif typeof(val) == "EnumItem" then
|
|
55
|
+
safeAttrs[k] = val.Name
|
|
56
|
+
elseif typeof(val) == "UDim2" then
|
|
57
|
+
safeAttrs[k] = {val.X.Scale, val.X.Offset, val.Y.Scale, val.Y.Offset}
|
|
58
|
+
elseif typeof(val) == "Instance" then
|
|
59
|
+
safeAttrs[k] = val:GetFullName()
|
|
60
|
+
elseif typeof(val) == "DateTime" then
|
|
61
|
+
safeAttrs[k] = val:ToIsoDate()
|
|
62
|
+
elseif typeof(val) == "string" or typeof(val) == "number" or typeof(val) == "boolean" then
|
|
63
|
+
safeAttrs[k] = val
|
|
64
|
+
else
|
|
65
|
+
safeAttrs[k] = tostring(val)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
props.Attributes = safeAttrs
|
|
46
69
|
end)
|
|
47
70
|
pcall(function()
|
|
48
71
|
props.Tags = CollectionService:GetTags(targetInstance)
|