ObjectRule
public sealed class ObjectRuleNamespace MapExpansions
Selects objects by name in one world, optionally limited to an area.
Properties
Section titled “Properties”public string Id { get; set; }Stable id inside the expansion, which a map layer uses to replace or remove the rule. Empty takes one made of side, names, area and effect.
public WorldSide Side { get; set; }Type: WorldSide
public string Name { get; set; }The object’s name starts with this (case-insensitive).
Parent
Section titled “Parent”public string Parent { get; set; }When set, some ancestor’s name starts with this.
public Bounds Area { get; set; }When its size is not zero, the object’s bounds must intersect this box. Main-world coordinates for WorldSide.Main, expansion-local ones for WorldSide.Expansion.
Effect
Section titled “Effect”public ObjectEffect Effect { get; set; }Type: ObjectEffect
Bottom
Section titled “Bottom”public float Bottom { get; set; }For ObjectEffect.Skirt: the height the wall reaches down to, in the same coordinates as Area.
TopShift
Section titled “TopShift”public float TopShift { get; set; }For ObjectEffect.ColliderTop: metres the top face moves up, negative for down.
Openings
Section titled “Openings”public List<Bounds> Openings { get; private set; }For ObjectEffect.Hollow: doorways left open in the shell, in the same coordinates as Area.
public List<(float From, string Material)> Bands { get; private set; }For ObjectEffect.Hollow: wall bands of the inside lining, each from a height above the floor in metres up to the next band or the ceiling, with the name of a loaded material.
CeilingMaterial
Section titled “CeilingMaterial”public string CeilingMaterial { get; set; }For ObjectEffect.Hollow: the name of a loaded material for the lining’s ceiling.
FloorMaterial
Section titled “FloorMaterial”public string FloorMaterial { get; set; }For ObjectEffect.Hollow: the name of a loaded material for the lining’s floor, laid 5 mm above the box’s bottom face over whatever floor the model draws there.
Windows
Section titled “Windows”public List<Bounds> Windows { get; private set; }For ObjectEffect.Hollow: boxes left open in the lining only, such as windows, in the same coordinates as Area.
FrameMaterial
Section titled “FrameMaterial”public string FrameMaterial { get; set; }For ObjectEffect.Hollow: the name of a loaded material for a frame around every hole in the lining’s walls, FrameWidth wide on the wall and as deep as the gap between lining and outer wall. Edges on the floor, the ceiling or a corner, and edges inside another hole, get none.
FrameWidth
Section titled “FrameWidth”public float FrameWidth { get; set; }For ObjectEffect.Hollow: width of FrameMaterial on the wall in metres.
LiningInset
Section titled “LiningInset”public float LiningInset { get; set; }For ObjectEffect.Hollow: metres between the outer walls and the lining’s walls. More than the default keeps sills and frames the outer model draws inward behind the lining.
Methods
Section titled “Methods”public static ObjectRule In( WorldSide side, string name, ObjectEffect effect, string parent = null)Types: WorldSide, ObjectEffect
Within
Section titled “Within”public ObjectRule Within(Vector3 min, Vector3 max)DownTo
Section titled “DownTo”public ObjectRule DownTo(float height)Sets Bottom.
ShiftTop
Section titled “ShiftTop”public ObjectRule ShiftTop(float metres)Sets TopShift.
Opening
Section titled “Opening”public ObjectRule Opening(Vector3 min, Vector3 max)Adds a box to Openings.
public ObjectRule Band(float from, string material)Adds a wall band to Bands.
Ceiling
Section titled “Ceiling”public ObjectRule Ceiling(string material)Sets CeilingMaterial.
public ObjectRule Floor(string material)Sets FloorMaterial.
public ObjectRule Frame(string material, float width = 0.06f)Sets FrameMaterial and FrameWidth.
public ObjectRule Inset(float metres)Sets LiningInset.
Window
Section titled “Window”public ObjectRule Window(Vector3 min, Vector3 max)Adds a box to Windows.
ToString
Section titled “ToString”public override string ToString()