GMOD_disease/lua/autorun/server/sv_symbtom.lua

18 lines
547 B
Lua
Raw Permalink Normal View History

Symbtom = {}
--- Disease class
---@param side name string? the name of the symbtom (string)
---@param side func function? the function called when symbtom
---@param side delay number? delay time between two symbtoms
---@param side level float? the level of the symbtom (between 0-1)
function Symbtom:new(name, func, level, delay)
local instance = {}
setmetatable(instance, {__index = Disease})
instance.name = name
instance.func = func
instance.level = level
instance.delay = delay
return instance
end
return Symbtom