diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index d5a1580ded9..bbf238fd037 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -395,9 +395,22 @@ proc/get_radio_key_from_channel(var/channel) return var/atom/whisper_loc = get_whisper_loc() - var/list/listening = hearers(message_range, whisper_loc) + var/list/listening = hear(message_range, whisper_loc) listening |= src + var/list/hearturfs = list() + + //Pass whispers on to anything inside the immediate listeners. + // This comes before the ghosts do so that ghosts don't act as whisper relays + for(var/atom/L in listening) + if(ismob(L)) + for(var/mob/C in L.contents) + if(isliving(C)) + listening += C + hearturfs += get_turf(L) + if(isobj(L)) + hearturfs += get_turf(L) + //ghosts for(var/mob/M in dead_mob_list) //does this include players who joined as observers as well? if(!M.client) @@ -405,11 +418,14 @@ proc/get_radio_key_from_channel(var/channel) if(M.stat == DEAD && M.client && M.get_preference(CHAT_GHOSTEARS)) listening |= M - //Pass whispers on to anything inside the immediate listeners. - for(var/mob/L in listening) - for(var/mob/C in L.contents) - if(isliving(C)) - listening += C + // This, in tandem with "hearturfs", lets nested mobs hear whispers that are in range + // Grifted from saycode above. + for(var/mob/M in player_list) + if(!M.client || isnewplayer(M)) + continue //skip monkeys and leavers + if(get_turf(M) in hearturfs) + listening |= M + //pass on the message to objects that can hear us. for(var/obj/O in view(message_range, whisper_loc)) diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index 92055b813ab..41d4c67427d 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -24,6 +24,5 @@ //Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak if(mind) qdel(mind) living_mob_list -= src - ghostize() if(icon_state != "[chassis]_dead" || cleanWipe) qdel(src) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index d0aeb8b9fa7..77a66e4eba0 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -114,6 +114,11 @@ C.toff = 1 ..() +/mob/living/silicon/pai/update_icons() + if(stat == DEAD) + icon_state = "[chassis]_dead" + else + icon_state = resting ? "[chassis]_rest" : "[chassis]" // this function shows the information about being silenced as a pAI in the Status panel /mob/living/silicon/pai/proc/show_silenced() @@ -420,17 +425,17 @@ set category = "IC" // Pass lying down or getting up to our pet human, if we're in a rig. - if(istype(src.loc,/obj/item/device/paicard)) + if(stat == CONSCIOUS && istype(src.loc,/obj/item/device/paicard)) resting = 0 var/obj/item/weapon/rig/rig = src.get_rig() if(istype(rig)) rig.force_rest(src) else resting = !resting - icon_state = resting ? "[chassis]_rest" : "[chassis]" to_chat(src, "You are now [resting ? "resting" : "getting up"]") - canmove = !resting + update_icons() + update_canmove() //Overriding this will stop a number of headaches down the track. /mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob, params) diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 5bb3cf3b645..ff0bcacd903 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -28,6 +28,9 @@ var/datum/paiController/paiController // Global handler for pAI candidates if("signup" in href_list) var/mob/dead/observer/O = locate(href_list["signup"]) if(!O) return + if(!(O in respawnable_list)) + to_chat(O, "You've given up your ability to respawn!") + return if(!check_recruit(O)) return recruitWindow(O) return @@ -361,6 +364,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates return 0 if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) return 0 + if(!(O in respawnable_list)) + return 0 if(O.client) return 1 return 0 diff --git a/code/modules/mob/living/silicon/pai/say.dm b/code/modules/mob/living/silicon/pai/say.dm index 1acb470773a..722e3b632ea 100644 --- a/code/modules/mob/living/silicon/pai/say.dm +++ b/code/modules/mob/living/silicon/pai/say.dm @@ -6,8 +6,11 @@ /mob/living/silicon/pai/get_whisper_loc() if(loc == card) // currently in its card? - if(istype(card.loc, /mob/living)) - return card.loc // allow a pai being held or in pocket to whisper + var/atom/movable/whisper_loc = card + if(istype(card.loc, /obj/item/device/pda)) // Step up 1 level if in a PDA + whisper_loc = card.loc + if(istype(whisper_loc.loc, /mob/living)) + return whisper_loc.loc // allow a pai being held or in pocket to whisper else - return card // allow a pai in its card to whisper - return ..() \ No newline at end of file + return whisper_loc // allow a pai in its card to whisper + return ..() diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm index cb00e6a12b3..3f9155ed162 100644 --- a/code/modules/nano/interaction/default.dm +++ b/code/modules/nano/interaction/default.dm @@ -15,7 +15,7 @@ return STATUS_UPDATE // Ghosts can view updates /mob/living/silicon/pai/default_can_use_topic(var/src_object) - if(src_object == src && !stat) + if((src_object == src || src_object == radio) && stat == CONSCIOUS) return STATUS_INTERACTIVE else return ..()