mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +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
|
||||
M.real_name = new_name
|
||||
M.name = new_name
|
||||
if(M.mind)
|
||||
M.mind.name = new_name
|
||||
if(M.mind) M.mind.name = new_name
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if (href_list["varnameedit"])
|
||||
|
||||
@@ -31,13 +31,12 @@
|
||||
|
||||
datum/mind
|
||||
var/key
|
||||
var/name //replaces mob/var/original_name
|
||||
var/name //replaces mob/var/original_name
|
||||
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/memory
|
||||
//TODO: store original name --rastaf0
|
||||
|
||||
var/assigned_role
|
||||
var/special_role
|
||||
@@ -778,16 +777,16 @@ datum/mind
|
||||
ticker.mode.malf_ai -= src
|
||||
special_role = null
|
||||
|
||||
current.verbs -= /mob/living/silicon/ai/proc/choose_modules
|
||||
current.verbs -= /datum/game_mode/malfunction/proc/takeover
|
||||
current.verbs -= /datum/game_mode/malfunction/proc/ai_win
|
||||
current.verbs -= /client/proc/fireproof_core
|
||||
current.verbs -= /client/proc/upgrade_turrets
|
||||
current.verbs -= /client/proc/disable_rcd
|
||||
current.verbs -= /client/proc/overload_machine
|
||||
current.verbs -= /client/proc/blackout
|
||||
current.verbs -= /client/proc/interhack
|
||||
current.verbs -= /client/proc/reactivate_camera
|
||||
current.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
|
||||
/datum/game_mode/malfunction/proc/takeover,
|
||||
/datum/game_mode/malfunction/proc/ai_win,
|
||||
/client/proc/fireproof_core,
|
||||
/client/proc/upgrade_turrets,
|
||||
/client/proc/disable_rcd,
|
||||
/client/proc/overload_machine,
|
||||
/client/proc/blackout,
|
||||
/client/proc/interhack,
|
||||
/client/proc/reactivate_camera)
|
||||
|
||||
current:laws = new /datum/ai_laws/asimov
|
||||
del(current:malf_picker)
|
||||
@@ -1092,8 +1091,6 @@ datum/mind
|
||||
//Initialisation procs
|
||||
/mob/living/proc/mind_initialize()
|
||||
if(mind)
|
||||
if(mind.key != key)
|
||||
world.log << "## DEBUG: mind_initialize(): [key] took possession of [mind.key]'s mind"
|
||||
mind.key = key
|
||||
else
|
||||
mind = new /datum/mind(key)
|
||||
|
||||
@@ -156,36 +156,50 @@
|
||||
changeling_mob.make_changeling()
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_changeling()
|
||||
for(var/datum/mind/changeling in changelings)
|
||||
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>"
|
||||
if(changelings.len)
|
||||
var/text = "<FONT size = 2><B>The changelings were:</B></FONT>"
|
||||
for(var/datum/mind/changeling in changelings)
|
||||
var/changelingwin = 1
|
||||
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in changeling.objectives)
|
||||
if(objective.check_completion())
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
|
||||
text += "<br>[changeling.key] was [changeling.name] ("
|
||||
if(changeling.current && changeling.current.changeling)
|
||||
if(changeling.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||
feedback_add_details("changeling_objective","[objective.type]|FAIL")
|
||||
changelingwin = 0
|
||||
count++
|
||||
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
|
||||
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
|
||||
|
||||
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
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."
|
||||
if("sacrifice")
|
||||
if(sacrifice_target && sacrifice_target.current)
|
||||
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."
|
||||
if(sacrifice_target)
|
||||
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
|
||||
explanation = "Free objective."
|
||||
if("eldergod")
|
||||
@@ -310,58 +310,60 @@
|
||||
feedback_set("round_end_result",acolytes_survived)
|
||||
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:"
|
||||
|
||||
for(var/obj_count=1,obj_count <= objectives.len,obj_count++)
|
||||
var/explanation
|
||||
switch(objectives[obj_count])
|
||||
if("survive")
|
||||
if(!check_survive())
|
||||
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]")
|
||||
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")
|
||||
if(objectives.len)
|
||||
text += "<br><b>The cultists' objectives were:</b>"
|
||||
for(var/obj_count=1, obj_count <= objectives.len, obj_count++)
|
||||
var/explanation
|
||||
switch(objectives[obj_count])
|
||||
if("survive")
|
||||
if(!check_survive())
|
||||
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]")
|
||||
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")
|
||||
world << "<B>Objective #[obj_count]</B>: [explanation]"
|
||||
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)
|
||||
if(sacrifice_target in sacrificed)
|
||||
explanation = "Sacrifice [sacrifice_target.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.name], the [sacrifice_target.assigned_role]. \red Failed."
|
||||
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
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_cult()
|
||||
if (cult.len!=0 || (ticker && istype(ticker.mode,/datum/game_mode/cult)))
|
||||
world << "<FONT size = 2><B>The cultists were: </B></FONT>"
|
||||
var/text = ""
|
||||
for(var/datum/mind/cult_nh_mind in cult)
|
||||
if(cult_nh_mind.current)
|
||||
text += "[cult_nh_mind.current.real_name]"
|
||||
if(cult_nh_mind.current.stat == 2)
|
||||
text += " (Dead)"
|
||||
if( cult.len || (ticker && istype(ticker.mode,/datum/game_mode/cult)) )
|
||||
var/text = "<FONT size = 2><B>The cultists were:</B></FONT>"
|
||||
for(var/datum/mind/cultist in cult)
|
||||
|
||||
text += "<br>[cultist.key] was [cultist.name] ("
|
||||
if(cultist.current)
|
||||
if(cultist.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += " (Survived!)"
|
||||
text += "survived"
|
||||
if(cultist.current.real_name != cultist.name)
|
||||
text += " as [cultist.current.real_name]"
|
||||
else
|
||||
text += "[cult_nh_mind.key] (character destroyed)"
|
||||
text += ", "
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
world << text
|
||||
|
||||
@@ -338,22 +338,21 @@ var/global/datum/controller/gameticker/ticker
|
||||
mode.declare_completion()//To declare normal completion.
|
||||
|
||||
//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_"))
|
||||
call(mode, handler)()
|
||||
|
||||
//Print a list of antagonists to the server log
|
||||
var/list/total_antagonists = list()
|
||||
//Look into all mobs in world, dead or alive
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.mind && M.mind.special_role) //If they have a mind and are an antagonist of some sort...
|
||||
var/temprole = M.mind.special_role
|
||||
|
||||
if(temprole in total_antagonists) //If the role exists already, add the name to it
|
||||
total_antagonists[temprole] += ", [M.real_name]([M.ckey])"
|
||||
for(var/datum/mind/Mind in minds)
|
||||
var/temprole = 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
|
||||
total_antagonists[temprole] += ", [Mind.name]([Mind.key])"
|
||||
else
|
||||
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!
|
||||
log_game("Antagonists at round end were...")
|
||||
|
||||
@@ -237,21 +237,22 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_malfunction()
|
||||
if (malf_ai.len!=0 || istype(ticker.mode,/datum/game_mode/malfunction))
|
||||
if (malf_ai.len==1)
|
||||
var/text = ""
|
||||
var/datum/mind/ai = malf_ai[1]
|
||||
if(ai.current)
|
||||
text += "[ai.current.real_name]"
|
||||
else
|
||||
text += "[ai.key] (character destroyed)"
|
||||
world << "<FONT size = 2><B>The malfunctioning AI was [text]</B></FONT>"
|
||||
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)":"")
|
||||
if( malf_ai.len || istype(ticker.mode,/datum/game_mode/malfunction) )
|
||||
var/text = "<FONT size = 2><B>The malfunctioning AI were:</B></FONT>"
|
||||
|
||||
for(var/datum/mind/malf in malf_ai)
|
||||
|
||||
text += "<br>[malf.key] was [malf.name] ("
|
||||
if(malf.current)
|
||||
if(malf.current.stat == DEAD)
|
||||
text += "deactivated"
|
||||
else
|
||||
ai_names += "[ai.key] (character destroyed)"
|
||||
world << english_list(ai_names)
|
||||
text += "operational"
|
||||
if(malf.current.real_name != malf.name)
|
||||
text += " as [malf.current.real_name]"
|
||||
else
|
||||
text += "hardware destroyed"
|
||||
text += ")"
|
||||
|
||||
world << text
|
||||
return 1
|
||||
@@ -37,36 +37,28 @@
|
||||
|
||||
|
||||
/datum/game_mode/meteor/declare_completion()
|
||||
var/list/survivors = list()
|
||||
var/area/escape_zone = locate(/area/shuttle/escape/centcom)
|
||||
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 )
|
||||
|
||||
var/text
|
||||
var/survivors = 0
|
||||
for(var/mob/living/player in player_list)
|
||||
if (player.stat != 2)
|
||||
if(player.stat != DEAD)
|
||||
var/turf/location = get_turf(player.loc)
|
||||
if (location in escape_zone)
|
||||
survivors[player.real_name] = "shuttle"
|
||||
else if (location.loc.type in pod_zone)
|
||||
survivors[player.real_name] = "pod"
|
||||
else
|
||||
survivors[player.real_name] = "alive"
|
||||
if(!location) continue
|
||||
switch(location.loc.type)
|
||||
if( /area/shuttle/escape/centcom )
|
||||
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
|
||||
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("round_end_result",survivors.len)
|
||||
|
||||
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>"
|
||||
feedback_set("round_end_result",survivors)
|
||||
|
||||
..()
|
||||
return 1
|
||||
|
||||
@@ -322,17 +322,25 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_nuclear()
|
||||
if (syndicates.len!=0 || (ticker && istype(ticker.mode,/datum/game_mode/nuclear)))
|
||||
world << "<FONT size = 2><B>The Syndicate operatives were: </B></FONT>"
|
||||
for(var/datum/mind/mind in syndicates)
|
||||
var/text = ""
|
||||
if(mind.current)
|
||||
text += "[mind.key] was [mind.current.real_name]"
|
||||
if(mind.current.stat == 2)
|
||||
text += " (Dead)"
|
||||
if( syndicates.len || (ticker && istype(ticker.mode,/datum/game_mode/nuclear)) )
|
||||
var/text = "<FONT size = 2><B>The syndicate operatives were:</B></FONT>"
|
||||
|
||||
for(var/datum/mind/syndicate in syndicates)
|
||||
|
||||
text += "<br>[syndicate.key] was [syndicate.name] ("
|
||||
if(syndicate.current)
|
||||
if(syndicate.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(syndicate.current.real_name != syndicate.name)
|
||||
text += " as [syndicate.current.real_name]"
|
||||
else
|
||||
text += "[mind.key] (character destroyed)"
|
||||
world << text
|
||||
text += "body destroyed"
|
||||
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.
|
||||
@@ -353,8 +361,8 @@
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
switch(synd_mind.current.gender)
|
||||
if("male")
|
||||
synd_mind.current.real_name = "[pick(first_names_male)] [lastname]"
|
||||
synd_mind.name = "[pick(first_names_male)] [lastname]"
|
||||
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
|
||||
@@ -197,27 +197,16 @@ datum/objective/silence
|
||||
if(emergency_shuttle.location<2)
|
||||
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)
|
||||
if (player == owner.current)
|
||||
if(player == owner.current)
|
||||
continue
|
||||
if (player.mind)
|
||||
if (player.stat != 2)
|
||||
if (get_turf(player) in shuttle)
|
||||
return 0
|
||||
if (get_turf(player) in pod1)
|
||||
return 0
|
||||
if (get_turf(player) in pod2)
|
||||
return 0
|
||||
if (get_turf(player) in pod3)
|
||||
return 0
|
||||
if (get_turf(player) in pod4)
|
||||
return 0
|
||||
if(player.mind)
|
||||
if(player.stat != DEAD)
|
||||
var/turf/T = get_turf(player)
|
||||
if(!T) continue
|
||||
switch(T.loc.type)
|
||||
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)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -260,7 +249,6 @@ datum/objective/escape
|
||||
datum/objective/survive
|
||||
explanation_text = "Stay alive until the end."
|
||||
|
||||
|
||||
check_completion()
|
||||
if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
|
||||
return 0 //Brains no longer win survive objectives. --NEO
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = rev_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
|
||||
|
||||
// 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
|
||||
rev_obj.owner = rev_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
|
||||
|
||||
/datum/game_mode/proc/greet_revolutionary(var/datum/mind/rev_mind, var/you_are=1)
|
||||
@@ -344,64 +344,75 @@
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_revolution()
|
||||
if(head_revolutionaries.len!=0 || istype(ticker.mode,/datum/game_mode/revolution))
|
||||
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/targets = list()
|
||||
|
||||
var/list/names = new
|
||||
for(var/datum/mind/i in heads)
|
||||
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."
|
||||
if(head_revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution))
|
||||
var/text = "<FONT size = 2><B>The head revolutionaries were:</B></FONT>"
|
||||
|
||||
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)
|
||||
return istype(mind) && \
|
||||
|
||||
@@ -164,39 +164,49 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_traitor()
|
||||
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.
|
||||
if(traitors.len)
|
||||
var/text = "<FONT size = 2><B>The traitors were:</B></FONT>"
|
||||
for(var/datum/mind/traitor in traitors)
|
||||
var/traitorwin = 1
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in traitor.objectives)
|
||||
if(objective.check_completion())
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
|
||||
|
||||
text += "<br>[traitor.key] was [traitor.name] ("
|
||||
if(traitor.current)
|
||||
if(traitor.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||
feedback_add_details("traitor_objective","[objective.type]|FAIL")
|
||||
traitorwin = 0
|
||||
count++
|
||||
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
|
||||
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)
|
||||
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")
|
||||
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")
|
||||
|
||||
world << text
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -123,6 +123,8 @@
|
||||
|
||||
wizard_mob.real_name = newname
|
||||
wizard_mob.name = newname
|
||||
if(wizard_mob.mind)
|
||||
wizard_mob.mind.name = newname
|
||||
return
|
||||
|
||||
|
||||
@@ -207,36 +209,43 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_wizard()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
var/wizard_name
|
||||
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(wizards.len)
|
||||
var/text = "<FONT size = 2><B>The wizards/witches were:</B></FONT>"
|
||||
|
||||
if(wizard.current && wizard.current.stat!=2 && wizardwin)
|
||||
world << "<B>The wizard was successful!<B>"
|
||||
feedback_add_details("wizard_success","SUCCESS")
|
||||
else
|
||||
world << "<B>The wizard has failed!<B>"
|
||||
feedback_add_details("wizard_success","FAIL")
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
|
||||
text += "<br>[wizard.key] was [wizard.name] ("
|
||||
if(wizard.current)
|
||||
if(wizard.current.stat == DEAD)
|
||||
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
|
||||
|
||||
//OTHER PROCS
|
||||
|
||||
@@ -837,6 +837,7 @@
|
||||
#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\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\personality.dm"
|
||||
#include "code\modules\mob\living\silicon\pai\recruit.dm"
|
||||
|
||||
Reference in New Issue
Block a user