|
|
|
@@ -1,32 +1,22 @@
|
|
|
|
|
/* Note from Carnie:
|
|
|
|
|
The way datum/mind stuff works has been changed a lot.
|
|
|
|
|
Minds now represent IC characters rather than following a client around constantly.
|
|
|
|
|
|
|
|
|
|
Guidelines for using minds properly:
|
|
|
|
|
|
|
|
|
|
- Never mind.transfer_to(ghost). The var/current and var/original of a mind must always be of type mob/living!
|
|
|
|
|
ghost.mind is however used as a reference to the ghost's corpse
|
|
|
|
|
|
|
|
|
|
- When creating a new mob for an existing IC character (e.g. cloning a dead guy or borging a brain of a human)
|
|
|
|
|
the existing mind of the old mob should be transfered to the new mob like so:
|
|
|
|
|
|
|
|
|
|
mind.transfer_to(new_mob)
|
|
|
|
|
|
|
|
|
|
- You must not assign key= or ckey= after transfer_to() since the transfer_to transfers the client for you.
|
|
|
|
|
By setting key or ckey explicitly after transfering the mind with transfer_to you will cause bugs like DCing
|
|
|
|
|
the player.
|
|
|
|
|
|
|
|
|
|
- IMPORTANT NOTE 2, if you want a player to become a ghost, use mob.ghostize() It does all the hard work for you.
|
|
|
|
|
|
|
|
|
|
- When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting
|
|
|
|
|
a ghost to become a xeno during an event). Simply assign the key or ckey like you've always done.
|
|
|
|
|
|
|
|
|
|
new_mob.key = key
|
|
|
|
|
|
|
|
|
|
The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple!
|
|
|
|
|
However if you want that mind to have any special properties like being a traitor etc you will have to do that
|
|
|
|
|
yourself.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/datum/mind
|
|
|
|
@@ -47,7 +37,7 @@
|
|
|
|
|
var/role_alt_title
|
|
|
|
|
|
|
|
|
|
var/datum/job/assigned_job
|
|
|
|
|
var/list/kills=list()
|
|
|
|
|
var/list/kills = list()
|
|
|
|
|
var/list/datum/objective/objectives = list()
|
|
|
|
|
var/list/datum/objective/special_verbs = list()
|
|
|
|
|
|
|
|
|
@@ -78,9 +68,8 @@
|
|
|
|
|
//zealot_master is a reference to the mob that converted them into a zealot (for ease of investigation and such)
|
|
|
|
|
var/mob/living/carbon/human/zealot_master = null
|
|
|
|
|
|
|
|
|
|
/datum/mind/New(var/key)
|
|
|
|
|
src.key = key
|
|
|
|
|
|
|
|
|
|
/datum/mind/New(new_key)
|
|
|
|
|
key = new_key
|
|
|
|
|
|
|
|
|
|
/datum/mind/Destroy()
|
|
|
|
|
ticker.minds -= src
|
|
|
|
@@ -122,19 +111,15 @@
|
|
|
|
|
/datum/mind/proc/wipe_memory()
|
|
|
|
|
memory = null
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/show_memory(mob/recipient, window=1)
|
|
|
|
|
/datum/mind/proc/show_memory(mob/recipient, window = 1)
|
|
|
|
|
if(!recipient)
|
|
|
|
|
recipient = current
|
|
|
|
|
var/output = "<B>[current.real_name]'s Memories:</B><HR>"
|
|
|
|
|
output += memory
|
|
|
|
|
|
|
|
|
|
if(objectives.len)
|
|
|
|
|
output += "<HR><B>Objectives:</B>"
|
|
|
|
|
|
|
|
|
|
var/obj_count = 1
|
|
|
|
|
for(var/datum/objective/objective in objectives)
|
|
|
|
|
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
|
|
|
|
obj_count++
|
|
|
|
|
output += "<HR><B>Objectives:</B><BR>"
|
|
|
|
|
output += gen_objective_text()
|
|
|
|
|
|
|
|
|
|
if(job_objectives.len)
|
|
|
|
|
output += "<HR><B>Job Objectives:</B><UL>"
|
|
|
|
@@ -145,17 +130,213 @@
|
|
|
|
|
obj_count++
|
|
|
|
|
output += "</UL>"
|
|
|
|
|
if(window)
|
|
|
|
|
recipient << browse(output,"window=memory")
|
|
|
|
|
recipient << browse(output, "window=memory")
|
|
|
|
|
else
|
|
|
|
|
to_chat(recipient, "<i>[output]</i>")
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/gen_objective_text(admin = FALSE)
|
|
|
|
|
. = ""
|
|
|
|
|
var/obj_count = 1
|
|
|
|
|
for(var/datum/objective/objective in objectives)
|
|
|
|
|
. += "<b>Objective #[obj_count]</b>: [objective.explanation_text]"
|
|
|
|
|
if(admin)
|
|
|
|
|
. += " <a href='?src=[UID()];obj_edit=\ref[objective]'>Edit</a> " // Edit
|
|
|
|
|
. += "<a href='?src=[UID()];obj_delete=\ref[objective]'>Delete</a> " // Delete
|
|
|
|
|
|
|
|
|
|
. += "<a href='?src=[UID()];obj_completed=\ref[objective]'>" // Mark Completed
|
|
|
|
|
. += "<font color=[objective.completed ? "green" : "red"]>Toggle Completion</font>"
|
|
|
|
|
. += "</a>"
|
|
|
|
|
. += "<br>"
|
|
|
|
|
obj_count++
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/_memory_edit_header(gamemode, list/alt)
|
|
|
|
|
. = gamemode
|
|
|
|
|
if(ticker.mode.config_tag == gamemode || (LAZYLEN(alt) && (ticker.mode.config_tag in alt)))
|
|
|
|
|
. = uppertext(.)
|
|
|
|
|
. = "<i><b>[.]</b></i>: "
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/_memory_edit_role_enabled(role)
|
|
|
|
|
. = "|Disabled in Prefs"
|
|
|
|
|
if(current && current.client && (role in current.client.prefs.be_special))
|
|
|
|
|
. = "|Enabled in Prefs"
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_implant(mob/living/carbon/human/H)
|
|
|
|
|
if(ismindshielded(H))
|
|
|
|
|
. = "Mindshield Implant:<a href='?src=[UID()];implant=remove'>Remove</a>|<b><font color='green'>Implanted</font></b></br>"
|
|
|
|
|
else
|
|
|
|
|
. = "Mindshield Implant:<b>No Implant</b>|<a href='?src=[UID()];implant=add'>Implant [H.p_them()]!</a></br>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_revolution(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("revolution")
|
|
|
|
|
if(ismindshielded(H))
|
|
|
|
|
. += "<b>NO</b>|headrev|rev"
|
|
|
|
|
else if(src in ticker.mode.head_revolutionaries)
|
|
|
|
|
. += "<a href='?src=[UID()];revolution=clear'>no</a>|<b><font color='red'>HEADREV</font></b>|<a href='?src=[UID()];revolution=rev'>rev</a>"
|
|
|
|
|
. += "<br>Flash: <a href='?src=[UID()];revolution=flash'>give</a>"
|
|
|
|
|
|
|
|
|
|
var/list/L = current.get_contents()
|
|
|
|
|
var/obj/item/flash/flash = locate() in L
|
|
|
|
|
if(flash)
|
|
|
|
|
if(!flash.broken)
|
|
|
|
|
. += "|<a href='?src=[UID()];revolution=takeflash'>take</a>."
|
|
|
|
|
else
|
|
|
|
|
. += "|<a href='?src=[UID()];revolution=takeflash'>take</a>|<a href='?src=[UID()];revolution=repairflash'>repair</a>."
|
|
|
|
|
else
|
|
|
|
|
. += "."
|
|
|
|
|
|
|
|
|
|
. += " <a href='?src=[UID()];revolution=reequip'>Reequip</a> (gives traitor uplink)."
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
. += "<br>Objectives are empty! <a href='?src=[UID()];revolution=autoobjectives'>Set to kill all heads</a>."
|
|
|
|
|
else if(src in ticker.mode.revolutionaries)
|
|
|
|
|
. += "<a href='?src=[UID()];revolution=clear'>no</a>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<b><font color='red'>REV</font></b>"
|
|
|
|
|
else
|
|
|
|
|
. += "<b>NO</b>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<a href='?src=[UID()];revolution=rev'>rev</a>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_REV)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_cult(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("cult")
|
|
|
|
|
if(ismindshielded(H))
|
|
|
|
|
. += "<B>NO</B>|cultist"
|
|
|
|
|
else if(src in ticker.mode.cult)
|
|
|
|
|
. += "<a href='?src=[UID()];cult=clear'>no</a>|<b><font color='red'>CULTIST</font></b>"
|
|
|
|
|
. += "<br>Give <a href='?src=[UID()];cult=tome'>tome</a>|<a href='?src=[UID()];cult=equip'>equip</a>."
|
|
|
|
|
else
|
|
|
|
|
. += "<b>NO</b>|<a href='?src=[UID()];cult=cultist'>cultist</a>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_CULTIST)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_wizard(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("wizard")
|
|
|
|
|
if(src in ticker.mode.wizards)
|
|
|
|
|
. += "<b><font color='red'>WIZARD</font></b>|<a href='?src=[UID()];wizard=clear'>no</a>"
|
|
|
|
|
. += "<br><a href='?src=[UID()];wizard=lair'>To lair</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];wizard=dressup'>dress up</a>, <a href='?src=[UID()];wizard=name'>let choose name</a>."
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
. += "<br>Objectives are empty! <a href='?src=[UID()];wizard=autoobjectives'>Randomize!</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];wizard=wizard'>wizard</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_WIZARD)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_changeling(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("changeling", list("traitorchan"))
|
|
|
|
|
if(src in ticker.mode.changelings)
|
|
|
|
|
. += "<b><font color='red'>CHANGELING</font></b>|<a href='?src=[UID()];changeling=clear'>no</a>"
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
. += "<br>Objectives are empty! <a href='?src=[UID()];changeling=autoobjectives'>Randomize!</a>"
|
|
|
|
|
if(changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]))
|
|
|
|
|
. += "<br><a href='?src=[UID()];changeling=initialdna'>Transform to initial appearance.</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];changeling=changeling'>changeling</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_CHANGELING)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_vampire(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("vampire", list("traitorvamp"))
|
|
|
|
|
if(src in ticker.mode.vampires)
|
|
|
|
|
. += "<b><font color='red'>VAMPIRE</font></b>|<a href='?src=[UID()];vampire=clear'>no</a>"
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
. += "<br>Objectives are empty! <a href='?src=[UID()];vampire=autoobjectives'>Randomize!</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];vampire=vampire'>vampire</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_VAMPIRE)
|
|
|
|
|
/** Enthralled ***/
|
|
|
|
|
. += "<br><b><i>enthralled</i></b>: "
|
|
|
|
|
if(src in ticker.mode.vampire_enthralled)
|
|
|
|
|
. += "<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];vampthrall=clear'>no</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "thrall|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_nuclear(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("nuclear")
|
|
|
|
|
if(src in ticker.mode.syndicates)
|
|
|
|
|
. += "<b><font color='red'>OPERATIVE</b></font>|<a href='?src=[UID()];nuclear=clear'>no</a>"
|
|
|
|
|
. += "<br><a href='?src=[UID()];nuclear=lair'>To shuttle</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];nuclear=dressup'>dress up</a>."
|
|
|
|
|
var/code
|
|
|
|
|
for(var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
|
|
|
|
|
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
|
|
|
|
code = bombue.r_code
|
|
|
|
|
break
|
|
|
|
|
if(code)
|
|
|
|
|
. += " Code is [code]. <a href='?src=[UID()];nuclear=tellcode'>tell the code.</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];nuclear=nuclear'>operative</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_OPERATIVE)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_shadowling(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("shadowling")
|
|
|
|
|
if(src in ticker.mode.shadows)
|
|
|
|
|
. += "<b><font color='red'>SHADOWLING</font></b>|thrall|<a href='?src=[UID()];shadowling=clear'>no</a>"
|
|
|
|
|
else if(src in ticker.mode.shadowling_thralls)
|
|
|
|
|
. += "Shadowling|<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];shadowling=clear'>no</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];shadowling=shadowling'>shadowling</a>|<a href='?src=[UID()];shadowling=thrall'>thrall</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_SHADOWLING)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_abductor(mob/living/carbon/human/H)
|
|
|
|
|
. = _memory_edit_header("abductor")
|
|
|
|
|
if(src in ticker.mode.abductors)
|
|
|
|
|
. += "<b><font color='red'>ABDUCTOR</font></b>|<a href='?src=[UID()];abductor=clear'>no</a>"
|
|
|
|
|
. += "|<a href='?src=[UID()];common=undress'>undress</a>|<a href='?src=[UID()];abductor=equip'>equip</a>"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];abductor=abductor'>abductor</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_ABDUCTOR)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_traitor()
|
|
|
|
|
. = _memory_edit_header("traitor", list("traitorchan", "traitorvamp"))
|
|
|
|
|
if(src in ticker.mode.traitors)
|
|
|
|
|
. += "<b><font color='red'>TRAITOR</font></b>|<a href='?src=[UID()];traitor=clear'>no</a>"
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
. += "<br>Objectives are empty! <a href='?src=[UID()];traitor=autoobjectives'>Randomize</a>!"
|
|
|
|
|
else
|
|
|
|
|
. += "<a href='?src=[UID()];traitor=traitor'>traitor</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
. += _memory_edit_role_enabled(ROLE_TRAITOR)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_silicon()
|
|
|
|
|
. = "<i><b>Silicon</b></i>: "
|
|
|
|
|
var/mob/living/silicon/robot/robot = current
|
|
|
|
|
if(istype(robot) && robot.emagged)
|
|
|
|
|
. += "<br>Cyborg: <b><font color='red'>Is emagged!</font></b> <a href='?src=[UID()];silicon=unemag'>Unemag!</a><br>0th law: [robot.laws.zeroth_law]"
|
|
|
|
|
var/mob/living/silicon/ai/ai = current
|
|
|
|
|
if(istype(ai) && ai.connected_robots.len)
|
|
|
|
|
var/n_e_robots = 0
|
|
|
|
|
for(var/mob/living/silicon/robot/R in ai.connected_robots)
|
|
|
|
|
if(R.emagged)
|
|
|
|
|
n_e_robots++
|
|
|
|
|
. += "<br>[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. <a href='?src=[UID()];silicon=unemagcyborgs'>Unemag</a>"
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/memory_edit_uplink()
|
|
|
|
|
. = ""
|
|
|
|
|
if(ishuman(current) && ((src in ticker.mode.head_revolutionaries) || \
|
|
|
|
|
(src in ticker.mode.traitors) || \
|
|
|
|
|
(src in ticker.mode.syndicates)))
|
|
|
|
|
. = "Uplink: <a href='?src=[UID()];common=uplink'>give</a>"
|
|
|
|
|
var/obj/item/uplink/hidden/suplink = find_syndicate_uplink()
|
|
|
|
|
var/crystals
|
|
|
|
|
if(suplink)
|
|
|
|
|
crystals = suplink.uses
|
|
|
|
|
if(suplink)
|
|
|
|
|
. += "|<a href='?src=[UID()];common=takeuplink'>take</a>"
|
|
|
|
|
if(usr.client.holder.rights & (R_SERVER|R_EVENT))
|
|
|
|
|
. += ", <a href='?src=[UID()];common=crystals'>[crystals]</a> crystals"
|
|
|
|
|
else
|
|
|
|
|
. += ", [crystals] crystals"
|
|
|
|
|
. += "." //hiel grammar
|
|
|
|
|
// ^ whoever left this comment is literally a grammar nazi. stalin better. in russia grammar correct you.
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/edit_memory()
|
|
|
|
|
if(!ticker || !ticker.mode)
|
|
|
|
|
alert("Not before round-start!", "Alert")
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
var/out = "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
|
|
|
|
|
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
|
|
|
|
|
var/out = "<B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])" : ""]<br>"
|
|
|
|
|
out += "Mind currently owned by key: [key] [active ? "(synced)" : "(not synced)"]<br>"
|
|
|
|
|
out += "Assigned role: [assigned_role]. <a href='?src=[UID()];role_edit=1'>Edit</a><br>"
|
|
|
|
|
out += "Factions and special roles:<br>"
|
|
|
|
|
|
|
|
|
@@ -169,284 +350,60 @@
|
|
|
|
|
"nuclear",
|
|
|
|
|
"traitor", // "traitorchan",
|
|
|
|
|
)
|
|
|
|
|
var/text = ""
|
|
|
|
|
var/mob/living/carbon/human/H = current
|
|
|
|
|
if(ishuman(current))
|
|
|
|
|
/** Impanted**/
|
|
|
|
|
if(ismindshielded(H))
|
|
|
|
|
text = "Mindshield Implant:<a href='?src=[UID()];implant=remove'>Remove</a>|<b><font color='green'>Implanted</font></b></br>"
|
|
|
|
|
else
|
|
|
|
|
text = "Mindshield Implant:<b>No Implant</b>|<a href='?src=[UID()];implant=add'>Implant [H.p_them()]!</a></br>"
|
|
|
|
|
sections["implant"] = text
|
|
|
|
|
sections["implant"] = memory_edit_implant(H)
|
|
|
|
|
/** REVOLUTION ***/
|
|
|
|
|
text = "revolution"
|
|
|
|
|
if(ticker.mode.config_tag=="revolution")
|
|
|
|
|
text += uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(ismindshielded(H))
|
|
|
|
|
text += "<b>NO</b>|headrev|rev"
|
|
|
|
|
else if(src in ticker.mode.head_revolutionaries)
|
|
|
|
|
text += "<a href='?src=[UID()];revolution=clear'>no</a>|<b><font color='red'>HEADREV</font></b>|<a href='?src=[UID()];revolution=rev'>rev</a>"
|
|
|
|
|
text += "<br>Flash: <a href='?src=[UID()];revolution=flash'>give</a>"
|
|
|
|
|
|
|
|
|
|
var/list/L = current.get_contents()
|
|
|
|
|
var/obj/item/flash/flash = locate() in L
|
|
|
|
|
if(flash)
|
|
|
|
|
if(!flash.broken)
|
|
|
|
|
text += "|<a href='?src=[UID()];revolution=takeflash'>take</a>."
|
|
|
|
|
else
|
|
|
|
|
text += "|<a href='?src=[UID()];revolution=takeflash'>take</a>|<a href='?src=[UID()];revolution=repairflash'>repair</a>."
|
|
|
|
|
else
|
|
|
|
|
text += "."
|
|
|
|
|
|
|
|
|
|
text += " <a href='?src=[UID()];revolution=reequip'>Reequip</a> (gives traitor uplink)."
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
text += "<br>Objectives are empty! <a href='?src=[UID()];revolution=autoobjectives'>Set to kill all heads</a>."
|
|
|
|
|
else if(src in ticker.mode.revolutionaries)
|
|
|
|
|
text += "<a href='?src=[UID()];revolution=clear'>no</a>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<b><font color='red'>REV</font></b>"
|
|
|
|
|
else
|
|
|
|
|
text += "<b>NO</b>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<a href='?src=[UID()];revolution=rev'>rev</a>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_REV in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["revolution"] = text
|
|
|
|
|
|
|
|
|
|
sections["revolution"] = memory_edit_revolution(H)
|
|
|
|
|
/** CULT ***/
|
|
|
|
|
text = "cult"
|
|
|
|
|
if(ticker.mode.config_tag=="cult")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(ismindshielded(H))
|
|
|
|
|
text += "<B>NO</B>|cultist"
|
|
|
|
|
else if(src in ticker.mode.cult)
|
|
|
|
|
text += "<a href='?src=[UID()];cult=clear'>no</a>|<b><font color='red'>CULTIST</font></b>"
|
|
|
|
|
text += "<br>Give <a href='?src=[UID()];cult=tome'>tome</a>|<a href='?src=[UID()];cult=equip'>equip</a>."
|
|
|
|
|
/*
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
text += "<br>Objectives are empty! Set to sacrifice and <a href='?src=[UID()];cult=escape'>escape</a> or <a href='?src=[UID()];cult=summon'>summon</a>."
|
|
|
|
|
*/
|
|
|
|
|
else
|
|
|
|
|
text += "<b>NO</b>|<a href='?src=[UID()];cult=cultist'>cultist</a>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_CULTIST in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["cult"] = text
|
|
|
|
|
|
|
|
|
|
sections["cult"] = memory_edit_cult(H)
|
|
|
|
|
/** WIZARD ***/
|
|
|
|
|
text = "wizard"
|
|
|
|
|
if(ticker.mode.config_tag=="wizard")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(src in ticker.mode.wizards)
|
|
|
|
|
text += "<b><font color='red'>WIZARD</font></b>|<a href='?src=[UID()];wizard=clear'>no</a>"
|
|
|
|
|
text += "<br><a href='?src=[UID()];wizard=lair'>To lair</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];wizard=dressup'>dress up</a>, <a href='?src=[UID()];wizard=name'>let choose name</a>."
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
text += "<br>Objectives are empty! <a href='?src=[UID()];wizard=autoobjectives'>Randomize!</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];wizard=wizard'>wizard</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_WIZARD in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["wizard"] = text
|
|
|
|
|
|
|
|
|
|
sections["wizard"] = memory_edit_wizard(H)
|
|
|
|
|
/** CHANGELING ***/
|
|
|
|
|
text = "changeling"
|
|
|
|
|
if(ticker.mode.config_tag=="changeling" || ticker.mode.config_tag=="traitorchan")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(src in ticker.mode.changelings)
|
|
|
|
|
text += "<b><font color='red'>CHANGELING</font></b>|<a href='?src=[UID()];changeling=clear'>no</a>"
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
text += "<br>Objectives are empty! <a href='?src=[UID()];changeling=autoobjectives'>Randomize!</a>"
|
|
|
|
|
if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) )
|
|
|
|
|
text += "<br><a href='?src=[UID()];changeling=initialdna'>Transform to initial appearance.</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];changeling=changeling'>changeling</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_CHANGELING in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["changeling"] = text
|
|
|
|
|
|
|
|
|
|
sections["changeling"] = memory_edit_changeling(H)
|
|
|
|
|
/** VAMPIRE ***/
|
|
|
|
|
text = "vampire"
|
|
|
|
|
if(ticker.mode.config_tag=="vampire" || ticker.mode.config_tag=="traitorvamp")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<b><i>[text]</i></b>: "
|
|
|
|
|
if(src in ticker.mode.vampires)
|
|
|
|
|
text += "<b><font color='red'>VAMPIRE</font></b>|<a href='?src=[UID()];vampire=clear'>no</a>"
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
text += "<br>Objectives are empty! <a href='?src=[UID()];vampire=autoobjectives'>Randomize!</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];vampire=vampire'>vampire</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_VAMPIRE in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
/** Enthralled ***/
|
|
|
|
|
text += "<br><b><i>enthralled</i></b>: "
|
|
|
|
|
if(src in ticker.mode.vampire_enthralled)
|
|
|
|
|
text += "<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];vampthrall=clear'>no</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "thrall|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
sections["vampire"] = text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sections["vampire"] = memory_edit_vampire(H)
|
|
|
|
|
/** NUCLEAR ***/
|
|
|
|
|
text = "nuclear"
|
|
|
|
|
if(ticker.mode.config_tag=="nuclear")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(src in ticker.mode.syndicates)
|
|
|
|
|
text += "<b><font color='red'>OPERATIVE</b></font>|<a href='?src=[UID()];nuclear=clear'>no</a>"
|
|
|
|
|
text += "<br><a href='?src=[UID()];nuclear=lair'>To shuttle</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];nuclear=dressup'>dress up</a>."
|
|
|
|
|
var/code
|
|
|
|
|
for(var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
|
|
|
|
|
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
|
|
|
|
code = bombue.r_code
|
|
|
|
|
break
|
|
|
|
|
if(code)
|
|
|
|
|
text += " Code is [code]. <a href='?src=[UID()];nuclear=tellcode'>tell the code.</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];nuclear=nuclear'>operative</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_OPERATIVE in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["nuclear"] = text
|
|
|
|
|
|
|
|
|
|
sections["nuclear"] = memory_edit_nuclear(H)
|
|
|
|
|
/** SHADOWLING **/
|
|
|
|
|
text = "shadowling"
|
|
|
|
|
if(ticker.mode.config_tag == "shadowling")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(src in ticker.mode.shadows)
|
|
|
|
|
text += "<b><font color='red'>SHADOWLING</font></b>|thrall|<a href='?src=[UID()];shadowling=clear'>no</a>"
|
|
|
|
|
else if(src in ticker.mode.shadowling_thralls)
|
|
|
|
|
text += "Shadowling|<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];shadowling=clear'>no</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];shadowling=shadowling'>shadowling</a>|<a href='?src=[UID()];shadowling=thrall'>thrall</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_SHADOWLING in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["shadowling"] = text
|
|
|
|
|
|
|
|
|
|
sections["shadowling"] = memory_edit_shadowling(H)
|
|
|
|
|
/** Abductors **/
|
|
|
|
|
|
|
|
|
|
text = "abductor"
|
|
|
|
|
if(ticker.mode.config_tag == "abductor")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(src in ticker.mode.abductors)
|
|
|
|
|
text += "<b><font color='red'>ABDUCTOR</font></b>|<a href='?src=[UID()];abductor=clear'>no</a>"
|
|
|
|
|
text += "|<a href='?src=[UID()];common=undress'>undress</a>|<a href='?src=[UID()];abductor=equip'>equip</a>"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];abductor=abductor'>abductor</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_ABDUCTOR in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sections["Abductor"] = text
|
|
|
|
|
|
|
|
|
|
sections["abductor"] = memory_edit_abductor(H)
|
|
|
|
|
/** TRAITOR ***/
|
|
|
|
|
text = "traitor"
|
|
|
|
|
if(ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan" || ticker.mode.config_tag=="traitorvamp")
|
|
|
|
|
text = uppertext(text)
|
|
|
|
|
text = "<i><b>[text]</b></i>: "
|
|
|
|
|
if(src in ticker.mode.traitors)
|
|
|
|
|
text += "<b><font color='red'>TRAITOR</font></b>|<a href='?src=[UID()];traitor=clear'>no</a>"
|
|
|
|
|
if(objectives.len==0)
|
|
|
|
|
text += "<br>Objectives are empty! <a href='?src=[UID()];traitor=autoobjectives'>Randomize</a>!"
|
|
|
|
|
else
|
|
|
|
|
text += "<a href='?src=[UID()];traitor=traitor'>traitor</a>|<b>NO</b>"
|
|
|
|
|
|
|
|
|
|
if(current && current.client && (ROLE_TRAITOR in current.client.prefs.be_special))
|
|
|
|
|
text += "|Enabled in Prefs"
|
|
|
|
|
else
|
|
|
|
|
text += "|Disabled in Prefs"
|
|
|
|
|
|
|
|
|
|
sections["traitor"] = text
|
|
|
|
|
|
|
|
|
|
sections["traitor"] = memory_edit_traitor()
|
|
|
|
|
/** SILICON ***/
|
|
|
|
|
|
|
|
|
|
if(issilicon(current))
|
|
|
|
|
text = "silicon"
|
|
|
|
|
var/mob/living/silicon/robot/robot = current
|
|
|
|
|
if(istype(robot) && robot.emagged)
|
|
|
|
|
text += "<br>Cyborg: <b><font color='red'>Is emagged!</font></b> <a href='?src=[UID()];silicon=unemag'>Unemag!</a><br>0th law: [robot.laws.zeroth_law]"
|
|
|
|
|
var/mob/living/silicon/ai/ai = current
|
|
|
|
|
if(istype(ai) && ai.connected_robots.len)
|
|
|
|
|
var/n_e_robots = 0
|
|
|
|
|
for(var/mob/living/silicon/robot/R in ai.connected_robots)
|
|
|
|
|
if(R.emagged)
|
|
|
|
|
n_e_robots++
|
|
|
|
|
text += "<br>[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. <a href='?src=[UID()];silicon=unemagcyborgs'>Unemag</a>"
|
|
|
|
|
|
|
|
|
|
sections["silicon"] = memory_edit_silicon()
|
|
|
|
|
/*
|
|
|
|
|
This prioritizes antags relevant to the current round to make them appear at the top of the panel.
|
|
|
|
|
Traitorchan and traitorvamp are snowflaked in because they have multiple sections.
|
|
|
|
|
*/
|
|
|
|
|
if(ticker.mode.config_tag == "traitorchan")
|
|
|
|
|
if(sections["traitor"])
|
|
|
|
|
out += sections["traitor"]+"<br>"
|
|
|
|
|
out += sections["traitor"] + "<br>"
|
|
|
|
|
if(sections["changeling"])
|
|
|
|
|
out += sections["changeling"]+"<br>"
|
|
|
|
|
out += sections["changeling"] + "<br>"
|
|
|
|
|
sections -= "traitor"
|
|
|
|
|
sections -= "changeling"
|
|
|
|
|
|
|
|
|
|
if(ticker.mode.config_tag == "traitorvamp")
|
|
|
|
|
// Elif technically unnecessary but it makes the following else look better
|
|
|
|
|
else if(ticker.mode.config_tag == "traitorvamp")
|
|
|
|
|
if(sections["traitor"])
|
|
|
|
|
out += sections["traitor"]+"<br>"
|
|
|
|
|
out += sections["traitor"] + "<br>"
|
|
|
|
|
if(sections["vampire"])
|
|
|
|
|
out += sections["vampire"]+"<br>"
|
|
|
|
|
out += sections["vampire"] + "<br>"
|
|
|
|
|
sections -= "traitor"
|
|
|
|
|
sections -= "vampire"
|
|
|
|
|
else
|
|
|
|
|
if(sections[ticker.mode.config_tag])
|
|
|
|
|
out += sections[ticker.mode.config_tag]+"<br>"
|
|
|
|
|
out += sections[ticker.mode.config_tag] + "<br>"
|
|
|
|
|
sections -= ticker.mode.config_tag
|
|
|
|
|
|
|
|
|
|
for(var/i in sections)
|
|
|
|
|
if(sections[i])
|
|
|
|
|
out += sections[i]+"<br>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(((src in ticker.mode.head_revolutionaries) || \
|
|
|
|
|
(src in ticker.mode.traitors) || \
|
|
|
|
|
(src in ticker.mode.syndicates)) && \
|
|
|
|
|
ishuman(current) )
|
|
|
|
|
|
|
|
|
|
text = "Uplink: <a href='?src=[UID()];common=uplink'>give</a>"
|
|
|
|
|
var/obj/item/uplink/hidden/suplink = find_syndicate_uplink()
|
|
|
|
|
var/crystals
|
|
|
|
|
if(suplink)
|
|
|
|
|
crystals = suplink.uses
|
|
|
|
|
if(suplink)
|
|
|
|
|
text += "|<a href='?src=[UID()];common=takeuplink'>take</a>"
|
|
|
|
|
if(usr.client.holder.rights & (R_SERVER|R_EVENT))
|
|
|
|
|
text += ", <a href='?src=[UID()];common=crystals'>[crystals]</a> crystals"
|
|
|
|
|
else
|
|
|
|
|
text += ", [crystals] crystals"
|
|
|
|
|
text += "." //hiel grammar
|
|
|
|
|
out += text
|
|
|
|
|
out += sections[i] + "<br>"
|
|
|
|
|
|
|
|
|
|
out += memory_edit_uplink()
|
|
|
|
|
out += "<br>"
|
|
|
|
|
|
|
|
|
|
out += "<b>Memory:</b><br>"
|
|
|
|
@@ -456,14 +413,9 @@
|
|
|
|
|
if(objectives.len == 0)
|
|
|
|
|
out += "EMPTY<br>"
|
|
|
|
|
else
|
|
|
|
|
var/obj_count = 1
|
|
|
|
|
for(var/datum/objective/objective in objectives)
|
|
|
|
|
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=[UID()];obj_edit=\ref[objective]'>Edit</a> <a href='?src=[UID()];obj_delete=\ref[objective]'>Delete</a> <a href='?src=[UID()];obj_completed=\ref[objective]'><font color=[objective.completed ? "green" : "red"]>Toggle Completion</font></a><br>"
|
|
|
|
|
obj_count++
|
|
|
|
|
out += gen_objective_text(admin = TRUE)
|
|
|
|
|
out += "<a href='?src=[UID()];obj_add=1'>Add objective</a><br><br>"
|
|
|
|
|
|
|
|
|
|
out += "<a href='?src=[UID()];obj_announce=1'>Announce objectives</a><br><br>"
|
|
|
|
|
|
|
|
|
|
usr << browse(out, "window=edit_memory[src];size=400x500")
|
|
|
|
|
|
|
|
|
|
/datum/mind/Topic(href, href_list)
|
|
|
|
@@ -1284,12 +1236,9 @@
|
|
|
|
|
return A
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/announce_objectives()
|
|
|
|
|
var/obj_count = 1
|
|
|
|
|
to_chat(current, "<span class='notice'>Your current objectives:</span>")
|
|
|
|
|
for(var/objective in objectives)
|
|
|
|
|
var/datum/objective/O = objective
|
|
|
|
|
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
|
|
|
|
|
obj_count++
|
|
|
|
|
for(var/line in splittext(gen_objective_text(), "<br>"))
|
|
|
|
|
to_chat(current, line)
|
|
|
|
|
|
|
|
|
|
/datum/mind/proc/find_syndicate_uplink()
|
|
|
|
|
var/list/L = current.get_contents()
|
|
|
|
@@ -1675,4 +1624,4 @@
|
|
|
|
|
/mob/living/simple_animal/construct/armoured/mind_initialize()
|
|
|
|
|
..()
|
|
|
|
|
mind.assigned_role = "Juggernaut"
|
|
|
|
|
mind.special_role = SPECIAL_ROLE_CULTIST
|
|
|
|
|
mind.special_role = SPECIAL_ROLE_CULTIST
|