Skip to content

Commit

Permalink
Update headset.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGamerdk committed May 28, 2024
1 parent d0825e3 commit 3bce304
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,13 @@
var/obj/item/card/id/id_card = wearer.wear_id?.GetID()
if(!istype(id_card))
return
var/paygrade = get_paygrade_id_by_name(wearer.get_paygrade(FALSE))
var/last_number = text2num(copytext(paygrade, length(paygrade), length(paygrade)+1))
if(!(findtext(paygrade, "O") || last_number >= 4))

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(ranking < 3) //E1 starts at 0, so anyone above Corporal (ranking = 3) can recommend for medals

Check failure on line 426 in code/game/objects/items/devices/radio/headset.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "ranking"
to_chat(wearer, SPAN_WARNING("Only officers or NCO's (ME4+) can recommend medals!"))
return
if(add_medal_recommendation(usr))
Expand Down

0 comments on commit 3bce304

Please sign in to comment.