Skip to content

Commit

Permalink
fix linter warnings because of icon index operations (#1109)
Browse files Browse the repository at this point in the history
## Что этот PR делает

Меняет тип переменной `worn_icon_species` с `icon` на `list`, потому что
это список.

## Тестирование

Компилируется

## Summary by Sourcery

Bug Fixes:
- Fix linter warnings by changing the type of 'worn_icon_species' from
'icon' to 'list' to accurately reflect its usage as a list.
  • Loading branch information
Gaxeer authored Feb 1, 2025
1 parent 41ab7f9 commit d9c0ce9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit d9c0ce9

Please sign in to comment.