From 95e0de22ecb0c1f0e0e17f2b8ebda3351de0353c Mon Sep 17 00:00:00 2001 From: zimon9 <122945887+zimon9@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:54:46 -0400 Subject: [PATCH] Console examine_more viewability change (#3553) ## About The Pull Request This PR makes it so that you can view a console, laptop, a wideband log, the screen on an APC, and the gasses measured from an air alarm, from one tile away. You can not interact with the UI unless you are right next to it. To do this, the examine_more function is used. ## Why It's Good For The Game It makes sense to be able to see screens without having to be right next to them. You will still be unable to interact with them, but you no longer need to be right next to them just to open up the UI. Laptops have also always required holding them in your hands to open up the UI, and this change should address that so that this is no longer necessary. ## Changelog :cl: add: Added ability to see screens using the examine_more function /:cl: --- code/game/machinery/computer/_computer.dm | 3 +++ code/game/machinery/computer/crew.dm | 3 +++ code/game/objects/items/devices/radio/intercom.dm | 3 +++ code/modules/atmospherics/machinery/airalarm.dm | 3 +++ code/modules/modular_computers/computers/item/laptop.dm | 4 +++- .../modular_computers/computers/machinery/modular_computer.dm | 4 ++++ code/modules/power/apc.dm | 3 +++ 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm index 3a36603c50709..0e5507a5b7f38 100644 --- a/code/game/machinery/computer/_computer.dm +++ b/code/game/machinery/computer/_computer.dm @@ -123,3 +123,6 @@ . = ..() if(!user.canUseTopic(src, !issilicon(user)) || !is_operational) return + +/obj/machinery/computer/examine_more(mob/user) + ui_interact(user) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index c1a1171e57cc8..a3ec24abc8acc 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -44,6 +44,9 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) ui = new(user, src, "CrewConsole") ui.open() +/obj/machinery/computer/crew/examine_more(mob/user) + interact(user) //crew monitors use the interact method instead of ui_interact, for some reason. Not very consistent. + /datum/crewmonitor/ui_close(mob/user) ui_sources -= user return ..() diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 944fe7462583b..8782d3d302806 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -177,6 +177,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/item/radio/intercom, 31) set_frequency(FREQ_WIDEBAND) freqlock = TRUE +/obj/item/radio/intercom/wideband/examine_more(mob/user) + interact(user) + /obj/item/radio/intercom/wideband/unscrewed unscrewed = TRUE diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index a95e153c0e140..efa0d7b332c42 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -272,6 +272,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/airalarm, 27) ui = new(user, src, "AirAlarm", name) ui.open() +/obj/machinery/airalarm/examine_more(mob/user) + ui_interact(user) + /obj/machinery/airalarm/ui_data(mob/user) var/data = list( "locked" = locked, diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm index f7a518d3568f4..e0567b9954bdd 100644 --- a/code/modules/modular_computers/computers/item/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop.dm @@ -112,7 +112,9 @@ display_overlays = screen_on update_appearance() - +/obj/item/modular_computer/laptop/examine_more(mob/user) + if(screen_on) + interact(user) // Laptop frame, starts empty and closed. /obj/item/modular_computer/laptop/buildable diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index b7f1a2f5d9121..27b0809760b77 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -85,6 +85,10 @@ else return ..() +/obj/machinery/modular_computer/examine_more(mob/user) + if(cpu?.enabled) + interact(user) + // Process currently calls handle_power(), may be expanded in future if more things are added. /obj/machinery/modular_computer/process() if(cpu) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 4f2d70b680ad2..3df3820b28f49 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -900,6 +900,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc/auto_name, 25) ui = new(user, src, "Apc", name) ui.open() +/obj/machinery/power/apc/examine_more(mob/user) + ui_interact(user) + /obj/machinery/power/apc/ui_data(mob/user) var/list/data = list( "locked" = locked,