Minds part 3

Removed mob/var/original_name. Totally replaced by datum/mind/var/name now.

Fixed round-end reports. They're now sort of follow the same format as each-other. Not sure how the ew format will work out on high-pop servers. if it's too spammy I'll tone it down a bit.

Fixed pais. Their life.dm got unticked. Resolves issue 759

Known issues: 
Borgs keep their human objectives when borged. I'll try playing with the way minds work for silicon mobs whe the freeze is over.
No way to edit minds when they are not attached to a mob. Need some sort of debugging tool.
datum/mind/var/mob/living/original isn't realy used for much. I could probably replace it with something more useful.
Changeling stuff is messy. The changeling object should be referenced by the mind not the mob (or something)

Part 4 on hold will try to address some of these known issues. Taking a break from minds to fix some issues on the tracker now (like lighting)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4355 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-08-09 23:41:01 +00:00
parent 4b98d66d68
commit 40c2238c24
13 changed files with 317 additions and 286 deletions

View File

@@ -419,8 +419,7 @@ client
break break
M.real_name = new_name M.real_name = new_name
M.name = new_name M.name = new_name
if(M.mind) if(M.mind) M.mind.name = new_name
M.mind.name = new_name
href_list["datumrefresh"] = href_list["rename"] href_list["datumrefresh"] = href_list["rename"]
else if (href_list["varnameedit"]) else if (href_list["varnameedit"])

View File

@@ -31,13 +31,12 @@
datum/mind datum/mind
var/key var/key
var/name //replaces mob/var/original_name var/name //replaces mob/var/original_name
var/mob/living/current var/mob/living/current
var/mob/living/original var/mob/living/original //TODO: remove.not used in any meaningful way ~Carn. First I'll need to tweak the way silicon-mobs handle minds.
var/active = 0 var/active = 0
var/memory var/memory
//TODO: store original name --rastaf0
var/assigned_role var/assigned_role
var/special_role var/special_role
@@ -778,16 +777,16 @@ datum/mind
ticker.mode.malf_ai -= src ticker.mode.malf_ai -= src
special_role = null special_role = null
current.verbs -= /mob/living/silicon/ai/proc/choose_modules current.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
current.verbs -= /datum/game_mode/malfunction/proc/takeover /datum/game_mode/malfunction/proc/takeover,
current.verbs -= /datum/game_mode/malfunction/proc/ai_win /datum/game_mode/malfunction/proc/ai_win,
current.verbs -= /client/proc/fireproof_core /client/proc/fireproof_core,
current.verbs -= /client/proc/upgrade_turrets /client/proc/upgrade_turrets,
current.verbs -= /client/proc/disable_rcd /client/proc/disable_rcd,
current.verbs -= /client/proc/overload_machine /client/proc/overload_machine,
current.verbs -= /client/proc/blackout /client/proc/blackout,
current.verbs -= /client/proc/interhack /client/proc/interhack,
current.verbs -= /client/proc/reactivate_camera /client/proc/reactivate_camera)
current:laws = new /datum/ai_laws/asimov current:laws = new /datum/ai_laws/asimov
del(current:malf_picker) del(current:malf_picker)
@@ -1092,8 +1091,6 @@ datum/mind
//Initialisation procs //Initialisation procs
/mob/living/proc/mind_initialize() /mob/living/proc/mind_initialize()
if(mind) if(mind)
if(mind.key != key)
world.log << "## DEBUG: mind_initialize(): [key] took possession of [mind.key]'s mind"
mind.key = key mind.key = key
else else
mind = new /datum/mind(key) mind = new /datum/mind(key)

View File

