From 2d8f85d810dc77928ceb25442c0389cc351b4de9 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 7 Feb 2020 02:59:59 +0100 Subject: [PATCH 1/4] A few nuisances solved. --- code/modules/mob/dead/observer/observer.dm | 3 ++- modular_citadel/code/modules/mob/cit_emotes.dm | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 3559edc0fb..00d6d3cc70 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -310,8 +310,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/obj/machinery/cryopod/C = loc C.despawn_occupant() else - ghostize(0, penalize = TRUE, voluntary = TRUE) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 suicide_log(TRUE) + ghostize(FALSE, penalize = TRUE, voluntary = TRUE) //FALSE parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 + /mob/camera/verb/ghost() set category = "OOC" diff --git a/modular_citadel/code/modules/mob/cit_emotes.dm b/modular_citadel/code/modules/mob/cit_emotes.dm index d0ad0d3232..62570e7bf3 100644 --- a/modular_citadel/code/modules/mob/cit_emotes.dm +++ b/modular_citadel/code/modules/mob/cit_emotes.dm @@ -15,12 +15,10 @@ /datum/emote/living/insult/run_emote(mob/living/user, params) var/insult_message = "" - var/miming = user.mind ? user.mind.miming : 0 - if(!user.is_muzzled()) - insult_message += pick_list_replacements(INSULTS_FILE, "insult_gen") - message = insult_message - else if(miming) + if(user.mind?.miming) message = "creatively gesticulates." + else if(!user.is_muzzled()) + message = pick_list_replacements(INSULTS_FILE, "insult_gen") else message = "muffles something." . = ..() @@ -36,7 +34,7 @@ sound = 'modular_citadel/sound/voice/scream_silicon.ogg' if(iscyborg(user)) var/mob/living/silicon/robot/S = user - if(S.cell.charge < 20) + if(S.cell?.charge < 20) to_chat(S, "Scream module deactivated. Please recharge.") return S.cell.use(200) From 86c472eaf60f6d7283bf4edc74f356f7b81d8d98 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 7 Feb 2020 03:17:00 +0100 Subject: [PATCH 2/4] the holopad fix. --- code/datums/holocall.dm | 12 ++++++------ code/game/machinery/computer/camera_advanced.dm | 9 ++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index 72fe6f5a1c..e0b0072808 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -12,7 +12,12 @@ /mob/camera/aiEye/remote/holo/setLoc() . = ..() var/obj/machinery/holopad/H = origin - H.move_hologram(eye_user, loc) + H?.move_hologram(eye_user, loc) + +/obj/machinery/holopad/remove_eye_control(mob/living/user) + if(user.client) + user.reset_perspective(null) + user.remote_control = null //this datum manages it's own references @@ -54,11 +59,6 @@ /datum/holocall/Destroy() QDEL_NULL(hangup) - var/user_good = !QDELETED(user) - if(user_good) - user.reset_perspective() - user.remote_control = null - if(!QDELETED(eye)) QDEL_NULL(eye) diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 8de470fdb8..e5ac9a0f78 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -47,7 +47,10 @@ jump_action.Grant(user) actions += jump_action -/obj/machinery/computer/camera_advanced/proc/remove_eye_control(mob/living/user) +/obj/machinery/proc/remove_eye_control(mob/living/user) + CRASH("[type] does not implement ai eye handling") + +/obj/machinery/computer/camera_advanced/remove_eye_control(mob/living/user) if(!user) return for(var/V in actions) @@ -157,7 +160,7 @@ var/cooldown = 0 var/acceleration = 1 var/mob/living/eye_user = null - var/obj/machinery/computer/camera_advanced/origin + var/obj/machinery/origin var/eye_initialized = 0 var/visible_icon = 0 var/image/user_image = null @@ -170,7 +173,7 @@ /mob/camera/aiEye/remote/Destroy() if(origin && eye_user) - origin.remove_eye_control(eye_user) + origin.remove_eye_control(eye_user,src) origin = null . = ..() eye_user = null From f38e69467326e99bc654d4a41291c1d007e1c004 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Fri, 7 Feb 2020 03:42:08 +0100 Subject: [PATCH 3/4] Does it work? Yes. Does it compile? No. --- modular_citadel/code/modules/mob/cit_emotes.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/modular_citadel/code/modules/mob/cit_emotes.dm b/modular_citadel/code/modules/mob/cit_emotes.dm index 62570e7bf3..2be83733e5 100644 --- a/modular_citadel/code/modules/mob/cit_emotes.dm +++ b/modular_citadel/code/modules/mob/cit_emotes.dm @@ -14,7 +14,6 @@ emote_type = EMOTE_AUDIBLE /datum/emote/living/insult/run_emote(mob/living/user, params) - var/insult_message = "" if(user.mind?.miming) message = "creatively gesticulates." else if(!user.is_muzzled()) From 83a08ee9f54d2cf7d0e15df08f19dab5d7b76def Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 7 Feb 2020 05:21:08 +0100 Subject: [PATCH 4/4] Extras and tg#45018 --- code/modules/food_and_drinks/food/snacks.dm | 7 ++++--- code/modules/projectiles/guns/energy/dueling.dm | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index c068c1aa40..aa76a81c7e 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -71,10 +71,11 @@ All foods are distributed among various categories. Use common sense. if(!eater) return if(!reagents.total_volume) - var/obj/item/trash_item = generate_trash(eater) + var/mob/living/location = loc + var/obj/item/trash_item = generate_trash(location) qdel(src) - eater.put_in_hands(trash_item) - + if(istype(location)) + location.put_in_hands(trash_item) /obj/item/reagent_containers/food/snacks/attack_self(mob/user) return diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 6fe10eb3b6..615bb5d939 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -320,10 +320,10 @@ if(C.setting == counter_setting) return BULLET_ACT_BLOCK - var/mob/living/L = target - if(!istype(target)) + if(!isliving(target)) return BULLET_ACT_BLOCK + var/mob/living/L = target switch(hugbox) if(DUEL_HUGBOX_NONE) var/obj/item/bodypart/B = L.get_bodypart(BODY_ZONE_HEAD)