Class WalkableOpening
An opening is some sort of extrusion in a WallLike, like a window or a door. Openings are created from their underlying OpeningType.
public class WalkableOpening : Opening
- Inheritance
-
WalkableOpening
- Derived
- Inherited Members
- Extension Methods
Constructors
WalkableOpening(OpeningType, int[])
Creates a new opening from the given opening type and color
public WalkableOpening(OpeningType type, int[] colors)
Parameters
type
OpeningTypeThe opening type
colors
int[]The indices of the colors to use
Methods
CanPlaceOn(FurnitureType)
Whether the given FurnitureType can be attached to this opening. By default, this method returns true when the furniture has the CanCoverWindow category.
public override bool CanPlaceOn(FurnitureType type)
Parameters
type
FurnitureType
Returns
- bool
Whether the opening is a window
CanWalkThrough(Map, WallLike, MapObject)
Returns whether a PersonLike is able to walk through a WallLike that has this opening. This returns true for WalkableOpening and LockableAnimatedDoor and false for Opening.
public override bool CanWalkThrough(Map map, WallLike wall, MapObject obj)
Parameters
Returns
Construct(OpeningType, int[], WallLike)
Constructs a new door with the given settings. This is a helper method that can be used through a method group when constructing a new OpeningType.
public static WalkableOpening Construct(OpeningType type, int[] colors, WallLike wall)
Parameters
type
OpeningTypeThe type.
colors
int[]The colors.
wall
WallLikeThe wall.
Returns
- WalkableOpening
The constructed door.