@@ -156,36 +156,50 @@
changeling_mob.make_changeling() changeling_mob.make_changeling()
/datum/game_mode/proc/auto_declare_completion_changeling() /datum/game_mode/proc/auto_declare_completion_changeling()
for(var/datum/mind/changeling in changelings) if(changelings.len)
var/changelingwin = 1 var/text = "<FONT size = 2><B>The changelings were:</B></FONT>"
var/changeling_name for(var/datum/mind/changeling in changelings)
if((changeling.current) && (changeling.current.changeling)) var/changelingwin = 1
changeling_name = "[changeling.current.real_name] (played by [changeling.key])"
world << "<B>The changeling was [changeling_name].</B>"
world << "<b>[changeling.current.gender=="male"?"His":"Her"] changeling ID was [changeling.current.gender=="male"?"Mr.":"Mrs."] [changeling.current.changeling.changelingID]."
world << "<B>Genomes absorbed: [changeling.current.changeling.absorbedcount]</B>"
var/count = 1 text += "<br>[changeling.key] was [changeling.name] ("
for(var/datum/objective/objective in changeling.objectives) if(changeling.current && changeling.current.changeling)
if(objective.check_completion()) if(changeling.current.stat == DEAD)
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>" text += "died"
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
else else
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed" text += "survived"
feedback_add_details("changeling_objective","[objective.type]|FAIL") if(changeling.current.real_name != changeling.name)
changelingwin = 0 text += " as [changeling.current.real_name]"
count++ else
text += "body destroyed"
changelingwin = 0
text += ")"
if(changeling.current && changeling.current.changeling)
text += "<br><b>changeling ID:</b> [changeling.current.gender==MALE?"Mr.":"Ms."] [changeling.current.changeling.changelingID]."
text += "<br><b>Genomes absorbed:</b> [changeling.current.changeling.absorbedcount]"
if(changeling.objectives.len)
var/count = 1
for(var/datum/objective/objective in changeling.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
feedback_add_details("changeling_objective","[objective.type]|FAIL")
changelingwin = 0
count++
if(changelingwin)
text += "<br><B>The changeling was successful!<B>"
feedback_add_details("changeling_success","SUCCESS")
else
text += "<br><B>The changeling has failed!<B>"
feedback_add_details("changeling_success","FAIL")
world << text
else
changeling_name = "[changeling.key] (character destroyed)"
changelingwin = 0
if(changelingwin)
world << "<B>The changeling was successful!<B>"
feedback_add_details("changeling_success","SUCCESS")
else
world << "<B>The changeling has failed!<B>"
feedback_add_details("changeling_success","FAIL")
return 1 return 1
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind) /datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)

View File

