Skip to content

Commit

Permalink
Ports an EMP Effect on the Crew Monitor (#2603) (#3431)
Browse files Browse the repository at this point in the history
* push

* no more beeping : (

* Apply suggestions from code review



* Update _under.dm

* Update _under.dm

* Update code/modules/clothing/under/_under.dm

rogue space

---------

Co-authored-by: Zergspower <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored May 22, 2024
1 parent b9b95a8 commit f72a93e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion code/game/machinery/computer/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
continue

// Check if their uniform is in a compatible mode.
if((uniform.has_sensor <= NO_SENSORS) || !uniform.sensor_mode)
if((uniform.has_sensor == NO_SENSORS) || !uniform.sensor_mode) // NOVA EDIT CHANGE - ORIGINAL if((uniform.has_sensor <= NO_SENSORS) || !uniform.sensor_mode)
stack_trace("Human without active suit sensors is in suit_sensors_list: [tracked_human] ([tracked_human.type]) ([uniform.type])")
continue

Expand All @@ -259,6 +259,20 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
if (jobs[trim_assignment] != null)
entry["ijob"] = jobs[trim_assignment]

// NOVA EDIT ADDITION START - EMP SENSORS
if(uniform.has_sensor == BROKEN_SENSORS)
entry["is_robot"] = rand(0,1)
entry["life_status"] = rand(0,1)
entry["area"] = pick_list (ION_FILE, "ionarea")
entry["oxydam"] = rand(0,1000)
entry["toxdam"] = rand(0,1000)
entry["burndam"] =rand(0,1000)
entry["brutedam"] = rand(0,1000)
entry["health"] = -50
entry["can_track"] = tracked_living_mob.can_track()
results[++results.len] = entry
continue
// NOVA EDIT ADDITION END
// NOVA EDIT BEGIN: Checking for robotic race
if (issynthetic(tracked_human))
entry["is_robot"] = TRUE
Expand Down
3 changes: 2 additions & 1 deletion code/modules/clothing/under/_under.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@

if(severity <= EMP_HEAVY)
has_sensor = BROKEN_SENSORS
sensor_mode = SENSOR_LIVING // NOVA EDIT ADDITION
if(ismob(loc))
var/mob/M = loc
to_chat(M,span_warning("[src]'s sensors short out!"))

else
sensor_mode = pick(SENSOR_OFF, SENSOR_OFF, SENSOR_OFF, SENSOR_LIVING, SENSOR_LIVING, SENSOR_VITALS, SENSOR_VITALS, SENSOR_COORDS)
sensor_mode = clamp(sensor_mode + pick(-1,1), SENSOR_OFF, SENSOR_COORDS) // NOVA EDIT CHANGE - ORIGINAL: sensor_mode = pick(SENSOR_OFF, SENSOR_OFF, SENSOR_OFF, SENSOR_LIVING, SENSOR_LIVING, SENSOR_VITALS, SENSOR_VITALS, SENSOR_COORDS)
if(ismob(loc))
var/mob/M = loc
to_chat(M,span_warning("The sensors on the [src] change rapidly!"))
Expand Down

0 comments on commit f72a93e

Please sign in to comment.