From dde2c51e73552cab75c14e67928fa4d8c5388e62 Mon Sep 17 00:00:00 2001 From: "elly1989@rocketmail.com" Date: Sat, 29 Sep 2012 06:15:38 +0000 Subject: [PATCH] Fixes an obscure runtime which happens when there are no human players and an Ion-Storm occurs. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4771 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/gamemodes/events.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index e8e9c7f7471..382ac0b5f4f 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -433,7 +433,10 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is var/list/pos_crew = list() for(var/mob/living/carbon/human/pos in player_list) pos_crew += pos.real_name - crew = pick(pos_crew) + if(pos_crew.len) + crew = pick(pos_crew) + else + crew = "Any Human" switch(rand(1,14)) if(1) M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"