@@ -111,8 +111,8 @@
if("survive") if("survive")
explanation = "Our knowledge must live on. Make sure at least [acolytes_needed] acolytes escape on the shuttle to spread their work on an another station." explanation = "Our knowledge must live on. Make sure at least [acolytes_needed] acolytes escape on the shuttle to spread their work on an another station."
if("sacrifice") if("sacrifice")
if(sacrifice_target && sacrifice_target.current) if(sacrifice_target)
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (Hell blood join) and three acolytes to do so." explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (Hell blood join) and three acolytes to do so."
else else
explanation = "Free objective." explanation = "Free objective."
if("eldergod") if("eldergod")
@@ -310,58 +310,60 @@
feedback_set("round_end_result",acolytes_survived) feedback_set("round_end_result",acolytes_survived)
world << "\red <FONT size = 3><B> The staff managed to stop the cult!</B></FONT>" world << "\red <FONT size = 3><B> The staff managed to stop the cult!</B></FONT>"
world << "\b Cultists escaped: [acolytes_survived]" var/text = "<b>Cultists escaped:</b> [acolytes_survived]"
world << "The cultists' objectives were:" if(objectives.len)
text += "<br><b>The cultists' objectives were:</b>"
for(var/obj_count=1,obj_count <= objectives.len,obj_count++) for(var/obj_count=1, obj_count <= objectives.len, obj_count++)
var/explanation var/explanation
switch(objectives[obj_count]) switch(objectives[obj_count])
if("survive") if("survive")
if(!check_survive()) if(!check_survive())
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. \green <b>Success!</b>" explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. \green <b>Success!</b>"
feedback_add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]") feedback_add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]")
else
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. \red Failed."
feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
if("sacrifice")
if(!sacrifice_target)
explanation = "Free objective"
else
if(sacrificed.Find(sacrifice_target))
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. \green <b>Success!</b>"
feedback_add_details("cult_objective","cult_sacrifice|SUCCESS")
else if(sacrifice_target && sacrifice_target.current)
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. \red Failed."
feedback_add_details("cult_objective","cult_sacrifice|FAIL")
else else
explanation = "Sacrifice Unknown, the Unknown whos body was likely gibbed. \red Failed." explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. \red Failed."
feedback_add_details("cult_objective","cult_sacrifice|FAIL|GIBBED") feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
if("eldergod") if("sacrifice")
if(!eldergod) if(sacrifice_target)
explanation = "Summon Nar-Sie. \green <b>Success!</b>" if(sacrifice_target in sacrificed)
feedback_add_details("cult_objective","cult_narsie|SUCCESS") explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. \green <b>Success!</b>"
else feedback_add_details("cult_objective","cult_sacrifice|SUCCESS")
explanation = "Summon Nar-Sie. \red Failed." else if(sacrifice_target && sacrifice_target.current)
feedback_add_details("cult_objective","cult_narsie|FAIL") explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. \red Failed."
world << "<B>Objective #[obj_count]</B>: [explanation]" feedback_add_details("cult_objective","cult_sacrifice|FAIL")
else
explanation = "Sacrifice Unknown, the Unknown whos body was likely gibbed. \red Failed."
feedback_add_details("cult_objective","cult_sacrifice|FAIL|GIBBED")
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. \green <b>Success!</b>"
feedback_add_details("cult_objective","cult_narsie|SUCCESS")
else
explanation = "Summon Nar-Sie. \red Failed."
feedback_add_details("cult_objective","cult_narsie|FAIL")
text += "<br><B>Objective #[obj_count]</B>: [explanation]"
world << text
..() ..()
return 1 return 1
/datum/game_mode/proc/auto_declare_completion_cult() /datum/game_mode/proc/auto_declare_completion_cult()
if (cult.len!=0 || (ticker && istype(ticker.mode,/datum/game_mode/cult))) if( cult.len || (ticker && istype(ticker.mode,/datum/game_mode/cult)) )
world << "<FONT size = 2><B>The cultists were: </B></FONT>" var/text = "<FONT size = 2><B>The cultists were:</B></FONT>"
var/text = "" for(var/datum/mind/cultist in cult)
for(var/datum/mind/cult_nh_mind in cult)
if(cult_nh_mind.current) text += "<br>[cultist.key] was [cultist.name] ("
text += "[cult_nh_mind.current.real_name]" if(cultist.current)
if(cult_nh_mind.current.stat == 2) if(cultist.current.stat == DEAD)
text += " (Dead)" text += "died"
else else
text += " (Survived!)" text += "survived"
if(cultist.current.real_name != cultist.name)
text += " as [cultist.current.real_name]"
else else
text += "[cult_nh_mind.key] (character destroyed)" text += "body destroyed"
text += ", " text += ")"
world << text world << text

View File

