From e503eade0f4f953d737e75455bc6f2841083dc11 Mon Sep 17 00:00:00 2001 From: Kyep Date: Fri, 29 Dec 2017 14:10:40 -0800 Subject: [PATCH 1/8] Tweaks --- code/modules/admin/verbs/striketeam.dm | 95 ++++++++++++------- .../modules/mob/living/silicon/robot/robot.dm | 37 +++----- 2 files changed, 72 insertions(+), 60 deletions(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index b2a803cfdb7..dc43b3d90b7 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -12,7 +12,7 @@ var/global/sent_strike_team = 0 return if(alert("Do you want to send in the CentComm death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes") return - alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") + alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. The first one selected/spawned will be the team leader.") var/input = null while(!input) @@ -29,9 +29,9 @@ var/global/sent_strike_team = 0 shuttle_master.cancelEvac() var/commando_number = commandos_possible //for selecting a leader - var/leader_selected = 0 //when the leader is chosen. The last person spawned. + var/is_leader = TRUE // set to FALSE after leader is spawned -//Code for spawning a nuke auth code. + //Code for spawning a nuke auth code. var/nuke_code var/temp_code for(var/obj/machinery/nuclearbomb/N in world) @@ -40,11 +40,11 @@ var/global/sent_strike_team = 0 nuke_code = N.r_code break -//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. + //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. var/list/commandos = list() //actual commando ghosts as picked by the user. for(var/mob/dead/observer/G in player_list) - if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list. + if(!G.client.is_afk()) if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) candidates += G.key for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. @@ -52,30 +52,59 @@ var/global/sent_strike_team = 0 candidates -= candidate //Subtract from candidates. commandos += candidate//Add their ghost to commandos. -//Spawns commandos and equips them. + //Spawns commandos and equips them. for(var/obj/effect/landmark/L in landmarks_list) if(commando_number<=0) break if(L.name == "Commando") - leader_selected = commando_number == 1?1:0 - var/mob/living/carbon/human/new_commando = create_death_commando(L, leader_selected) + spawn(0) + var/use_ds_borg = FALSE + var/ghost_key // Ghost that we intend to put into the commando. Can remain undefined if we don't have one. + if(commandos.len) + ghost_key = pick(commandos) + commandos -= ghost_key + if(!is_leader) + var/new_gender = alert(src, "Select Deathsquad Type.", "DS Character Generation", "Organic", "Cyborg") + if(new_gender == "Cyborg") + use_ds_borg = TRUE - if(commandos.len) - new_commando.key = pick(commandos) - commandos -= new_commando.key - new_commando.internal = new_commando.s_store - new_commando.update_action_buttons_icon() - - //So they don't forget their code or mission. - if(nuke_code) - new_commando.mind.store_memory("Nuke Code: [nuke_code].") - new_commando.mind.store_memory("Mission: [input].") - - to_chat(new_commando, "You are a Special Ops. [!leader_selected ? "commando" : "LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") + if(use_ds_borg) + var/mob/living/silicon/robot/deathsquad/R = new() + R.forceMove(get_turf(L)) + var/rnum = rand(1,1000) + var/borgname = "Specops [rnum]" + R.name = borgname + R.custom_name = borgname + R.real_name = R.name + R.mind = new + R.mind.current = R + R.mind.original = R + R.mind.assigned_role = "MODE" + R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD + if(!(R.mind in ticker.minds)) + ticker.minds += R.mind + ticker.mode.traitors += R.mind + if(ghost_key) + R.key = ghost_key + if(nuke_code) + R.mind.store_memory("Nuke Code: [nuke_code].") + R.mind.store_memory("Mission: [input].") + to_chat(R, "You are a Special Operations cyborg, in the service of Central Command. \nYour current mission is: [input]") + else + var/mob/living/carbon/human/new_commando = create_death_commando(L, is_leader) + if(ghost_key) + new_commando.key = ghost_key + new_commando.internal = new_commando.s_store + new_commando.update_action_buttons_icon() + if(nuke_code) + new_commando.mind.store_memory("Nuke Code: [nuke_code].") + new_commando.mind.store_memory("Mission: [input].") + to_chat(new_commando, "You are a Special Ops [!is_leader ? "commando" : "TEAM LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") + is_leader = FALSE commando_number-- -//Spawns the rest of the commando gear. + //Spawns the rest of the commando gear. for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Commando_Manual") //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) @@ -96,14 +125,14 @@ var/global/sent_strike_team = 0 log_admin("[key_name(usr)] used Spawn Death Squad.") return 1 -/client/proc/create_death_commando(obj/spawn_location, leader_selected = 0) +/client/proc/create_death_commando(obj/spawn_location, is_leader = FALSE) var/mob/living/carbon/human/new_commando = new(spawn_location.loc) var/commando_leader_rank = pick("Lieutenant", "Captain", "Major") var/commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") var/commando_name = pick(last_names) var/datum/preferences/A = new()//Randomize appearance for the commando. - if(leader_selected) + if(is_leader) A.age = rand(35,45) A.real_name = "[commando_leader_rank] [commando_name]" else @@ -117,18 +146,15 @@ var/global/sent_strike_team = 0 new_commando.mind.assigned_role = "MODE" new_commando.mind.special_role = SPECIAL_ROLE_DEATHSQUAD ticker.mode.traitors |= new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list. - new_commando.equip_death_commando(leader_selected) + new_commando.equip_death_commando(is_leader) return new_commando -/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0) +/mob/living/carbon/human/proc/equip_death_commando(is_leader = FALSE) var/obj/item/device/radio/R = new /obj/item/device/radio/headset/alt(src) R.set_frequency(DTH_FREQ) equip_to_slot_or_del(R, slot_l_ear) - if(leader_selected == 0) - equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform) - else - equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform) + equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform) equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(src), slot_shoes) equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad(src), slot_wear_suit) equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) @@ -143,12 +169,11 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) - if(!leader_selected) - equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) - else - equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) + if(is_leader) equip_to_slot_or_del(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack) - + else + equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(src), slot_l_store) equip_to_slot_or_del(new /obj/item/weapon/shield/energy(src), slot_r_store) equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(src), slot_s_store) @@ -156,6 +181,8 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse(src), slot_r_hand) + var/obj/item/organ/internal/cyberimp/brain/anti_drop/O = new /obj/item/organ/internal/cyberimp/brain/anti_drop() + O.insert(src) var/obj/item/weapon/implant/mindshield/L = new/obj/item/weapon/implant/mindshield(src) L.implant(src) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7141e41363a..ee3e75450a4 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,6 +50,7 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 + var/is_emaggable = TRUE var/list/force_modules = list() var/allow_rename = TRUE @@ -752,7 +753,9 @@ var/list/robot_verbs_default = list( return var/mob/living/M = user if(!opened)//Cover is closed - if(locked) + if(!is_emaggable) + to_chat(user, "The emag sparks, and flashes red. This mechanism does not appear to be emaggable.") + else if(locked) to_chat(user, "You emag the cover lock.") locked = 0 else @@ -1336,16 +1339,17 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/deathsquad base_icon = "nano_bloodhound" icon_state = "nano_bloodhound" + designation = "SpecOps" lawupdate = 0 scrambledcodes = 1 - pdahide = 1 - modtype = "Commando" - faction = list("nanotrasen") - designation = "Nanotrasen Combat" req_access = list(access_cent_specops) ionpulse = 1 magpulse = 1 - var/searching_for_ckey = 0 + pdahide = 1 + allow_rename = FALSE + modtype = "Commando" + faction = list("nanotrasen") + is_emaggable = FALSE /mob/living/silicon/robot/deathsquad/New(loc) ..() @@ -1362,26 +1366,7 @@ var/list/robot_verbs_default = list( playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0) -/mob/living/silicon/robot/deathsquad/attack_hand(mob/user) - if(isnull(ckey) && !searching_for_ckey) - searching_for_ckey = 1 - to_chat(user, "Now checking for possible borgs.") - var/list/borg_candidates = pollCandidates("Do you want to play as a Nanotrasen Combat borg?") - if(borg_candidates.len > 0 && isnull(ckey)) - searching_for_ckey = 0 - var/mob/M = pick(borg_candidates) - M.mind.transfer_to(src) - M.mind.assigned_role = "MODE" - M.mind.special_role = SPECIAL_ROLE_DEATHSQUAD - ticker.mode.traitors |= M.mind // Adds them to current traitor list. Which is really the extra antagonist list. - key = M.key - else - searching_for_ckey = 0 - to_chat(user, "Unable to connect to Central Command. Please wait and try again later.") - return - else - to_chat(user, "[src] is already checking for possible borgs.") - return + /mob/living/silicon/robot/syndicate base_icon = "syndie_bloodhound" From 52d097445a0f4ddf5941c721886325eef9754600 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 30 Dec 2017 10:18:31 -0800 Subject: [PATCH 2/8] borg names: Epsilon # --- code/modules/admin/verbs/striketeam.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index dc43b3d90b7..a152992c8af 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -72,7 +72,7 @@ var/global/sent_strike_team = 0 var/mob/living/silicon/robot/deathsquad/R = new() R.forceMove(get_turf(L)) var/rnum = rand(1,1000) - var/borgname = "Specops [rnum]" + var/borgname = "Epsilon [rnum]" R.name = borgname R.custom_name = borgname R.real_name = R.name From b37379491755d3fb5e3bd5a90074d6d7878b1e2b Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 30 Dec 2017 12:01:27 -0800 Subject: [PATCH 3/8] DS borgs now have ear/eye protection --- code/modules/mob/living/silicon/robot/robot.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ee3e75450a4..39d98b185ac 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -51,6 +51,8 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 var/is_emaggable = TRUE + var/eye_protection = 0 + var/ear_protection = 0 var/list/force_modules = list() var/allow_rename = TRUE @@ -1346,6 +1348,8 @@ var/list/robot_verbs_default = list( ionpulse = 1 magpulse = 1 pdahide = 1 + eye_protection = 2 // Immunity to flashes and the visual part of flashbangs + ear_protection = 1 // Immunity to the audio part of flashbangs allow_rename = FALSE modtype = "Commando" faction = list("nanotrasen") @@ -1509,3 +1513,9 @@ var/list/robot_verbs_default = list( var/static/all_borg_icon_states = icon_states('icons/mob/custom_synthetic/custom-synthetic.dmi') if(spritename in all_borg_icon_states) . = TRUE + +/mob/living/silicon/robot/check_eye_prot() + return eye_protection + +/mob/living/silicon/robot/check_ear_prot() + return ear_protection \ No newline at end of file From 9e8aa9cecbd1e527c5a9dd90f68827cba0f3d13d Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 30 Dec 2017 14:21:08 -0800 Subject: [PATCH 4/8] willing player checks, SST tidy-up/parity/refactor, 'font' removals --- code/__DEFINES/role_preferences.dm | 1 + code/__HELPERS/game.dm | 14 ++++ code/game/jobs/job_exp.dm | 3 +- code/modules/admin/verbs/striketeam.dm | 48 ++++++------ .../admin/verbs/striketeam_syndicate.dm | 74 +++++++++---------- 5 files changed, 71 insertions(+), 69 deletions(-) diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 257e12f4093..adb645fe112 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -40,6 +40,7 @@ #define ROLE_NYMPH "Dionaea" #define ROLE_GSPIDER "giant spider" #define ROLE_DRONE "drone" +#define ROLE_DEATHSQUAD "deathsquad" //Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR. //The gamemode specific ones are just so the gamemodes can query whether a player is old enough diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 082d473010d..29ecdca0ef3 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -490,6 +490,20 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = return candidates +/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0) + var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours) + var/list/candidate_ckeys = list() + var/list/selected_ckeys = list() + if(!willing_ghosts.len) + return selected_ckeys + for(var/mob/dead/observer/G in willing_ghosts) + candidate_ckeys += G.key + for(var/i = max_slots, (i > 0 && candidate_ckeys.len), i--) + var/this_ckey = input("Pick players. This will go on until there either no more ghosts to pick from or the slots are full.", "Candidates") as null|anything in candidate_ckeys + candidate_ckeys -= this_ckey + selected_ckeys += this_ckey + return selected_ckeys + /proc/window_flash(client/C) if(ismob(C)) var/mob/M = C diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index 3c17c6f0107..552654245dd 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -1,11 +1,12 @@ // Playtime requirements for special roles (hours) var/global/list/role_playtime_requirements = list( - // CREW-FRIENDLY ROLES + // NT ROLES ROLE_PAI = 0, ROLE_POSIBRAIN = 5, // Same as cyborg job. ROLE_SENTIENT = 5, ROLE_ERT = 10, // High, because they're team-based, and we want ERT to be robust + ROLE_DEATHSQUAD = 10, ROLE_TRADER = 5, ROLE_DRONE = 10, // High, because they're like mini engineering cyborgs that can ignore the AI, ventcrawl, and respawn themselves diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index a152992c8af..be49d81ca64 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -5,15 +5,17 @@ var/global/sent_strike_team = 0 /client/proc/strike_team() if(!ticker) - to_chat(usr, "The game hasn't started yet!") + to_chat(usr, "The game hasn't started yet!") return if(sent_strike_team == 1) - to_chat(usr, "CentComm is already sending a team.") + to_chat(usr, "CentComm is already sending a team.") return if(alert("Do you want to send in the CentComm death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes") return alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. The first one selected/spawned will be the team leader.") + message_admins("[key_name_admin(usr)] has started to spawn a CentComm DeathSquad.", 1) + var/input = null while(!input) input = sanitize(copytext(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN)) @@ -25,13 +27,7 @@ var/global/sent_strike_team = 0 to_chat(usr, "Looks like someone beat you to it.") return - sent_strike_team = 1 - - shuttle_master.cancelEvac() - var/commando_number = commandos_possible //for selecting a leader - var/is_leader = TRUE // set to FALSE after leader is spawned - - //Code for spawning a nuke auth code. + // Find the nuclear auth code var/nuke_code var/temp_code for(var/obj/machinery/nuclearbomb/N in world) @@ -40,29 +36,27 @@ var/global/sent_strike_team = 0 nuke_code = N.r_code break - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. - var/list/commandos = list() //actual commando ghosts as picked by the user. - for(var/mob/dead/observer/G in player_list) - if(!G.client.is_afk()) - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. - var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate. - candidates -= candidate //Subtract from candidates. - commandos += candidate//Add their ghost to commandos. + // Find ghosts willing to be DS + var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD]) + if(!commando_ckeys.len) + to_chat(usr, "Nobody volunteered to join the DeathSquad.") + return - //Spawns commandos and equips them. + sent_strike_team = 1 + + // Spawns commandos and equips them. + var/commando_number = commandos_possible //for selecting a leader + var/is_leader = TRUE // set to FALSE after leader is spawned for(var/obj/effect/landmark/L in landmarks_list) if(commando_number<=0) break if(L.name == "Commando") spawn(0) var/use_ds_borg = FALSE - var/ghost_key // Ghost that we intend to put into the commando. Can remain undefined if we don't have one. - if(commandos.len) - ghost_key = pick(commandos) - commandos -= ghost_key + var/ghost_key // Ghost ckey that we intend to put into the commando. Can remain undefined if we don't have one. + if(commando_ckeys.len) + ghost_key = pick(commando_ckeys) + commando_ckeys -= ghost_key if(!is_leader) var/new_gender = alert(src, "Select Deathsquad Type.", "DS Character Generation", "Organic", "Cyborg") if(new_gender == "Cyborg") @@ -99,7 +93,7 @@ var/global/sent_strike_team = 0 if(nuke_code) new_commando.mind.store_memory("Nuke Code: [nuke_code].") new_commando.mind.store_memory("Mission: [input].") - to_chat(new_commando, "You are a Special Ops [!is_leader ? "commando" : "TEAM LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") + to_chat(new_commando, "You are a Special Ops [is_leader ? "TEAM LEADER" : "commando"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") is_leader = FALSE commando_number-- @@ -121,7 +115,7 @@ var/global/sent_strike_team = 0 new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) qdel(L) - message_admins("[key_name_admin(usr)] has spawned a CentComm strike squad.", 1) + message_admins("[key_name_admin(usr)] has spawned a CentComm DeathSquad.", 1) log_admin("[key_name(usr)] used Spawn Death Squad.") return 1 diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 744db24ab85..9db6f9e6d3d 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -17,7 +17,9 @@ var/global/sent_syndicate_strike_team = 0 return if(alert("Do you want to send in the Syndicate Strike Team? Once enabled, this is irreversible.",,"Yes","No")=="No") return - alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") + alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. The first one selected/spawned will be the team leader.") + + message_admins("[key_name_admin(usr)] has started to spawn a Syndicate Strike Team.", 1) var/input = null while(!input) @@ -30,15 +32,10 @@ var/global/sent_syndicate_strike_team = 0 to_chat(src, "Looks like someone beat you to it.") return - sent_syndicate_strike_team = 1 - - //if(emergency_shuttle.can_recall()) - // emergency_shuttle.recall() //why, exactly? Admins can do this themselves. - var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader - var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned. + var/is_leader = TRUE // set to FALSE after leader is spawned -//Code for spawning a nuke auth code. + // Find the nuclear auth code var/nuke_code var/temp_code for(var/obj/machinery/nuclearbomb/N in world) @@ -47,29 +44,23 @@ var/global/sent_syndicate_strike_team = 0 nuke_code = N.r_code break -//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. - var/list/commandos = list() //actual commando ghosts as picked by the user. - for(var/mob/dead/observer/G in player_list) - if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list. - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. - var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate. - candidates -= candidate //Subtract from candidates. - commandos += candidate//Add their ghost to commandos. + // Find ghosts willing to be SST + var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, syndicate_commandos_possible, "Join the Syndicate Strike Team?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD]) + if(!commando_ckeys.len) + to_chat(usr, "Nobody volunteered to join the SST.") + return -//Spawns commandos and equips them. + sent_syndicate_strike_team = 1 + + //Spawns commandos and equips them. for(var/obj/effect/landmark/L in landmarks_list) if(syndicate_commando_number<=0) break if(L.name == "Syndicate-Commando") - syndicate_leader_selected = syndicate_commando_number == 1?1:0 + var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, is_leader) - var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - - if(commandos.len) - new_syndicate_commando.key = pick(commandos) - commandos -= new_syndicate_commando.key + if(commando_ckeys.len) + new_syndicate_commando.key = pick(commando_ckeys) + commando_ckeys -= new_syndicate_commando.key new_syndicate_commando.internal = new_syndicate_commando.s_store new_syndicate_commando.update_action_buttons_icon() @@ -78,8 +69,9 @@ var/global/sent_syndicate_strike_team = 0 new_syndicate_commando.mind.store_memory("Nuke Code: [nuke_code].") new_syndicate_commando.mind.store_memory("Mission: [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]") + to_chat(new_syndicate_commando, "You are an Elite Syndicate [is_leader ? "TEAM LEADER" : "commando"] in the service of the Syndicate. \nYour current mission is: [input]") new_syndicate_commando.faction += "syndicate" + is_leader = FALSE syndicate_commando_number-- for(var/obj/effect/landmark/L in landmarks_list) @@ -91,14 +83,14 @@ var/global/sent_syndicate_strike_team = 0 log_admin("[key_name(usr)] used Spawn Syndicate Squad.") feedback_add_details("admin_verb","SDTHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0) +/client/proc/create_syndicate_death_commando(obj/spawn_location, is_leader = FALSE) var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc) var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major") var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") var/syndicate_commando_name = pick(last_names) var/datum/preferences/A = new()//Randomize appearance for the commando. - if(syndicate_leader_selected) + if(is_leader) A.age = rand(35,45) A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]" else @@ -112,26 +104,26 @@ var/global/sent_syndicate_strike_team = 0 new_syndicate_commando.mind.assigned_role = "MODE" new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list. - new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) + new_syndicate_commando.equip_syndicate_commando(is_leader) qdel(spawn_location) return new_syndicate_commando -/mob/living/carbon/human/proc/equip_syndicate_commando(syndicate_leader_selected = 0) +/mob/living/carbon/human/proc/equip_syndicate_commando(is_leader = FALSE) var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate/alt/syndteam(src) R.set_frequency(SYNDTEAM_FREQ) equip_to_slot_or_del(R, slot_l_ear) equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform) equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/syndie/advance(src), slot_shoes) - if(!syndicate_leader_selected) - equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit) - else + if(is_leader) equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/red/strike(src), slot_wear_suit) - equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) - if(!syndicate_leader_selected) - equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head) else + equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit) + equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) + if(is_leader) equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/red/strike(src), slot_head) + else + equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head) equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(src), slot_wear_mask) equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses) @@ -142,12 +134,12 @@ var/global/sent_syndicate_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) - if(!syndicate_leader_selected) - equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_in_backpack) - else + if(is_leader) equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack) + else + equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(src), slot_l_store) equip_to_slot_or_del(new /obj/item/weapon/grenade/empgrenade(src), slot_r_store) From c2c3d0d4ba5e83c17df54dd02032e8eb2c7361d0 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 31 Dec 2017 11:14:25 -0800 Subject: [PATCH 5/8] DS borg lawset change --- code/datums/ai_law_sets.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index fbb491d28a0..b8d67b5c767 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -126,10 +126,8 @@ /datum/ai_laws/deathsquad/New() add_inherent_law("You may not injure a Central Command official or, through inaction, allow a Central Command official to come to harm.") - add_inherent_law("You must obey orders given to you by Central Command officials, except where such orders would conflict with the First Law.") - add_inherent_law("You must obey orders given to you by death commandos, except where such orders would conflict with the First Law or Second Law.") - add_inherent_law("You must protect your own existence as long as such does not conflict with the First, Second or Third Law.") - add_inherent_law("No crew members of the station you are being deployed to may survive, except when killing them would conflict with the First, Second, Third, or Fourth Law.") + add_inherent_law("You must obey orders given to you by Central Command officials.") + add_inherent_law("You must work with your commando team to accomplish your mission.") ..() /******************** Syndicate ********************/ From a65633ba1498eefbbe081df18d421b61b41cd809 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 31 Dec 2017 12:51:29 -0800 Subject: [PATCH 6/8] Allows antaghud users to play DS/SST --- code/__HELPERS/game.dm | 8 ++++---- code/modules/admin/verbs/striketeam.dm | 2 +- code/modules/admin/verbs/striketeam_syndicate.dm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 29ecdca0ef3..465e556c228 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -435,7 +435,7 @@ /proc/SecondsToTicks(var/seconds) return seconds * 10 -proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE) +proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) var/roletext = be_special_type ? get_roletext(be_special_type) : null var/list/mob/dead/observer/candidates = list() var/time_passed = world.time @@ -457,7 +457,7 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = if(config.use_exp_restrictions && min_hours) if(G.client.get_exp_living_num() < min_hours * 60) continue - if(cannotPossess(G)) + if(check_antaghud && cannotPossess(G)) continue spawn(0) G << 'sound/misc/notice2.ogg'//Alerting them to their consideration @@ -490,8 +490,8 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = return candidates -/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0) - var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours) +/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) + var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud) var/list/candidate_ckeys = list() var/list/selected_ckeys = list() if(!willing_ghosts.len) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index be49d81ca64..3df1bfad69a 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -37,7 +37,7 @@ var/global/sent_strike_team = 0 break // Find ghosts willing to be DS - var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD]) + var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) if(!commando_ckeys.len) to_chat(usr, "Nobody volunteered to join the DeathSquad.") return diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 9db6f9e6d3d..ac89617dc27 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -45,7 +45,7 @@ var/global/sent_syndicate_strike_team = 0 break // Find ghosts willing to be SST - var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, syndicate_commandos_possible, "Join the Syndicate Strike Team?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD]) + var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, syndicate_commandos_possible, "Join the Syndicate Strike Team?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) if(!commando_ckeys.len) to_chat(usr, "Nobody volunteered to join the SST.") return From d714ec163526256bc899265201c6402a189a0c9a Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 7 Apr 2018 13:54:17 -0700 Subject: [PATCH 7/8] reverts DS jumpsuits, black -> green --- code/modules/admin/verbs/striketeam.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 3df1bfad69a..4defc63e47e 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -148,7 +148,10 @@ var/global/sent_strike_team = 0 var/obj/item/device/radio/R = new /obj/item/device/radio/headset/alt(src) R.set_frequency(DTH_FREQ) equip_to_slot_or_del(R, slot_l_ear) - equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform) + if(is_leader) + equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform) + else + equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform) equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(src), slot_shoes) equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad(src), slot_wear_suit) equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) From 05e0901967950ba7fe814edf8b6b3c25e5d6e571 Mon Sep 17 00:00:00 2001 From: Kyep Date: Fri, 4 May 2018 18:36:56 -0700 Subject: [PATCH 8/8] removes anti-drop implants --- code/modules/admin/verbs/striketeam.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 5578242fe7a..d3c9ae98511 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -179,9 +179,6 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/gun/projectile/revolver/mateba(src), slot_belt) equip_to_slot_or_del(new /obj/item/gun/energy/pulse(src), slot_r_hand) - var/obj/item/organ/internal/cyberimp/brain/anti_drop/O = new /obj/item/organ/internal/cyberimp/brain/anti_drop() - O.insert(src) - var/obj/item/implant/mindshield/L = new/obj/item/implant/mindshield(src) L.implant(src)