From e884985fe3f6610d01ca9a5e7ec2e43d0bfd2a2e Mon Sep 17 00:00:00 2001 From: guiriguy <67844553+guiriguy@users.noreply.github.com> Date: Thu, 18 Dec 2025 22:50:28 +0100 Subject: [PATCH] Refactor player courage and temperature checks --- 42/media/lua/client/TOC/UI/SurgeryInteractions.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/42/media/lua/client/TOC/UI/SurgeryInteractions.lua b/42/media/lua/client/TOC/UI/SurgeryInteractions.lua index 5367293..2efafe8 100644 --- a/42/media/lua/client/TOC/UI/SurgeryInteractions.lua +++ b/42/media/lua/client/TOC/UI/SurgeryInteractions.lua @@ -68,9 +68,10 @@ local function AddStoveContextMenu(playerNum, context, worldObjects, test) -- Notifications, in case the player can't do the action - local isPlayerCourageous = pl:hasTrait("Brave") or pl:hasTrait("Desensitized") or pl:getPerkLevel(Perks.Strength) > 5 - local isTempHighEnough = stoveObj:getCurrentTemperature() >= 250 + local isPlayerCourageous = pl:hasTrait(CharacterTrait.BRAVE) or pl:hasTrait(CharacterTrait.DESENSITIZED) or pl:getPerkLevel(Perks.Strength) > 5 + local isTempHighEnough = stoveObj:getCurrentTemperature()-1 >= 2.50 local isLimbFree = not dcInst:getIsProstEquipped(limbName) + TOC_DEBUG.print(stoveObj:getCurrentTemperature()) option.notAvailable = not(isPlayerCourageous and isTempHighEnough and isLimbFree) if not isTempHighEnough then