Files
DrathekandGitHub 7c8bb85de3 Whitespace Standardization [MDB IGNORE] (#15748)
* Update settings

* Whitespace changes

* Comment out merger hooks in gitattributes

Corrupt maps would have to be resolved in repo before hooks could be updated

* Revert "Whitespace changes"

This reverts commit afbdd1d8442973f5d570c30920d9d865b5acd479.

* Whitespace again minus example

* Gitignore example changelog

* Restore changelog merge setting

* Keep older dmi hook attribute until hooks can be updated

* update vscode settings too

* Renormalize remaining

* Revert "Gitignore example changelog"

This reverts commit de22ad375d3ee4d5930c550da2fd23a29a86e616.

* Attempt to normalize example.yml (and another file I guess)

* Try again
2024-02-20 11:28:51 +01:00

39 lines
1.3 KiB
Plaintext

/*
USAGE NOTE
For decals, the var Persistent = 'has already been saved', and is primarily used to prevent duplicate savings of generic filth (filth.dm).
This also means 'TRUE' can be used to define a decal as "Do not save at all, even as a generic replacement." if a dirt decal is considered 'too common' to save.
generic_filth = TRUE means when the decal is saved, it will be switched out for a generic green 'filth' decal.
*/
/obj/effect/decal/cleanable
plane = DIRTY_PLANE
layer = DIRTY_LAYER
var/persistent = FALSE
var/generic_filth = FALSE
var/age = 0
var/list/random_icon_states = list()
/obj/effect/decal/cleanable/Initialize(var/mapload, var/_age)
if(!isnull(_age))
age = _age
if(random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
if(!mapload || !config.persistence_ignore_mapload)
SSpersistence.track_value(src, /datum/persistent/filth)
. = ..()
/obj/effect/decal/cleanable/Destroy()
SSpersistence.forget_value(src, /datum/persistent/filth)
. = ..()
/obj/effect/decal/cleanable/clean_blood(var/ignore = 0)
if(!ignore)
qdel(src)
return
..()
/obj/effect/decal/cleanable/New()
if (random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
..()