Removes a debug object made in the wrong place, fixes a runtime that could generate at very low populations.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3220 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
VivianFoxfoot@gmail.com
2012-03-01 04:24:15 +00:00
parent dbc9a34691
commit 2f3fbb6d13
2 changed files with 32 additions and 34 deletions

View File

@@ -262,10 +262,11 @@ Whitespace:Seperator;"}
drafted -= player drafted -= player
while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates
applicant += pick(drafted) if(drafted.len > 0)
if(applicant) applicant = pick(drafted)
candidates += applicant if(applicant)
drafted.Remove(applicant) candidates += applicant
drafted.Remove(applicant)
else // Not enough scrubs, ABORT ABORT ABORT else // Not enough scrubs, ABORT ABORT ABORT
break break
@@ -283,39 +284,18 @@ Whitespace:Seperator;"}
drafted -= player drafted -= player
while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates while(candidates.len < recommended_enemies) // Pick randomlly just the number of people we need and add them to our list of candidates
applicant += pick(drafted) if(drafted.len > 0)
if(applicant) applicant = pick(drafted)
candidates += applicant if(applicant)
drafted.Remove(applicant) candidates += applicant
drafted.Remove(applicant)
else else // Not enough scrubs, ABORT ABORT ABORT
break break
return candidates // Returns: The number of people who had the antagonist role set to yes, regardless of recomended_enemies, if that number is greater than recommended_enemies
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
for(var/obj/debug/debugger/B in world) // Less if there are not enough valid players in the game entirely to make recommended_enemies.
B.list1 = candidates.Copy(0)
return candidates // Return percisely the number of people needed (or less, but can't help with that), consisting of all people who want to be it + minium number of draftees.
/obj/debug/debugger
name = "Quantum Debugger"
desc = "A quantum debugger used by Centcomm Reality Engineers to help monitor transiant variables."
icon = 'stationobjs.dmi'
icon_state = "blackbox"
var/list/list1
var/list/list2
var/list/list3
var/list/list4
var/list/list5
var/var1
var/var2
var/var3
var/var4
var/var5
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player) /datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)

View File

@@ -611,3 +611,21 @@ Doing this because FindTurfs() isn't even used
playsound(pt.loc, 'explosionfar.ogg', 100, 1,10) playsound(pt.loc, 'explosionfar.ogg', 100, 1,10)
pt.gas.temperature = 500+T0C pt.gas.temperature = 500+T0C
pt.ignite() pt.ignite()
/obj/debug/debugger
name = "Quantum Debugger"
desc = "A quantum debugger used by Centcomm Reality Engineers to help monitor transiant variables."
icon = 'stationobjs.dmi'
icon_state = "blackbox"
var/list/list1
var/list/list2
var/list/list3
var/list/list4
var/list/list5
var/var1
var/var2
var/var3
var/var4
var/var5