mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 06:22:26 +01:00
Minor Performance Tweaks (#3265)
changes: /datum/wires no longer has an (init) proc. SMES wires now use timers instead of spawn. Cleanables' random_icon_states list is now lazy. (eliminates ~4000 lists from dirt) /obj/effect can no longer be pushed around by conveyor belts. Lighting overlays are now explicitly prevented from being moved by conveyor belts.
This commit is contained in:
@@ -142,11 +142,11 @@
|
||||
icon_state = "1"
|
||||
random_icon_states = list("1","2","3","4","5")
|
||||
amount = 0
|
||||
var/list/drips = list()
|
||||
var/list/drips
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/Initialize()
|
||||
. = ..()
|
||||
drips |= icon_state
|
||||
drips = list(icon_state)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing
|
||||
icon_state = "tracks"
|
||||
@@ -158,9 +158,9 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/Initialize()
|
||||
. = ..()
|
||||
if(random_icon_states.len)
|
||||
if(LAZYLEN(random_icon_states))
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
random_icon_states -= W.icon_state
|
||||
icon_state = pick(random_icon_states)
|
||||
else
|
||||
icon_state = "writing1"
|
||||
@@ -193,8 +193,8 @@
|
||||
blood.Blend(basecolor,ICON_MULTIPLY)
|
||||
|
||||
icon = blood
|
||||
overlays.Cut()
|
||||
overlays += giblets
|
||||
cut_overlays()
|
||||
add_overlay(giblets)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
@@ -238,7 +238,7 @@
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "mucus"
|
||||
random_icon_states = list("mucus")
|
||||
random_icon_states = null
|
||||
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/dry = 0 // Keeps the lag down
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/effect/decal/cleanable
|
||||
var/list/random_icon_states = list()
|
||||
var/list/random_icon_states
|
||||
|
||||
/obj/effect/decal/cleanable/clean_blood(var/ignore = 0)
|
||||
if(!ignore)
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/New()
|
||||
if (random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
..()
|
||||
/obj/effect/decal/cleanable/Initialize()
|
||||
if (LAZYLEN(random_icon_states))
|
||||
icon_state = pick(src.random_icon_states)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user