Skip to content

BuildingDefinition

public sealed class BuildingDefinition

Namespace MapExpansions

A building NPCs walk into and out of, as in the main world: they reach a door, disappear inside and come out at a door again. The building is an anchor only; walls and doors are whatever the expansion’s content shows there. Schedules find it by Name.

public string Id { get; set; }

Stable id inside the expansion; the building’s saved identity is made from it.

public string Name { get; set; }

The name the game and other mods look the building up by. Unique across the whole world.

public List<LocalPoint> Doors { get; }

Type: LocalPoint

Where NPCs stand to go in, outside the door and on walkable ground, facing the door.

public bool Knock { get; set; }

The player can knock at the doors, as at a home in the main world; whoever is inside comes out. Off for buildings with working doors.

public List<string> DoorModels { get; }

Path of the expansion source’s door model at each door, in the order of Doors, such as “Cabin/Industrial Metal Door (Static)”. The knock surface covers that model; a door without one gets it on the first wall in front of its point.

public BuildingDefinition()

BuildingDefinition(string, string, params LocalPoint[])

Section titled “BuildingDefinition(string, string, params LocalPoint[])”
public BuildingDefinition(string id, string name, params LocalPoint[] doors)

Types: LocalPoint