Gives all status effects an ID (#26880)

* Gives all status effects an ID

* Actually delete

* Update code/datums/status_effects/buffs.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/datums/status_effects/buffs.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* We ball

* Fix CI and remove stack trace

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-09-27 17:01:45 +00:00
committed by GitHub
co-authored by 1080pCat
parent 3eb0c0dcd5
commit 2a58ce0f91
8 changed files with 30 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
/datum/status_effect/blob_burst
id = "blob_burst"
alert_type = /atom/movable/screen/alert/status_effect/blob_burst
var/datum/callback/blob_burst_callback
+7
View File
@@ -275,6 +275,7 @@
owner.adjustFireLoss(-5)
/datum/status_effect/blood_rush
id = "blood_rush"
alert_type = null
duration = 10 SECONDS
@@ -488,6 +489,7 @@
REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, id)
/datum/status_effect/fleshmend
id = "fleshmend"
duration = -1
status_type = STATUS_EFFECT_REFRESH
tick_interval = 1 SECONDS
@@ -536,6 +538,7 @@
qdel(src)
/datum/status_effect/speedlegs
id = "speedlegs"
duration = -1
status_type = STATUS_EFFECT_UNIQUE
tick_interval = 4 SECONDS
@@ -577,6 +580,7 @@
cling = null
/datum/status_effect/panacea
id = "panacea"
duration = 20 SECONDS
tick_interval = 2 SECONDS
status_type = STATUS_EFFECT_REFRESH
@@ -702,6 +706,7 @@
to_chat(owner, "<span class='cultitalic'>[pick(un_hopeful_messages)]</span>")
/datum/status_effect/drill_payback
id = "drill_payback"
duration = -1
status_type = STATUS_EFFECT_UNIQUE
alert_type = null
@@ -797,6 +802,7 @@
vamp = null
/datum/status_effect/rev_protection
id = "rev_protection"
// revs are paralyzed for 10 seconds when they're deconverted, same duration
duration = 10 SECONDS
alert_type = null
@@ -823,6 +829,7 @@
. = ..()
/datum/status_effect/bookwyrm
id = "bookwyrm"
duration = BRAIN_DAMAGE_MOB_TIME
alert_type = null
+1
View File
@@ -523,6 +523,7 @@
id = "cult_slurring"
/datum/status_effect/incapacitating
id = "incapacitating"
tick_interval = 0
status_type = STATUS_EFFECT_REPLACE
alert_type = null
+2
View File
@@ -249,6 +249,7 @@
/// A status effect that can have a certain amount of "bonus" duration added, which extends the duration every tick,
/// although there is a maximum amount of bonus time that can be active at any given time.
/datum/status_effect/limited_bonus
id = "limited_bonus"
/// How much extra time has been added
var/bonus_time = 0
/// How much extra time to apply per tick
@@ -366,6 +367,7 @@
expire_proc.Invoke()
/datum/status_effect/action_status_effect
id = "action_status_effect"
alert_type = null
tick_interval = -1
+9 -1
View File
@@ -3,7 +3,8 @@
//When making a new status effect, add a define to status_effects.dm in __DEFINES for ease of use!
/datum/status_effect
var/id = "effect" //Used for screen alerts.
/// A unique ID that is used to see if there is already a status effect of the same type on something. Also used for screen alerts
var/id
var/duration = -1 //How long the status effect lasts in DECISECONDS. Enter -1 for an effect that never ends unless removed through some means.
var/tick_interval = 10 //How many deciseconds between ticks, approximately. Leave at 10 for every second. Setting this to -1 will stop processing if duration is also unlimited.
var/mob/living/owner //The mob affected by the status effect.
@@ -14,6 +15,11 @@
var/atom/movable/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
/datum/status_effect/New(list/arguments)
if(!id)
stack_trace("[src] was created but did not have an unique ID. Deleting.")
qdel(src)
return
on_creation(arglist(arguments))
/datum/status_effect/proc/on_creation(mob/living/new_owner, ...)
@@ -256,6 +262,7 @@
/// Status effect from multiple sources, when all sources are removed, so is the effect
/datum/status_effect/grouped
id = "grouped"
status_type = STATUS_EFFECT_MULTIPLE //! Adds itself to sources and destroys itself if one exists already, there are never multiple
var/list/sources = list()
@@ -280,6 +287,7 @@
* This allows for a more precise tweaking of status durations at runtime (e.g. paralysis).
*/
/datum/status_effect/transient
id = "transient"
tick_interval = 0.2 SECONDS // SSfastprocess interval
alert_type = null
/// How much strength left before expiring? time in deciseconds.