Merge pull request #9064 from Anasari/MoreClickAntag

One-click antag improvement. Antag-related refactor, memory confirmation & typo fixing
This commit is contained in:
tigercat2000
2018-06-13 18:43:18 -07:00
committed by GitHub
5 changed files with 155 additions and 185 deletions
+16 -41
View File
@@ -483,9 +483,11 @@
var/new_memo = copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN)
if(isnull(new_memo))
return
memory = new_memo
log_admin("[key_name(usr)] has edited [key_name(current)]'s memory")
message_admins("[key_name_admin(usr)] has edited [key_name_admin(current)]'s memory")
var/confirmed = alert(usr, "Are you sure?", "Edit Memory", "Yes", "No")
if(confirmed == "Yes") // Because it is too easy to accidentally wipe someone's memory
memory = new_memo
log_admin("[key_name(usr)] has edited [key_name(current)]'s memory")
message_admins("[key_name_admin(usr)] has edited [key_name_admin(current)]'s memory")
else if(href_list["obj_edit"] || href_list["obj_add"])
var/datum/objective/objective
@@ -1298,7 +1300,7 @@
if(H)
qdel(H)
/datum/mind/proc/make_Tratior()
/datum/mind/proc/make_Traitor()
if(!(src in ticker.mode.traitors))
ticker.mode.traitors += src
special_role = SPECIAL_ROLE_TRAITOR
@@ -1338,7 +1340,16 @@
ticker.mode.equip_syndicate(current)
/datum/mind/proc/make_Changling()
/datum/mind/proc/make_Vampire()
if(!(src in ticker.mode.vampires))
ticker.mode.vampires += src
ticker.mode.grant_vampire_powers(current)
special_role = SPECIAL_ROLE_VAMPIRE
ticker.mode.forge_vampire_objectives(src)
ticker.mode.greet_vampire(src)
ticker.mode.update_change_icons_added(src)
/datum/mind/proc/make_Changeling()
if(!(src in ticker.mode.changelings))
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
@@ -1367,42 +1378,6 @@
ticker.mode.greet_wizard(src)
ticker.mode.update_wiz_icons_added(src)
/datum/mind/proc/make_Cultist()
if(!(src in ticker.mode.cult))
ticker.mode.cult += src
ticker.mode.update_cult_icons_added(src)
special_role = SPECIAL_ROLE_CULTIST
to_chat(current, "<font color=\"cultitalic\"><b><i>You catch a glimpse of the Realm of [ticker.cultdat.entity_name], [ticker.cultdat.entity_title2]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.cultdat.entity_name].</b></i></font>")
to_chat(current, "<font color=\"cultitalic\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>")
var/datum/game_mode/cult/cult = ticker.mode
if(GAMEMODE_IS_CULT)
cult.memorize_cult_objectives(src)
else
var/explanation = "Summon [ticker.cultdat.entity_name] via the use of the appropriate rune. It will only work if nine cultists stand on and around it."
to_chat(current, "<B>Objective #1</B>: [explanation]")
current.memory += "<B>Objective #1</B>: [explanation]<BR>"
var/mob/living/carbon/human/H = current
if(istype(H))
var/obj/item/tome/T = new(H)
var/list/slots = list (
"backpack" = slot_in_backpack,
"left pocket" = slot_l_store,
"right pocket" = slot_r_store,
"left hand" = slot_l_hand,
"right hand" = slot_r_hand,
)
var/where = H.equip_in_one_of_slots(T, slots)
if(!where)
else
to_chat(H, "A tome, a message from your new master, appears in your [where].")
if(!ticker.mode.equip_cultist(current))
to_chat(H, "Summoning an amulet from your Master failed.")
/datum/mind/proc/make_Rev()
if(ticker.mode.head_revolutionaries.len>0)
// copy targets