This commit is contained in:
2022-03-29 16:37:32 -04:00
parent 0de1754b21
commit 72581f21e9
3 changed files with 14 additions and 20 deletions

View File

@@ -1,7 +1,10 @@
NilIsZero={
__index=function(t,k)
makeclass('NilIsZero') -- This is intended to be used as a metatable
function NilIsZero.__index(t,k)
return 0
end,
__newindex=function(t,k,v)
end
function NilIsZero.__newindex(t,k,v)
if v~=nil and v~=0 then rawset(t,k,v) end
end }
end