mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
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:
@@ -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"])
|
||||||
|
|||||||
@@ -33,11 +33,10 @@ 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)
|
||||||
|
|||||||
@@ -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()
|
||||||
|
if(changelings.len)
|
||||||
|
var/text = "<FONT size = 2><B>The changelings were:</B></FONT>"
|
||||||
for(var/datum/mind/changeling in changelings)
|
for(var/datum/mind/changeling in changelings)
|
||||||
var/changelingwin = 1
|
var/changelingwin = 1
|
||||||
var/changeling_name
|
|
||||||
if((changeling.current) && (changeling.current.changeling))
|
|
||||||
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>"
|
|
||||||
|
|
||||||
|
text += "<br>[changeling.key] was [changeling.name] ("
|
||||||
|
if(changeling.current && changeling.current.changeling)
|
||||||
|
if(changeling.current.stat == DEAD)
|
||||||
|
text += "died"
|
||||||
|
else
|
||||||
|
text += "survived"
|
||||||
|
if(changeling.current.real_name != changeling.name)
|
||||||
|
text += " as [changeling.current.real_name]"
|
||||||
|
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
|
var/count = 1
|
||||||
for(var/datum/objective/objective in changeling.objectives)
|
for(var/datum/objective/objective in changeling.objectives)
|
||||||
if(objective.check_completion())
|
if(objective.check_completion())
|
||||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||||
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
|
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
|
||||||
else
|
else
|
||||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||||
feedback_add_details("changeling_objective","[objective.type]|FAIL")
|
feedback_add_details("changeling_objective","[objective.type]|FAIL")
|
||||||
changelingwin = 0
|
changelingwin = 0
|
||||||
count++
|
count++
|
||||||
|
|
||||||
else
|
|
||||||
changeling_name = "[changeling.key] (character destroyed)"
|
|
||||||
changelingwin = 0
|
|
||||||
|
|
||||||
if(changelingwin)
|
if(changelingwin)
|
||||||
world << "<B>The changeling was successful!<B>"
|
text += "<br><B>The changeling was successful!<B>"
|
||||||
feedback_add_details("changeling_success","SUCCESS")
|
feedback_add_details("changeling_success","SUCCESS")
|
||||||
else
|
else
|
||||||
world << "<B>The changeling has failed!<B>"
|
text += "<br><B>The changeling has failed!<B>"
|
||||||
feedback_add_details("changeling_success","FAIL")
|
feedback_add_details("changeling_success","FAIL")
|
||||||
|
|
||||||
|
world << text
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@@ -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,10 +310,10 @@
|
|||||||
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])
|
||||||
@@ -325,14 +325,12 @@
|
|||||||
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. \red Failed."
|
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. \red Failed."
|
||||||
feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
|
feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
|
||||||
if("sacrifice")
|
if("sacrifice")
|
||||||
if(!sacrifice_target)
|
if(sacrifice_target)
|
||||||
explanation = "Free objective"
|
if(sacrifice_target in sacrificed)
|
||||||
else
|
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. \green <b>Success!</b>"
|
||||||
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")
|
feedback_add_details("cult_objective","cult_sacrifice|SUCCESS")
|
||||||
else if(sacrifice_target && sacrifice_target.current)
|
else if(sacrifice_target && sacrifice_target.current)
|
||||||
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. \red Failed."
|
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. \red Failed."
|
||||||
feedback_add_details("cult_objective","cult_sacrifice|FAIL")
|
feedback_add_details("cult_objective","cult_sacrifice|FAIL")
|
||||||
else
|
else
|
||||||
explanation = "Sacrifice Unknown, the Unknown whos body was likely gibbed. \red Failed."
|
explanation = "Sacrifice Unknown, the Unknown whos body was likely gibbed. \red Failed."
|
||||||
@@ -344,24 +342,28 @@
|
|||||||
else
|
else
|
||||||
explanation = "Summon Nar-Sie. \red Failed."
|
explanation = "Summon Nar-Sie. \red Failed."
|
||||||
feedback_add_details("cult_objective","cult_narsie|FAIL")
|
feedback_add_details("cult_objective","cult_narsie|FAIL")
|
||||||
world << "<B>Objective #[obj_count]</B>: [explanation]"
|
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
|
||||||
|
|||||||
@@ -345,15 +345,14 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
//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] += ", [M.real_name]([M.ckey])"
|
total_antagonists[temprole] += ", [Mind.name]([Mind.key])"
|
||||||
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...")
|
||||||
|
|||||||
@@ -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] ("
|
||||||
|
if(malf.current)
|
||||||
|
if(malf.current.stat == DEAD)
|
||||||
|
text += "deactivated"
|
||||||
else
|
else
|
||||||
text += "[ai.key] (character destroyed)"
|
text += "operational"
|
||||||
world << "<FONT size = 2><B>The malfunctioning AI was [text]</B></FONT>"
|
if(malf.current.real_name != malf.name)
|
||||||
|
text += " as [malf.current.real_name]"
|
||||||
else
|
else
|
||||||
world << "<FONT size = 2><B>The malfunctioning AI were: </B></FONT>"
|
text += "hardware destroyed"
|
||||||
var/list/ai_names = new
|
text += ")"
|
||||||
for(var/datum/mind/ai in malf_ai)
|
|
||||||
if(ai.current)
|
world << text
|
||||||
ai_names += ai.current.real_name + ((ai.current.stat==2)?" (Dead)":"")
|
return 1
|
||||||
else
|
|
||||||
ai_names += "[ai.key] (character destroyed)"
|
|
||||||
world << english_list(ai_names)
|
|
||||||
@@ -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>"
|
||||||
|
if( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
|
||||||
|
text += "<br><font size=2>[player.real_name] escaped in a life pod.</font>"
|
||||||
else
|
else
|
||||||
survivors[player.real_name] = "alive"
|
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
|
||||||
|
|||||||
@@ -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
|
else
|
||||||
text += "[mind.key] (character destroyed)"
|
text += "survived"
|
||||||
|
if(syndicate.current.real_name != syndicate.name)
|
||||||
|
text += " as [syndicate.current.real_name]"
|
||||||
|
else
|
||||||
|
text += "body destroyed"
|
||||||
|
text += ")"
|
||||||
|
|
||||||
world << 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
|
||||||
@@ -197,26 +197,15 @@ 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
|
|
||||||
if (get_turf(player) in pod3)
|
|
||||||
return 0
|
|
||||||
if (get_turf(player) in pod4)
|
|
||||||
return 0
|
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
|
||||||
|
|||||||
@@ -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(head_revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution))
|
||||||
if(i.current)
|
var/text = "<FONT size = 2><B>The head revolutionaries were:</B></FONT>"
|
||||||
var/hstatus = ""
|
|
||||||
if(i.current.stat == 2)
|
for(var/datum/mind/headrev in head_revolutionaries)
|
||||||
hstatus = "Dead"
|
text += "<br>[headrev.key] was [headrev.name] ("
|
||||||
else if(i.current.z != 1)
|
if(headrev.current)
|
||||||
hstatus = "Abandoned the station"
|
if(headrev.current.stat == DEAD)
|
||||||
names += i.current.real_name + " ([hstatus])"
|
text += "died"
|
||||||
|
else if(headrev.current.z != 1)
|
||||||
|
text += "fled the station"
|
||||||
else
|
else
|
||||||
names += "[i.key] (character destroyed)"
|
text += "survived the revolution"
|
||||||
world << "<FONT size = 2><B>The head revolutionaries were: </B></FONT>"
|
if(headrev.current.real_name != headrev.name)
|
||||||
world << english_list(names)
|
text += " as [headrev.current.real_name]"
|
||||||
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
|
else
|
||||||
names += "[i.key] (character destroyed)"
|
text += "body destroyed"
|
||||||
if (revolutionaries.len!=0)
|
text += ")"
|
||||||
world << "<FONT size = 2><B>The ordinary revolutionaries were: </B></FONT>"
|
|
||||||
world << english_list(names)
|
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
|
else
|
||||||
world << "The head revolutionaries failed to enlist any <FONT size = 2><B>ordinary revolutionaries</B></FONT>"
|
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()
|
var/list/heads = get_all_heads()
|
||||||
var/list/targets = new
|
for(var/datum/mind/head in heads)
|
||||||
for (var/datum/mind/i in head_revolutionaries)
|
var/target = (head in targets)
|
||||||
for (var/datum/objective/mutiny/o in i.objectives)
|
if(target)
|
||||||
targets |= o.target
|
text += "<font color='red'>"
|
||||||
if (head_revolutionaries.len!=0 || \
|
text += "<br>[head.key] was [head.name] ("
|
||||||
revolutionaries.len!=0 || \
|
if(head.current)
|
||||||
istype(ticker.mode,/datum/game_mode/revolution))
|
if(head.current.stat == DEAD)
|
||||||
|
text += "died"
|
||||||
var/list/names = new
|
else if(head.current.z != 1)
|
||||||
for(var/datum/mind/i in heads)
|
text += "fled the station"
|
||||||
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
|
else
|
||||||
names += "[i.key] (character destroyed)" + ((i in targets)?"(target)":"")
|
text += "survived the revolution"
|
||||||
if (heads.len!=0)
|
if(head.current.real_name != head.name)
|
||||||
world << "<FONT size = 2><B>The heads of staff were: </B></FONT>"
|
text += " as [head.current.real_name]"
|
||||||
world << english_list(names)
|
|
||||||
else
|
else
|
||||||
world << "There were no any <FONT size = 2><B>heads of staff</B></FONT> on the station."
|
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) && \
|
||||||
|
|||||||
@@ -164,39 +164,49 @@
|
|||||||
|
|
||||||
|
|
||||||
/datum/game_mode/proc/auto_declare_completion_traitor()
|
/datum/game_mode/proc/auto_declare_completion_traitor()
|
||||||
|
if(traitors.len)
|
||||||
|
var/text = "<FONT size = 2><B>The traitors were:</B></FONT>"
|
||||||
for(var/datum/mind/traitor in traitors)
|
for(var/datum/mind/traitor in traitors)
|
||||||
var/traitor_name
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
text += "<br>[traitor.key] was [traitor.name] ("
|
||||||
|
if(traitor.current)
|
||||||
|
if(traitor.current.stat == DEAD)
|
||||||
|
text += "died"
|
||||||
|
else
|
||||||
|
text += "survived"
|
||||||
|
if(traitor.current.real_name != traitor.name)
|
||||||
|
text += " as [traitor.current.real_name]"
|
||||||
|
else
|
||||||
|
text += "body destroyed"
|
||||||
|
text += ")"
|
||||||
|
|
||||||
|
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
|
||||||
var/count = 1
|
var/count = 1
|
||||||
for(var/datum/objective/objective in traitor.objectives)
|
for(var/datum/objective/objective in traitor.objectives)
|
||||||
if(objective.check_completion())
|
if(objective.check_completion())
|
||||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||||
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
|
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
|
||||||
else
|
else
|
||||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||||
feedback_add_details("traitor_objective","[objective.type]|FAIL")
|
feedback_add_details("traitor_objective","[objective.type]|FAIL")
|
||||||
traitorwin = 0
|
traitorwin = 0
|
||||||
count++
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
|
if(wizards.len)
|
||||||
|
var/text = "<FONT size = 2><B>The wizards/witches were:</B></FONT>"
|
||||||
|
|
||||||
for(var/datum/mind/wizard in wizards)
|
for(var/datum/mind/wizard in wizards)
|
||||||
var/wizard_name
|
|
||||||
|
text += "<br>[wizard.key] was [wizard.name] ("
|
||||||
if(wizard.current)
|
if(wizard.current)
|
||||||
if(wizard.current == wizard.original)
|
if(wizard.current.stat == DEAD)
|
||||||
wizard_name = "[wizard.current.real_name] (played by [wizard.key])"
|
text += "died"
|
||||||
else if (wizard.original)
|
|
||||||
wizard_name = "[wizard.current.real_name] (originally [wizard.original.real_name]) (played by [wizard.key])"
|
|
||||||
else
|
else
|
||||||
wizard_name = "[wizard.current.real_name] (original character destroyed) (played by [wizard.key])"
|
text += "survived"
|
||||||
|
if(wizard.current.real_name != wizard.name)
|
||||||
|
text += " as [wizard.current.real_name]"
|
||||||
else
|
else
|
||||||
wizard_name = "[wizard.key] (character destroyed)"
|
text += "body destroyed"
|
||||||
world << "<B>The wizard was [wizard_name]</B>"
|
text += ")"
|
||||||
|
|
||||||
var/count = 1
|
var/count = 1
|
||||||
var/wizardwin = 1
|
var/wizardwin = 1
|
||||||
for(var/datum/objective/objective in wizard.objectives)
|
for(var/datum/objective/objective in wizard.objectives)
|
||||||
if(objective.check_completion())
|
if(objective.check_completion())
|
||||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||||
feedback_add_details("wizard_objective","[objective.type]|SUCCESS")
|
feedback_add_details("wizard_objective","[objective.type]|SUCCESS")
|
||||||
else
|
else
|
||||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||||
feedback_add_details("wizard_objective","[objective.type]|FAIL")
|
feedback_add_details("wizard_objective","[objective.type]|FAIL")
|
||||||
wizardwin = 0
|
wizardwin = 0
|
||||||
count++
|
count++
|
||||||
|
|
||||||
if(wizard.current && wizard.current.stat!=2 && wizardwin)
|
if(wizard.current && wizard.current.stat!=2 && wizardwin)
|
||||||
world << "<B>The wizard was successful!<B>"
|
text += "<br><B>The wizard was successful!<B>"
|
||||||
feedback_add_details("wizard_success","SUCCESS")
|
feedback_add_details("wizard_success","SUCCESS")
|
||||||
else
|
else
|
||||||
world << "<B>The wizard has failed!<B>"
|
text += "<br><B>The wizard has failed!<B>"
|
||||||
feedback_add_details("wizard_success","FAIL")
|
feedback_add_details("wizard_success","FAIL")
|
||||||
|
|
||||||
|
world << text
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//OTHER PROCS
|
//OTHER PROCS
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user