mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
Fix hot spring runtime related to duplicate elements (#90555)
If something is mapped to spawn in on a hot spring tile, the tile will add the immerse element in `/turf/open/water/Entered` before `Initialize` runs, and when it does there's no check if the element has already been added, unlike other spots where the immerse element is added. This fixes that by adding a check on the call in `Initialize`.
This commit is contained in:
@@ -118,8 +118,9 @@
|
|||||||
// we don't want to end up with 4 different immerse elements, which would cause
|
// we don't want to end up with 4 different immerse elements, which would cause
|
||||||
// the immerse trait to be repeatedly removed and readded as someone moves within the pool,
|
// the immerse trait to be repeatedly removed and readded as someone moves within the pool,
|
||||||
// replacing the status effect over and over, which can be seen through the status effect alert icon.
|
// replacing the status effect over and over, which can be seen through the status effect alert icon.
|
||||||
AddElement(/datum/element/immerse, icon, icon_state, "immerse", immerse_overlay_color, alpha = immerse_overlay_alpha)
|
if(!immerse_added)
|
||||||
immerse_added = TRUE
|
AddElement(/datum/element/immerse, icon, icon_state, "immerse", immerse_overlay_color, alpha = immerse_overlay_alpha)
|
||||||
|
immerse_added = TRUE
|
||||||
icon_state = "pool_[rand(1, 4)]"
|
icon_state = "pool_[rand(1, 4)]"
|
||||||
particle_effect = new(src, /particles/hotspring_steam, 4)
|
particle_effect = new(src, /particles/hotspring_steam, 4)
|
||||||
//render the steam over mobs and objects on the game plane
|
//render the steam over mobs and objects on the game plane
|
||||||
|
|||||||
Reference in New Issue
Block a user