Skip to content

Commit 708d38f

Browse files
authored
Show "x looks at y" when using computers and such (#861)
1 parent 0e486d0 commit 708d38f

28 files changed

Lines changed: 34 additions & 0 deletions

File tree

code/game/machinery/_machinery.dm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@
152152
/// What was our power state the last time we updated its appearance?
153153
/// TRUE for on, FALSE for off, -1 for never checked
154154
var/appearance_power_state = -1
155+
/// If true, show "x looks at the machine" when opening the UI
156+
var/examine_feedback_on_ui = FALSE
157+
155158
armor_type = /datum/armor/obj_machinery
156159

157160
/datum/armor/obj_machinery
@@ -711,7 +714,11 @@
711714
if(interaction_flags_machine & INTERACT_MACHINE_SET_MACHINE)
712715
user.set_machine(src)
713716
update_last_used(user)
717+
var/had_ui = examine_feedback_on_ui && !issilicon(user) && SStgui.get_open_ui(user, src)
714718
. = ..()
719+
var/has_ui = examine_feedback_on_ui && !issilicon(user) && SStgui.get_open_ui(user, src)
720+
if(!had_ui && has_ui)
721+
user.examine_feedback(src)
715722

716723
/obj/machinery/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
717724
add_fingerprint(usr)

code/game/machinery/autolathe.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
layer = BELOW_OBJ_LAYER
1111
processing_flags = NONE
1212
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS
13+
examine_feedback_on_ui = TRUE
1314

1415
///Is the autolathe hacked via wiring
1516
var/hacked = FALSE

code/game/machinery/computer/_computer.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
integrity_failure = 0.5
88
armor_type = /datum/armor/machinery_computer
99
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON|INTERACT_MACHINE_REQUIRES_LITERACY
10+
examine_feedback_on_ui = TRUE
1011
/// How bright we are when turned on.
1112
var/brightness_on = 1
1213
/// Icon_state of the keyboard overlay.

code/game/machinery/dance_machine.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
density = TRUE
99
req_access = list(ACCESS_BAR)
1010
processing_flags = START_PROCESSING_MANUALLY
11+
examine_feedback_on_ui = TRUE
1112
/// Cooldown between "Error" sound effects being played
1213
COOLDOWN_DECLARE(jukebox_error_cd)
1314
/// Cooldown between being allowed to play another song

code/game/machinery/newscaster/newscaster_machine.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
max_integrity = 200
1414
integrity_failure = 0.25
1515
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON|INTERACT_MACHINE_REQUIRES_LITERACY
16+
examine_feedback_on_ui = TRUE
1617
///Reference to the currently logged in user.
1718
var/datum/bank_account/current_user
1819
///Name of the logged in user.

code/game/machinery/porta_turret/portable_turret.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@ DEFINE_BITFIELD(turret_flags, list(
918918
req_access = list(ACCESS_AI_UPLOAD)
919919
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
920920
interaction_flags_click = ALLOW_SILICON_REACH
921+
examine_feedback_on_ui = TRUE
921922
/// Variable dictating if linked turrets are active and will shoot targets
922923
var/enabled = TRUE
923924
/// Variable dictating if linked turrets will shoot lethal projectiles

code/game/machinery/roulette_machine.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
anchored = FALSE
2828
max_integrity = 500
2929
armor_type = /datum/armor/machinery_roulette
30+
examine_feedback_on_ui = TRUE
3031
var/static/list/numbers = list("0" = "green", "1" = "red", "3" = "red", "5" = "red", "7" = "red", "9" = "red", "12" = "red", "14" = "red", "16" = "red",\
3132
"18" = "red", "19" = "red", "21" = "red", "23" = "red", "25" = "red", "27" = "red", "30" = "red", "32" = "red", "34" = "red", "36" = "red",\
3233
"2" = "black", "4" = "black", "6" = "black", "8" = "black", "10" = "black", "11" = "black", "13" = "black", "15" = "black", "17" = "black", "20" = "black",\

code/game/machinery/sleepers.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
state_open = TRUE
1010
interaction_flags_mouse_drop = NEED_DEXTERITY
1111
circuit = /obj/item/circuitboard/machine/sleeper
12+
examine_feedback_on_ui = TRUE
1213

1314
payment_department = ACCOUNT_MED
1415
fair_market_price = 5

code/modules/atmospherics/machinery/air_alarm/_air_alarm.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
integrity_failure = 0.33
1414
armor_type = /datum/armor/machinery_airalarm
1515
resistance_flags = FIRE_PROOF
16+
examine_feedback_on_ui = TRUE
1617

1718
/// Current alert level of our air alarm.
1819
/// [AIR_ALARM_ALERT_NONE], [AIR_ALARM_ALERT_MINOR], [AIR_ALARM_ALERT_SEVERE]

code/modules/food_and_drinks/machinery/coffeemaker.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
resistance_flags = FIRE_PROOF | ACID_PROOF
1010
circuit = /obj/item/circuitboard/machine/coffeemaker
1111
anchored_tabletop_offset = 4
12+
examine_feedback_on_ui = TRUE
1213
var/obj/item/reagent_containers/cup/coffeepot/coffeepot = null
1314
var/brewing = FALSE
1415
var/brew_time = 20 SECONDS

0 commit comments

Comments
 (0)