No more pAI recruit window spam.

Added a toggle option to be a pAI (much like you can for aliens.) Changed popup window into an alert() and added a "never for this round" button in it. Can permanently set whether or not you want to be a pAI in your save (might not work as intended, only did mild testing, I cannot into bitwise operations.)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2162 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
only.lurking@gmail.com
2011-09-09 00:58:28 +00:00
parent 632f44b6e9
commit 6b868e69b3
6 changed files with 24 additions and 4 deletions
@@ -216,6 +216,17 @@ var/list/karma_spenders = list()
client.be_alien = 1
src << "You are now included in alien candidate lists until end of round."
/mob/dead/observer/verb/toggle_pai_candidate()
set name = "Toggle Be pAI Candidate"
set category = "Ghost"
set desc = "Receive a pop-up request when a pAI device requests a new personality. (toggle)"
if(client.be_pai)
client.be_pai = 0
src << "You will no longer receive pAI recruitment pop-ups this round."
else
client.be_pai = 1
src << "You will now be considered a viable candidate when a pAI device requests a new personality, effective until the end of this round."
/mob/dead/observer/memory()
set hidden = 1
src << "\red You are dead! You have no mind to store memory!"
@@ -17,7 +17,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
var/list/pai_candidates = list()
var/list/asked = list()
var/askDelay = 10 * 60 * 5 // Five minutes
var/askDelay = 10 * 60 * 1 // One minute [ms * sec * min]
Topic(href, href_list[])
if(href_list["download"])
@@ -173,12 +173,14 @@ var/datum/paiController/paiController // Global handler for pAI candidates
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.key == O.key)
hasSubmitted = 1
if(!hasSubmitted)
if(!hasSubmitted && O.client.be_pai)
spawn question(O.client)
proc/question(var/client/C)
asked.Add(C.key)
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")
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
C.be_pai = 0
@@ -10,6 +10,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"malf AI" = IS_MODE_COMPILED("malfunction"),
"revolutionary" = IS_MODE_COMPILED("revolution"),
"alien candidate" = 1, //always show
"pai candidate" = 1, // -- TLE
"cultist" = IS_MODE_COMPILED("cult"),
"infested monkey" = IS_MODE_COMPILED("monkey"),
)
@@ -956,6 +957,7 @@ datum/preferences
character.client.bubbles = bubbles
character.client.ooccolor = ooccolor
character.client.be_alien = be_special&BE_ALIEN
character.client.be_pai = be_special&BE_PAI
/*
+3
View File
@@ -50,6 +50,7 @@ datum/preferences/proc/savefile_save(mob/user)
F["ooccolor"] << src.ooccolor // Urist
F["lastchangelog"] << src.lastchangelog // rastaf0
return 1
// loads the savefile corresponding to the mob's ckey
@@ -120,8 +121,10 @@ datum/preferences/proc/savefile_load(mob/user, var/silent = 1)
be_special |= BE_MALF
be_special |= BE_REV
F["be_alien"] >> tmp
F["be_pai"] >> tmp
if (tmp)
be_special |= BE_ALIEN
be_special |= BE_PAI
del(F)
fdel(path)
savefile_save(user)