more tests for MP compat

This commit is contained in:
Pao
2023-01-12 15:47:52 +01:00
parent bf01a5dc0d
commit c049defe9d
3 changed files with 9 additions and 5 deletions

View File

@@ -12,10 +12,10 @@ local function OnTocServerCommand(module, command, args)
local toc_data = patient:getModData().TOC local toc_data = patient:getModData().TOC
-- todo maybe we cant send a table like this. Let's try something easier
--local moneyAmount = playerTwo:getInventory():getCountTypeRecurse("Money") --local moneyAmount = playerTwo:getInventory():getCountTypeRecurse("Money")
patient:Say("Giving info") print("Giving info")
sendClientCommand(patient, "TOC", "SendPlayerData", {surgeon_id, toc_data}) sendClientCommand(patient, "TOC", "SendPlayerData", {surgeon_id, 69})
elseif command == 'SendTocData' then elseif command == 'SendTocData' then
print("Sending TOC data") print("Sending TOC data")

View File

@@ -632,10 +632,11 @@ function ISNewHealthPanel.onClick_TOC(button)
-- button.character is patient -- button.character is patient
-- button.otherPlayer is surgeon -- button.otherPlayer is surgeon
sendClientCommand(button.character, "TOC", "GetPlayerData", {button.otherPlayer:getOnlineID(), button.character:getOnlineID()}) -- sends 0 & 4 as arguments sendClientCommand(button.otherPlayer, "TOC", "GetPlayerData", {button.otherPlayer:getOnlineID(), button.character:getOnlineID()}) -- sends 0 & 4 as arguments
if MP_other_player_toc_data then if MP_other_player_toc_data then
print("It works") print("It works")
print(MP_other_player_toc_data)
else else
print("Nopepppp") print("Nopepppp")
end end

View File

@@ -1,4 +1,7 @@
--- A rly big thx to Fenris_Wolf and Chuck to help me with that. Love you guy --- A rly big thx to Fenris_Wolf and Chuck to help me with that. Love you guy
if isClient() then return end
---Server side ---Server side
local Commands = {} local Commands = {}