@@ -338,22 +338,21 @@ var/global/datum/controller/gameticker/ticker
mode.declare_completion()//To declare normal completion. mode.declare_completion()//To declare normal completion.
//calls auto_declare_completion_* for all modes //calls auto_declare_completion_* for all modes
for (var/handler in typesof(/datum/game_mode/proc)) for(var/handler in typesof(/datum/game_mode/proc))
if (findtext("[handler]","auto_declare_completion_")) if (findtext("[handler]","auto_declare_completion_"))
call(mode, handler)() call(mode, handler)()
//Print a list of antagonists to the server log //Print a list of antagonists to the server log
var/list/total_antagonists = list() var/list/total_antagonists = list()
//Look into all mobs in world, dead or alive //Look into all mobs in world, dead or alive
for(var/mob/M in mob_list) for(var/datum/mind/Mind in minds)
if(M.mind && M.mind.special_role) //If they have a mind and are an antagonist of some sort... var/temprole = Mind.special_role
var/temprole = M.mind.special_role if(temprole) //if they are an antagonist of some sort.
if(temprole in total_antagonists) //If the role exists already, add the name to it
if(temprole in total_antagonists) //If the role exists already, add the name to it total_antagonists[temprole] += ", [Mind.name]([Mind.key])"
total_antagonists[temprole] += ", [M.real_name]([M.ckey])"
else else
total_antagonists.Add(temprole) //If the role doesnt exist in the list, create it and add the mob total_antagonists.Add(temprole) //If the role doesnt exist in the list, create it and add the mob
total_antagonists[temprole] += ": [M.real_name]([M.ckey])" total_antagonists[temprole] += ": [Mind.name]([Mind.key])"
//Now print them all into the log! //Now print them all into the log!
log_game("Antagonists at round end were...") log_game("Antagonists at round end were...")

View File

@@ -237,21 +237,22 @@
/datum/game_mode/proc/auto_declare_completion_malfunction() /datum/game_mode/proc/auto_declare_completion_malfunction()
if (malf_ai.len!=0 || istype(ticker.mode,/datum/game_mode/malfunction)) if( malf_ai.len || istype(ticker.mode,/datum/game_mode/malfunction) )
if (malf_ai.len==1) var/text = "<FONT size = 2><B>The malfunctioning AI were:</B></FONT>"
var/text = ""
var/datum/mind/ai = malf_ai[1] for(var/datum/mind/malf in malf_ai)
if(ai.current)
text += "[ai.current.real_name]" text += "<br>[malf.key] was [malf.name] ("
else if(malf.current)
text += "[ai.key] (character destroyed)" if(malf.current.stat == DEAD)
world << "<FONT size = 2><B>The malfunctioning AI was [text]</B></FONT>" text += "deactivated"
else
world << "<FONT size = 2><B>The malfunctioning AI were: </B></FONT>"
var/list/ai_names = new
for(var/datum/mind/ai in malf_ai)
if(ai.current)
ai_names += ai.current.real_name + ((ai.current.stat==2)?" (Dead)":"")
else else
ai_names += "[ai.key] (character destroyed)" text += "operational"
world << english_list(ai_names) if(malf.current.real_name != malf.name)
text += " as [malf.current.real_name]"
else
text += "hardware destroyed"
text += ")"
world << text
return 1

View File

