Skip to content

Commit

Permalink
[MIRROR] Disease Outbreak event only considers on-station players to …
Browse files Browse the repository at this point in the history
…be candidates [MDB IGNORE] (#25751) (#1232)

* Disease Outbreak event only considers on-station players to be candidates

* Update disease_outbreak.dm

* Update ev_roleplay_check.dm

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Rhials <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
4 people authored Dec 21, 2023
1 parent bceb06f commit 137e64c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions code/modules/events/disease_outbreak.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@
continue
if(length(candidate.diseases)) //Is our candidate already sick?
continue
// SKYRAT EDIT ADD START - Station/area event candidate filtering
if(!is_station_level(candidate.z) && !is_mining_level(candidate.z)) //Diseases can't really spread if the vector is in deep space.
continue
// SKYRAT EDIT ADDITION START - Station/area event candidate filtering.
if(engaged_role_play_check(candidate, station = TRUE, dorms = TRUE))
continue
// SKYRAT EDIT ADD END
// SKYRAT EDIT ADDITION END
disease_candidates += candidate

///Handles checking and alerting admins about the number of valid candidates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
/proc/engaged_role_play_check(mob/living/carbon/human/player, station = TRUE, dorms = TRUE)
var/turf/player_turf = get_turf(player)
var/area/player_area = get_area(player_turf)
if(!is_station_level(player_turf.z) && station)
return TRUE

if(istype(player_area, /area/station/commons/dorms) && dorms)
if(station && !is_station_level(player_turf.z))
return TRUE
if(dorms && istype(player_area, /area/station/commons/dorms))
return TRUE

return FALSE

0 comments on commit 137e64c

Please sign in to comment.