mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fix character setup preview icons rendering prior to SSAtoms initialization
- Rendering the characters involved creating mannequin mobs, prior to SSAtoms init these would not be initialized and thus have no DNA. This prints many warning messages, causes runtimes, and ultimately the icon does not render correctly. - Its fixed here since it seems that needing to use mobs prior to initialization is a pretty unique edge case. Comment added to explain to future us.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/datum/preferences/update_preview_icon() // Lines up and un-overlaps character edit previews. Also un-splits taurs.
|
||||
var/mob/living/carbon/human/dummy/mannequin/mannequin = get_mannequin(client_ckey)
|
||||
if(!mannequin.dna) // Special handling for preview icons before SSAtoms has initailized.
|
||||
mannequin.dna = new /datum/dna(null)
|
||||
mannequin.delete_inventory(TRUE)
|
||||
dress_preview_mob(mannequin)
|
||||
COMPILE_OVERLAYS(mannequin)
|
||||
|
||||
Reference in New Issue
Block a user