From f13b15806a26cb598b3d04070acf553fa2aad460 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 7 Jan 2018 19:14:24 -0800 Subject: [PATCH] Refactor - Deletes Paranormal & Janitor ERT outfits from /datum/outfit/admin (so they won't show up in the main special outfit list as *static* outfits) - Adds Paranormal & Janitor ERT outfits to 'emergency response team member' sub-section of admin dress command, which means they're still available, but now you can choose the level of them to equip to someone (amber/red/gamma), instead of them always being the old static outfit which doesn't match what real ERT actually use anymore. - Refactors the way that spawning ERT cyborgs works, so that most of their special stuff is done in New() instead of in response_team.dm. This means that manually spawning an ERT cyborg will actually work, rather than generating a half-ert cyborg with much of its special stuff missing. - Adds a new subtype of ERT cyborg, /mob/living/silicon/robot/ert/gamma, which is absolutely identical to the normal ert borg, except that it always has gamma module unlocked. This enables admins to manually spawn ERT gamma borgs, instead of all ERT borgs spawned always being non-gamma ERT borgs. --- code/datums/outfits/outfit_admin.dm | 67 ------------------- code/game/response_team.dm | 20 +----- code/modules/admin/verbs/debug.dm | 12 +++- .../modules/mob/living/silicon/robot/robot.dm | 22 +++++- 4 files changed, 32 insertions(+), 89 deletions(-) diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index e81600916fb..5212570223f 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -727,73 +727,6 @@ /obj/item/weapon/melee/classic_baton/telescopic = 1, /obj/item/ammo_box/magazine/m50 = 2) -/datum/outfit/admin/paranormal_ert - name = "Paranormal ERT member" - - uniform = /obj/item/clothing/under/syndicate - suit = /obj/item/clothing/suit/space/hardsuit/ert/paranormal - back = /obj/item/weapon/storage/backpack/ert/security - belt = /obj/item/weapon/gun/energy/gun/nuclear - gloves = /obj/item/clothing/gloves/color/black - shoes = /obj/item/clothing/shoes/combat - head = /obj/item/clothing/head/helmet/space/hardsuit/ert/paranormal - l_ear = /obj/item/device/radio/headset/ert/alt - glasses = /obj/item/clothing/glasses/hud/security/sunglasses - id = /obj/item/weapon/card/id/centcom - pda = /obj/item/device/pda/centcom - backpack_contents = list( - /obj/item/weapon/storage/box/survival = 1, - /obj/item/clothing/mask/gas/sechailer/swat = 1, - /obj/item/weapon/storage/box/zipties = 1, - /obj/item/device/flashlight = 1) - -/datum/outfit/admin/paranormal_ert/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - . = ..() - if(visualsOnly) - return - - var/obj/item/weapon/card/id/I = H.wear_id - if(istype(I)) - apply_to_card(I, H, get_centcom_access("Emergency Response Team Member"), "Emergency Response Team Member") - - var/obj/item/weapon/implant/L = new /obj/item/weapon/implant/mindshield(H) - L.implant(H) - -/datum/outfit/admin/janitorial_ert - name = "Janitorial ERT member" - - uniform = /obj/item/clothing/under/syndicate - suit = /obj/item/clothing/suit/space/hardsuit/ert/janitor - back = /obj/item/weapon/storage/backpack/ert/janitor - belt = /obj/item/weapon/storage/belt/janitor/full - gloves = /obj/item/clothing/gloves/color/yellow - shoes = /obj/item/clothing/shoes/galoshes - head = /obj/item/clothing/head/helmet/space/hardsuit/ert/janitor - l_ear = /obj/item/device/radio/headset/ert/alt - glasses = /obj/item/clothing/glasses/sunglasses - id = /obj/item/weapon/card/id/centcom - pda = /obj/item/device/pda/centcom - backpack_contents = list( - /obj/item/weapon/caution = 2, - /obj/item/weapon/storage/box/survival = 1, - /obj/item/weapon/reagent_containers/spray/cleaner = 1, - /obj/item/weapon/storage/bag/trash = 1, - /obj/item/weapon/storage/box/lights/mixed = 1, - /obj/item/weapon/holosign_creator = 1, - /obj/item/device/flashlight = 1) - -/datum/outfit/admin/janitorial_ert/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - . = ..() - if(visualsOnly) - return - - var/obj/item/weapon/card/id/I = H.wear_id - if(istype(I)) - apply_to_card(I, H, get_centcom_access("Emergency Response Team Member"), "Emergency Response Team Member") - - var/obj/item/weapon/implant/L = new /obj/item/weapon/implant/mindshield(H) - L.implant(H) - /datum/outfit/admin/chrono name = "Chrono Legionnaire" diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 47f026841f7..2423ac54921 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -29,7 +29,7 @@ var/ert_request_answered = 0 to_chat(usr, "The round hasn't started yet!") return - if(send_emergency_team) + if(send_emergency_team > 0) to_chat(usr, "Central Command has already dispatched an emergency response team!") return @@ -115,23 +115,7 @@ var/ert_request_answered = 0 if(class == "Cyborg") active_team.reduceCyborgSlots() var/cyborg_unlock = active_team.getCyborgUnlock() - var/mob/living/silicon/robot/ert/R = new() - R.forceMove(spawn_location) - var/rnum = rand(1,1000) - var/borgname = "ERT [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_ERT - if(cyborg_unlock) - R.crisis = 1 - if(!(R.mind in ticker.minds)) - ticker.minds += R.mind //Adds them to regular mind list. - ticker.mode.ert += R.mind + var/mob/living/silicon/robot/ert/R = new /mob/living/silicon/robot/ert(spawn_location, cyborg_unlock) return R var/mob/living/carbon/human/M = new(null) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 28a0532bf13..f8d61606789 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -577,7 +577,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/list/choices = list( "strip", "as job...", - "emergency response team member", + "emergency response team member", "emergency response team leader" ) @@ -642,7 +642,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(dresscode == "emergency response team leader") equip_team.equip_officer("Commander", M) else - switch(alert("Loadout Type", "Emergency Response Team", "Security", "Engineer", "Medic")) + var/list/ert_outfits = list("Security", "Engineer", "Medic", "Janitor", "Paranormal") + var/echoice = input("Loadout Type", "Emergency Response Team") as null|anything in ert_outfits + if(!echoice) + return + switch(echoice) if("Commander") equip_team.equip_officer("Commander", M) if("Security") @@ -651,6 +655,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that equip_team.equip_officer("Engineer", M) if("Medic") equip_team.equip_officer("Medic", M) + if("Janitor") + equip_team.equip_officer("Janitor", M) + if("Paranormal") + equip_team.equip_officer("Paranormal", M) else to_chat(src, "Invalid ERT Loadout selected") diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 9524e3a9327..e3df2023664 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1481,10 +1481,28 @@ var/list/robot_verbs_default = list( radio.recalculateChannels() aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src) -/mob/living/silicon/robot/ert/New(loc) - ..() +/mob/living/silicon/robot/ert/New(loc, cyborg_unlock) + ..(loc) cell.maxcharge = 25000 cell.charge = 25000 + var/rnum = rand(1,1000) + var/borgname = "ERT [rnum]" + name = borgname + custom_name = borgname + real_name = name + mind = new + mind.current = src + mind.original = src + mind.assigned_role = "MODE" + mind.special_role = SPECIAL_ROLE_ERT + if(cyborg_unlock) + crisis = 1 + if(!(mind in ticker.minds)) + ticker.minds += mind + ticker.mode.ert += mind + +/mob/living/silicon/robot/ert/gamma + crisis = 1 /mob/living/silicon/robot/nations base_icon = "droidpeace"