diff --git a/code/datums/medal_awards.dm b/code/datums/medal_awards.dm index 78fec7569582..5dfb764883d6 100644 --- a/code/datums/medal_awards.dm +++ b/code/datums/medal_awards.dm @@ -37,7 +37,7 @@ GLOBAL_LIST_EMPTY(jelly_awards) GLOBAL_LIST_INIT(human_medals, list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_MEDAL, MARINE_VALOR_MEDAL, MARINE_HEROISM_MEDAL)) -/proc/give_medal_award(medal_location, as_admin = FALSE) +/proc/give_medal_award(medal_location, as_admin = FALSE, as_xo = FALSE) if(as_admin && !check_rights(R_ADMIN)) as_admin = FALSE @@ -52,8 +52,13 @@ GLOBAL_LIST_INIT(human_medals, list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_ME if(!chosen_recipient) return FALSE + var/list/medals_list = GLOB.human_medals + if(as_xo) + medals_list = list(MARINE_CONDUCT_MEDAL) + // Pick a medal - var/medal_type = tgui_input_list(usr, "What type of medal do you want to award?", "Medal Type", GLOB.human_medals) + var/medal_type = tgui_input_list(usr, "What type of medal do you want to award?", "Medal Type", medals_list) + if(!medal_type) return FALSE @@ -166,7 +171,7 @@ GLOBAL_LIST_INIT(human_medals, list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_ME to_chat(user, SPAN_WARNING("You must have an authenticated ID Card to award medals.")) return - if(!((card.paygrade in GLOB.co_paygrades) || (card.paygrade in GLOB.highcom_paygrades))) + if(!((card.paygrade in GLOB.co_paygrades) || (card.paygrade in GLOB.highcom_paygrades) || (card.paygrade == PAY_SHORT_MO3))) to_chat(user, SPAN_WARNING("Only a Senior Officer can award medals!")) return @@ -180,7 +185,7 @@ GLOBAL_LIST_INIT(human_medals, list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_ME user.visible_message("ERROR: ID card not registered for [user.real_name] in USCM registry. Potential medal fraud detected.") return - if(give_medal_award(get_turf(printer))) + if(give_medal_award(get_turf(printer), as_xo = card.paygrade == PAY_SHORT_MO3)) user.visible_message(SPAN_NOTICE("[printer] prints a medal.")) GLOBAL_LIST_INIT(xeno_medals, list(XENO_SLAUGHTER_MEDAL, XENO_RESILIENCE_MEDAL, XENO_SABOTAGE_MEDAL, XENO_PROLIFERATION_MEDAL, XENO_REJUVENATION_MEDAL))