Skip to content

Commit

Permalink
Console examine_more viewability change (#3553)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## 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:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
zimon9 authored Oct 26, 2024
1 parent df35e26 commit 6ec4a20
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/game/machinery/computer/_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,6 @@
. = ..()
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational)
return

/obj/machinery/computer/examine_more(mob/user)
ui_interact(user)
3 changes: 3 additions & 0 deletions code/game/machinery/computer/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..()
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/devices/radio/intercom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions code/modules/atmospherics/machinery/airalarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion code/modules/modular_computers/computers/item/laptop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/power/apc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6ec4a20

Please sign in to comment.