-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Refactors fire overlays once again to make it not get stuck …
…so often (#1931) * Refactors fire overlays once again to make it not get stuck so often * Fix conflict I went back about 20-30 prs on tg to figure out where we missed something but I am not fully sure when this was last changed apart from 21 months ago which matches up with TG * Unchanged files, fixed * Hi yes, I like my robotic XENOS --------- Co-authored-by: NovaBot <[email protected]> Co-authored-by: MrMelbert <[email protected]> Co-authored-by: SomeRandomOwl <[email protected]>
- Loading branch information
1 parent
d46eeb0
commit cf3ab7a
Showing
17 changed files
with
115 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// When applied to a mob, they will always have a fire overlay regardless of if they are *actually* on fire. | ||
/datum/element/perma_fire_overlay | ||
|
||
/datum/element/perma_fire_overlay/Attach(atom/target) | ||
. = ..() | ||
if(!isliving(target)) | ||
return ELEMENT_INCOMPATIBLE | ||
|
||
RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(add_fire_overlay)) | ||
target.update_appearance(UPDATE_OVERLAYS) | ||
ADD_TRAIT(target, TRAIT_NO_EXTINGUISH, ELEMENT_TRAIT(type)) | ||
|
||
/datum/element/perma_fire_overlay/Detach(atom/target) | ||
. = ..() | ||
UnregisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS) | ||
REMOVE_TRAIT(target, TRAIT_NO_EXTINGUISH, ELEMENT_TRAIT(type)) | ||
target.update_appearance(UPDATE_OVERLAYS) | ||
|
||
/datum/element/perma_fire_overlay/proc/add_fire_overlay(mob/living/source, list/overlays) | ||
SIGNAL_HANDLER | ||
|
||
var/mutable_appearance/created_overlay = source.get_fire_overlay(stacks = MAX_FIRE_STACKS, on_fire = TRUE) | ||
if(isnull(created_overlay)) | ||
return | ||
|
||
overlays |= created_overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.