Merge pull request #6966 from Steelpoint/ERTv2

[FEATURE] Emergency Response Team V2
This commit is contained in:
Cheridan
2015-01-15 23:41:20 -06:00
21 changed files with 955 additions and 531 deletions
+5 -1
View File
@@ -66,7 +66,11 @@
log_admin("[key_name(usr)] started a gang war.")
if(!src.makeGangsters())
usr << "<span class='danger'>Unfortunatly there were not enough candidates available.</span>"
if("13")
message_admins("[key_name(usr)] created a emergency response team.")
log_admin("[key_name(usr)] created a emergency response team.")
if(!src.makeEmergencyresponseteam())
usr << "<span class='danger'>Unfortunatly there were not enough candidates available.</span>"
else if(href_list["forceevent"])
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
+26
View File
@@ -819,6 +819,9 @@ var/global/list/g_fancy_list_of_types = null
if("death commando")
equip_deathsquad(M)
if("emergency response officer")
equip_emergencyresponsesquad(M)
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)
@@ -1054,6 +1057,7 @@ var/global/list/g_fancy_list_of_types = null
usr << browse(dat, "window=dellog")
//Deathsquad
/proc/equip_deathsquad(var/mob/living/carbon/human/M, var/officer)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(M)
R.set_frequency(1441)
@@ -1101,3 +1105,25 @@ var/global/list/g_fancy_list_of_types = null
W.registered_name = M.real_name
W.update_label(M.real_name)
M.equip_to_slot_or_del(W, slot_wear_id)
//Emergency Response Team
/proc/equip_emergencyresponsesquad(var/mob/living/carbon/human/M, var/officer)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(M)
R.set_frequency(1441)
M.equip_to_slot_or_del(R, slot_ears)
if(officer)
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/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/weapon/storage/backpack/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/card/id/ertsCommand(M), slot_wear_id)
else
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/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
L.imp_in = M
L.implanted = 1
M.sec_hud_set_implants()
@@ -21,6 +21,7 @@ client/proc/one_click_antag()
<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>
"}
/* These dont work just yet
Ninja, aliens and deathsquad I have not looked into yet
@@ -427,6 +428,83 @@ client/proc/one_click_antag()
return 0
// EMERGENCY RESPONSE TEAM
/datum/admins/proc/makeEmergencyresponseteam()
var/list/mob/dead/observer/candidates = list()
var/time_passed = world.time
var/mission = input("Assign a mission to the Emergency Response Team", "Assign Mission", "Assist the station.")
//Generates a list of officers from active ghosts. Then the user picks which characters to respawn as the officers.
for(var/mob/dead/observer/G in player_list)
spawn(0)
switch(alert(G,"Do you wish to be considered for an elite Nanotrasen Emergency Response 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
else
return
sleep(300)
for(var/mob/dead/observer/G in candidates)
if(!G.key)
candidates.Remove(G)
if(candidates.len >= 4) //Minimum 4 to be considered a squad
//Pick the (un)lucky players
var/numagents = min(7,candidates.len) //How many officers to spawn
var/list/spawnpoints = emergencyresponseteamspawn
while(numagents && spawnpoints.len && candidates.len)
var/spawnloc = spawnpoints[1]
var/mob/dead/observer/chosen_candidate = pick(candidates)
candidates -= chosen_candidate
if(!chosen_candidate.key)
continue
//Spawn and equip the officer
var/mob/living/carbon/human/ERTOperative = new(spawnloc)
chosen_candidate.client.prefs.copy_to(ERTOperative)
ready_dna(ERTOperative)
if(numagents == 1) //If Squad Leader
ERTOperative.real_name = "Commander [pick(ERTOperative.real_name)]"
equip_emergencyresponsesquad(ERTOperative, 1)
else
ERTOperative.real_name = "Officer [pick(ERTOperative.real_name)]"
equip_emergencyresponsesquad(ERTOperative)
ERTOperative.key = chosen_candidate.key
ERTOperative.mind.assigned_role = "ERT"
//Assign antag status and the mission
ticker.mode.traitors += ERTOperative.mind
ERTOperative.mind.special_role = "ert"
var/datum/objective/missionobj = new
missionobj.owner = ERTOperative.mind
missionobj.explanation_text = mission
missionobj.completed = 1
ERTOperative.mind.objectives += missionobj
//Greet the commando
ERTOperative << "<B><font size=3 color=red>You are the [numagents==1?"Emergency Response Team Commander":"Emergency Response Officer"].</font></B>"
var/missiondesc = "Your squad is being sent on a 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
missiondesc += " Follow orders given to you by your commander. Avoid civilian casualites when possible."
missiondesc += "<BR><B>Your Mission</B>: [mission]"
ERTOperative << missiondesc
//Logging and cleanup
if(numagents == 1)
message_admins("The emergency response team has spawned with the mission: [mission].")
log_game("[key_name(ERTOperative)] has been selected as a Emergency Response Officer")
spawnpoints -= spawnloc
numagents--
return 1
return
/datum/admins/proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
if(!G_found || !G_found.key) return
@@ -115,3 +115,56 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
strip_delay = 40
put_on_delay = 20
//Emergency Response Team suits
/obj/item/clothing/head/helmet/space/hardsuit/ert
name = "emergency response unit helmet"
desc = "Standard issue command helmet for the ERT"
icon_state = "hardsuit0-ert_commander"
item_state = "hardsuit0-ert_commander"
item_color = "ert_commander"
armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100)
strip_delay = 130
/obj/item/clothing/head/helmet/space/hardsuit/ert/sec
desc = "Standard issue security helmet for the ERT"
icon_state = "hardsuit0-ert_security"
item_state = "hardsuit0-ert_security"
item_color = "ert_security"
/obj/item/clothing/head/helmet/space/hardsuit/ert/engi
desc = "Standard issue engineer helmet for the ERT"
icon_state = "hardsuit0-ert_engineer"
item_state = "hardsuit0-ert_engineer"
item_color = "ert_engineer"
/obj/item/clothing/head/helmet/space/hardsuit/ert/med
desc = "Standard issue medical helmet for the ERT"
icon_state = "hardsuit0-ert_medical"
item_state = "hardsuit0-ert_medical"
item_color = "ert_medical"
/obj/item/clothing/suit/space/ert
name = "emergency response team suit"
desc = "Standard issue command suit for the ERT."
icon_state = "ert_command"
item_state = "ert_command"
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100)
slowdown = 1
strip_delay = 130
/obj/item/clothing/suit/space/ert/sec
desc = "Standard issue security suit for the ERT."
icon_state = "ert_security"
item_state = "ert_security"
/obj/item/clothing/suit/space/ert/engi
desc = "Standard issue engineer suit for the ERT."
icon_state = "ert_engineer"
item_state = "ert_engineer"
/obj/item/clothing/suit/space/ert/med
desc = "Standard issue medical suit for the ERT."
icon_state = "ert_medical"
item_state = "ert_medical"
@@ -38,6 +38,24 @@
select_name = "DESTROY"
fire_sound = 'sound/weapons/pulse.ogg'
/obj/item/ammo_casing/energy/laser/pulse/carbine
e_cost = 1000
/obj/item/ammo_casing/energy/laser/carbine
e_cost = 1000
/obj/item/ammo_casing/energy/electrode/carbine
e_cost = 1000
/obj/item/ammo_casing/energy/laser/pulse/pistol
e_cost = 2000
/obj/item/ammo_casing/energy/laser/pistol
e_cost = 1000
/obj/item/ammo_casing/energy/electrode/pistol
e_cost = 1000
/obj/item/ammo_casing/energy/laser/bluetag
projectile_type = /obj/item/projectile/lasertag/bluetag
select_name = "bluetag"
@@ -14,6 +14,22 @@
/obj/item/weapon/gun/energy/pulse_rifle/attack_self(mob/living/user as mob)
select_fire(user)
/obj/item/weapon/gun/energy/pulse_rifle/pulse_carbine
name = "pulse carbine"
desc = "A ligther weight varient of the pulse rifle, a multifaceted energy carbine with three modes."
w_class = 3.0
icon_state = "pulse_carbine"
item_state = "pulse"
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse/carbine, /obj/item/ammo_casing/energy/electrode/carbine, /obj/item/ammo_casing/energy/laser/carbine)
/obj/item/weapon/gun/energy/pulse_rifle/pulse_pistol
name = "pulse pistol"
desc = "A ligther weight varient of the pulse rifle, a multifaceted energy pistol with three modes."
w_class = 2.0
icon_state = "pulse_pistol"
item_state = "pulse"
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse/pistol, /obj/item/ammo_casing/energy/electrode/pistol, /obj/item/ammo_casing/energy/laser/pistol)
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
desc = "A heavy-duty energy rifle built for pure destruction."
@@ -226,6 +226,11 @@ datum/reagent/medicine/adminordrazine/on_mob_life(var/mob/living/carbon/M as mob
..()
return
datum/reagent/medicine/adminordrazine/nanites
name = "Nanites"
id = "nanites"
description = "Tiny machines capable of rapid cellular regeneration."
datum/reagent/medicine/synaptizine
name = "Synaptizine"
id = "synaptizine"
@@ -56,7 +56,14 @@
..()
reagents.add_reagent("synaptizine", 30)
obj/item/weapon/reagent_containers/hypospray/combat/nanites
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing."
volume = 100
/obj/item/weapon/reagent_containers/hypospray/combat/nanites/New()
..()
reagents.remove_reagent("synaptizine", 30)
reagents.add_reagent("nanites", 100)
//MediPens