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(zombie): zombie sprite apply fix #11238

Merged
merged 2 commits into from
Dec 21, 2023
Merged
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
9 changes: 7 additions & 2 deletions code/modules/mob/organs/external/_external_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ var/list/limb_icon_cache = list()
. += "[species.get_race_key(owner)]"
. += "[bb]"
. += is_stump() ? "_s" : ""
if(owner.mind.special_role == "Zombie")
. += "_z"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. += "_z"
. += "_z"

А если зомби с роботической конечностью будет, то что случится?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failsafe сработает и все будет норм, всего лишь будет две генерации одно и той же иконке

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это просто функция для понимания отрисовщика, когда надо обновлять спрайт


if(force_icon)
. += "[force_icon]"
Expand Down Expand Up @@ -129,6 +131,7 @@ var/list/limb_icon_cache = list()
var/hulk_color_mod = rgb(48,224,40)
var/husk = owner && (MUTATION_HUSK in owner.mutations)
var/hulk = owner && (MUTATION_HULK in owner.mutations)
var/zombie = owner?.mind?.special_role == "Zombie"

/////
var/gender = "_m"
Expand All @@ -148,7 +151,7 @@ var/list/limb_icon_cache = list()
var/chosen_icon = ""
var/chosen_icon_state = ""

chosen_icon_state = "[icon_name][gender][body_build]"
chosen_icon_state = "[icon_name][gender][body_build][zombie ? "_z" : ""]"

/////
if(force_icon)
Expand All @@ -166,7 +169,9 @@ var/list/limb_icon_cache = list()
var/icon/temp_icon = icon(chosen_icon)
var/list/icon_states = temp_icon.IconStates()
if(!icon_states.Find(chosen_icon_state))
if(icon_states.Find("[icon_name][gender]"))
if(icon_states.Find("[icon_name][gender][body_build]"))
chosen_icon_state = "[icon_name][gender][body_build]"
else if(icon_states.Find("[icon_name][gender]"))
chosen_icon_state = "[icon_name][gender]"
else if(icon_states.Find("[icon_name]"))
chosen_icon_state = "[icon_name]"
Expand Down
Loading