mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Saves a bit of memory per decal (#48985)
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#define CLEAN_IMPRESSIVE 5
|
||||
/// Cleans things spotless down to the atomic structure
|
||||
#define CLEAN_GOD 6
|
||||
/// Never cleaned
|
||||
#define CLEAN_NEVER 7
|
||||
|
||||
//How strong things have to be to wipe forensic evidence...
|
||||
#define CLEAN_STRENGTH_FINGERPRINTS CLEAN_IMPRESSIVE
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
var/first_dir // This only stores the dir arg from init
|
||||
|
||||
/datum/component/decal/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description, _alpha=255)
|
||||
/datum/component/decal/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_NEVER, _color, _layer=TURF_LAYER, _description, _alpha=255)
|
||||
if(!isatom(parent) || !generate_appearance(_icon, _icon_state, _dir, _layer, _color, _alpha))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
first_dir = _dir
|
||||
@@ -19,7 +19,7 @@
|
||||
/datum/component/decal/RegisterWithParent()
|
||||
if(first_dir)
|
||||
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react)
|
||||
if(cleanable)
|
||||
if(cleanable != CLEAN_NEVER)
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
|
||||
if(description)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
|
||||
@@ -45,4 +45,4 @@
|
||||
var/turf/T = loc
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
T.AddComponent(/datum/component/decal, icon, icon_state, dir, CLEAN_GOD, color, null, null, alpha)
|
||||
T.AddComponent(/datum/component/decal, icon, icon_state, dir, CLEAN_NEVER, color, null, null, alpha)
|
||||
|
||||
Reference in New Issue
Block a user