Show / Hide Table of Contents

Class RoomCategory

Types of rooms that we can support.

Inheritance
System.Object
RoomCategory
Implements
IController
IViewController
IHasUniversalID
ILinkableParameterized<LinkConfig>
ILinkable
Namespace: Eco.Gameplay.Housing.PropertyValues
Assembly: Eco.Gameplay.dll
Syntax
public sealed class RoomCategory : Object, IController, IViewController, IHasUniversalID, ILinkableParameterized<LinkConfig>, ILinkable

Constructors

RoomCategory()

Declaration
public RoomCategory()

Fields

AffectsPropertyTypes

Which property types can furniture of this category support?

Declaration
public PropertyType[] AffectsPropertyTypes
Field Value
Type Description
PropertyType[]

CanAutoChooseCategory

Declaration
public bool CanAutoChooseCategory
Field Value
Type Description
System.Boolean

CanBeRoomCategory

When set, this cannot determine the type of a room, its a supporting category only (ex, 'Decoration' is a category of furniture but cannot be a category of room).

Declaration
public bool CanBeRoomCategory
Field Value
Type Description
System.Boolean

CapToPercentOfRestOfProperty

When set, the value of rooms of this type is capped to the value of the rest of the house (the uncapped rooms). For example, bathrooms are capped at X% of the rest of the house (because its not the main purpose of the dwelling, just a supporting role).

Declaration
public float CapToPercentOfRestOfProperty
Field Value
Type Description
System.Single

Color

Color associated with this category.

Declaration
public Color Color
Field Value
Type Description
Color

DisplayName

Declaration
public LocString DisplayName
Field Value
Type Description
LocString

MaxSupportPercentOfPrimary

For support furnishings (that is, furnishings that dont match the primary room category, like a chair in the kitchen), the total value of the support category cannot exceed this percent of the primary categroy's.

Declaration
public float MaxSupportPercentOfPrimary
Field Value
Type Description
System.Single

MaxSupportPercentOfPrimaryPerCategory

If assigned (can be null), then it will see if the primary category is in this list, and use this as the max support percent. Otherwise uses default MaxSupportPercentPrimary. This is used so Outdoor room can get 100% of its value from culture.

Declaration
public Dictionary<string, float> MaxSupportPercentOfPrimaryPerCategory
Field Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Single>

NegatesValue

Set this to true if the category nulls out housing points when in a room.

Declaration
public bool NegatesValue
Field Value
Type Description
System.Boolean

ShouldCapFromRoomMaterials

Room value is capped by default based on tier of materials. Categories like Outdoor disable this.

Declaration
public bool ShouldCapFromRoomMaterials
Field Value
Type Description
System.Boolean

SupportForAnyRoomType

When set, room category can be a support category for any type of room, even if it's doesn't list it in its support category list (ie, 'Decorations' are useful in any type of room).

Declaration
public bool SupportForAnyRoomType
Field Value
Type Description
System.Boolean

SupportingRoomCategoryNames

A list of other room category names which this category can contribute its points to.

Declaration
public string[] SupportingRoomCategoryNames
Field Value
Type Description
System.String[]

Properties

Bathroom

Declaration
public static RoomCategory Bathroom { get; }
Property Value
Type Description
RoomCategory

Bedroom

Declaration
public static RoomCategory Bedroom { get; }
Property Value
Type Description
RoomCategory

ControllerID

Declaration
public ref int ControllerID { get; }
Property Value
Type Description
System.Int32

Cultural

Declaration
public static RoomCategory Cultural { get; }
Property Value
Type Description
RoomCategory

DisplayNameColored

Declaration
public LocString DisplayNameColored { get; }
Property Value
Type Description
LocString

General

Declaration
public static RoomCategory General { get; }
Property Value
Type Description
RoomCategory

Industrial

Declaration
public static RoomCategory Industrial { get; }
Property Value
Type Description
RoomCategory

Kitchen

Declaration
public static RoomCategory Kitchen { get; }
Property Value
Type Description
RoomCategory

LivingRoom

Declaration
public static RoomCategory LivingRoom { get; }
Property Value
Type Description
RoomCategory

Name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

Outdoor

Declaration
public static RoomCategory Outdoor { get; }
Property Value
Type Description
RoomCategory

SupportingRoomCategories

Declaration
public IEnumerable<RoomCategory> SupportingRoomCategories { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<RoomCategory>

Methods

GetMaxSupportPercentOfPrimary(RoomCategory)

Gets how much this support room category can impact the given prinary, using the overrides if set otherwise default.

Declaration
public float GetMaxSupportPercentOfPrimary(RoomCategory primary)
Parameters
Type Name Description
RoomCategory primary
Returns
Type Description
System.Single

IsSupportedBy(RoomCategory)

Can other room give support value to this one?

Declaration
public bool IsSupportedBy(RoomCategory other)
Parameters
Type Name Description
RoomCategory other
Returns
Type Description
System.Boolean

OnLinkClicked(TooltipOrigin, TooltipClickContext, User)

Declaration
public void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
Type Name Description
TooltipOrigin origin
TooltipClickContext clickContext
User user

Explicit Interface Implementations

ILinkable.UILinkContent()

Declaration
LocString ILinkable.UILinkContent()
Returns
Type Description
LocString

ILinkableParameterized<LinkConfig>.UILinkContent(LinkConfig)

Declaration
LocString ILinkableParameterized<LinkConfig>.UILinkContent(LinkConfig config)
Parameters
Type Name Description
LinkConfig config
Returns
Type Description
LocString

Implements

IController
IViewController
IHasUniversalID
ILinkableParameterized<T>
ILinkable

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
RoomCategoryTooltip.Tooltip(RoomCategory)
TypeTooltipExtensions.UILinkGeneric(Object)
RoomTooltipLibrary.RoomCategoryTitle(RoomCategory)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