mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Adds Spawn-ERT-Commander verb for CCIA (#4463)
CCIA Agents now have the power to spawn as an ERT Commander. This will be mostly used for briefing outgoing ERT teams using information from faxes they have received.
This commit is contained in:
@@ -383,7 +383,8 @@ var/list/admin_verbs_cciaa = list(
|
||||
/datum/admins/proc/create_admin_fax,
|
||||
/client/proc/check_fax_history,
|
||||
/client/proc/aooc,
|
||||
/client/proc/check_antagonists
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/spawn_ert_commander
|
||||
)
|
||||
|
||||
/client/proc/add_admin_verbs()
|
||||
|
||||
+94
-90
@@ -9,19 +9,19 @@
|
||||
return //how did they get here?
|
||||
|
||||
if(!ROUND_IS_STARTED)
|
||||
src << "<span class='warning'>The game hasn't started yet!</span>"
|
||||
to_chat(src,"<span class='warning'>The game hasn't started yet!</span>")
|
||||
return
|
||||
|
||||
if(istype(mob, /mob/abstract/new_player))
|
||||
src << "<span class='warning'>You can't be in the lobby to join as a duty officer.</span>"
|
||||
to_chat(src,"<span class='warning'>You can't be in the lobby to join as a duty officer.</span>")
|
||||
return
|
||||
|
||||
if (alert(usr, "Do you want to cancel or proceed?", "Are you sure?", "Proceed", "Cancel") == "Cancel")
|
||||
src << "<span class='notice'>Cancelled.</span>"
|
||||
to_chat(src,"<span class='notice'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
if(mob.mind && mob.mind.special_role == "CCIA Agent")
|
||||
src << "<span class='warning'>You are already a CCIA Agent.</span>"
|
||||
to_chat(src,"<span class='warning'>You are already a CCIA Agent.</span>")
|
||||
verbs += /client/proc/returntobody
|
||||
return
|
||||
|
||||
@@ -30,94 +30,98 @@
|
||||
holder.original_mob = mob
|
||||
wasLiving = 1
|
||||
|
||||
for (var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "CCIAAgent")
|
||||
var/new_name = input(usr, "Pick a name","Name") as text
|
||||
var/mob/living/carbon/human/M = new(null)
|
||||
|
||||
M.check_dna(M)
|
||||
|
||||
M.real_name = new_name
|
||||
M.name = new_name
|
||||
M.age = input("Enter your characters age:","Num") as num
|
||||
if(!M.age)
|
||||
M.age = rand(35,50)
|
||||
if(M.age < 33 || M.age > 60)
|
||||
src << "<span class='warning'>The age you selected was not in a valid range for a Duty Officer.</span>"
|
||||
if(M.age < 33)
|
||||
M.age = 33
|
||||
else
|
||||
M.age = 60
|
||||
src << "<span class='warning'>Your age has been set to [M.age].</span>"
|
||||
|
||||
M.dna.ready_dna(M)
|
||||
|
||||
//Creates mind stuff.
|
||||
M.mind = new
|
||||
M.mind.current = M
|
||||
M.mind.original = M
|
||||
if(wasLiving)
|
||||
M.mind.admin_mob_placeholder = mob
|
||||
M.mind.assigned_role = "Central Command Internal Affairs Agent"
|
||||
M.mind.special_role = "CCIA Agent"
|
||||
M.loc = L.loc
|
||||
M.key = key
|
||||
|
||||
M.change_appearance(APPEARANCE_ALL, M.loc, check_species_whitelist = 1)
|
||||
|
||||
if(wasLiving)
|
||||
clear_cciaa_job(holder.original_mob)
|
||||
spawn(1)
|
||||
holder.original_mob.key = "@[key]"
|
||||
|
||||
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/laceup(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/ccia(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/pepper(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/taperecorder/cciaa(M), slot_r_store)
|
||||
|
||||
var/obj/item/clothing/suit/storage/toggle/internalaffairs/suit = new(M)
|
||||
suit.name = "central command internal affairs jacket"
|
||||
M.equip_to_slot_or_del(suit, slot_wear_suit)
|
||||
|
||||
var/obj/item/weapon/storage/backpack/satchel/bag = new(M)
|
||||
bag.name = "officer's leather satchel"
|
||||
bag.desc = "A well cared for leather satchel for Nanotrasen officers."
|
||||
M.equip_to_slot_or_del(bag, slot_back)
|
||||
if(M.backbag == 1)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/stamp/centcomm(M), slot_in_backpack)
|
||||
|
||||
var /obj/item/weapon/storage/lockbox/lockbox = new(M)
|
||||
lockbox.req_access = list(access_cent_captain)
|
||||
lockbox.name = "CCIA agent briefcase"
|
||||
lockbox.desc = "A smart looking briefcase with a NT logo on the side"
|
||||
lockbox.storage_slots = 8
|
||||
lockbox.max_storage_space = 16
|
||||
M.equip_to_slot_or_del(lockbox, slot_l_hand)
|
||||
|
||||
var/obj/item/device/pda/central/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Central Command Internal Affairs Agent"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
|
||||
M.equip_to_slot_or_del(pda, slot_belt)
|
||||
|
||||
M.implant_loyalty(M, 1)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.item_state = "id_inv"
|
||||
W.access = get_all_accesses() + get_centcom_access("CCIA Agent")
|
||||
W.assignment = "Central Command Internal Affairs Agent"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
verbs += /client/proc/returntobody
|
||||
var/obj/effect/landmark/L
|
||||
for (var/obj/effect/landmark/landmark in landmarks_list)
|
||||
if(landmark.name == "CCIAAgent")
|
||||
L = landmark
|
||||
break
|
||||
|
||||
if (!L)
|
||||
return
|
||||
|
||||
var/new_name = input(usr, "Pick a name","Name") as text
|
||||
var/mob/living/carbon/human/M = new(null)
|
||||
|
||||
M.check_dna(M)
|
||||
|
||||
M.real_name = new_name
|
||||
M.name = new_name
|
||||
M.age = input("Enter your characters age:","Num") as num
|
||||
if(!M.age)
|
||||
M.age = rand(35,50)
|
||||
if(M.age < 33 || M.age > 60)
|
||||
to_chat(src,"<span class='warning'>The age you selected was not in a valid range for a Duty Officer.</span>")
|
||||
if(M.age < 33)
|
||||
M.age = 33
|
||||
else
|
||||
M.age = 60
|
||||
to_chat(src,"<span class='warning'>Your age has been set to [M.age].</span>")
|
||||
|
||||
M.dna.ready_dna(M)
|
||||
|
||||
M.mind = new
|
||||
M.mind.current = M
|
||||
M.mind.original = M
|
||||
if(wasLiving)
|
||||
M.mind.admin_mob_placeholder = mob
|
||||
M.mind.assigned_role = "Central Command Internal Affairs Agent"
|
||||
M.mind.special_role = "CCIA Agent"
|
||||
M.forceMove(L.loc)
|
||||
M.key = key
|
||||
|
||||
M.change_appearance(APPEARANCE_ALL, M.loc, check_species_whitelist = 1)
|
||||
|
||||
if(wasLiving)
|
||||
clear_cciaa_job(holder.original_mob)
|
||||
addtimer(CALLBACK(holder.original_mob, /mob/.proc/invalidate_key_tmr), 1)
|
||||
|
||||
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/laceup(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/ccia(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/pepper(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/taperecorder/cciaa(M), slot_r_store)
|
||||
|
||||
var/obj/item/clothing/suit/storage/toggle/internalaffairs/suit = new(M)
|
||||
suit.name = "central command internal affairs jacket"
|
||||
M.equip_to_slot_or_del(suit, slot_wear_suit)
|
||||
|
||||
var/obj/item/weapon/storage/backpack/satchel/bag = new(M)
|
||||
bag.name = "officer's leather satchel"
|
||||
bag.desc = "A well cared for leather satchel for Nanotrasen officers."
|
||||
M.equip_to_slot_or_del(bag, slot_back)
|
||||
if(M.backbag == 1)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/stamp/centcomm(M), slot_in_backpack)
|
||||
|
||||
var /obj/item/weapon/storage/lockbox/lockbox = new(M)
|
||||
lockbox.req_access = list(access_cent_captain)
|
||||
lockbox.name = "CCIA agent briefcase"
|
||||
lockbox.desc = "A smart looking briefcase with a NT logo on the side"
|
||||
lockbox.storage_slots = 8
|
||||
lockbox.max_storage_space = 16
|
||||
M.equip_to_slot_or_del(lockbox, slot_l_hand)
|
||||
|
||||
var/obj/item/device/pda/central/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Central Command Internal Affairs Agent"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
|
||||
M.equip_to_slot_or_del(pda, slot_belt)
|
||||
|
||||
M.implant_loyalty(M, 1)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.item_state = "id_inv"
|
||||
W.access = get_all_accesses() | get_centcom_access("CCIA Agent")
|
||||
W.assignment = "Central Command Internal Affairs Agent"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
verbs += /client/proc/returntobody
|
||||
|
||||
/client/proc/returntobody()
|
||||
set name = "Return to mob"
|
||||
set desc = "The Agent's work is done, return to your original mob"
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/client/proc/spawn_ert_commander()
|
||||
set category = "Special Verbs"
|
||||
set name = "Spawn ERT Commander"
|
||||
set desc = "Spawns an ERT Commander."
|
||||
|
||||
if(!check_rights(R_CCIAA)) return
|
||||
|
||||
if(!holder)
|
||||
return //how did they get here?
|
||||
|
||||
if(!ROUND_IS_STARTED)
|
||||
to_chat(src,"<span class='warning'>The game hasn't started yet!</span>")
|
||||
return
|
||||
|
||||
if(istype(mob, /mob/abstract/new_player))
|
||||
to_chat(src,"<span class='warning'>You can't be in the lobby to join as a commander.</span>")
|
||||
return
|
||||
|
||||
if (alert(usr, "Do you want to cancel or proceed?", "Are you sure?", "Proceed", "Cancel") == "Cancel")
|
||||
to_chat(src,"<span class='notice'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
if(mob.mind && mob.mind.special_role == "ERT Commander")
|
||||
to_chat(src,"<span class='warning'>You are already an ERT Commander.</span>")
|
||||
verbs += /client/proc/returntobody
|
||||
return
|
||||
|
||||
var/wasLiving = 0
|
||||
if(istype(mob, /mob/living))
|
||||
holder.original_mob = mob
|
||||
wasLiving = 1
|
||||
|
||||
var/obj/effect/landmark/L
|
||||
for (var/obj/effect/landmark/landmark in landmarks_list)
|
||||
if(landmark.name == "ERTCommander")
|
||||
L = landmark
|
||||
break
|
||||
|
||||
if (!L)
|
||||
return
|
||||
|
||||
var/new_name = input(usr, "Pick a name","Name") as text
|
||||
var/mob/living/carbon/human/M = new(null)
|
||||
|
||||
M.check_dna(M)
|
||||
|
||||
M.real_name = new_name
|
||||
M.name = new_name
|
||||
M.age = input("Enter your characters age:","Num") as num
|
||||
if(!M.age)
|
||||
M.age = rand(35,50)
|
||||
if(M.age < 33 || M.age > 60)
|
||||
to_chat(src,"<span class='warning'>The age you selected was not in a valid range for a Commander.</span>")
|
||||
if(M.age < 33)
|
||||
M.age = 33
|
||||
else
|
||||
M.age = 60
|
||||
to_chat(src,"<span class='warning'>Your age has been set to [M.age].</span>")
|
||||
|
||||
M.dna.ready_dna(M)
|
||||
|
||||
M.mind = new
|
||||
M.mind.current = M
|
||||
M.mind.original = M
|
||||
if(wasLiving)
|
||||
M.mind.admin_mob_placeholder = mob
|
||||
M.mind.assigned_role = "Emergency Response Team Commander"
|
||||
M.mind.special_role = "ERT Commander"
|
||||
M.forceMove(L.loc)
|
||||
M.key = key
|
||||
|
||||
M.change_appearance(APPEARANCE_ALL, M.loc, check_species_whitelist = 1)
|
||||
|
||||
if(wasLiving)
|
||||
clear_cciaa_job(holder.original_mob)
|
||||
addtimer(CALLBACK(holder.original_mob, /mob/.proc/invalidate_key_tmr), 1)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_commander(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/commander(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/vest/heavy/ert/commander(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel, slot_back)
|
||||
|
||||
|
||||
|
||||
var/obj/item/device/pda/central/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Emergency Response Team Commander"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
|
||||
M.equip_to_slot_or_del(pda, slot_belt)
|
||||
|
||||
M.implant_loyalty(M, 1)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.item_state = "id_inv"
|
||||
W.access = get_all_accesses() | get_centcom_access("BlackOps Commander")
|
||||
W.assignment = "Emergency Response Team Commander"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
verbs += /client/proc/returntobody
|
||||
|
||||
/mob/proc/invalidate_key_tmr()
|
||||
key = "@[key]"
|
||||
Reference in New Issue
Block a user