refactor: removed unused code

This commit is contained in:
ZioPao
2025-04-13 03:16:06 +02:00
parent d850691053
commit 253c5717a9
5 changed files with 6 additions and 9 deletions

View File

@@ -1,9 +1,7 @@
local ProsthesisHandler = require("TOC/Handlers/ProsthesisHandler") -- declared in common
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")
---@diagnostic disable-next-line: duplicate-set-field

View File

@@ -50,6 +50,10 @@ Compat.handlers = {
['iMedsFixed'] = {
fun = Compat.iMeds,
isActive = false}
-- TODO Check if FirstAidOverhaul can be made compatible
}

View File

@@ -403,9 +403,6 @@ function DataController.ReceiveData(key, data)
handler:setup(key)
elseif data and data.limbs then
-- 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)
elseif username == getPlayer():getUsername() then
TOC_DEBUG.print("Trying to load local data or no data is available")

View File

@@ -24,8 +24,6 @@ function ServerDataHandler.AddTable(key, table)
--TOC_DEBUG.printTable(table)
-- 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
ServerDataHandler.modData[key] = table

View File

@@ -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 prosthesisData {isProstEquipped : boolean, prostFactor : number }
---@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}
---------------------------