From 79d4142a98fa85fa5015598481f3224ae2312ca7 Mon Sep 17 00:00:00 2001 From: Gristlebee <56049844+Gristlebee@users.noreply.github.com> Date: Mon, 27 May 2024 16:38:38 -0700 Subject: [PATCH] Holopad Caller History (#3005) ## About The Pull Request Holopads now show the location of the last holopad that called them on examine. ## Why It's Good For The Game While having to shamefully ask over wideband to have someone call again after you missed their call is funny, knowing where to callback if you miss someone should help streamline ship to ship communication and improve quality of life. ## Changelog :cl: add: Holopads now display the location of the last holopad that called them on examine. code: Span macros for hologram.dm /:cl: --------- Signed-off-by: Gristlebee <56049844+Gristlebee@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> --- code/game/machinery/hologram.dm | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 9b2591bd59cd..60ded054842a 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -78,6 +78,8 @@ Possible to do for anyone motivated enough: var/secure = FALSE /// If we are currently calling another holopad var/calling = FALSE + /// The last holopad that called this one. + var/caller_history /obj/machinery/holopad/Initialize() . = ..() @@ -178,7 +180,9 @@ Possible to do for anyone motivated enough: /obj/machinery/holopad/examine(mob/user) . = ..() if(in_range(user, src) || isobserver(user)) - . += "The status display reads: Current projection range: [holo_range] units." + . += span_notice("The status display reads: Current projection range: [holo_range] units.") + if(caller_history) + . += span_notice("The caller history displays the last recieved call to be from: [caller_history].") /obj/machinery/holopad/attackby(obj/item/P, mob/user, params) if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P)) @@ -195,11 +199,11 @@ Possible to do for anyone motivated enough: if(istype(P,/obj/item/disk/holodisk)) if(disk) - to_chat(user,"There's already a disk inside [src]!") + to_chat(user,span_warning("There's already a disk inside [src]!")) return if (!user.transferItemToLoc(P,src)) return - to_chat(user,"You insert [P] into [src].") + to_chat(user,span_notice("You insert [P] into [src].")) disk = P return @@ -249,15 +253,15 @@ Possible to do for anyone motivated enough: if("AIrequest") if(last_request + 200 < world.time) last_request = world.time - to_chat(usr, "You requested an AI's presence.") + to_chat(usr, span_info("You requested an AI's presence.")) var/area/area = get_area(src) for(var/mob/living/silicon/ai/AI in GLOB.silicon_mobs) if(!AI.client) continue - to_chat(AI, "Your presence is requested at \the [area].") + to_chat(AI, span_info("Your presence is requested at \the [area].")) return TRUE else - to_chat(usr, "A request for AI presence was already sent recently.") + to_chat(usr, span_info("A request for AI presence was already sent recently.")) return if("holocall") if(outgoing_call) @@ -280,7 +284,7 @@ Possible to do for anyone motivated enough: calling = TRUE return TRUE else - to_chat(usr, "You must stand on the holopad to make a call!") + to_chat(usr, span_warning("You must stand on the holopad to make a call!")) if("connectcall") var/datum/holocall/call_to_connect = locate(params["holopad"]) in holo_calls if(!QDELETED(call_to_connect)) @@ -374,6 +378,7 @@ Possible to do for anyone motivated enough: for(var/I in holo_calls) var/datum/holocall/HC = I if(HC.connected_holopad != src) + caller_history = get_area_name(HC.calling_holopad) if(force_answer_call && world.time > (HC.call_start_time + (HOLOPAD_MAX_DIAL_TIME / 2))) HC.Answer(src) break @@ -392,7 +397,7 @@ Possible to do for anyone motivated enough: if(is_operational && (!AI || AI.eyeobj.loc == loc))//If the projector has power and client eye is on it if (AI && istype(AI.current, /obj/machinery/holopad)) - to_chat(user, "ERROR: \black Image feed in progress.") + to_chat(user, span_danger("ERROR: \black Image feed in progress.")) return var/obj/effect/overlay/holo_pad_hologram/Hologram = new(loc)//Spawn a blank effect at the location. @@ -415,11 +420,11 @@ Possible to do for anyone motivated enough: move_hologram(user, loc) set_holo(user, Hologram) - visible_message("A holographic image of [user] flickers to life before your eyes!") + visible_message(span_notice("A holographic image of [user] flickers to life before your eyes!")) return Hologram else - to_chat(user, "ERROR: Unable to project hologram.") + to_chat(user, span_danger("ERROR:Unable to project hologram.")) /*This is the proc for special two-way communication between AI and holopad/people talking near holopad. For the other part of the code, check silicon say.dm. Particularly robot talk.*/ @@ -583,7 +588,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ Hologram.set_anchored(TRUE)//So space wind cannot drag it. Hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click. Hologram.set_light(2) //hologram lighting - visible_message("A holographic image of [record.caller_name] flickers to life before your eyes!") + visible_message(span_notice("A holographic image of [record.caller_name] flickers to life before your eyes!")) return Hologram /obj/machinery/holopad/proc/replay_start()