You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/vscripts/alyxlib/class.lua
+53-11Lines changed: 53 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ local function _inherit(base, self, fenv)
110
110
break
111
111
end
112
112
end
113
-
Warning("Trying to inherit an already inherited class ( "..class_name.." -> ["..tostring(self)..","..self:GetClassname()..","..self:GetName().."] )\n")
113
+
warn("Trying to inherit an already inherited class ( "..class_name.." -> ["..tostring(self)..","..self:GetClassname()..","..self:GetName().."] )")
114
114
return
115
115
end
116
116
@@ -133,7 +133,7 @@ local function _inherit(base, self, fenv)
133
133
}
134
134
-- Used to automatically save values
135
135
meta.__newindex=function(table, key, value)
136
-
ifnotkey:startswith("__") andtype(value) ~="function" then
136
+
ifnotkey:startswith("_") andtype(value) ~="function" then
137
137
meta.__values[key] =value
138
138
self:Save(key, value)
139
139
else
@@ -438,6 +438,7 @@ end
438
438
---@fieldOnBreakfun(self: EntityClass, inflictor: EntityHandle) # Called when a breakable entity is broken.
439
439
---@fieldOnTakeDamagefun(self: EntityClass, damageTable: OnTakeDamageTable) # Called when entity takes damage.
440
440
---@fieldPrecachefun(self: EntityClass, context: CScriptPrecacheContext) # Called before Spawn for precaching.
441
+
---@fieldThinkfunction # Entity think function.
441
442
EntityClass=entity("EntityClass")
442
443
443
444
---Assign a new value to entity's field `name`.
@@ -461,24 +462,26 @@ function EntityClass:Save(name, value)
0 commit comments