diff --git a/aurorastation.dme b/aurorastation.dme index 503864878fd..09492c8f802 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1137,6 +1137,7 @@ #include "code\modules\cargo\randomstock.dm" #include "code\modules\cciaa\cciaa.dm" #include "code\modules\cciaa\cciaa_items.dm" +#include "code\modules\cciaa\ert_cmd.dm" #include "code\modules\client\asset_cache.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 05a9f1ff36c..f50f97c0433 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -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() diff --git a/code/modules/cciaa/cciaa.dm b/code/modules/cciaa/cciaa.dm index 3e8b845d273..7ba18eaa989 100644 --- a/code/modules/cciaa/cciaa.dm +++ b/code/modules/cciaa/cciaa.dm @@ -9,19 +9,19 @@ return //how did they get here? if(!ROUND_IS_STARTED) - src << "The game hasn't started yet!" + to_chat(src,"The game hasn't started yet!") return if(istype(mob, /mob/abstract/new_player)) - src << "You can't be in the lobby to join as a duty officer." + to_chat(src,"You can't be in the lobby to join as a duty officer.") return if (alert(usr, "Do you want to cancel or proceed?", "Are you sure?", "Proceed", "Cancel") == "Cancel") - src << "Cancelled." + to_chat(src,"Cancelled.") return if(mob.mind && mob.mind.special_role == "CCIA Agent") - src << "You are already a CCIA Agent." + to_chat(src,"You are already a CCIA Agent.") 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 << "The age you selected was not in a valid range for a Duty Officer." - if(M.age < 33) - M.age = 33 - else - M.age = 60 - src << "Your age has been set to [M.age]." - - 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,"The age you selected was not in a valid range for a Duty Officer.") + if(M.age < 33) + M.age = 33 + else + M.age = 60 + to_chat(src,"Your age has been set to [M.age].") + + 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" diff --git a/code/modules/cciaa/ert_cmd.dm b/code/modules/cciaa/ert_cmd.dm new file mode 100644 index 00000000000..c5b731dc9cb --- /dev/null +++ b/code/modules/cciaa/ert_cmd.dm @@ -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,"The game hasn't started yet!") + return + + if(istype(mob, /mob/abstract/new_player)) + to_chat(src,"You can't be in the lobby to join as a commander.") + return + + if (alert(usr, "Do you want to cancel or proceed?", "Are you sure?", "Proceed", "Cancel") == "Cancel") + to_chat(src,"Cancelled.") + return + + if(mob.mind && mob.mind.special_role == "ERT Commander") + to_chat(src,"You are already an ERT Commander.") + 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,"The age you selected was not in a valid range for a Commander.") + if(M.age < 33) + M.age = 33 + else + M.age = 60 + to_chat(src,"Your age has been set to [M.age].") + + 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]" \ No newline at end of file diff --git a/maps/aurora/aurora-1_centcomm.dmm b/maps/aurora/aurora-1_centcomm.dmm index e0516c19f3d..7acba08be8a 100644 --- a/maps/aurora/aurora-1_centcomm.dmm +++ b/maps/aurora/aurora-1_centcomm.dmm @@ -1,5 +1,4 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE -//Model dictionary trimmed on: 10-03-2018 20:24 (UTC) "aaa" = ( /obj/effect/step_trigger/teleporter/random{ affect_ghosts = 1; @@ -22147,6 +22146,14 @@ "aWP" = ( /turf/template_noop, /area/space) +"aWQ" = ( +/obj/effect/landmark{ + name = "ERTCommander" + }, +/turf/unsimulated/floor{ + icon_state = "grimy" + }, +/area/centcom/creed) (1,1,1) = {" aaa @@ -55199,7 +55206,7 @@ aqt aqt avf avz -avz +aWQ awb awP avf