Makes transfer always occur if nobody is playing.

This commit is contained in:
Neerti
2019-04-17 07:05:20 -04:00
parent b9af45b2da
commit c5b8c5b4eb

View File

@@ -31,6 +31,24 @@ SUBSYSTEM_DEF(vote)
reset()
/datum/controller/subsystem/vote/proc/autotransfer()
// Before doing the vote, see if anyone is playing.
// If not, just do the transfer.
var/players_are_in_round = FALSE
for(var/a in player_list) // Mobs with clients attached.
var/mob/living/L = a
if(!istype(L)) // Exclude ghosts and other weird things.
continue
if(L.stat == DEAD) // Dead mobs aren't playing.
continue
// Everything else is, however.
players_are_in_round = TRUE
break
if(!players_are_in_round)
log_debug("The crew transfer shuttle was automatically called at vote time due to no players being present.")
init_shift_change(null, 1)
return
initiate_vote(VOTE_CREW_TRANSFER, "the server", 1)
log_debug("The server has called a crew transfer vote.")