mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-06-01 20:33:38 +02:00
3 KiB
3 KiB
NeedType
Namespace: TinyLife
Assembly: Tiny Life.dll
Summary
A need is a desire that a TinyLife.Objects.Person
can have to a given extent. To register a custom need type, use TinyLife.NeedType.Register(TinyLife.NeedType)
.
Constructors
Name | Summary |
---|---|
NeedType ( String , Single , Func <Person , ActionType >, Func <Person , TimeSpan >, Single ) |
Instantiates a new need type with the given settings |
Fields
Type | Name | Summary |
---|---|---|
String | Name | The name of this need. Used for TinyLife.Localization purposes and saving to disk. |
Func<Person, ActionType> | NeedLowAction | The TinyLife.Actions.ActionType that is constructed and executed when this need type's TinyLife.Need.Value is very low |
Func<Person, TimeSpan> | NeedLowTime | The amount of in-game time that needs to pass until TinyLife.NeedType.NeedLowAction is constructed and enqueued |
Single | PassiveReduction | The amount that a need instance's TinyLife.Need.Value is reduced by automatically every update frame |
Single | SolveImportance | The priority for solving this need over other needs, where higher numbers represent a more urgent need. This value defaults to 0, meaning it has no special importance. |
Static Fields
Type | Name | Summary |
---|---|---|
NeedType | Energy | |
NeedType | Entertainment | |
NeedType | Hunger | |
NeedType | Hygiene | |
NeedType | Social | |
NeedType | Toilet | |
IList<NeedType> | Types | A list of all of the need types that are currently registered. Register custom need types using TinyLife.NeedType.Register(TinyLife.NeedType) . |
Static Methods
Return | Name | Summary |
---|---|---|
NeedType | Register ( NeedType ) |
Register the TinyLife.NeedType specified to the TinyLife.NeedType.Types dictionary |