mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Merge pull request #26591 from Cruix/alternate_appearance_fix
Fixed nulls in the active_alternate_appearances list
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ GLOBAL_LIST_INIT(huds, list(
|
||||
gang_huds += G.ganghud
|
||||
|
||||
for(var/datum/atom_hud/hud in (GLOB.huds|gang_huds|GLOB.active_alternate_appearances))
|
||||
if(hud.hudusers[src])
|
||||
if(hud && hud.hudusers[src])
|
||||
hud.add_hud_to(src)
|
||||
|
||||
/mob/dead/new_player/reload_huds()
|
||||
|
||||
@@ -29,12 +29,11 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances)
|
||||
appearance_key = key
|
||||
|
||||
/datum/atom_hud/alternate_appearance/Destroy()
|
||||
if(!QDELETED(src))
|
||||
for(var/v in hudusers)
|
||||
remove_hud_from(v)
|
||||
for(var/v in hudatoms)
|
||||
remove_from_hud(v)
|
||||
GLOB.active_alternate_appearances -= src
|
||||
for(var/v in hudusers)
|
||||
remove_hud_from(v)
|
||||
for(var/v in hudatoms)
|
||||
remove_from_hud(v)
|
||||
GLOB.active_alternate_appearances -= src
|
||||
return ..()
|
||||
|
||||
/datum/atom_hud/alternate_appearance/proc/onNewMob(mob/M)
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
prepare_huds()
|
||||
can_ride_typecache = typecacheof(can_ride_typecache)
|
||||
for(var/v in GLOB.active_alternate_appearances)
|
||||
if(!v)
|
||||
continue
|
||||
var/datum/atom_hud/alternate_appearance/AA = v
|
||||
AA.onNewMob(src)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user