Merge pull request #5418 from Fox-McCloud/malf-ai-rework

Malf AI Rework
This commit is contained in:
TheDZD
2016-08-12 18:30:41 -04:00
committed by GitHub
38 changed files with 342 additions and 634 deletions
-4
View File
@@ -739,10 +739,6 @@ var/global/nologevent = 0
if(ticker.mode.config_tag == "cult")
return 2
return 1
if(M.mind in ticker.mode.malf_ai)
if(ticker.mode.config_tag == "malfunction")
return 2
return 1
if(M.mind in ticker.mode.syndicates)
if(ticker.mode.config_tag == "nuclear")
return 2
+3 -7
View File
@@ -48,22 +48,18 @@
if(!src.makeCult())
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("5")
log_admin("[key_name(usr)] has spawned a malf AI.")
if(!src.makeMalfAImode())
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("6")
log_admin("[key_name(usr)] has spawned a wizard.")
if(!src.makeWizard())
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("7")
if("6")
log_admin("[key_name(usr)] has spawned vampires.")
if(!src.makeVampires())
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("8")
if("7")
log_admin("[key_name(usr)] has spawned vox raiders.")
if(!src.makeVoxRaiders())
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("9")
if("8")
log_admin("[key_name(usr)] has spawned an abductor team.")
if(!src.makeAbductorTeam())
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
+4 -26
View File
@@ -17,37 +17,15 @@ client/proc/one_click_antag()
<a href='?src=\ref[src];makeAntag=2'>Make Changelings</a><br>
<a href='?src=\ref[src];makeAntag=3'>Make Revolutionaries</a><br>
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
<a href='?src=\ref[src];makeAntag=5'>Make Malf AI</a><br>
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=7'>Make Vampires</a><br>
<a href='?src=\ref[src];makeAntag=8'>Make Vox Raiders (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=9'>Make Abductor Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=5'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=6'>Make Vampires</a><br>
<a href='?src=\ref[src];makeAntag=7'>Make Vox Raiders (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=8'>Make Abductor Team (Requires Ghosts)</a><br>
"}
usr << browse(dat, "window=oneclickantag;size=400x400")
return
/datum/admins/proc/makeMalfAImode()
var/list/mob/living/silicon/AIs = list()
var/mob/living/silicon/malfAI = null
var/datum/mind/themind = null
for(var/mob/living/silicon/ai/ai in player_list)
if(ai.client && (ROLE_MALF in ai.client.prefs.be_special))
AIs += ai
if(AIs.len)
malfAI = pick(AIs)
if(malfAI)
themind = malfAI.mind
themind.make_AI_Malf()
return 1
return 0
/datum/admins/proc/makeTraitors()
var/datum/game_mode/traitor/temp = new