Files
Paradise/obj/effect/spawner/dynamic_bridge.html

26 lines
5.8 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>/obj/effect/spawner/dynamic_bridge - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="obj/effect/spawner/dynamic_bridge.html#proc">Proc Details</a></header><main><h1>dynamic_bridge <aside>/<a href="obj.html">obj</a>/<a href="obj/effect/spawner.html">effect/spawner</a>/<a href="obj/effect/spawner/dynamic_bridge.html">dynamic_bridge</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/dynamic_bridge_spawner.dm#L29"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/dynamic_bridge_spawner.dm 29"></a></h1><p>A spawner for dynamic bridges, largely with hardcoded expectations to be
operating on Lavaland.</p>
<p>It does this by starting at its spawn point, placed by a
<a href="datum/river_spawner.html" title="/datum/river_spawner">/datum/river_spawner</a> during generation, and walking in each direction
&quot;forwards&quot; and &quot;backwards&quot; until it reaches the maximum possible length of
the bridge, or a tile that doesn't appear to be a valid &quot;passage&quot;
(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 &quot;cleans up&quot; the tiles contiguous to its entrance and exit turfs,
removing any lava if present.</p>
<p>It attempts this first in the vertical direction, and then the horizontal. So
&quot;fowards&quot; and &quot;backwards&quot; can mean NORTH/SOUTH or EAST/WEST depending on the
direction it's attempting.</p>
<p>There are several bridge &quot;themes&quot; implemented in <code>make_walkway()</code> and
<code>make_pillar()</code>, and more can be added if desired.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/effect/spawner/dynamic_bridge.html#proc/cleanup_edge">cleanup_edge</a></th><td>Make a tile safe for player passage, for use at the bridge entrance and exits</td></tr><tr><th><a href="obj/effect/spawner/dynamic_bridge.html#proc/out_of_bounds">out_of_bounds</a></th><td>Checks if we are going out of bounds. Returns TRUE if we are close (less than or equal to 2 turfs) to a border</td></tr><tr><th><a href="obj/effect/spawner/dynamic_bridge.html#proc/valid_landing">valid_landing</a></th><td>Returns whether the passed in turf is a valid &quot;landing&quot;. A valid landing is
a tile that hasn't been reserved by another bridge, and has a non-lava tile
leading directly to it.</td></tr><tr><th><a href="obj/effect/spawner/dynamic_bridge.html#proc/valid_passage">valid_passage</a></th><td>Returns whether the passed in turf is a valid &quot;passage&quot;. 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.</td></tr></table><h2 id="proc">Proc Details</h2><h3 id="proc/cleanup_edge"><aside class="declaration">proc </aside>cleanup_edge<aside>(/<a href="turf.html">turf</a>/T) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/dynamic_bridge_spawner.dm#L238"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/dynamic_bridge_spawner.dm 238"></a></aside></h3><p>Make a tile safe for player passage, for use at the bridge entrance and exits</p><h3 id="proc/out_of_bounds"><aside class="declaration">proc </aside>out_of_bounds<aside>(direction, /<a href="turf.html">turf</a>/current_turf) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/dynamic_bridge_spawner.dm#L302"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/dynamic_bridge_spawner.dm 302"></a></aside></h3><p>Checks if we are going out of bounds. Returns TRUE if we are close (less than or equal to 2 turfs) to a border</p><h3 id="proc/valid_landing"><aside class="declaration">proc </aside>valid_landing<aside>(/<a href="turf.html">turf</a>/T, direction) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/dynamic_bridge_spawner.dm#L66"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/dynamic_bridge_spawner.dm 66"></a></aside></h3><p>Returns whether the passed in turf is a valid &quot;landing&quot;. A valid landing is
a tile that hasn't been reserved by another bridge, and has a non-lava tile
leading directly to it.</p><h3 id="proc/valid_passage"><aside class="declaration">proc </aside>valid_passage<aside>(/<a href="turf.html">turf</a>/T) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/objects/effects/spawners/dynamic_bridge_spawner.dm#L103"><img src="git.png" width="16" height="16" title="code/game/objects/effects/spawners/dynamic_bridge_spawner.dm 103"></a></aside></h3><p>Returns whether the passed in turf is a valid &quot;passage&quot;. 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.</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>