From 137e64c632c1a786f7266c1b64090cb25395985a Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Thu, 21 Dec 2023 09:58:44 +0300 Subject: [PATCH] [MIRROR] Disease Outbreak event only considers on-station players to 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 <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/modules/events/disease_outbreak.dm | 6 ++++-- .../modules/ices_events/code/events/ev_roleplay_check.dm | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 38b313a6417..3be09528abd 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -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 diff --git a/modular_skyrat/modules/ices_events/code/events/ev_roleplay_check.dm b/modular_skyrat/modules/ices_events/code/events/ev_roleplay_check.dm index d55fd75aeb3..0def7040812 100644 --- a/modular_skyrat/modules/ices_events/code/events/ev_roleplay_check.dm +++ b/modular_skyrat/modules/ices_events/code/events/ev_roleplay_check.dm @@ -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