Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes it possible for all Officers and all NCO's (E4+) to recommend people for medals. #6343

Merged
merged 5 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
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
Loading