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

[MIRROR] Adds investigative logging for vent overclocking #846

Merged
merged 1 commit into from
Nov 27, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
if("overclock")
if(isnull(vent))
return TRUE
vent.toggle_overclock()
vent.toggle_overclock(source = key_name(user))
vent.update_appearance(UPDATE_ICON)
return TRUE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
else // pump_direction == SIPHONING
icon_state = "vent_in"

/obj/machinery/atmospherics/components/unary/vent_pump/proc/toggle_overclock(from_break = FALSE)
/obj/machinery/atmospherics/components/unary/vent_pump/proc/toggle_overclock(source, from_break = FALSE)
fan_overclocked = !fan_overclocked

if(from_break)
Expand All @@ -234,6 +234,8 @@
else
sound_loop.stop()

investigate_log("had its overlock setting [fan_overclocked ? "enabled" : "disabled"] by [source]", INVESTIGATE_ATMOS)

update_appearance()

/obj/machinery/atmospherics/components/unary/vent_pump/process_atmos()
Expand All @@ -247,13 +249,10 @@
if(!istype(us))
return

var/current_integrity = get_integrity()
if(fan_overclocked)
take_damage(fan_damage_rate, sound_effect=FALSE)
if(current_integrity == 0)
on = FALSE
set_is_operational(FALSE)
toggle_overclock(from_break = TRUE)
if(get_integrity() == 0)
investigate_log("was destroyed as a result of overclocking", INVESTIGATE_ATMOS)
return

var/percent_integrity = get_integrity_percentage()
Expand Down
Loading