[MIRROR] cleans up robot gripper code (#12388)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-02-08 07:14:07 +01:00
committed by GitHub
co-authored by Kashargul Cameron Lennox
parent a450bdfcf0
commit cbb200e0db
20 changed files with 515 additions and 439 deletions
+8 -2
View File
@@ -84,7 +84,7 @@
return ..()
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, var/hit_modifier, var/click_parameters)
/obj/structure/table/attackby(obj/item/W, mob/user, hit_modifier, click_parameters)
if (!W) return
// Handle harm intent grabbing/tabling.
@@ -128,7 +128,13 @@
// Handle dismantling or placing things on the table from here on.
if(isrobot(user))
return
if(istype(W, /obj/item/gripper))
var/obj/item/gripper/robot_gripper = W
var/obj/item/item_to_drop = robot_gripper.get_wrapped_item()
robot_gripper.drop_item_nm(loc)
item_to_drop.do_drop_animation(user)
auto_align(item_to_drop, click_parameters)
return FALSE
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return