mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Redirect surgical tool clicks on surgical tables that have a surgical patient (#94711)
## About The Pull Request if a surgery table has a patient on it, and you click it with a surgical tool, it redirects the click to the patient instead of placing the tool on the table ## Why It's Good For The Game sometimes you misclick on the one pixel of transparency and the tool is lost to the sands of time. this is annoying ## Changelog 🆑 Melbert qol: If a surgery table has a patient on it, and you click it with a surgical tool, it redirects the click to the patient instead of placing the tool on the table /🆑
This commit is contained in:
@@ -1030,6 +1030,14 @@
|
||||
/obj/structure/table/optable/make_climbable()
|
||||
AddElement(/datum/element/elevation, pixel_shift = 12)
|
||||
|
||||
// surgical tools cannot be placed on the op table while a patient is also on it
|
||||
/obj/structure/table/optable/table_place_act(mob/living/user, obj/item/tool, list/modifiers)
|
||||
if(!isnull(patient) && (tool.item_flags & SURGICAL_TOOL))
|
||||
tool.melee_attack_chain(user, patient, modifiers)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
return ..()
|
||||
|
||||
///Align the mob with the table when buckled.
|
||||
/obj/structure/table/optable/post_buckle_mob(mob/living/buckled)
|
||||
buckled.add_offsets(type, z_add = 6)
|
||||
|
||||
Reference in New Issue
Block a user