Skip to main content

RoomFixes

A class in Root.Township, Alta.Caves.PluginParts.

Cave map generator part that tidies open areas: fills rooms below a minimum size with wall, then joins the rest with corridors. Settings only; the work is done in RoomFixesInstance.

Constructors​

MemberWhat it is
RoomFixes()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

8 private and internal fields
MemberWhat it is
private float lineThresholdBacking field for LineThreshold.
private Plugin manMadeLayerBacking field for ManMadeLayer.
private float maximumCorridorWidthBacking field for MaximumCorridorWidth.
private float minimumCorridorWidthBacking field for MinimumCorridorWidth.
private int minimumRoomSizeBacking field for MinimumRoomSize.
private int roomBacking field for RoomValue.
private int wallBacking field for WallValue.
private int yIndexBacking field for YIndex.

Properties​

MemberWhat it is
float LineThreshold { get; }Threshold passed to the corridor line drawing, together with the man-made layer.
Plugin ManMadeLayer { get; }Layer plugin passed to corridor drawing, probably to mark corridors as man-made.
float MaximumCorridorWidth { get; }Largest random corridor width.
float MinimumCorridorWidth { get; }Smallest random corridor width.
int MinimumRoomSize { get; }Open areas with fewer cells than this are filled with WallValue.
int RoomValue { get; }Value written into cells that are room or corridor.
int WallValue { get; }Value written into cells of rooms that are too small.
int YIndex { get; }Which Y slice of the layer is processed.

Methods​

MemberWhat it is
override IPartInstance GetInstance(PluginInstance plugin)Creates the RoomFixesInstance that runs this part on a plugin.

Used in​

Members of other types that take, return or hold a RoomFixes: