Wiped/suicided pAIs should be eligible for being candidates again (5 minute cooldown between prompts.)

pAIs should ghost properly in all circumstances, now.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1653 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
only.lurking@gmail.com
2011-06-02 03:43:56 +00:00
parent 0ab86fbe99
commit f7f5c8ecab
3 changed files with 10 additions and 9 deletions

View File

@@ -13,9 +13,6 @@
//var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
//mind.store_memory("Time of death: [tod]", 0)
if(key)
spawn(50)
src.ghost()
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
@@ -26,4 +23,7 @@
log_game("Rebooting because of no live players")
world.Reboot()
return
return ..(gibbed)
if(key)
spawn(50)
src.ghostize(1)
del(src)

View File

@@ -21,7 +21,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
Topic(href, href_list[])
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"]) //pai_candidates.Find(href_list["candidate"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/device/paicard/card = locate(href_list["device"])
if(card.pai)
return
@@ -35,7 +35,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
pai_candidates.Remove(candidate)
usr << browse(null, "window=findPai")
if(href_list["new"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"]) //pai_candidates.Find(href_list["candidate"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/option = href_list["option"]
switch(option)
if("name")
@@ -162,8 +162,10 @@ var/datum/paiController/paiController // Global handler for pAI candidates
proc/requestRecruits()
for(var/mob/dead/observer/O in world)
if(asked.Find(O.key))
if(asked[O] < world.time + askDelay)
if(world.time < asked[O.key] + askDelay)
continue
else
asked.Remove(O.key)
if(O.client)
var/hasSubmitted = 0
for(var/datum/paiCandidate/c in paiController.pai_candidates)
@@ -177,4 +179,4 @@ var/datum/paiController/paiController // Global handler for pAI candidates
asked[C.key] = world.time
var/response = input(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request") in list ("Yes", "No")
if(response == "Yes")
recruitWindow(C.mob)
recruitWindow(C.mob)