@@ -37,36 +37,28 @@
/datum/game_mode/meteor/declare_completion() /datum/game_mode/meteor/declare_completion()
var/list/survivors = list() var/text
var/area/escape_zone = locate(/area/shuttle/escape/centcom) var/survivors = 0
var/area/pod_zone = list( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
for(var/mob/living/player in player_list) for(var/mob/living/player in player_list)
if (player.stat != 2) if(player.stat != DEAD)
var/turf/location = get_turf(player.loc) var/turf/location = get_turf(player.loc)
if (location in escape_zone) if(!location) continue
survivors[player.real_name] = "shuttle" switch(location.loc.type)
else if (location.loc.type in pod_zone) if( /area/shuttle/escape/centcom )
survivors[player.real_name] = "pod" text += "<br><b><font size=2>[player.real_name] escaped on the emergency shuttle</font></b>"
else if( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
survivors[player.real_name] = "alive" text += "<br><font size=2>[player.real_name] escaped in a life pod.</font>"
else
text += "<br><font size=1>[player.real_name] survived but is stranded without any hope of rescue.</font>"
survivors++
if(survivors)
world << "\blue <B>The following survived the meteor storm</B>:[text]"
else
world << "\blue <B>Nobody survived the meteor storm!</B>"
feedback_set_details("round_end_result","end - evacuation") feedback_set_details("round_end_result","end - evacuation")
feedback_set("round_end_result",survivors.len) feedback_set("round_end_result",survivors)
if (survivors.len)
world << "\blue <B>The following survived the meteor attack!</B>"
for(var/survivor in survivors)
var/condition = survivors[survivor]
switch(condition)
if("shuttle")
world << "\t <B><FONT size = 2>[survivor] escaped on the shuttle!</FONT></B>"
if("pod")
world << "\t <FONT size = 2>[survivor] escaped on an escape pod!</FONT>"
if("alive")
world << "\t <FONT size = 1>[survivor] stayed alive. Whereabouts unknown.</FONT>"
else
world << "\blue <B>No one survived the meteor attack!</B>"
..() ..()
return 1 return 1

View File

@@ -322,17 +322,25 @@
/datum/game_mode/proc/auto_declare_completion_nuclear() /datum/game_mode/proc/auto_declare_completion_nuclear()
if (syndicates.len!=0 || (ticker && istype(ticker.mode,/datum/game_mode/nuclear))) if( syndicates.len || (ticker && istype(ticker.mode,/datum/game_mode/nuclear)) )
world << "<FONT size = 2><B>The Syndicate operatives were: </B></FONT>" var/text = "<FONT size = 2><B>The syndicate operatives were:</B></FONT>"
for(var/datum/mind/mind in syndicates)
var/text = "" for(var/datum/mind/syndicate in syndicates)
if(mind.current)
text += "[mind.key] was [mind.current.real_name]" text += "<br>[syndicate.key] was [syndicate.name] ("
if(mind.current.stat == 2) if(syndicate.current)
text += " (Dead)" if(syndicate.current.stat == DEAD)
text += "died"
else
text += "survived"
if(syndicate.current.real_name != syndicate.name)
text += " as [syndicate.current.real_name]"
else else
text += "[mind.key] (character destroyed)" text += "body destroyed"
world << text text += ")"
world << text
return 1
/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho. /proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
@@ -353,8 +361,8 @@
for(var/datum/mind/synd_mind in syndicates) for(var/datum/mind/synd_mind in syndicates)
switch(synd_mind.current.gender) switch(synd_mind.current.gender)
if("male") if("male")
synd_mind.current.real_name = "[pick(first_names_male)] [lastname]" synd_mind.name = "[pick(first_names_male)] [lastname]"
if("female") if("female")
synd_mind.current.real_name = "[pick(first_names_female)] [lastname]" synd_mind.name = "[pick(first_names_female)] [lastname]"
synd_mind.current.real_name = synd_mind.name
return return

View File

@@ -197,27 +197,16 @@ datum/objective/silence
if(emergency_shuttle.location<2) if(emergency_shuttle.location<2)
return 0 return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
var/area/pod1 = locate(/area/shuttle/escape_pod1/centcom)
var/area/pod2 = locate(/area/shuttle/escape_pod2/centcom)
var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom)
var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom)
for(var/mob/living/player in player_list) for(var/mob/living/player in player_list)
if (player == owner.current) if(player == owner.current)
continue continue
if (player.mind) if(player.mind)
if (player.stat != 2) if(player.stat != DEAD)
if (get_turf(player) in shuttle) var/turf/T = get_turf(player)
return 0 if(!T) continue
if (get_turf(player) in pod1) switch(T.loc.type)
return 0 if(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
if (get_turf(player) in pod2) return 0
return 0
if (get_turf(player) in pod3)
return 0
if (get_turf(player) in pod4)
return 0
return 1 return 1
@@ -260,7 +249,6 @@ datum/objective/escape
datum/objective/survive datum/objective/survive
explanation_text = "Stay alive until the end." explanation_text = "Stay alive until the end."
check_completion() check_completion()
if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current)) if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
return 0 //Brains no longer win survive objectives. --NEO return 0 //Brains no longer win survive objectives. --NEO

