Skip to content

Commit

Permalink
SL minimap icons + latejoining SLs no longer take over SL status (#16378
Browse files Browse the repository at this point in the history
)

Co-authored-by: Changelogs <[email protected]>
  • Loading branch information
breadhunt and actions-user authored Aug 16, 2024
1 parent 7823b11 commit c4ccff3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
5 changes: 1 addition & 4 deletions code/datums/jobs/job/marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,9 @@ You are also in charge of communicating with command and letting them know about
return
if(!new_human.assigned_squad)
return
if(new_human.assigned_squad.squad_leader != new_human)
if(new_human.assigned_squad.squad_leader)
new_human.assigned_squad.demote_leader()
if(!ismarineleaderjob(new_human.assigned_squad?.squad_leader?.job)) //If there's no proper SL already in the squad, promote to leader
new_human.assigned_squad.promote_leader(new_human)


/datum/job/terragov/squad/vatgrown
title = SQUAD_MARINE
paygrade = "VM"
Expand Down
7 changes: 6 additions & 1 deletion code/datums/jobs/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@
H.hud_set_job(faction)
H.update_inv_head()
H.update_inv_wear_suit()

if(istype(H.wear_ear, /obj/item/radio/headset/mainship/))
var/obj/item/radio/headset/mainship/radio = H.wear_ear
radio.update_minimap_icon()

/datum/squad/proc/promote_leader(mob/living/carbon/human/H)
if(squad_leader)
Expand All @@ -330,6 +332,9 @@
squad_leader.hud_set_job(faction)
squad_leader.update_inv_head()
squad_leader.update_inv_wear_suit()
if(istype(squad_leader.wear_ear, /obj/item/radio/headset/mainship/))
var/obj/item/radio/headset/mainship/radio = squad_leader.wear_ear
radio.update_minimap_icon()
to_chat(squad_leader, "<font size='3' color='blue'>You're now the Squad Leader for [src]!</font>")


Expand Down
4 changes: 2 additions & 2 deletions code/game/data_huds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,13 @@
if(assigned_squad)
var/squad_color = assigned_squad.color
var/rank = job.comm_title
if(assigned_squad.squad_leader == src)
rank = JOB_COMM_TITLE_SQUAD_LEADER
if(job.job_flags & JOB_FLAG_PROVIDES_SQUAD_HUD)
var/image/IMG = image('icons/mob/hud/job.dmi', src, "")
IMG.color = squad_color
holder.overlays += IMG
holder.overlays += image('icons/mob/hud/job.dmi', src, "[rank]")
if(assigned_squad?.squad_leader == src)
holder.overlays += image('icons/mob/hud/job.dmi', src, "leader_trim")
var/fireteam = wear_id?.assigned_fireteam
if(fireteam)
var/image/IMG2 = image('icons/mob/hud/job.dmi', src, "fireteam_[fireteam]")
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ GLOBAL_LIST_INIT(channel_tokens, list(
var/image/overlay = image('icons/UI_icons/map_blips.dmi', null, wearer.job.minimap_icon)
overlay.color = wearer.assigned_squad.color
underlay.overlays += overlay

if(wearer.assigned_squad?.squad_leader == wearer)
var/image/leader_trim = image('icons/UI_icons/map_blips.dmi', null, "leader_trim")
underlay.overlays += leader_trim

SSminimaps.add_marker(wearer, marker_flags, underlay)
return
SSminimaps.add_marker(wearer, marker_flags, image('icons/UI_icons/map_blips.dmi', null, wearer.job.minimap_icon))
Expand Down
Binary file modified icons/UI_Icons/map_blips.dmi
Binary file not shown.
Binary file modified icons/mob/hud/job.dmi
Binary file not shown.

0 comments on commit c4ccff3

Please sign in to comment.