Merge pull request #9200 from Ikarrus/ERTcodes

[Z2 MAP] Centcom Response Team Variations
This commit is contained in:
Cheridan
2015-05-01 14:31:22 -05:00
7 changed files with 223 additions and 116 deletions
+77 -53
View File
@@ -856,43 +856,23 @@ var/global/list/g_fancy_list_of_types = null
equip_deathsquad(M)
if("emergency response officer")
var/alert
if(alert("Code Red ERT?","Select Response Level","Yes","No")=="Yes")
alert = 1
else
alert = 0
switch(input("Which class?") in list("Commander","Security","Engineer","Medic"))
if("Commander")
equip_emergencyresponsesquad(M, "commander")
equip_emergencyresponsesquad(M, "commander",alert)
if("Security")
equip_emergencyresponsesquad(M, "sec")
equip_emergencyresponsesquad(M, "sec",alert)
if("Engineer")
equip_emergencyresponsesquad(M, "eng")
equip_emergencyresponsesquad(M, "eng",alert)
if("Medic")
equip_emergencyresponsesquad(M, "med")
equip_emergencyresponsesquad(M, "med",alert)
if("centcom official")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/pen(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(M), slot_back)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "Centcom Official"
pda.update_label()
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_l_hand)
var/obj/item/weapon/card/id/W = new(M)
W.icon_state = "centcom"
W.access = get_centcom_access("Centcom Official")
W.access += access_weapons
W.assignment = "Centcom Official"
W.registered_name = M.real_name
W.update_label()
M.equip_to_slot_or_del(W, slot_wear_id)
equip_centcomofficial(M)
if("centcom commander")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_commander(M), slot_w_uniform)
@@ -1156,7 +1136,7 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(W, slot_wear_id)
//Emergency Response Team
/proc/equip_emergencyresponsesquad(var/mob/living/carbon/human/M, var/ertrole)
/proc/equip_emergencyresponsesquad(var/mob/living/carbon/human/M, var/ertrole, var/alert)
var/obj/item/weapon/card/id/W = null
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/headset_cent/alt(M)
R.set_frequency(CENTCOM_FREQ)
@@ -1170,19 +1150,23 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/hardsuit/ert(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(W, slot_wear_id)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/full(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(M), slot_l_store)
R.keyslot = new /obj/item/device/encryptionkey/heads/captain
if(alert)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(M), slot_l_store)
else
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/switchblade(M), slot_l_store)
if("sec")
W = new /obj/item/weapon/card/id/ert/Security(M)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
@@ -1192,16 +1176,20 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(W, slot_wear_id)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/carbine/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/full(M), slot_belt)
R.keyslot = new /obj/item/device/encryptionkey/heads/hos
if(alert)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/carbine/loyalpin(M), slot_in_backpack)
else
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/advtaser(M), slot_in_backpack)
if("med")
W = new /obj/item/weapon/card/id/ert/Medical(M)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
@@ -1211,18 +1199,21 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(W, slot_wear_id)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(M), slot_r_hand)
R.keyslot = new /obj/item/device/encryptionkey/heads/cmo
if(alert)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(M), slot_in_backpack)
else
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat(M), slot_in_backpack)
if("eng")
W = new /obj/item/weapon/card/id/ert/Engineer(M)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
@@ -1232,17 +1223,21 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(W, slot_wear_id)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/engine(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_l_store)
R.keyslot = new /obj/item/device/encryptionkey/heads/ce
if(alert)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/loyalpin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack)
else
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/loaded(M), slot_in_backpack)
R.recalculateChannels()
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1252,4 +1247,33 @@ var/global/list/g_fancy_list_of_types = null
if (W)
W.registered_name = M.real_name
W.update_label(W.registered_name, W.assignment)
W.update_label(W.registered_name, W.assignment)
/proc/equip_centcomofficial(var/mob/living/carbon/human/M)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/pen(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(M), slot_back)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "Centcom Official"
pda.update_label()
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_l_hand)
var/obj/item/weapon/card/id/W = new(M)
W.icon_state = "centcom"
W.access = get_centcom_access("Centcom Official")
W.access += access_weapons
W.assignment = "Centcom Official"
W.registered_name = M.real_name
W.update_label()
M.equip_to_slot_or_del(W, slot_wear_id)
+82 -18
View File
@@ -20,8 +20,7 @@ client/proc/one_click_antag()
<a href='?src=\ref[src];makeAntag=12'>Make Gangsters</a><br>
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=10'>Make Deathsquad (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=13'>Make Emergency Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=13'>Make Centcom Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=14'>Make Abductor Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=15'>Make Revenant (Requires Ghost)</a><br>
"}
@@ -320,7 +319,7 @@ client/proc/one_click_antag()
if(candidates.len >= 2) //Minimum 2 to be considered a squad
//Pick the lucky players
var/numagents = min(5,candidates.len) //How many commandos to spawn
var/list/spawnpoints = deathsquadspawn
var/list/spawnpoints = emergencyresponseteamspawn
while(numagents && candidates.len)
if (numagents > spawnpoints.len)
numagents--
@@ -343,6 +342,9 @@ client/proc/one_click_antag()
equip_deathsquad(Commando)
Commando.key = chosen_candidate.key
Commando.mind.assigned_role = "Death Commando"
for(var/obj/machinery/door/poddoor/ert/door in airlocks)
spawn(0)
door.open()
//Assign antag status and the mission
ticker.mode.traitors += Commando.mind
@@ -410,15 +412,73 @@ client/proc/one_click_antag()
return 0
// EMERGENCY RESPONSE TEAM
/datum/admins/proc/makeOfficial()
var/mission = input("Assign a task for the official", "Assign Task", "Conduct a routine preformance review of [station_name()] and its Captain.")
var/list/mob/dead/observer/candidates = getCandidates("Do you wish to be considered to be a Centcom Official?", "pAI")
if(candidates.len)
var/mob/dead/observer/chosen_candidate = pick(candidates)
//Create the official
var/mob/living/carbon/human/newmob = new (pick(emergencyresponseteamspawn))
chosen_candidate.client.prefs.copy_to(newmob)
ready_dna(newmob)
newmob.real_name = random_name(newmob.gender)
newmob.key = chosen_candidate.key
newmob.mind.assigned_role = "Centcom Official"
equip_centcomofficial(newmob)
//Assign antag status and the mission
ticker.mode.traitors += newmob.mind
newmob.mind.special_role = "centcom"
var/datum/objective/missionobj = new
missionobj.owner = newmob.mind
missionobj.explanation_text = mission
missionobj.completed = 1
newmob.mind.objectives += missionobj
//Greet the official
newmob << "<B><font size=3 color=red>You are a Centcom Official.</font></B>"
newmob << "<BR>Central Command is sending you to [station_name()] with the task: [mission]"
//Logging and cleanup
message_admins("A [key_name_admin(newmob)] has spawned with the task: [mission]")
log_game("[key_name(newmob)] has been selected as a Centcom Official")
return 1
return 0
// CENTCOM RESPONSE TEAM
/datum/admins/proc/makeEmergencyresponseteam()
var/alert = input("Which team should we send?", "Select Response Level") as null|anything in list("Green: Centcom Official", "Blue: Light ERT", "Amber: Full ERT", "Red: Elite ERT", "Delta: Deathsquad")
if(!alert)
return
switch(alert)
if("Delta: Deathsquad")
makeDeathsquad()
return
if("Red: Elite ERT")
alert = "Red"
if("Amber: Full ERT")
alert = "Amber"
if("Blue: Light ERT")
alert = "Blue"
if("Green: Centcom Official")
makeOfficial()
return
var/teamsize = min(7,input("Maximum size of team? (7 max)", "Select Team Size",4) as null|num)
var/mission = input("Assign a mission to the Emergency Response Team", "Assign Mission", "Assist the station.")
var/list/mob/dead/observer/candidates = getCandidates("Do you wish to be considered for an elite Nanotrasen Emergency Response Team?", "deathsquad", null)
var/list/mob/dead/observer/candidates = getCandidates("Do you wish to be considered for a Code [alert] Nanotrasen Emergency Response Team?", "deathsquad", null)
var/teamSpawned = 0
if(candidates.len >= 4) //Minimum 4 to be considered a squad
if(candidates.len > 0)
//Pick the (un)lucky players
var/numagents = min(7,candidates.len) //How many officers to spawn
var/numagents = min(teamsize,candidates.len) //How many officers to spawn
var/redalert //If the ert gets super weapons
if (alert == "Red")
numagents = min(teamsize,candidates.len)
redalert = 1
var/list/spawnpoints = emergencyresponseteamspawn
while(numagents && candidates.len)
if (numagents > spawnpoints.len)
@@ -438,28 +498,34 @@ client/proc/one_click_antag()
switch(numagents)
if(1)
ERTOperative.real_name = "Commander [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "commander")
equip_emergencyresponsesquad(ERTOperative, "commander",redalert)
if(2)
ERTOperative.real_name = "Security Officer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "sec")
equip_emergencyresponsesquad(ERTOperative, "sec",redalert)
if(3)
ERTOperative.real_name = "Medical Officer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "med")
equip_emergencyresponsesquad(ERTOperative, "med",redalert)
if(4)
ERTOperative.real_name = "Engineer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "eng")
equip_emergencyresponsesquad(ERTOperative, "eng",redalert)
if(5)
ERTOperative.real_name = "Security Officer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "sec")
equip_emergencyresponsesquad(ERTOperative, "sec",redalert)
if(6)
ERTOperative.real_name = "Medical Officer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "med")
equip_emergencyresponsesquad(ERTOperative, "med",redalert)
if(7)
ERTOperative.real_name = "Engineer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "eng")
equip_emergencyresponsesquad(ERTOperative, "eng",redalert)
ERTOperative.key = chosen_candidate.key
ERTOperative.mind.assigned_role = "ERT"
//Open the Armory doors
if(alert != "Blue")
for(var/obj/machinery/door/poddoor/ert/door in airlocks)
spawn(0)
door.open()
//Assign antag status and the mission
ticker.mode.traitors += ERTOperative.mind
ERTOperative.mind.special_role = "ert"
@@ -471,7 +537,7 @@ client/proc/one_click_antag()
//Greet the commando
ERTOperative << "<B><font size=3 color=red>You are [numagents==1?"the Emergency Response Team Commander":"an Emergency Response Officer"].</font></B>"
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
var/missiondesc = "Your squad is being sent on a Code [alert] mission to [station_name()] by Nanotrasen's Security Division."
if(numagents == 1) //If Squad Leader
missiondesc += " Lead your squad to ensure the completion of the mission. Avoid civilian casualites when possible. Board the shuttle when your team is ready."
else
@@ -481,7 +547,7 @@ client/proc/one_click_antag()
//Logging and cleanup
if(numagents == 1)
message_admins("The emergency response team has spawned with the mission: [mission].")
message_admins("A Code [alert] emergency response team has spawned with the mission: [mission]")
log_game("[key_name(ERTOperative)] has been selected as an Emergency Response Officer")
numagents--
teamSpawned++
@@ -576,7 +642,6 @@ client/proc/one_click_antag()
G << 'sound/misc/notice2.ogg' //Alerting them to their consideration
switch(alert(G,Question,"Please answer in 30 seconds!","Yes","No"))
if("Yes")
G << 'sound/machines/ping.ogg'
G << "<span class='notice'>Choice registered: Yes.</span>"
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
G << "<span class='danger'>Sorry, you were too late for the consideration!</span>"
@@ -585,7 +650,6 @@ client/proc/one_click_antag()
candidates += G
if("No")
G << "<span class='danger'>Choice registered: No.</span>"
G << 'sound/machines/buzz-sigh.ogg'
return
else
return