Space Station 13 - Modules - TypesProc Details

dynamic_bridge

A spawner for dynamic bridges, largely with hardcoded expectations to be operating on Lavaland.

It does this by starting at its spawn point, placed by a /datum/river_spawner during generation, and walking in each direction "forwards" and "backwards" until it reaches the maximum possible length of the bridge, or a tile that doesn't appear to be a valid "passage" (essentially a tile that doesn't have lava on both sides and thus wouldn't look good or make an effective bridge). If it manages to do this and find two tiles that work as the start and end of the bridge, it places the paths, pillars, and "cleans up" the tiles contiguous to its entrance and exit turfs, removing any lava if present.

It attempts this first in the vertical direction, and then the horizontal. So "fowards" and "backwards" can mean NORTH/SOUTH or EAST/WEST depending on the direction it's attempting.

There are several bridge "themes" implemented in make_walkway() and make_pillar(), and more can be added if desired.

Procs

cleanup_edgeMake a tile safe for player passage, for use at the bridge entrance and exits
out_of_boundsChecks if we are going out of bounds. Returns TRUE if we are close (less than or equal to 2 turfs) to a border
valid_landingReturns whether the passed in turf is a valid "landing". A valid landing is a tile that hasn't been reserved by another bridge, and has a non-lava tile leading directly to it.
valid_passageReturns whether the passed in turf is a valid "passage". A valid passage is a lava tile that has lava on both sides of it. Invalid passage tiles do not look good as bridge walkways and defeat the purpose of there is floor right next to it.

Proc Details

cleanup_edge

Make a tile safe for player passage, for use at the bridge entrance and exits

out_of_bounds

Checks if we are going out of bounds. Returns TRUE if we are close (less than or equal to 2 turfs) to a border

valid_landing

Returns whether the passed in turf is a valid "landing". A valid landing is a tile that hasn't been reserved by another bridge, and has a non-lava tile leading directly to it.

valid_passage

Returns whether the passed in turf is a valid "passage". A valid passage is a lava tile that has lava on both sides of it. Invalid passage tiles do not look good as bridge walkways and defeat the purpose of there is floor right next to it.