Skip to content

Commit

Permalink
Loader hud icon + spotter and loader minimap icons (#7957)
Browse files Browse the repository at this point in the history
# About the pull request

Adds a unique hud icon to loader


![dreamseeker_5wJvgiDGBP](https://github.com/user-attachments/assets/5213e251-83cd-4364-b828-0bb1b19568eb)

Adds an actual unique minimap icon to both spotter and loader


![8wF6VMx3Rd](https://github.com/user-attachments/assets/7f9bcbef-2211-4fd8-bef0-62143ea1a306)


![kc1qTwO8xc](https://github.com/user-attachments/assets/399e3755-85ce-4a35-9606-3d78ea374f32)

Also fixes upp political comissar having incorrect minimap icon

Also fixes broken code in k9 handler minimap icon handling

# Explain why it's good for the game

Better identification - good

# Changelog
:cl:
add: hud icon for loader
add: minimap/orbit icons for loader and spotter
fix: upp political commisar having incorrect minimap/orbit icon
fix: k9 handler pamphlet making all corpsmen have minimap/orbit icon of
k9 handler instead of corpsman one
/:cl:
  • Loading branch information
Blundir authored Jan 1, 2025
1 parent 25d7e56 commit eabcd63
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions code/game/objects/items/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
var/faction = FACTION_NEUTRAL
var/id_type = "ID Card"
var/list/faction_group
/// For custom minimap icons
var/minimap_icon_override = null

/// The name registered_name on the card
var/registered_name = "Unknown"
Expand Down
10 changes: 7 additions & 3 deletions code/game/objects/items/pamphlets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@

var/obj/item/card/id/ID = user.get_idcard()
ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "Spotter")
ID.minimap_icon_override = "spotter"
user.update_minimap_icon()
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Spotter")

/obj/item/pamphlet/skill/loader
Expand Down Expand Up @@ -131,11 +133,13 @@

/obj/item/pamphlet/skill/loader/on_use(mob/living/carbon/human/user)
. = ..()
user.rank_fallback = "ass"
user.rank_fallback = "load"
user.hud_set_squad()

var/obj/item/card/id/ID = user.get_idcard()
ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "Loader")
ID.minimap_icon_override = "loader"
user.update_minimap_icon()
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Loader")

/obj/item/pamphlet/skill/k9_handler
Expand Down Expand Up @@ -168,11 +172,11 @@
. = ..()
user.rank_fallback = "medk9"
user.hud_set_squad()
user.assigned_equipment_preset.minimap_icon = "medic_k9"
user.update_minimap_icon()

var/obj/item/card/id/ID = user.get_idcard()
ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "K9 Handler")
ID.minimap_icon_override = "medic_k9"
user.update_minimap_icon()
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "K9 Handler")

/obj/item/pamphlet/skill/machinegunner
Expand Down
1 change: 1 addition & 0 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
var/list/icon_data = list(
list("Mar", null),
list("ass", "hudsquad_ass"),
list("load", "hudsquad_load"),
list("Eng", "hudsquad_engi"),
list("Med", "hudsquad_med"),
list("medk9", "hudsquad_medk9"),
Expand Down
9 changes: 7 additions & 2 deletions code/modules/gear_presets/_select_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,13 @@
icon.color = minimap_icon[icons]
background.overlays += icon
else
var/iconstate = minimap_icon ? minimap_icon : "unknown"
var/mutable_appearance/icon = image('icons/ui_icons/map_blips.dmi', icon_state = iconstate)
var/obj/item/card/id/ID = user.get_idcard()
var/icon_to_use
if(ID.minimap_icon_override)
icon_to_use = ID.minimap_icon_override
else
icon_to_use = minimap_icon ? minimap_icon : "unknown"
var/mutable_appearance/icon = image('icons/ui_icons/map_blips.dmi', icon_state = icon_to_use)
icon.appearance_flags = RESET_COLOR
background.overlays += icon

Expand Down
1 change: 1 addition & 0 deletions code/modules/gear_presets/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3749,6 +3749,7 @@
rank = JOB_UPP_COMMISSAR
paygrades = list(PAY_SHORT_UO4P = JOB_PLAYTIME_TIER_0)
role_comm_title = "Commissar"
minimap_icon = "upp_plt"
minimum_age = 30
skills = /datum/skills/upp/commissar

Expand Down
Binary file modified icons/mob/hud/marine_hud.dmi
Binary file not shown.
Binary file modified icons/ui_icons/map_blips.dmi
Binary file not shown.

0 comments on commit eabcd63

Please sign in to comment.