GMOD_disease/lua/autorun/server/sv_disease.lua

20 lines
945 B
Lua
Raw Normal View History

2023-09-03 14:03:21 -04:00
Disease = {}
--- Disease class
---@param side name string? the name of the disease (string)
---@param side symbtoms_by_stages list? a list of list of symbtom, a list of symbtoms by stage (Symbtom)
2023-09-03 18:30:38 -04:00
---@param side contamination_methods list? a list of contamination method (string)
---@param side transmission_zone_stages list? a list of transmissions zone (int), one number by stage
---@param side stages_duration list? a list of stage duration (int), one number by stage
function Disease:new(name, symbtoms_by_stages, contamination_methods, transmission_zone_stages, stages_duration)
2023-09-03 14:03:21 -04:00
local instance = {}
setmetatable(instance, {__index = Disease})
instance.name = name
instance.symbtoms_by_stages = symbtoms_by_stages
2023-09-03 18:30:38 -04:00
instance.contamination_methods = contamination_methods
instance.transmission_zone_stages = transmission_zone_stages
instance.stages_duration = stages_duration
2023-09-03 14:03:21 -04:00
return instance
end
return Disease