diff --git a/_maps/map_files/generic/centcomm.dmm b/_maps/map_files/generic/centcomm.dmm
index b9ddf7c0f50..2c6f94f0e0e 100644
--- a/_maps/map_files/generic/centcomm.dmm
+++ b/_maps/map_files/generic/centcomm.dmm
@@ -13073,12 +13073,12 @@
pixel_x = 5;
pixel_y = 5
},
-/obj/item/storage/lockbox/medal,
/obj/machinery/newscaster/security_unit{
dir = 8;
name = "east bump";
pixel_x = 28
},
+/obj/item/storage/lockbox/medal/cc,
/turf/simulated/floor/carpet,
/area/centcom/specops)
"UA" = (
diff --git a/code/_globalvars/misc_globals.dm b/code/_globalvars/misc_globals.dm
index 52761cc2f1f..bcbaa4ac54b 100644
--- a/code/_globalvars/misc_globals.dm
+++ b/code/_globalvars/misc_globals.dm
@@ -13,6 +13,7 @@ GLOBAL_DATUM_INIT(command_announcer, /obj/item/radio/intercom/command, create_co
/proc/create_global_announcer()
spawn(0)
GLOB.global_announcer = new(null)
+ GLOB.global_announcer.config(list("Common", "Engineering", "Medical", "Supply", "Command", "Science", "Service", "Security", "Procedure"))
return
/proc/create_command_announcer()
diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm
index b3257d3587b..08dc3f49bfd 100644
--- a/code/game/objects/items/weapons/storage/lockbox.dm
+++ b/code/game/objects/items/weapons/storage/lockbox.dm
@@ -111,6 +111,29 @@
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/heart(src)
+/obj/item/storage/lockbox/medal/cc
+ name = "central command medal box"
+ desc = "A locked box used to store ALL the medals you could ever need."
+ max_combined_w_class = 30
+ storage_slots = 15
+ req_access = list(ACCESS_CENT_COMMANDER)
+
+/obj/item/storage/lockbox/medal/cc/populate_contents()
+ new /obj/item/clothing/accessory/medal/gold/heroism(src)
+ ..()
+ new /obj/item/clothing/accessory/medal/gold(src)
+ new /obj/item/clothing/accessory/medal/silver(src)
+ new /obj/item/clothing/accessory/medal(src)
+
+ // Departmental medals
+ new /obj/item/clothing/accessory/medal/security(src)
+ new /obj/item/clothing/accessory/medal/science(src)
+ new /obj/item/clothing/accessory/medal/engineering(src)
+ new /obj/item/clothing/accessory/medal/service(src)
+ new /obj/item/clothing/accessory/medal/medical(src)
+ new /obj/item/clothing/accessory/medal/legal(src)
+ new /obj/item/clothing/accessory/medal/supply(src)
+
/obj/item/storage/lockbox/medal/hardmode_box
name = "\improper HRD-MDE program medal box"
desc = "A locked box used to store medals of pride. Use a fauna research disk on the box to transmit the data and print a medal."
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
index b956d816a0e..10b42b57ffc 100644
--- a/code/modules/clothing/under/accessories/accessory.dm
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -77,18 +77,25 @@
if(istype(H) && !ismonkeybasic(H)) //Monkeys are a snowflake because you can't remove accessories once added
if(H.wear_suit && H.wear_suit.flags_inv & HIDEJUMPSUIT)
to_chat(user, "[H]'s body is covered, and you cannot attach \the [src].")
- return 1
+ return TRUE
var/obj/item/clothing/under/U = H.w_uniform
if(istype(U))
+ if(user == H)
+ U.attach_accessory(src, user, TRUE)
+ return
user.visible_message("[user] is putting a [src.name] on [H]'s [U.name]!", "You begin to put a [src.name] on [H]'s [U.name]...")
- if(do_after(user, 40, target=H) && H.w_uniform == U)
- user.visible_message("[user] puts a [src.name] on [H]'s [U.name]!", "You finish putting a [src.name] on [H]'s [U.name].")
- U.attackby(src, user)
+ if(do_after(user, 4 SECONDS, target = H) && H.w_uniform == U)
+ if(U.attach_accessory(src, user, TRUE))
+ user.visible_message("[user] puts a [src.name] on [H]'s [U.name]!", "You finish putting a [src.name] on [H]'s [U.name].")
+ after_successful_nonself_attach(H, user)
else
to_chat(user, "[H] is not wearing anything to attach \the [src] to.")
- return 1
+ return TRUE
return ..()
+/obj/item/clothing/accessory/proc/after_successful_nonself_attach(mob/living/carbon/human/H, mob/living/user)
+ return
+
//default attackby behaviour
/obj/item/clothing/accessory/attackby(obj/item/I, mob/user, params)
..()
@@ -195,6 +202,29 @@
item_color = "bronze"
materials = list(MAT_METAL=1000)
resistance_flags = FIRE_PROOF
+ /// The channel we will announce on when we are rewarded to someone
+ var/channel
+ /// Will we try to announce, toggled by using in hand
+ var/try_announce = TRUE
+
+/obj/item/clothing/accessory/medal/examine(mob/user)
+ . = ..()
+ if(channel)
+ . += "The tiny radio inside seems to be [try_announce ? "active" : "inactive"]."
+
+/obj/item/clothing/accessory/medal/attack_self(mob/user)
+ . = ..()
+ if(channel)
+ try_announce = !try_announce
+ to_chat(user, "You silently [try_announce ? "enable" : "disable"] the radio in [src].")
+
+/obj/item/clothing/accessory/medal/after_successful_nonself_attach(mob/living/carbon/human/H, mob/living/user)
+ if(!channel || !try_announce)
+ return
+ if(!is_station_level(user.z))
+ return
+ GLOB.global_announcer.autosay("[H] has been rewarded [src] by [user]!", "Medal Announcer", channel = channel, follow_target_override = src)
+ channel = null
// GOLD (awarded by centcom)
/obj/item/clothing/accessory/medal/gold
@@ -203,11 +233,13 @@
icon_state = "gold"
item_color = "gold"
materials = list(MAT_GOLD=1000)
+ channel = "Common"
/obj/item/clothing/accessory/medal/gold/captain
name = "medal of captaincy"
desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
+ channel = null // captains medal is special :)
/obj/item/clothing/accessory/medal/gold/captain/Initialize(mapload)
. = ..()
@@ -226,10 +258,12 @@
icon_state = "silver"
item_color = "silver"
materials = list(MAT_SILVER=1000)
+ channel = "Command"
/obj/item/clothing/accessory/medal/silver/valor
name = "medal of valor"
desc = "An award issued by Captains to crew members whose exceptional performance and service to the station has been commended by the station's top leadership."
+ channel = "Common"
/obj/item/clothing/accessory/medal/silver/leadership
name = "medal of command"
@@ -243,30 +277,37 @@
/obj/item/clothing/accessory/medal/security
name = "robust security medal"
desc = "An award issued by the HoS to security staff who excel at upholding the law."
+ channel = "Security"
/obj/item/clothing/accessory/medal/science
name = "smart science medal"
desc = "An award issued by the RD to science staff who advance the frontiers of knowledge."
+ channel = "Science"
/obj/item/clothing/accessory/medal/engineering
name = "excellent engineering medal"
desc = "An award issued by the CE to engineering staff whose dedication keep the station running at its best."
+ channel = "Engineering"
/obj/item/clothing/accessory/medal/service
name = "superior service medal"
desc = "An award issued by the HoP to service staff who go above and beyond."
+ channel = "Service"
/obj/item/clothing/accessory/medal/medical
name = "magnificient medical medal"
desc = "An award issued by the CMO to medical staff who excel at saving lives."
+ channel = "Medical"
/obj/item/clothing/accessory/medal/legal
name = "meritous legal medal"
desc = "An award issued by the Magistrate to legal staff who uphold the rule of law."
+ channel = "Procedure"
/obj/item/clothing/accessory/medal/supply
name = "stable supply medal"
desc = "An award issued by the Quartermaster to supply staff dedicated to being effective."
+ channel = "Supply"
/obj/item/clothing/accessory/medal/recruiter // Prize for the NT Recruiter emagged arcade
name = "nanotrasen recruiter medal"
@@ -277,6 +318,7 @@
desc = "A rarely-awarded medal for those who sacrifice themselves in the line of duty to save their fellow crew."
icon_state = "bronze_heart"
item_color = "bronze_heart"
+ channel = "Common"
// Plasma, from NT research departments. For now, used by the HRD-MDE project for the moderate 2 fauna, drake and hierophant.
@@ -317,18 +359,22 @@
/obj/item/clothing/accessory/medal/gold/bubblegum
name = "bubblegum HRD-MDE award"
desc = "An award which represents magnificant contributions to the HRD-MDE project in the form of analysing Bubblegum, and the related blood space."
+ channel = null
/obj/item/clothing/accessory/medal/gold/heroism/hardmode_full //Kill every hardmode boss. In a shift. Good luck.
name = "medal of incredible dedication"
desc = "An extremely rare golden medal awarded only by CentComm. This medal was issued for miners who went above and beyond for the HRD-MDE project. Engraved on it is the phrase 'mori quam foedari'..."
+ channel = null
/obj/item/clothing/accessory/medal/silver/colossus
name = "colossus HRD-MDE award"
desc = "An award which represents major contributions to the HRD-MDE project in the form of analysing a colossus."
+ channel = null
/obj/item/clothing/accessory/medal/silver/legion
name = "legion HRD-MDE award"
desc = "An award which represents major contributions to the HRD-MDE project in the form of analysing the Legion."
+ channel = null
/obj/item/clothing/accessory/medal/blood_drunk
name = "blood drunk HRD-MDE award"