View File

@@ -78,7 +78,7 @@
var/datum/objective/mutiny/rev_obj = new var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind rev_obj.owner = rev_mind
rev_obj.target = head_mind rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.current.real_name], the [head_mind.assigned_role]." rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj rev_mind.objectives += rev_obj
// equip_traitor(rev_mind.current, 1) //changing how revs get assigned their uplink so they can get PDA uplinks. --NEO // equip_traitor(rev_mind.current, 1) //changing how revs get assigned their uplink so they can get PDA uplinks. --NEO
@@ -109,7 +109,7 @@
var/datum/objective/mutiny/rev_obj = new var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind rev_obj.owner = rev_mind
rev_obj.target = head_mind rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.current.real_name], the [head_mind.assigned_role]." rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj rev_mind.objectives += rev_obj
/datum/game_mode/proc/greet_revolutionary(var/datum/mind/rev_mind, var/you_are=1) /datum/game_mode/proc/greet_revolutionary(var/datum/mind/rev_mind, var/you_are=1)
@@ -344,64 +344,75 @@
return 1 return 1
/datum/game_mode/proc/auto_declare_completion_revolution() /datum/game_mode/proc/auto_declare_completion_revolution()
if(head_revolutionaries.len!=0 || istype(ticker.mode,/datum/game_mode/revolution)) var/list/targets = list()
var/list/names = new
for(var/datum/mind/i in head_revolutionaries)
if(i.current)
var/hstatus = ""
if(i.current.stat == 2)
hstatus = "Dead"
else if(i.current.z != 1)
hstatus = "Abandoned the station"
names += i.current.real_name + " ([hstatus])"
else
names += "[i.key] (character destroyed)"
world << "<FONT size = 2><B>The head revolutionaries were: </B></FONT>"
world << english_list(names)
if (revolutionaries.len!=0 || istype(ticker.mode,/datum/game_mode/revolution))
var/list/names = new
for(var/datum/mind/i in revolutionaries)
if(i.current)
var/hstatus = ""
if(i.current.stat == 2)
hstatus = "Dead"
else if(i.current.z != 1)
hstatus = "Abandoned the station"
names += i.current.real_name + " ([hstatus])"
else
names += "[i.key] (character destroyed)"
if (revolutionaries.len!=0)
world << "<FONT size = 2><B>The ordinary revolutionaries were: </B></FONT>"
world << english_list(names)
else
world << "The head revolutionaries failed to enlist any <FONT size = 2><B>ordinary revolutionaries</B></FONT>"
var/list/heads = get_all_heads()
var/list/targets = new
for (var/datum/mind/i in head_revolutionaries)
for (var/datum/objective/mutiny/o in i.objectives)
targets |= o.target
if (head_revolutionaries.len!=0 || \
revolutionaries.len!=0 || \
istype(ticker.mode,/datum/game_mode/revolution))
var/list/names = new if(head_revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution))
for(var/datum/mind/i in heads) var/text = "<FONT size = 2><B>The head revolutionaries were:</B></FONT>"
if(i.current)
var/turf/T = get_turf(i.current)
var/hstatus = ""
if(i.current.stat == 2)
hstatus = "Dead"
else if((T) && (T.z != 1))
hstatus = "Abandoned the station"
names += i.current.real_name + " ([hstatus])" + ((i in targets)?"(target)":"")
else
names += "[i.key] (character destroyed)" + ((i in targets)?"(target)":"")
if (heads.len!=0)
world << "<FONT size = 2><B>The heads of staff were: </B></FONT>"
world << english_list(names)
else
world << "There were no any <FONT size = 2><B>heads of staff</B></FONT> on the station."
for(var/datum/mind/headrev in head_revolutionaries)
text += "<br>[headrev.key] was [headrev.name] ("
if(headrev.current)
if(headrev.current.stat == DEAD)
text += "died"
else if(headrev.current.z != 1)
text += "fled the station"
else
text += "survived the revolution"
if(headrev.current.real_name != headrev.name)
text += " as [headrev.current.real_name]"
else
text += "body destroyed"
text += ")"
for(var/datum/objective/mutiny/objective in headrev.objectives)
targets |= objective.target
world << text
if(revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution))
var/text = "<FONT size = 2><B>The revolutionaries were:</B></FONT>"
for(var/datum/mind/rev in revolutionaries)
text += "<br>[rev.key] was [rev.name] ("
if(rev.current)
if(rev.current.stat == DEAD)
text += "died"
else if(rev.current.z != 1)
text += "fled the station"
else
text += "survived the revolution"
if(rev.current.real_name != rev.name)
text += " as [rev.current.real_name]"
else
text += "body destroyed"
text += ")"
world << text
if( head_revolutionaries.len || revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution) )
var/text = "<FONT size = 2><B>The heads of staff were:</B></FONT>"
var/list/heads = get_all_heads()
for(var/datum/mind/head in heads)
var/target = (head in targets)
if(target)
text += "<font color='red'>"
text += "<br>[head.key] was [head.name] ("
if(head.current)
if(head.current.stat == DEAD)
text += "died"
else if(head.current.z != 1)
text += "fled the station"
else
text += "survived the revolution"
if(head.current.real_name != head.name)
text += " as [head.current.real_name]"
else
text += "body destroyed"
text += ")"
if(target)
text += "</font>"
/proc/is_convertable_to_rev(datum/mind/mind) /proc/is_convertable_to_rev(datum/mind/mind)
return istype(mind) && \ return istype(mind) && \

