Fixed Slimaggedon spawning -- Uses antag menu

This commit is contained in:
ZomgPonies
2014-01-04 22:11:16 -05:00
parent e9feda83cb
commit af92092f64
4 changed files with 19 additions and 6 deletions
@@ -247,10 +247,10 @@
new_slime.key = key
new_slime << "<B>You are now a slime!</B>"
/*
if(new_slime.client)
if(babies.len)
var/list/candidates = get_active_candidates()
var/list/candidates = get_slime_candidates()
if(candidates.len)
var/mob/dead/observer/picked = pick(candidates)
var/mob/living/carbon/slime/S = pick(babies)
@@ -261,7 +261,7 @@
else
new_slime << "<i>You're an only child!</i>"*/
new_slime << "<i>You're an only child!</i>"
else
src << "<i>I am not ready to reproduce yet...</i>"
else
+13
View File
@@ -309,6 +309,19 @@ proc/isInSight(var/atom/A, var/atom/B)
i++
return candidates
/proc/get_slime_candidates()
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/G in respawnable_list)
if( G.client && G.client.prefs.be_special & BE_SLIME)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become a slime
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
return candidates
proc/get_candidates(be_special_flag=0)
. = list()
for(var/mob/G in respawnable_list)
+1 -1
View File
@@ -16,7 +16,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"infested monkey" = IS_MODE_COMPILED("monkey"), // 9
"ninja" = "true", // 10
"vox raider" = IS_MODE_COMPILED("heist"), // 11
"diona" = 1, // 12
"slime" = 1, // 12
"vampire" = IS_MODE_COMPILED("vampire") // 13
)
+2 -2
View File
@@ -665,7 +665,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
#define BE_MONKEY 512
#define BE_NINJA 1024
#define BE_VOX 2048
#define BE_PLANT 4096
#define BE_SLIME 4096
#define BE_VAMPIRE 8192
var/list/be_special_flags = list(
@@ -681,7 +681,7 @@ var/list/be_special_flags = list(
"Monkey" = BE_MONKEY,
"Ninja" = BE_NINJA,
"Vox" = BE_VOX,
"Diona" = BE_PLANT,
"Slime" = BE_SLIME,
"Vampire" = BE_VAMPIRE
)