mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Optimize memory usage by eliminating/changing some lists
Ported from TG: Object armors are no longer defined in (unique) lists but rather datums that can be cached depending on their armor values. Add LAZYSET define to lazily initialize a list then assigning a key to a value Add alldirs2 global which is the same as alldirs except diagonals go first Optimize mob memory by making alerts list lazy Optimize obj/machinery memory by making use_log and settagwhitelist lists lazy Optimize atom memory by not creating hud_list list for all atoms Optimize turf memory by not creating footstep_sounds list for all turfs Clean up code where possible
This commit is contained in:
@@ -226,7 +226,7 @@ Des: Removes all infected images from the alien.
|
||||
|
||||
/mob/living/carbon/alien/handle_footstep(turf/T)
|
||||
if(..())
|
||||
if(T.footstep_sounds["xeno"])
|
||||
if(T.footstep_sounds && T.footstep_sounds["xeno"])
|
||||
var/S = pick(T.footstep_sounds["xeno"])
|
||||
if(S)
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
/mob/living/carbon/human/handle_footstep(turf/T)
|
||||
if(..())
|
||||
if(T.footstep_sounds["human"])
|
||||
if(T.footstep_sounds && T.footstep_sounds["human"])
|
||||
var/S = pick(T.footstep_sounds["human"])
|
||||
if(S)
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
|
||||
Reference in New Issue
Block a user