View File

@@ -164,39 +164,49 @@
/datum/game_mode/proc/auto_declare_completion_traitor() /datum/game_mode/proc/auto_declare_completion_traitor()
for(var/datum/mind/traitor in traitors) if(traitors.len)
var/traitor_name var/text = "<FONT size = 2><B>The traitors were:</B></FONT>"
for(var/datum/mind/traitor in traitors)
if(traitor.current)
if(traitor.current == traitor.original)
traitor_name = "[traitor.current.real_name] (played by [traitor.key])"
else if (traitor.original)
traitor_name = "[traitor.current.real_name] (originally [traitor.original.real_name]) (played by [traitor.key])"
else
traitor_name = "[traitor.current.real_name] (original character destroyed) (played by [traitor.key])"
else
traitor_name = "[traitor.key] (character destroyed)"
var/special_role_text = traitor.special_role?(lowertext(traitor.special_role)):"antagonist"
world << "<B>The [special_role_text] was [traitor_name]</B>"
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
var/traitorwin = 1 var/traitorwin = 1
var/count = 1
for(var/datum/objective/objective in traitor.objectives) text += "<br>[traitor.key] was [traitor.name] ("
if(objective.check_completion()) if(traitor.current)
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>" if(traitor.current.stat == DEAD)
feedback_add_details("traitor_objective","[objective.type]|SUCCESS") text += "died"
else else
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed" text += "survived"
feedback_add_details("traitor_objective","[objective.type]|FAIL") if(traitor.current.real_name != traitor.name)
traitorwin = 0 text += " as [traitor.current.real_name]"
count++ else
text += "body destroyed"
text += ")"
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
var/count = 1
for(var/datum/objective/objective in traitor.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
feedback_add_details("traitor_objective","[objective.type]|FAIL")
traitorwin = 0
count++
var/special_role_text
if(traitor.special_role)
special_role_text = lowertext(traitor.special_role)
else
special_role_text = "antagonist"
if(traitorwin) if(traitorwin)
world << "<B>The [special_role_text] was successful!<B>" text += "<br><B>The [special_role_text] was successful!<B>"
feedback_add_details("traitor_success","SUCCESS") feedback_add_details("traitor_success","SUCCESS")
else else
world << "<B>The [special_role_text] has failed!<B>" text += "<br><B>The [special_role_text] has failed!<B>"
feedback_add_details("traitor_success","FAIL") feedback_add_details("traitor_success","FAIL")
world << text
return 1 return 1

View File

@@ -123,6 +123,8 @@
wizard_mob.real_name = newname wizard_mob.real_name = newname
wizard_mob.name = newname wizard_mob.name = newname
if(wizard_mob.mind)
wizard_mob.mind.name = newname
return return
@@ -207,36 +209,43 @@
/datum/game_mode/proc/auto_declare_completion_wizard() /datum/game_mode/proc/auto_declare_completion_wizard()
for(var/datum/mind/wizard in wizards) if(wizards.len)
var/wizard_name var/text = "<FONT size = 2><B>The wizards/witches were:</B></FONT>"
if(wizard.current)
if(wizard.current == wizard.original)
wizard_name = "[wizard.current.real_name] (played by [wizard.key])"
else if (wizard.original)
wizard_name = "[wizard.current.real_name] (originally [wizard.original.real_name]) (played by [wizard.key])"
else
wizard_name = "[wizard.current.real_name] (original character destroyed) (played by [wizard.key])"
else
wizard_name = "[wizard.key] (character destroyed)"
world << "<B>The wizard was [wizard_name]</B>"
var/count = 1
var/wizardwin = 1
for(var/datum/objective/objective in wizard.objectives)
if(objective.check_completion())
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
feedback_add_details("wizard_objective","[objective.type]|SUCCESS")
else
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
feedback_add_details("wizard_objective","[objective.type]|FAIL")
wizardwin = 0
count++
if(wizard.current && wizard.current.stat!=2 && wizardwin) for(var/datum/mind/wizard in wizards)
world << "<B>The wizard was successful!<B>"
feedback_add_details("wizard_success","SUCCESS") text += "<br>[wizard.key] was [wizard.name] ("
else if(wizard.current)
world << "<B>The wizard has failed!<B>" if(wizard.current.stat == DEAD)
feedback_add_details("wizard_success","FAIL") text += "died"
else
text += "survived"
if(wizard.current.real_name != wizard.name)
text += " as [wizard.current.real_name]"
else
text += "body destroyed"
text += ")"
var/count = 1
var/wizardwin = 1
for(var/datum/objective/objective in wizard.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
feedback_add_details("wizard_objective","[objective.type]|SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
feedback_add_details("wizard_objective","[objective.type]|FAIL")
wizardwin = 0
count++
if(wizard.current && wizard.current.stat!=2 && wizardwin)
text += "<br><B>The wizard was successful!<B>"
feedback_add_details("wizard_success","SUCCESS")
else
text += "<br><B>The wizard has failed!<B>"
feedback_add_details("wizard_success","FAIL")
world << text
return 1 return 1
//OTHER PROCS //OTHER PROCS

View File

@@ -837,6 +837,7 @@
#include "code\modules\mob\living\silicon\pai\death.dm" #include "code\modules\mob\living\silicon\pai\death.dm"
#include "code\modules\mob\living\silicon\pai\examine.dm" #include "code\modules\mob\living\silicon\pai\examine.dm"
#include "code\modules\mob\living\silicon\pai\hud.dm" #include "code\modules\mob\living\silicon\pai\hud.dm"
#include "code\modules\mob\living\silicon\pai\life.dm"
#include "code\modules\mob\living\silicon\pai\pai.dm" #include "code\modules\mob\living\silicon\pai\pai.dm"
#include "code\modules\mob\living\silicon\pai\personality.dm" #include "code\modules\mob\living\silicon\pai\personality.dm"
#include "code\modules\mob\living\silicon\pai\recruit.dm" #include "code\modules\mob\living\silicon\pai\recruit.dm"