Skip to content

Commit

Permalink
Makes it possible for all Officers and all NCO's (E4+) to recommend p…
Browse files Browse the repository at this point in the history
…eople for medals. (#6343)

# About the pull request

I've been meaning to do this.

Corporal and above + all officers can recommend medals.


# Explain why it's good for the game
# Testing Photographs and Procedure
I tested it.

Tried to give a medal recommendation as a PFC: Failed
Tried to give a medal recommendation as a FTL: Success
Tried to give a medal recommendation as an SO: Success
Tried to give a medal recommendation as XO: Success

<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: All officers and NCO's can now recommend people for medals.
/:cl:
  • Loading branch information
TheGamerdk authored Jun 4, 2024
1 parent 93e1989 commit 403760a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions code/datums/medal_awards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@ GLOBAL_LIST_INIT(xeno_medals, list(XENO_SLAUGHTER_MEDAL, XENO_RESILIENCE_MEDAL,
continue
recipient_ranks[recipient_name] = record.fields["rank"]
possible_recipients += recipient_name
if(length(possible_recipients) == 0)
to_chat(recommendation_giver, SPAN_WARNING("It's not possible to give medals when the ship is empty. Tough luck, partner..."))
return FALSE

var/chosen_recipient = tgui_input_list(recommendation_giver, "Who do you want to recommend a medal for?", "Medal Recommendation", possible_recipients)
if(!chosen_recipient)
return FALSE
Expand Down
10 changes: 8 additions & 2 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,14 @@
var/obj/item/card/id/id_card = wearer.wear_id?.GetID()
if(!istype(id_card))
return
if(!(id_card.rank in list(JOB_SO, JOB_XO, JOB_SQUAD_LEADER)))
to_chat(wearer, SPAN_WARNING("Only Staff Officers, Executive Officers and Squad Leaders are permitted to give medal recommendations!"))

var/datum/paygrade/paygrade_actual = GLOB.paygrades[id_card.paygrade]
if(!paygrade_actual)
return
if(!istype(paygrade_actual, /datum/paygrade/marine)) //We only want marines to be able to recommend for medals
return
if(paygrade_actual.ranking < 3) //E1 starts at 0, so anyone above Corporal (ranking = 3) can recommend for medals
to_chat(wearer, SPAN_WARNING("Only officers or NCO's (ME4+) can recommend medals!"))
return
if(add_medal_recommendation(usr))
to_chat(usr, SPAN_NOTICE("Recommendation successfully submitted."))
Expand Down

0 comments on commit 403760a

Please sign in to comment.