mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Makes some more lists lazy (#94388)
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
co-authored by
SyncIt21
MrMelbert
parent
b88e1a1328
commit
53ed83bb9d
@@ -67,7 +67,7 @@
|
||||
/// bitflag used to check which clothes cover this bodypart
|
||||
var/body_part
|
||||
/// List of obj/item's embedded inside us. Managed by embedded components, do not modify directly
|
||||
var/list/embedded_objects = list()
|
||||
var/list/embedded_objects
|
||||
/// are we a hand? if so, which one!
|
||||
var/held_index = 0
|
||||
/// A speed modifier we apply to the owner when attached, if any. Positive numbers make it move slower, negative numbers make it move faster.
|
||||
@@ -1395,14 +1395,14 @@
|
||||
if(embed in embedded_objects) // go away
|
||||
return
|
||||
// We don't need to do anything with projectile embedding, because it will never reach this point
|
||||
embedded_objects += embed
|
||||
LAZYADD(embedded_objects, embed)
|
||||
RegisterSignal(embed, COMSIG_ITEM_EMBEDDING_UPDATE, PROC_REF(embedded_object_changed))
|
||||
refresh_bleed_rate()
|
||||
|
||||
/// INTERNAL PROC, DO NOT USE
|
||||
/// Cleans up any attachment we have to the embedded object, removes it from our list
|
||||
/obj/item/bodypart/proc/_unembed_object(obj/item/unembed)
|
||||
embedded_objects -= unembed
|
||||
LAZYREMOVE(embedded_objects, unembed)
|
||||
UnregisterSignal(unembed, COMSIG_ITEM_EMBEDDING_UPDATE)
|
||||
refresh_bleed_rate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user