mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Fixes medical grippers not being usable in surgery (#26311)
* Fixes medical grippers not being usable in surgery * Adds a new trait for tools that behave like an open hand in surgery. uses that instead of a typecheck.
This commit is contained in:
committed by
GitHub
parent
5c32524456
commit
a0308e048a
@@ -97,7 +97,7 @@
|
||||
for(var/datum/surgery/S in branches_init)
|
||||
first_step = S.get_surgery_step()
|
||||
|
||||
if(!tool && first_step.accept_hand)
|
||||
if((!tool || HAS_TRAIT(tool, TRAIT_SURGICAL_OPEN_HAND)) && first_step.accept_hand)
|
||||
if(SURGERY_TOOL_HAND in starting_tools)
|
||||
CRASH("[src] was provided with multiple branches that allow an empty hand.")
|
||||
next_surgery = S // if there's no tool, just proceed forward.
|
||||
@@ -141,7 +141,7 @@
|
||||
if((SURGERY_TOOL_ANY in starting_tools) && next_surgery_step.accept_any_item)
|
||||
CRASH("[src] has a conflict with the next main step [next_surgery_step] in surgery [surgery]: both accept any item.")
|
||||
|
||||
if(!tool && next_surgery_step.accept_hand && !(SURGERY_TOOL_HAND in starting_tools))
|
||||
if((!tool || HAS_TRAIT(tool, TRAIT_SURGICAL_OPEN_HAND)) && next_surgery_step.accept_hand && !(SURGERY_TOOL_HAND in starting_tools))
|
||||
next_surgery = surgery
|
||||
|
||||
for(var/allowed in next_surgery_step.allowed_tools)
|
||||
|
||||
@@ -217,9 +217,7 @@
|
||||
|
||||
var/success = FALSE
|
||||
if(accept_hand)
|
||||
if(!tool)
|
||||
success = TRUE
|
||||
if(isrobot(user) && istype(tool, /obj/item/gripper/medical))
|
||||
if(!tool || HAS_TRAIT(tool, TRAIT_SURGICAL_OPEN_HAND))
|
||||
success = TRUE
|
||||
|
||||
if(accept_any_item)
|
||||
|
||||
Reference in New Issue
Block a user