diff --git a/code/datums/mind.dm b/code/datums/mind.dm index a46a0744bcb..3f62c8ffaed 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -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, "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].") - to_chat(current, "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.") - 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, "Objective #1: [explanation]") - current.memory += "Objective #1: [explanation]
" - - - 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 diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index 93fe05ffa10..eb32bed006d 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -191,7 +191,7 @@ //message_admins("The probability of a new traitor is [traitor_prob]%") if(prob(traitor_prob)) message_admins("New traitor roll passed. Making a new Traitor.") - character.mind.make_Tratior() //TEMP: Add proper checks for loyalty here. uc_guy + character.mind.make_Traitor() //TEMP: Add proper checks for loyalty here. uc_guy //else //message_admins("New traitor roll failed. No new traitor.") //else diff --git a/code/game/gamemodes/changeling/evolution_menu.dm b/code/game/gamemodes/changeling/evolution_menu.dm index d690f095236..a7af2b94482 100644 --- a/code/game/gamemodes/changeling/evolution_menu.dm +++ b/code/game/gamemodes/changeling/evolution_menu.dm @@ -20,7 +20,7 @@ var/list/sting_paths /obj/effect/proc_holder/changeling/evolution_menu/proc/create_menu(var/datum/changeling/changeling) var/dat - dat +="Changling Evolution Menu" + dat +="Changeling Evolution Menu" //javascript, the part that does most of the work~ dat += {" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index ece60118fa0..abfc807f9df 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -39,35 +39,35 @@ switch(href_list["makeAntag"]) if("1") log_admin("[key_name(usr)] has spawned a traitor.") - if(!src.makeTraitors()) + if(!makeTraitors()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("2") log_admin("[key_name(usr)] has spawned a changeling.") - if(!src.makeChanglings()) + if(!makeChangelings()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("3") log_admin("[key_name(usr)] has spawned revolutionaries.") - if(!src.makeRevs()) + if(!makeRevs()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("4") log_admin("[key_name(usr)] has spawned a cultists.") - if(!src.makeCult()) + if(!makeCult()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("5") log_admin("[key_name(usr)] has spawned a wizard.") - if(!src.makeWizard()) + if(!makeWizard()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("6") log_admin("[key_name(usr)] has spawned vampires.") - if(!src.makeVampires()) + if(!makeVampires()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("7") log_admin("[key_name(usr)] has spawned vox raiders.") - if(!src.makeVoxRaiders()) + if(!makeVoxRaiders()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("8") log_admin("[key_name(usr)] has spawned an abductor team.") - if(!src.makeAbductorTeam()) + if(!makeAbductorTeam()) to_chat(usr, "Unfortunately there weren't enough candidates available.") else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"] || href_list["dbsearchip"] || href_list["dbsearchcid"] || href_list["dbsearchbantype"]) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index b3f0a1a15a8..5c8e1c77745 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -25,6 +25,22 @@ client/proc/one_click_antag() usr << browse(dat, "window=oneclickantag;size=400x400") return +/datum/admins/proc/CandCheck(var/role = null, var/mob/living/carbon/human/M, var/datum/game_mode/temp = null) + // You pass in ROLE define (optional), the applicant, and the gamemode, and it will return true / false depending on whether the applicant qualify for the candidacy in question + if(jobban_isbanned(M, "Syndicate")) + return FALSE + if(M.stat || !M.mind || M.mind.special_role) + return FALSE + if(temp) + if(M.mind.assigned_role in temp.restricted_jobs || M.client.prefs.species in temp.protected_species) + return FALSE + if(role) // Don't even bother evaluating if there's no role + if(player_old_enough_antag(M.client,role) && (role in M.client.prefs.be_special) && (!jobban_isbanned(M, role))) + return TRUE + else + return FALSE + else + return TRUE /datum/admins/proc/makeTraitors() var/datum/game_mode/traitor/temp = new @@ -35,35 +51,29 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null - log_admin("[key_name(owner)] tried making Traitors with One-Click-Antag") - message_admins("[key_name_admin(owner)] tried making Traitors with One-Click-Antag") + var/antnum = input(owner, "How many traitors you want to create? Enter 0 to cancel","Amount:", 0) as num + if(!antnum || antnum <= 0) + return + log_admin("[key_name(owner)] tried making [antnum] traitors with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making [antnum] traitors with One-Click-Antag") for(var/mob/living/carbon/human/applicant in player_list) - if(ROLE_TRAITOR in applicant.client.prefs.be_special) - if(player_old_enough_antag(applicant.client,ROLE_TRAITOR)) - if(!applicant.stat) - if(applicant.mind) - if(!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.mind.assigned_role in temp.restricted_jobs)) - if(!(applicant.client.prefs.species in temp.protected_species)) - candidates += applicant + if(CandCheck(ROLE_TRAITOR, applicant, temp)) + candidates += applicant if(candidates.len) - var/numTratiors = min(candidates.len, 3) + var/numTraitors = min(candidates.len, antnum) - for(var/i = 0, i300)//If more than 30 game seconds passed. + //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. + for(var/mob/G in respawnable_list) + if(!jobban_isbanned(G, "Syndicate")) + spawn(0) + switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + return + candidates += G + if("No") return - candidates += G - if("No") - return - else - return - sleep(300) + else + return + sleep(300) - for(var/mob/dead/observer/G in candidates) - if(!G.key) - candidates.Remove(G) + for(var/mob/dead/observer/G in candidates) + if(!G.key) + candidates.Remove(G) - if(candidates.len) - var/numagents = 6 - //Spawns commandos and equips them. - for(var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad) - if(numagents<=0) - break - if(L.name == "Syndicate-Commando") - syndicate_leader_selected = numagents == 1?1:0 - - var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - qdel(new_syndicate_commando) + if(candidates.len) + //Spawns commandos and equips them. + for(var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad) + if(antnum <= 0) break + if(L.name == "Syndicate-Commando") + syndicate_leader_selected = antnum == 1?1:0 - new_syndicate_commando.key = theghost.key - new_syndicate_commando.internal = new_syndicate_commando.s_store - new_syndicate_commando.update_action_buttons_icon() + var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - //So they don't forget their code or mission. + while((!theghost || !theghost.client) && candidates.len) + theghost = pick(candidates) + candidates.Remove(theghost) + + if(!theghost) + qdel(new_syndicate_commando) + break + + new_syndicate_commando.key = theghost.key + new_syndicate_commando.internal = new_syndicate_commando.s_store + new_syndicate_commando.update_action_buttons_icon() + + //So they don't forget their code or mission. - to_chat(new_syndicate_commando, "You are an Elite Syndicate. [!syndicate_leader_selected ? "commando" : "LEADER"] in the service of the Syndicate. \nYour current mission is: [input]") + to_chat(new_syndicate_commando, "You are an Elite Syndicate. [!syndicate_leader_selected ? "commando" : "LEADER"] in the service of the Syndicate. \nYour current mission is: [input]") - numagents-- - if(numagents >= 6) - return 0 - - for(var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) - if(L.name == "Syndicate-Commando-Bomb") - new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) + antnum-- + for(var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) + if(L.name == "Syndicate-Commando-Bomb") + new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) return 1 @@ -429,10 +431,12 @@ client/proc/one_click_antag() var/leader_chosen = 0 //when the leader is chosen. The last person spawned. + var/antnum = input(owner, "How many raiders you want to create? Enter 0 to cancel.","Amount:", 0) as num + if(!antnum || antnum <= 0) + return log_admin("[key_name(owner)] tried making Vox Raiders with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making Vox Raiders with One-Click-Antag") - - //Generates a list of candidates from active ghosts. +//Generates a list of candidates from active ghosts. for(var/mob/G in respawnable_list) if(istype(G) && G.client && (ROLE_RAIDER in G.client.prefs.be_special)) if(player_old_enough_antag(G.client,ROLE_RAIDER)) @@ -455,8 +459,7 @@ client/proc/one_click_antag() candidates.Remove(G) if(candidates.len) - var/max_raiders = 1 - var/raiders = max_raiders + var/raiders = min(antnum, candidates.len) //Spawns vox raiders and equips them. for(var/obj/effect/landmark/L in world) if(L.name == "voxstart") @@ -480,8 +483,6 @@ client/proc/one_click_antag() to_chat(new_vox, "Don't forget to turn on your nitrogen internals!") raiders-- - if(raiders > max_raiders) - return 0 else return 0 return 1 @@ -534,32 +535,26 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + var/antnum = input(owner, "How many vampires you want to create? Enter 0 to cancel","Amount:", 0) as num + if(!antnum || antnum <= 0) + return + log_admin("[key_name(owner)] tried making Vampires with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making Vampires with One-Click-Antag") for(var/mob/living/carbon/human/applicant in player_list) - if(ROLE_VAMPIRE in applicant.client.prefs.be_special) - if(player_old_enough_antag(applicant.client,ROLE_VAMPIRE)) - if(!applicant.stat) - if(applicant.mind) - if(!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "vampire") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - if(!(applicant.client.prefs.species in temp.protected_species)) - candidates += applicant + if(CandCheck(ROLE_VAMPIRE, applicant, temp)) + candidates += applicant if(candidates.len) - var/numVampires = min(candidates.len, 3) + var/numVampires = min(candidates.len, antnum) for(var/i = 0, i