mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
Experimental tweaks to how parallax's movement hooks work; the current ones appear to be fairly expensive for all movable movement, doing locate(/mob) in src on every forceMove(). This PR creates a new lazylist (contained_mobs) containing a list of every mob directly contained by an object. contained_mobs is updated on mob/forceMove(). Not sure how to handle mobs located deeper than directly inside an object. Only alternative to this I see is to make SSparallax tick.
21 lines
464 B
Plaintext
21 lines
464 B
Plaintext
#define GRID_WIDTH 3
|
|
|
|
var/datum/controller/subsystem/parallax/SSparallax
|
|
|
|
/datum/controller/subsystem/parallax
|
|
name = "Space Parallax"
|
|
init_order = SS_INIT_PARALLAX
|
|
flags = SS_NO_FIRE
|
|
|
|
var/list/parallax_icon[(GRID_WIDTH**2)*3]
|
|
var/parallax_initialized = 0
|
|
|
|
/datum/controller/subsystem/parallax/New()
|
|
NEW_SS_GLOBAL(SSparallax)
|
|
|
|
/datum/controller/subsystem/parallax/Initialize(timeofday)
|
|
create_global_parallax_icons()
|
|
..(timeofday, TRUE)
|
|
|
|
#undef GRID_WIDTH
|