mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] [NO GBP] Fixes a runtime caused by basic ghost mobs [MDB IGNORE] (#18695)
* [NO GBP] Fixes a runtime caused by basic ghost mobs (#72622) ## About The Pull Request Fixes a runtime that was causing the CI to fail. The Bald hairstyle and Shaved facial hairstyle had no associated sprites in the hairstyle global lists. This would cause a runtime when trying to generate the hair/beard sprite. Bonus behind-the-scenes picture of the debug process:  ## Why It's Good For The Game I get scared every time Fikou pings me and this will make him stop. ## Changelog 🆑 fix: Bald/Shaved ghosts will no longer cause a runtime and spawn without a name. /🆑 * [NO GBP] Fixes a runtime caused by basic ghost mobs Co-authored-by: Rhials <Datguy33456@gmail.com>
This commit is contained in:
@@ -68,14 +68,14 @@
|
||||
ghost_facial_hairstyle = random_facial_hairstyle()
|
||||
ghost_facial_hair_color = ghost_hair_color
|
||||
|
||||
if(!isnull(ghost_hairstyle))
|
||||
if(!isnull(ghost_hairstyle) && ghost_hairstyle != "Bald") //Bald hairstyle and the Shaved facial hairstyle lack an associated sprite and will not properly generate hair, and just cause runtimes.
|
||||
var/datum/sprite_accessory/hair_style = GLOB.hairstyles_list[ghost_hairstyle] //We use the hairstyle name to get the sprite accessory, which we copy the icon_state from.
|
||||
ghost_hair = mutable_appearance('icons/mob/species/human/human_face.dmi', "[hair_style.icon_state]", -HAIR_LAYER)
|
||||
ghost_hair.alpha = 200
|
||||
ghost_hair.color = ghost_hair_color
|
||||
add_overlay(ghost_hair)
|
||||
|
||||
if(!isnull(ghost_facial_hairstyle))
|
||||
if(!isnull(ghost_facial_hairstyle) && ghost_facial_hairstyle != "Shaved")
|
||||
var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hairstyles_list[ghost_facial_hairstyle]
|
||||
ghost_facial_hair = mutable_appearance('icons/mob/species/human/human_face.dmi', "[facial_hair_style.icon_state]", -HAIR_LAYER)
|
||||
ghost_facial_hair.alpha = 200
|
||||
|
||||
Reference in New Issue
Block a user