refactor: removed unused code
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
local ProsthesisHandler = require("TOC/Handlers/ProsthesisHandler") -- declared in common
|
local ProsthesisHandler = require("TOC/Handlers/ProsthesisHandler") -- declared in common
|
||||||
local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
|
local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
|
||||||
local CommonMethods = require("TOC/CommonMethods")
|
|
||||||
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
|
||||||
|
|
||||||
-- FIX in B42 for some reason unequipping prosthesis doesn't work. Still not sure why
|
|
||||||
|
|
||||||
local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Get("ISClothingExtraAction_isValid")
|
local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Get("ISClothingExtraAction_isValid")
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ Compat.handlers = {
|
|||||||
['iMedsFixed'] = {
|
['iMedsFixed'] = {
|
||||||
fun = Compat.iMeds,
|
fun = Compat.iMeds,
|
||||||
isActive = false}
|
isActive = false}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- TODO Check if FirstAidOverhaul can be made compatible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -403,9 +403,6 @@ function DataController.ReceiveData(key, data)
|
|||||||
handler:setup(key)
|
handler:setup(key)
|
||||||
elseif data and data.limbs then
|
elseif data and data.limbs then
|
||||||
-- Let's validate that the data structure is actually valid to prevent issues
|
-- Let's validate that the data structure is actually valid to prevent issues
|
||||||
if data.isUpdateFromServer then
|
|
||||||
TOC_DEBUG.print("Update from the server")
|
|
||||||
end
|
|
||||||
handler:applyOnlineData(data)
|
handler:applyOnlineData(data)
|
||||||
elseif username == getPlayer():getUsername() then
|
elseif username == getPlayer():getUsername() then
|
||||||
TOC_DEBUG.print("Trying to load local data or no data is available")
|
TOC_DEBUG.print("Trying to load local data or no data is available")
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ function ServerDataHandler.AddTable(key, table)
|
|||||||
--TOC_DEBUG.printTable(table)
|
--TOC_DEBUG.printTable(table)
|
||||||
|
|
||||||
-- Set that the data has been modified and it's updated on the server
|
-- Set that the data has been modified and it's updated on the server
|
||||||
table.isUpdateFromServer = true -- FIX this is useless as of now
|
|
||||||
|
|
||||||
ModData.add(key, table) -- Add it to the server mod data
|
ModData.add(key, table) -- Add it to the server mod data
|
||||||
ServerDataHandler.modData[key] = table
|
ServerDataHandler.modData[key] = table
|
||||||
|
|
||||||
|
|||||||
@@ -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, isUpdateFromServer : boolean, isInitializing : boolean}
|
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean, isInitializing : boolean}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user