Skip to main content

RoomFixesInstance

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

Runtime instance of the RoomFixes plugin part: fills in small pockets, joins the remaining rooms with corridors, and records the two biggest rooms for the layer links.

Constructors​

MemberWhat it is
RoomFixesInstance(PluginInstance plugin, RoomFixes part)Creates a RoomFixesInstance from plugin and part.

Methods​

MemberWhat it is
override void Modify(MapChunkLayer layer, int offX, int offZ)Repeatedly finds rooms, walls off small ones and draws corridors between nearest groups; stores the biggest rooms and the entrance snap on the generator.
1 private and internal method
MemberWhat it is
private int FloodFill(int x, int z, int maxXZ, MapChunkLayer layer, float value, out int totalX, out int totalZ)Scanline flood fill from a cell, setting matching cells to a value; returns the cell count and coordinate totals.