Makes Medals Cooler (#22652)

* medal buff

* reviews

* Update code/game/objects/items/weapons/storage/lockbox.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* a

* oops

* bam

* Update code/game/objects/items/weapons/storage/lockbox.dm

* Update code/modules/clothing/under/accessories/accessory.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/clothing/under/accessories/accessory.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/clothing/under/accessories/accessory.dm

---------

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Contrabang
2023-10-16 13:28:04 -04:00
committed by GitHub
parent 9556c9de91
commit 73eb774125
4 changed files with 76 additions and 6 deletions

View File

@@ -13073,12 +13073,12 @@
pixel_x = 5; pixel_x = 5;
pixel_y = 5 pixel_y = 5
}, },
/obj/item/storage/lockbox/medal,
/obj/machinery/newscaster/security_unit{ /obj/machinery/newscaster/security_unit{
dir = 8; dir = 8;
name = "east bump"; name = "east bump";
pixel_x = 28 pixel_x = 28
}, },
/obj/item/storage/lockbox/medal/cc,
/turf/simulated/floor/carpet, /turf/simulated/floor/carpet,
/area/centcom/specops) /area/centcom/specops)
"UA" = ( "UA" = (

View File

@@ -13,6 +13,7 @@ GLOBAL_DATUM_INIT(command_announcer, /obj/item/radio/intercom/command, create_co
/proc/create_global_announcer() /proc/create_global_announcer()
spawn(0) spawn(0)
GLOB.global_announcer = new(null) GLOB.global_announcer = new(null)
GLOB.global_announcer.config(list("Common", "Engineering", "Medical", "Supply", "Command", "Science", "Service", "Security", "Procedure"))
return return
/proc/create_command_announcer() /proc/create_command_announcer()

View File

@@ -111,6 +111,29 @@
new /obj/item/clothing/accessory/medal/silver/valor(src) new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/heart(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 /obj/item/storage/lockbox/medal/hardmode_box
name = "\improper HRD-MDE program medal 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." 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."

View File

@@ -77,18 +77,25 @@
if(istype(H) && !ismonkeybasic(H)) //Monkeys are a snowflake because you can't remove accessories once added 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) if(H.wear_suit && H.wear_suit.flags_inv & HIDEJUMPSUIT)
to_chat(user, "[H]'s body is covered, and you cannot attach \the [src].") 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 var/obj/item/clothing/under/U = H.w_uniform
if(istype(U)) if(istype(U))
if(user == H)
U.attach_accessory(src, user, TRUE)
return
user.visible_message("<span class='notice'>[user] is putting a [src.name] on [H]'s [U.name]!</span>", "<span class='notice'>You begin to put a [src.name] on [H]'s [U.name]...</span>") user.visible_message("<span class='notice'>[user] is putting a [src.name] on [H]'s [U.name]!</span>", "<span class='notice'>You begin to put a [src.name] on [H]'s [U.name]...</span>")
if(do_after(user, 40, target=H) && H.w_uniform == U) if(do_after(user, 4 SECONDS, target = H) && H.w_uniform == U)
if(U.attach_accessory(src, user, TRUE))
user.visible_message("<span class='notice'>[user] puts a [src.name] on [H]'s [U.name]!</span>", "<span class='notice'>You finish putting a [src.name] on [H]'s [U.name].</span>") user.visible_message("<span class='notice'>[user] puts a [src.name] on [H]'s [U.name]!</span>", "<span class='notice'>You finish putting a [src.name] on [H]'s [U.name].</span>")
U.attackby(src, user) after_successful_nonself_attach(H, user)
else else
to_chat(user, "[H] is not wearing anything to attach \the [src] to.") to_chat(user, "[H] is not wearing anything to attach \the [src] to.")
return 1 return TRUE
return ..() return ..()
/obj/item/clothing/accessory/proc/after_successful_nonself_attach(mob/living/carbon/human/H, mob/living/user)
return
//default attackby behaviour //default attackby behaviour
/obj/item/clothing/accessory/attackby(obj/item/I, mob/user, params) /obj/item/clothing/accessory/attackby(obj/item/I, mob/user, params)
..() ..()
@@ -195,6 +202,29 @@
item_color = "bronze" item_color = "bronze"
materials = list(MAT_METAL=1000) materials = list(MAT_METAL=1000)
resistance_flags = FIRE_PROOF 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)
. += "<span class='notice'>The tiny radio inside seems to be [try_announce ? "active" : "inactive"].</span>"
/obj/item/clothing/accessory/medal/attack_self(mob/user)
. = ..()
if(channel)
try_announce = !try_announce
to_chat(user, "<span class='notice'>You silently [try_announce ? "enable" : "disable"] the radio in [src].</span>")
/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) // GOLD (awarded by centcom)
/obj/item/clothing/accessory/medal/gold /obj/item/clothing/accessory/medal/gold
@@ -203,11 +233,13 @@
icon_state = "gold" icon_state = "gold"
item_color = "gold" item_color = "gold"
materials = list(MAT_GOLD=1000) materials = list(MAT_GOLD=1000)
channel = "Common"
/obj/item/clothing/accessory/medal/gold/captain /obj/item/clothing/accessory/medal/gold/captain
name = "medal of captaincy" 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." 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 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
channel = null // captains medal is special :)
/obj/item/clothing/accessory/medal/gold/captain/Initialize(mapload) /obj/item/clothing/accessory/medal/gold/captain/Initialize(mapload)
. = ..() . = ..()
@@ -226,10 +258,12 @@
icon_state = "silver" icon_state = "silver"
item_color = "silver" item_color = "silver"
materials = list(MAT_SILVER=1000) materials = list(MAT_SILVER=1000)
channel = "Command"
/obj/item/clothing/accessory/medal/silver/valor /obj/item/clothing/accessory/medal/silver/valor
name = "medal of 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." 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 /obj/item/clothing/accessory/medal/silver/leadership
name = "medal of command" name = "medal of command"
@@ -243,30 +277,37 @@
/obj/item/clothing/accessory/medal/security /obj/item/clothing/accessory/medal/security
name = "robust security medal" name = "robust security medal"
desc = "An award issued by the HoS to security staff who excel at upholding the law." desc = "An award issued by the HoS to security staff who excel at upholding the law."
channel = "Security"
/obj/item/clothing/accessory/medal/science /obj/item/clothing/accessory/medal/science
name = "smart science medal" name = "smart science medal"
desc = "An award issued by the RD to science staff who advance the frontiers of knowledge." desc = "An award issued by the RD to science staff who advance the frontiers of knowledge."
channel = "Science"
/obj/item/clothing/accessory/medal/engineering /obj/item/clothing/accessory/medal/engineering
name = "excellent engineering medal" name = "excellent engineering medal"
desc = "An award issued by the CE to engineering staff whose dedication keep the station running at its best." 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 /obj/item/clothing/accessory/medal/service
name = "superior service medal" name = "superior service medal"
desc = "An award issued by the HoP to service staff who go above and beyond." desc = "An award issued by the HoP to service staff who go above and beyond."
channel = "Service"
/obj/item/clothing/accessory/medal/medical /obj/item/clothing/accessory/medal/medical
name = "magnificient medical medal" name = "magnificient medical medal"
desc = "An award issued by the CMO to medical staff who excel at saving lives." desc = "An award issued by the CMO to medical staff who excel at saving lives."
channel = "Medical"
/obj/item/clothing/accessory/medal/legal /obj/item/clothing/accessory/medal/legal
name = "meritous legal medal" name = "meritous legal medal"
desc = "An award issued by the Magistrate to legal staff who uphold the rule of law." desc = "An award issued by the Magistrate to legal staff who uphold the rule of law."
channel = "Procedure"
/obj/item/clothing/accessory/medal/supply /obj/item/clothing/accessory/medal/supply
name = "stable supply medal" name = "stable supply medal"
desc = "An award issued by the Quartermaster to supply staff dedicated to being effective." 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 /obj/item/clothing/accessory/medal/recruiter // Prize for the NT Recruiter emagged arcade
name = "nanotrasen recruiter medal" 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." desc = "A rarely-awarded medal for those who sacrifice themselves in the line of duty to save their fellow crew."
icon_state = "bronze_heart" icon_state = "bronze_heart"
item_color = "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. // 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 /obj/item/clothing/accessory/medal/gold/bubblegum
name = "bubblegum HRD-MDE award" 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." 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. /obj/item/clothing/accessory/medal/gold/heroism/hardmode_full //Kill every hardmode boss. In a shift. Good luck.
name = "medal of incredible dedication" 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 <i>'mori quam foedari'...</i>" 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 <i>'mori quam foedari'...</i>"
channel = null
/obj/item/clothing/accessory/medal/silver/colossus /obj/item/clothing/accessory/medal/silver/colossus
name = "colossus HRD-MDE award" name = "colossus HRD-MDE award"
desc = "An award which represents major contributions to the HRD-MDE project in the form of analysing a colossus." 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 /obj/item/clothing/accessory/medal/silver/legion
name = "legion HRD-MDE award" name = "legion HRD-MDE award"
desc = "An award which represents major contributions to the HRD-MDE project in the form of analysing the Legion." 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 /obj/item/clothing/accessory/medal/blood_drunk
name = "blood drunk HRD-MDE award" name = "blood drunk HRD-MDE award"