/tg/ Station 13 - Modules - Types — Define Details

modular_aphelion/modules/bouncy_objects/code/bouncy_element.dm

BOUNCE_REBOUND_DELAYDelay between an impact and the rebound it causes.
BOUNCE_MINIMUM_DISTANCEBounces shorter than this many tiles are dropped rather than animated as an imperceptible twitch.
BOUNCE_SLIDE_PIXEL_LIMITFurthest, in pixels, a sub-tile slide may move an object from its base offset, so it stays over its own tile.
BOUNCE_MAX_HOP_HEIGHTTallest hop arc, in pixels.
BOUNCE_MAX_PER_TICKMost bounces (rebounds, ejection hops and tosses) that may start in one tick, shared by every bouncy object.
BOUNCE_MAX_DISTANCEFurthest, in tiles, one bounce travels while it has gravity. Mostly trims mass drivers and explosions, which throw far further than hands do.
/datum/element/bouncyMakes a thrown movable rebound after it hits something, losing distance on every rebound.
/datum/thrownthing/bounceA rebound thrown by /datum/element/bouncy. It strikes nothing: running into an obstacle only chains the next rebound.

Define Details

BOUNCE_MAX_DISTANCE

Furthest, in tiles, one bounce travels while it has gravity. Mostly trims mass drivers and explosions, which throw far further than hands do.

BOUNCE_MAX_HOP_HEIGHT

Tallest hop arc, in pixels.

BOUNCE_MAX_PER_TICK

Most bounces (rebounds, ejection hops and tosses) that may start in one tick, shared by every bouncy object.

Keeps mass throws, such as an explosion scattering a pile of casings and rods, from flooding SSthrowing, the timer subsystem, clients and the sound system. Objects past the budget settle where they are.

BOUNCE_MINIMUM_DISTANCE

Bounces shorter than this many tiles are dropped rather than animated as an imperceptible twitch.

BOUNCE_REBOUND_DELAY

Delay between an impact and the rebound it causes.

Must be nonzero. Impacts are handled inside [/datum/thrownthing/proc/finalize], and that throw's Destroy() clears throwing and the SSthrowing entry of its movable. A rebound started synchronously would be cancelled by that cleanup.

BOUNCE_SLIDE_PIXEL_LIMIT

Furthest, in pixels, a sub-tile slide may move an object from its base offset, so it stays over its own tile.