RoomFixPlugin
A class in Root.Township, Alta.Caves.
Cave generation plugin that lines the cave up so its biggest room sits behind the entrance, places the exit near the second biggest room, and shapes the hole between cave layers.
- Listed in World generation
- Inherits or implements
Plugin - Derived types
RoomFixPlugin.Create - Nested types
Create,Tunnel
Constructors
| Member | What it is |
|---|---|
RoomFixPlugin() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
| Member | What it is |
|---|---|
const float PositionOffset | Distance (15) used to pull the cave back from the entrance and push the exit out. |
12 private and internal fields
| Member | What it is |
|---|---|
private float floorHeight | Height of the floor in the room the passage starts from (7.5 by default). |
private float layerHeightUnits | Height drop between one cave layer and the next (15 by default). |
private AnimationCurve progressLerpValue | Curve along the passage scaling how strongly it carves. |
private AnimationCurve solidFloorEnd | Curve along the passage for the top of the solid floor band. |
private AnimationCurve solidFloorStart | Curve along the passage for the bottom of the solid floor band. |
private AnimationCurve solidRoofEnd | Curve along the passage for the top of the roof band. |
private AnimationCurve solidRoofStart | Curve along the passage for the bottom of the roof band. |
private float stepDepth | Horizontal length of one step in the passage between layers. |
private int steps | Number of steps in the passage. With stepDepth it sets how far the next layer is offset. |
private RoomFixPlugin.Tunnel[] tunnels | Tunnel definitions. Not read anywhere else in this build. |
private AnimationCurve width | Curve along the passage giving its half width. |
private AnimationCurve widthLerpValue | Curve across the passage width scaling how strongly it carves towards the edges. |
Properties
| Member | What it is |
|---|---|
float FloorHeight { get; } | Floor height within a layer, probably. |
float LayerHeightUnits { get; } | Height of one cave layer. |
AnimationCurve ProgressLerpValue { get; } | Blend curve along the passage, used by the roof hole part. |
AnimationCurve SolidFloorEnd { get; } | Curve for where the solid floor ends. |
AnimationCurve SolidFloorStart { get; } | Curve for where the solid floor starts, used by the roof hole part. |
AnimationCurve SolidRoofEnd { get; } | Curve for where the solid roof ends. |
AnimationCurve SolidRoofStart { get; } | Curve for where the solid roof starts. |
float StepDepth { get; } | Depth of each step. |
int Steps { get; } | Number of steps from the entrance into the cave. |
RoomFixPlugin.Tunnel[] Tunnels { get; } | Extra tunnel shapes to carve. |
AnimationCurve Width { get; } | Width curve of the passage. |
AnimationCurve WidthLerpValue { get; } | Blend curve across the width, used by the roof hole part. |
Methods
| Member | What it is |
|---|---|
override PluginInstance GetInstance(IGenerator generator) | Creates the plugin's working instance for a generator. |
override IEnumerator Render(MapChunk chunk, PluginInstance pluginInstance) | Moves the cave into place behind the entrance and tells the layer streamer where the exit is. |
Used in
Members of other types that take, return or hold a RoomFixPlugin: