From f5e7961f6b733900a962a0fabfe26d4179333495 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Thu, 7 Mar 2019 09:17:32 +1000 Subject: [PATCH] Allows putting bodies into resleeving pod via drag-and-drop --- code/modules/resleeving/machines.dm | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index 7a021c4a5a..7783cc9d7b 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -488,6 +488,37 @@ return ..() +/obj/machinery/transhuman/resleever/MouseDrop_T(mob/living/carbon/O, mob/user as mob) + if(!istype(O)) + return 0 //not a mob + if(user.incapacitated()) + return 0 //user shouldn't be doing things + if(O.anchored) + return 0 //mob is anchored??? + if(get_dist(user, src) > 1 || get_dist(user, O) > 1) + return 0 //doesn't use adjacent() to allow for non-cardinal (fuck my life) + if(!ishuman(user) && !isrobot(user)) + return 0 //not a borg or human + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return 0 //panel open + + if(O.buckled) + return 0 + if(O.has_buckled_mobs()) + to_chat(user, span("warning", "\The [O] has other entities attached to it. Remove them first.")) + return + + if(put_mob(O)) + if(O == user) + src.updateUsrDialog() + visible_message("[user] climbs into \the [src].") + else + src.updateUsrDialog() + visible_message("[user] puts [O] into \the [src].") + + add_fingerprint(user) + /obj/machinery/transhuman/resleever/proc/putmind(var/datum/transhuman/mind_record/MR, mode = 1, var/mob/living/carbon/human/override = null) if((!occupant || !istype(occupant) || occupant.stat >= DEAD) && mode == 1) return 0