Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applies some bugfixes to examine_more interaction with modular computers and adds examine_more interaction to tablets #3995

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion code/game/machinery/computer/_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,6 @@
return

/obj/machinery/computer/examine_more(mob/user)
. = ..()
ui_interact(user)
return ..()
return
4 changes: 2 additions & 2 deletions code/game/machinery/computer/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
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.
return ..()
. = ..()
interact(user)

/datum/crewmonitor/ui_close(mob/user)
ui_sources -= user
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/devices/radio/intercom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/item/radio/intercom, 31)
else
. += "<span class='notice'>It's <i>unscrewed</i> from the wall, and can be <b>detached</b>.</span>"

/obj/item/radio/intercom/wideband/examine_more(mob/user)
. = ..()
interact(user)

/obj/item/radio/intercom/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(unscrewed)
Expand Down Expand Up @@ -177,10 +181,6 @@ 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)
return ..()

/obj/item/radio/intercom/wideband/unscrewed
unscrewed = TRUE

Expand Down
10 changes: 6 additions & 4 deletions code/modules/atmospherics/machinery/airalarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/airalarm, 27)
if(2)
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] the interface.</span>"

/obj/machinery/airalarm/examine_more(mob/user)
. = ..()
if(buildstage == 2)
ui_interact(user)


/obj/machinery/airalarm/ui_status(mob/user)
if(user.has_unlimited_silicon_privilege && aidisabled)
to_chat(user, "AI control has been disabled.")
Expand All @@ -278,10 +284,6 @@ 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)
return ..()

/obj/machinery/airalarm/ui_data(mob/user)
var/data = list(
"locked" = locked,
Expand Down
10 changes: 5 additions & 5 deletions code/modules/modular_computers/computers/item/laptop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
if(screen_on)
. += "<span class='notice'>Alt-click to close it.</span>"

/obj/item/modular_computer/laptop/examine_more(mob/user)
. = ..()
if(screen_on && enabled)
interact(user)

/obj/item/modular_computer/laptop/Initialize()
. = ..()

Expand Down Expand Up @@ -112,11 +117,6 @@
display_overlays = screen_on
update_appearance()

/obj/item/modular_computer/laptop/examine_more(mob/user)
if(screen_on)
interact(user)
return ..()

// Laptop frame, starts empty and closed.
/obj/item/modular_computer/laptop/buildable
start_open = FALSE
5 changes: 5 additions & 0 deletions code/modules/modular_computers/computers/item/tablet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
icon_state = icon_state_powered = icon_state_unpowered = "[base_icon_state]-[finish_color]"
return ..()

/obj/item/modular_computer/tablet/examine_more(mob/user)
. = ..()
if(screen_on && enabled)
interact(user)

/obj/item/modular_computer/tablet/syndicate_contract_uplink
name = "contractor tablet"
icon = 'icons/obj/contractor_tablet.dmi'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
. = ..()
. += get_modular_computer_parts_examine(user)

/obj/machinery/modular_computer/examine_more(mob/user)
. = ..()
if(cpu.enabled)
interact(user)

/obj/machinery/modular_computer/attack_ghost(mob/dead/observer/user)
. = ..()
if(.)
Expand Down Expand Up @@ -85,10 +90,6 @@
else
return ..()

/obj/machinery/modular_computer/examine_more(mob/user)
interact(user)
return ..()

// Process currently calls handle_power(), may be expanded in future if more things are added.
/obj/machinery/modular_computer/process()
if(cpu)
Expand Down
8 changes: 4 additions & 4 deletions code/modules/power/apc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc/auto_name, 25)
if(issilicon(user))
. += "<span class='notice'>Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].</span>"

/obj/machinery/power/apc/examine_more(mob/user)
. = ..()
ui_interact(user)

// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/update_appearance(updates=check_updates())
Expand Down Expand Up @@ -900,10 +904,6 @@ 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)
return ..()

/obj/machinery/power/apc/ui_data(mob/user)
var/list/data = list(
"locked" = locked,
Expand Down
Loading