mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Fixes decals causing 20k runtimes and blood not cleaning (#53967)
decals will unregister signals and wont try to clean twice
This commit is contained in:
@@ -672,8 +672,6 @@
|
||||
///Returned by cleanable components when they are cleaned.
|
||||
#define COMPONENT_CLEANED (1<<0)
|
||||
|
||||
///from base of datum/component/forensics/wipe_blood_dna(): ()
|
||||
#define COMSIG_WIPE_BLOOD_DNA "wipe_blood_dna"
|
||||
|
||||
//Creamed
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
/datum/component/forensics/proc/wipe_blood_DNA()
|
||||
blood_DNA = null
|
||||
SEND_SIGNAL(src, COMSIG_WIPE_BLOOD_DNA)
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/wipe_fibers()
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/element/decal/Detach(atom/source, force)
|
||||
UnregisterSignal(source, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE))
|
||||
UnregisterSignal(source,COMSIG_ATOM_UPDATE_OVERLAYS)
|
||||
UnregisterSignal(source, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS))
|
||||
source.update_icon()
|
||||
if(isitem(source))
|
||||
INVOKE_ASYNC(source, /obj/item/.proc/update_slot_icon)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/datum/element/decal/blood
|
||||
//dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
|
||||
/datum/element/decal/blood/Attach(datum/target, _icon, _icon_state, _dir, _cleanable=CLEAN_TYPE_BLOOD, _color, _layer=ABOVE_OBJ_LAYER)
|
||||
if(!isitem(target))
|
||||
@@ -7,8 +6,11 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
RegisterSignal(target, COMSIG_ATOM_GET_EXAMINE_NAME, .proc/get_examine_name)
|
||||
RegisterSignal(target, COMSIG_WIPE_BLOOD_DNA, .proc/Detach)
|
||||
RegisterSignal(target, COMSIG_ATOM_GET_EXAMINE_NAME, .proc/get_examine_name, TRUE)
|
||||
|
||||
/datum/element/decal/blood/Detach(atom/source, force)
|
||||
UnregisterSignal(source, COMSIG_ATOM_GET_EXAMINE_NAME)
|
||||
return ..()
|
||||
|
||||
/datum/element/decal/blood/generate_appearance(_icon, _icon_state, _dir, _layer, _color, _alpha, source)
|
||||
var/obj/item/I = source
|
||||
|
||||
Reference in New Issue
Block a user