refactor: removed old code
This commit is contained in:
@@ -57,7 +57,6 @@ function DataController:setup(key)
|
|||||||
---@type tocModDataType
|
---@type tocModDataType
|
||||||
self.tocData = {
|
self.tocData = {
|
||||||
-- Generic stuff that does not belong anywhere else
|
-- Generic stuff that does not belong anywhere else
|
||||||
isInitializing = true,
|
|
||||||
isIgnoredPartInfected = false,
|
isIgnoredPartInfected = false,
|
||||||
isAnyLimbCut = false,
|
isAnyLimbCut = false,
|
||||||
limbs = {},
|
limbs = {},
|
||||||
@@ -93,10 +92,6 @@ function DataController:setup(key)
|
|||||||
-- Sync with the server
|
-- Sync with the server
|
||||||
self:apply()
|
self:apply()
|
||||||
|
|
||||||
-- -- Disable lock
|
|
||||||
-- self.tocData.isInitializing = false
|
|
||||||
-- ModData.add(key, self.tocData)
|
|
||||||
|
|
||||||
triggerEvent("OnSetupTocData")
|
triggerEvent("OnSetupTocData")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -339,14 +334,11 @@ end
|
|||||||
---@param cicatrizationTime integer?
|
---@param cicatrizationTime integer?
|
||||||
function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime)
|
function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime)
|
||||||
local limbData = self.tocData.limbs[limbName]
|
local limbData = self.tocData.limbs[limbName]
|
||||||
if ampStatus.isCut ~= nil then limbData.isCut = ampStatus.isCut end
|
for k, v in pairs(ampStatus) do
|
||||||
if ampStatus.isInfected ~= nil then limbData.isInfected = ampStatus.isInfected end
|
if v ~= nil then
|
||||||
if ampStatus.isOperated ~= nil then limbData.isOperated = ampStatus.isOperated end
|
limbData[k] = v
|
||||||
if ampStatus.isCicatrized ~= nil then limbData.isCicatrized = ampStatus.isCicatrized end
|
end
|
||||||
if ampStatus.isCauterized ~= nil then limbData.isCauterized = ampStatus.isCauterized end
|
end
|
||||||
if ampStatus.woundDirtyness ~= nil then limbData.woundDirtyness = ampStatus.woundDirtyness end
|
|
||||||
if ampStatus.isVisible ~= nil then limbData.isVisible = ampStatus.isVisible end
|
|
||||||
|
|
||||||
if cicatrizationTime ~= nil then limbData.cicatrizationTime = cicatrizationTime end
|
if cicatrizationTime ~= nil then limbData.cicatrizationTime = cicatrizationTime end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -485,4 +477,4 @@ function DataController.DestroyInstance(username)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return DataController
|
return DataController
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
---@alias limbsTable {Hand_L : partDataType, ForeArm_L : partDataType, UpperArm_L : partDataType, Hand_R : partDataType, ForeArm_R : partDataType, UpperArm_R : partDataType }
|
---@alias limbsTable {Hand_L : partDataType, ForeArm_L : partDataType, UpperArm_L : partDataType, Hand_R : partDataType, ForeArm_R : partDataType, UpperArm_R : partDataType }
|
||||||
---@alias prosthesisData {isProstEquipped : boolean, prostFactor : number }
|
---@alias prosthesisData {isProstEquipped : boolean, prostFactor : number }
|
||||||
---@alias prosthesesTable {Top_L : prosthesisData, Top_R : prosthesisData } -- TODO add Bottom_L and Bottom_R
|
---@alias prosthesesTable {Top_L : prosthesisData, Top_R : prosthesisData } -- TODO add Bottom_L and Bottom_R
|
||||||
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean, isInitializing : boolean}
|
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user