This commit is contained in:
Kyep
2017-12-29 14:10:40 -08:00
parent c449acdc70
commit e503eade0f
2 changed files with 72 additions and 60 deletions
+61 -34
View File
@@ -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("<B>Nuke Code:</B> <span class='warning'>[nuke_code].</span>")
new_commando.mind.store_memory("<B>Mission:</B> <span class='warning'>[input].</span>")
to_chat(new_commando, "<span class='notice'>You are a Special Ops. [!leader_selected ? "commando" : "<B>LEADER</B>"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: <span class='danger'>[input]</span></span>")
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("<B>Nuke Code:</B> <span class='warning'>[nuke_code].</span>")
R.mind.store_memory("<B>Mission:</B> <span class='warning'>[input].</span>")
to_chat(R, "<span class='userdanger'>You are a Special Operations cyborg, in the service of Central Command. \nYour current mission is: <span class='danger'>[input]</span></span>")
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("<B>Nuke Code:</B> <span class='warning'>[nuke_code].</span>")
new_commando.mind.store_memory("<B>Mission:</B> <span class='warning'>[input].</span>")
to_chat(new_commando, "<span class='userdanger'>You are a Special Ops [!is_leader ? "commando" : "<B>TEAM LEADER</B>"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: <span class='danger'>[input]</span></span>")
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)