We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58ae854 commit bacbd30Copy full SHA for bacbd30
technic/spec/api_spec.lua
@@ -68,7 +68,12 @@ describe("Technic API", function()
68
end,
69
}
70
-- Make sure that original definition will not be changed during registration
71
- setmetatable(data, { __newindex = function() error("Attempt to modify original definition") end })
+ setmetatable(data, {
72
+ __newindex = function(self, key, value)
73
+ assert(self ~= data, "Attempt to modify original definition")
74
+ rawset(self, key, value)
75
+ end
76
+ })
77
technic.register_solar_array("my_mod:my_solar_array", data)
78
79
-- Verify node registration
0 commit comments