Skip to content

Commit

Permalink
Adds player interaction logs to pump_ui (goonstation#17416)
Browse files Browse the repository at this point in the history
  • Loading branch information
vortex1942 authored Dec 24, 2023
1 parent 115c6cb commit c9de82a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/modules/atmospherics/machinery/binary/pump_ui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@
var/value_to_set = input(usr, "[value_name] ([min_value] - [max_value] [value_units]):", "Enter new value", get_value()) as num
if(isnum_safe(value_to_set))
src.set_value(clamp(value_to_set, min_value, max_value))
logTheThing(LOG_STATION, usr, "has set [src.get_atom()] value to [src.get_value()] at [log_loc(src.get_atom())]")

if("toggle_power")
src.toggle_power()
logTheThing(LOG_STATION, usr, "has set [src.get_atom()] power to [src.is_on() ? "On" : "Off"] at [log_loc(src.get_atom())]")

if("bump_value")
src.set_value(clamp(get_value() + text2num_safe(href_list["bump_value"]), min_value, max_value))
logTheThing(LOG_STATION, usr, "has set [src.get_atom()] value to [src.get_value()] at [log_loc(src.get_atom())]")

src.show_ui(usr)
/// Displays the UI
Expand Down

0 comments on commit c9de82a

Please sign in to comment.