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

fix linter warnings because of icon index operations #1109

Merged
merged 1 commit into from
Feb 1, 2025
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
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/human/human_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ There are several things that need to be remembered:
var/mutant_override = FALSE

var/obj/item/bodypart/head/bodypart_head = src.get_bodypart(BODY_ZONE_HEAD)
if(worn_item.worn_icon_species && worn_item.worn_icon_species[bodypart_head.species_bodytype])
if(worn_item.worn_icon_species?[bodypart_head.species_bodytype])
icon_file = worn_item.worn_icon_species[bodypart_head.species_bodytype]
mutant_override = TRUE
else if(bodypart_head.species_bodytype in icon_files_species)
Expand Down Expand Up @@ -468,7 +468,7 @@ There are several things that need to be remembered:
var/mutant_override = FALSE

var/obj/item/bodypart/chest/bodypart_chest = src.get_bodypart(BODY_ZONE_CHEST)
if(worn_item.worn_icon_species && worn_item.worn_icon_species[bodypart_chest.species_bodytype])
if(worn_item.worn_icon_species?[bodypart_chest.species_bodytype])
icon_file = worn_item.worn_icon_species[bodypart_chest.species_bodytype]
mutant_override = TRUE
else if(bodypart_chest.species_bodytype in icon_files_species)
Expand Down Expand Up @@ -538,7 +538,7 @@ There are several things that need to be remembered:
var/mutant_override = FALSE

var/obj/item/bodypart/head/bodypart_head = src.get_bodypart(BODY_ZONE_HEAD)
if(worn_item.worn_icon_species && worn_item.worn_icon_species[bodypart_head.species_bodytype])
if(worn_item.worn_icon_species?[bodypart_head.species_bodytype])
icon_file = worn_item.worn_icon_species[bodypart_head.species_bodytype]
mutant_override = TRUE
else if(bodypart_head.species_bodytype in icon_files_species)
Expand Down
2 changes: 1 addition & 1 deletion modular_bandastation/species/code/clothing/items.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item
var/icon/worn_icon_species
var/list/worn_icon_species

/obj/item/clothing/head/mod
worn_icon_species = list(
Expand Down
2 changes: 1 addition & 1 deletion modular_bandastation/species/code/clothing/mod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var/mob/living/carbon/user = usr
if(istype(user))
var/obj/item/bodypart/head/bodypart_head = user.get_bodypart(BODY_ZONE_HEAD)
if(bodypart_head && worn_icon_species && worn_icon_species[bodypart_head.species_bodytype])
if(bodypart_head && worn_icon_species?[bodypart_head.species_bodytype])
module_icon = mutable_appearance(worn_icon_species[bodypart_head.species_bodytype], used_overlay, layer = standing.layer + 0.1)
if(!use_mod_colors)
module_icon.appearance_flags |= RESET_COLOR
Expand Down
Loading