Fixes to CutLimbHandler
This commit is contained in:
@@ -11,9 +11,7 @@ function DebugCommands.PrintAllTocData(playerObj, args)
|
||||
TOC_DEBUG.printTable(ServerDataHandler.modData)
|
||||
end
|
||||
|
||||
|
||||
|
||||
---comment
|
||||
---Print ALL TOC data
|
||||
---@param playerObj IsoPlayer
|
||||
---@param args printTocDataParams
|
||||
function DebugCommands.PrintTocData(playerObj, args)
|
||||
|
||||
@@ -14,6 +14,7 @@ end
|
||||
---@param key string
|
||||
---@param table tocModData
|
||||
function ServerDataHandler.AddTable(key, table)
|
||||
TOC_DEBUG.print("Adding table with key: " .. tostring(key))
|
||||
ModData.add(key, table) -- Add it to the server mod data
|
||||
ServerDataHandler.modData[key] = table
|
||||
end
|
||||
|
||||
@@ -6,19 +6,17 @@ local ServerRelayCommands = {}
|
||||
|
||||
-- TODO We can easily make this a lot more simple without having functions
|
||||
|
||||
---comment
|
||||
---@param surgeonPl IsoPlayer
|
||||
---Relay DamageDuringAmputation to another client
|
||||
---@param args relayDamageDuringAmputationParams
|
||||
function ServerRelayCommands.RelayDamageDuringAmputation(surgeonPl, args)
|
||||
function ServerRelayCommands.RelayDamageDuringAmputation(_, args)
|
||||
local patientPl = getPlayerByOnlineID(args.patientNum)
|
||||
local surgeonNum = surgeonPl:getOnlineID()
|
||||
|
||||
---@type receiveDamageDuringAmputationParams
|
||||
local params = {surgeonNum = surgeonNum, limbName = args.limbName}
|
||||
local params = {limbName = args.limbName}
|
||||
sendServerCommand(patientPl, CommandsData.modules.TOC_RELAY, CommandsData.client.Relay.ReceiveDamageDuringAmputation, params)
|
||||
end
|
||||
|
||||
---comment
|
||||
---Relay ExecuteAmputationAction to another client
|
||||
---@param surgeonPl IsoPlayer
|
||||
---@param args relayExecuteAmputationActionParams
|
||||
function ServerRelayCommands.RelayExecuteAmputationAction(surgeonPl, args)
|
||||
@@ -36,6 +34,7 @@ end
|
||||
|
||||
local function OnClientRelayCommand(module, command, playerObj, args)
|
||||
if module == CommandsData.modules.TOC_RELAY and ServerRelayCommands[command] then
|
||||
TOC_DEBUG.print("Received Client Relay command - " .. tostring(command))
|
||||
ServerRelayCommands[command](playerObj, args)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user