Skip to content

Commit

Permalink
werfuijer8yuherfg8yuihwerfg8yui3werfg8yuwerfg8eryufgh8eryugh (#3352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Sep 12, 2024
1 parent e887d6a commit 3577fd3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
10 changes: 10 additions & 0 deletions code/__HELPERS/~monkestation-helpers/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@
var/obj/item/organ/internal/brain/brain = target
if(!QDELETED(brain.brainmob?.mind))
return brain.brainmob.mind

/proc/is_late_arrival(mob/living/player)
var/static/cached_result
if(!isnull(cached_result))
return cached_result
if(!HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS) || (STATION_TIME_PASSED() > 1 MINUTES))
return cached_result = FALSE
if(QDELETED(player) || !istype(get_area(player), /area/shuttle/arrival))
return FALSE
return TRUE
8 changes: 7 additions & 1 deletion code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,14 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list


/datum/objective/mutiny/check_completion()
if(!target || !considered_alive(target) || considered_afk(target) || considered_exiled(target))
// monkestation start: fix bugs with revs ending early due to late arrivals
if(QDELETED(target))
return TRUE
if(is_late_arrival(target.current))
return FALSE
if(!considered_alive(target) || considered_afk(target) || considered_exiled(target))
return TRUE
// monkestation end
var/turf/T = get_turf(target.current)
return !T || !is_station_level(T.z)

Expand Down
3 changes: 1 addition & 2 deletions monkestation/code/modules/storytellers/gamemode_subsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ SUBSYSTEM_DEF(gamemode)
continue
// I split these checks up to make the code more readable ~Lucy
var/is_on_station = is_station_level(player.z)
var/is_late_arrival = HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS) && istype(get_area(player), /area/shuttle/arrival)
if(!is_on_station && !is_late_arrival)
if(!is_on_station && !is_late_arrival(player))
continue
candidate_candidates += player

Expand Down

0 comments on commit 3577fd3

Please sign in to comment.