From 5ebd797afeb94af03308f1cd3ee01ee94531c14c Mon Sep 17 00:00:00 2001 From: Pao Date: Thu, 12 Jan 2023 22:13:13 +0100 Subject: [PATCH] Moved a lot more stuff --- media/lua/client/TOC_ContextMenus.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/media/lua/client/TOC_ContextMenus.lua b/media/lua/client/TOC_ContextMenus.lua index 03bd695..d6e4758 100644 --- a/media/lua/client/TOC_ContextMenus.lua +++ b/media/lua/client/TOC_ContextMenus.lua @@ -33,6 +33,28 @@ local function OperateLocal(_, patient, surgeon, partName, useOven) end +function TheOnlyCure.TryActionOnOtherPlayerLocal(_, part_name, action, surgeon, patient) + + local ui = GetConfirmUIMP() + if not ui then + MakeConfirmUIMP() + ui = GetConfirmUIMP() + end + + if action == "Cut" then + AskCanCutLimb(patient, part_name) + AskCanCutArm(patient, part_name); + elseif action == "Operate" then + AskCanOperateLimb(patient, part_name) + AskCanOperateArm(patient, part_name); + end + ui.actionAct = action; + ui.partNameAct = part_name; + ui.patient = patient; + SetConfirmUIMP("Wait server") +end + + local function otherPlayerLocal(_, partName, action, surgeon, patient)