Class ActionType
Inheritance
System.Object
ActionType
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Tiny Life.dll
Syntax
[JsonConverter(typeof(StaticJsonConverter<ActionType>), new object[]{typeof(ActionType), "PrivateTypes"})]
public class ActionType : IEmotionSource
Fields
AddALittleSomething
Declaration
public static readonly ActionType AddALittleSomething
Field Value
AddCandle
Declaration
public static readonly ActionType AddCandle
Field Value
AdmireFood
Declaration
public static readonly ActionType AdmireFood
Field Value
AdmireLgbtFlag
Declaration
public static readonly ActionType AdmireLgbtFlag
Field Value
AdmitToBeingRomanticWithSomeoneElse
Declaration
public static readonly ActionType AdmitToBeingRomanticWithSomeoneElse
Field Value
AdoptChild
Declaration
public static readonly ActionType AdoptChild
Field Value
AgeUp
Declaration
public static readonly ActionType AgeUp
Field Value
AskAboutComputerSpecs
Declaration
public static readonly ActionType AskAboutComputerSpecs
Field Value
AskAboutDay
Declaration
public static readonly ActionType AskAboutDay
Field Value
AskAboutFamilyWellbeing
Declaration
public static readonly ActionType AskAboutFamilyWellbeing
Field Value
AskAboutFictionBooks
Declaration
public static readonly ActionType AskAboutFictionBooks
Field Value
AskAboutGamingRig
Declaration
public static readonly ActionType AskAboutGamingRig
Field Value
AskAboutNonfictionBooks
Declaration
public static readonly ActionType AskAboutNonfictionBooks
Field Value
AskAboutPersonality
Declaration
public static readonly ActionType AskAboutPersonality
Field Value
AskIfSingle
Declaration
public static readonly ActionType AskIfSingle
Field Value
AskMedicalHistory
Declaration
public static readonly ActionType AskMedicalHistory
Field Value
AskToCook
Declaration
public static readonly ActionType AskToCook
Field Value
AskToLeave
Declaration
public static readonly ActionType AskToLeave
Field Value
AskToTaste
Declaration
public static readonly ActionType AskToTaste
Field Value
AskToTellStory
Declaration
public static readonly ActionType AskToTellStory
Field Value
BakeFood
Declaration
public static readonly ActionType BakeFood
Field Value
BeAwayFromLotEmployment
Declaration
public static readonly ActionType BeAwayFromLotEmployment
Field Value
BeEnticing
Declaration
public static readonly ActionType BeEnticing
Field Value
BlowOutCandles
Declaration
public static readonly ActionType BlowOutCandles
Field Value
BoastAboutPagesWritten
Declaration
public static readonly ActionType BoastAboutPagesWritten
Field Value
BragAboutComputer
Declaration
public static readonly ActionType BragAboutComputer
Field Value
BreakUp
Declaration
public static readonly ActionType BreakUp
Field Value
BrewCoffee
Declaration
public static readonly ActionType BrewCoffee
Field Value
BribeForFriendship
Declaration
public static readonly ActionType BribeForFriendship
Field Value
CallOver
Declaration
public static readonly ActionType CallOver
Field Value
CallToMeal
Declaration
public static readonly ActionType CallToMeal
Field Value
CasualCompliment
Declaration
public static readonly ActionType CasualCompliment
Field Value
CelebrateBirthday
Declaration
public static readonly ActionType CelebrateBirthday
Field Value
ChangeOutfit
Declaration
public static readonly ActionType ChangeOutfit
Field Value
ChastiseForFoodBeliefs
Declaration
public static readonly ActionType[] ChastiseForFoodBeliefs
Field Value
Chat
Declaration
public static readonly ActionType Chat
Field Value
ChatWith
Declaration
public static readonly ActionType ChatWith
Field Value
Clean
Declaration
public static readonly ActionType Clean
Field Value
CleanDish
Declaration
public static readonly ActionType CleanDish
Field Value
CleanEverything
Declaration
public static readonly ActionType CleanEverything
Field Value
CleanOutFridge
Declaration
public static readonly ActionType CleanOutFridge
Field Value
CollectSunlight
Declaration
public static readonly ActionType CollectSunlight
Field Value
CollectTrash
Declaration
public static readonly ActionType CollectTrash
Field Value
ColorColoringBook
Declaration
public static readonly ActionType ColorColoringBook
Field Value
CompareMuscleSize
Declaration
public static readonly ActionType CompareMuscleSize
Field Value
ComplainAboutAdults
Declaration
public static readonly ActionType ComplainAboutAdults
Field Value
ComplainAboutLife
Declaration
public static readonly ActionType ComplainAboutLife
Field Value
ComplainAboutParent
Declaration
public static readonly ActionType ComplainAboutParent
Field Value
ComplainAboutRelationship
Declaration
public static readonly ActionType ComplainAboutRelationship
Field Value
ComplimentLooks
Declaration
public static readonly ActionType ComplimentLooks
Field Value
ConfideIn
Declaration
public static readonly ActionType ConfideIn
Field Value
CookChildFood
Declaration
public static readonly ActionType CookChildFood
Field Value
CookFood
Declaration
public static readonly ActionType CookFood
Field Value
CreateApp
Declaration
public static readonly ActionType[] CreateApp
Field Value
CriticizeDeforestation
Declaration
public static readonly ActionType CriticizeDeforestation
Field Value
DebatePineappleOnPizza
Declaration
public static readonly ActionType DebatePineappleOnPizza
Field Value
DebugAddToHousehold
Declaration
public static readonly ActionType DebugAddToHousehold
Field Value
DebugDie
Declaration
public static readonly ActionType DebugDie
Field Value
DebugTeleport
Declaration
public static readonly ActionType DebugTeleport
Field Value
DeepCompliment
Declaration
public static readonly ActionType DeepCompliment
Field Value
DeliverMail
Declaration
public static readonly ActionType DeliverMail
Field Value
DeliverNewspaper
Declaration
public static readonly ActionType DeliverNewspaper
Field Value
Die
Declaration
public static readonly ActionType Die
Field Value
DiscussFineDining
Declaration
public static readonly ActionType DiscussFineDining
Field Value
DiscussHomeAutomation
Declaration
public static readonly ActionType DiscussHomeAutomation
Field Value
DiscussNpP
Declaration
public static readonly ActionType DiscussNpP
Field Value
DiscussWorkoutRegimen
Declaration
public static readonly ActionType DiscussWorkoutRegimen
Field Value
DoHomework
Declaration
public static readonly ActionType DoHomework
Field Value
Drive
Declaration
public static readonly ActionType Drive
Field Value
Eat
Declaration
public static readonly ActionType Eat
Field Value
EditOutfits
Declaration
public static readonly ActionType EditOutfits
Field Value
EnthuseAboutCoupons
Declaration
public static readonly ActionType EnthuseAboutCoupons
Field Value
ExpressFearOfCrowds
Declaration
public static readonly ActionType ExpressFearOfCrowds
Field Value
Flirt
Declaration
public static readonly ActionType Flirt
Field Value
FlirtyJoke
Declaration
public static readonly ActionType FlirtyJoke
Field Value
FoolAround
Declaration
public static readonly ActionType FoolAround
Field Value
GaugeRelationship
Declaration
public static readonly ActionType GaugeRelationship
Field Value
GetBakingIngredients
Declaration
public static readonly ActionType GetBakingIngredients
Field Value
GetFoodFromDisplayCase
Declaration
public static readonly ActionType GetFoodFromDisplayCase
Field Value
GetFoodSomewhereElse
Declaration
public static readonly ActionType GetFoodSomewhereElse
Field Value
GetFurnitureMail
Declaration
public static readonly ActionType GetFurnitureMail
Field Value
GetIngredientsFamily
Declaration
public static readonly ActionType GetIngredientsFamily
Field Value
GetIngredientsSingle
Declaration
public static readonly ActionType GetIngredientsSingle
Field Value
GetJob
Declaration
public static readonly ActionType GetJob
Field Value
GetJobFromNewspaper
Declaration
public static readonly ActionType GetJobFromNewspaper
Field Value
GetLeftovers
Declaration
public static readonly ActionType GetLeftovers
Field Value
GetWater
Declaration
public static readonly ActionType GetWater
Field Value
GoHere
Declaration
public static readonly ActionType GoHere
Field Value
GoHome
Declaration
public static readonly ActionType GoHome
Field Value
GoJogging
Declaration
public static readonly ActionType GoJogging
Field Value
GrabServing
Declaration
public static readonly ActionType GrabServing
Field Value
GrillFood
Declaration
public static readonly ActionType GrillFood
Field Value
GushAboutPartner
Declaration
public static readonly ActionType GushAboutPartner
Field Value
HackSomeone
Declaration
public static readonly ActionType HackSomeone
Field Value
HaveBookPublished
Declaration
public static readonly ActionType HaveBookPublished
Field Value
HelpWithTraining
Declaration
public static readonly ActionType HelpWithTraining
Field Value
ImplyHomeSmarter
Declaration
public static readonly ActionType ImplyHomeSmarter
Field Value
ImplyMotherIsCamel
Declaration
public static readonly ActionType ImplyMotherIsCamel
Field Value
Insult
Declaration
public static readonly ActionType Insult
Field Value
InviteToHousehold
Declaration
public static readonly ActionType InviteToHousehold
Field Value
JoinAdvancedTournament
Declaration
public static readonly ActionType JoinAdvancedTournament
Field Value
JoinEasyTournament
Declaration
public static readonly ActionType JoinEasyTournament
Field Value
JokeAboutAromance
Declaration
public static readonly ActionType JokeAboutAromance
Field Value
JokeAboutAsexuality
Declaration
public static readonly ActionType JokeAboutAsexuality
Field Value
JokeAboutFamilyGatherings
Declaration
public static readonly ActionType JokeAboutFamilyGatherings
Field Value
JokeAboutOverspending
Declaration
public static readonly ActionType JokeAboutOverspending
Field Value
JokeAboutOwnUnemployment
Declaration
public static readonly ActionType JokeAboutOwnUnemployment
Field Value
JokeAboutSmartHome
Declaration
public static readonly ActionType JokeAboutSmartHome
Field Value
JokeAboutTreadmillAccidents
Declaration
public static readonly ActionType JokeAboutTreadmillAccidents
Field Value
JokeAboutTrees
Declaration
public static readonly ActionType JokeAboutTrees
Field Value
JokeAboutWork
Declaration
public static readonly ActionType JokeAboutWork
Field Value
JokeAboutWritingStyle
Declaration
public static readonly ActionType JokeAboutWritingStyle
Field Value
Kiss
Declaration
public static readonly ActionType Kiss
Field Value
LiftWeights
Declaration
public static readonly ActionType LiftWeights
Field Value
Light
Declaration
public static readonly ActionType Light
Field Value
LockDoor
Declaration
public static readonly ActionType LockDoor
Field Value
LotEmploymentIdle
Declaration
public static readonly ActionType LotEmploymentIdle
Field Value
MakeFunOfBeingBadAtSchool
Declaration
public static readonly ActionType MakeFunOfBeingBadAtSchool
Field Value
MakeFunOfBeingNerd
Declaration
public static readonly ActionType MakeFunOfBeingNerd
Field Value
MakeFunOfBeingOutdoorsy
Declaration
public static readonly ActionType MakeFunOfBeingOutdoorsy
Field Value
MakeFunOfFoodIntolerance
Declaration
public static readonly ActionType[] MakeFunOfFoodIntolerance
Field Value
MakeFunOfFriends
Declaration
public static readonly ActionType MakeFunOfFriends
Field Value
MakeFunOfIntroversion
Declaration
public static readonly ActionType MakeFunOfIntroversion
Field Value
MakeFunOfLaziness
Declaration
public static readonly ActionType MakeFunOfLaziness
Field Value
MakeFunOfNiceness
Declaration
public static readonly ActionType MakeFunOfNiceness
Field Value
MakeFunOfPoorFitness
Declaration
public static readonly ActionType MakeFunOfPoorFitness
Field Value
MakeFunOfUnemployment
Declaration
public static readonly ActionType MakeFunOfUnemployment
Field Value
Declaration
public static readonly ActionType MakeRisqueRemark
Field Value
MixProteinShake
Declaration
public static readonly ActionType MixProteinShake
Field Value
ModGame
Declaration
public static readonly ActionType[] ModGame
Field Value
MopPuddle
Declaration
public static readonly ActionType MopPuddle
Field Value
OrderCafeFood
Declaration
public static readonly ActionType OrderCafeFood
Field Value
OrderCoffee
Declaration
public static readonly ActionType OrderCoffee
Field Value
Paint
Declaration
public static readonly ActionType Paint
Field Value
PassOut
Declaration
public static readonly ActionType PassOut
Field Value
PayBills
Declaration
public static readonly ActionType PayBills
Field Value
PeeSelf
Declaration
public static readonly ActionType PeeSelf
Field Value
PickUp
Declaration
public static readonly ActionType PickUp
Field Value
PlayInSandbox
Declaration
public static readonly ActionType PlayInSandbox
Field Value
PlayOnJungleGym
Declaration
public static readonly ActionType PlayOnJungleGym
Field Value
PlayOnlineGames
Declaration
public static readonly ActionType PlayOnlineGames
Field Value
PlaySingleplayerGames
Declaration
public static readonly ActionType PlaySingleplayerGames
Field Value
PlayTrick
Declaration
public static readonly ActionType PlayTrick
Field Value
PlayWithToy
Declaration
public static readonly ActionType PlayWithToy
Field Value
PoseMathPuzzle
Declaration
public static readonly ActionType PoseMathPuzzle
Field Value
PracticeJokes
Declaration
public static readonly ActionType PracticeJokes
Field Value
PracticeProgramming
Declaration
public static readonly ActionType PracticeProgramming
Field Value
PracticeSalesPitch
Declaration
public static readonly ActionType PracticeSalesPitch
Field Value
PracticeSpeech
Declaration
public static readonly ActionType PracticeSpeech
Field Value
PracticeWriting
Declaration
public static readonly ActionType PracticeWriting
Field Value
PrepareFood
Declaration
public static readonly ActionType PrepareFood
Field Value
PrepareOrder
Declaration
public static readonly ActionType PrepareOrder
Field Value
PsychSelfUp
Declaration
public static readonly ActionType PsychSelfUp
Field Value
PublishApp
Declaration
public static readonly ActionType PublishApp
Field Value
PutAway
Declaration
public static readonly ActionType PutAway
Field Value
PutDown
Declaration
public static readonly ActionType PutDown
Field Value
PutInFridge
Declaration
public static readonly ActionType PutInFridge
Field Value
Puzzle
Declaration
public static readonly ActionType Puzzle
Field Value
QuitJob
Declaration
public static readonly ActionType QuitJob
Field Value
Read
Declaration
public static readonly ActionType Read
Field Value
ReadJokes
Declaration
public static readonly ActionType ReadJokes
Field Value
ReadNewspaper
Declaration
public static readonly ActionType ReadNewspaper
Field Value
ReadSkillBook
Declaration
public static readonly ActionType ReadSkillBook
Field Value
ReciteLovePoem
Declaration
public static readonly ActionType ReciteLovePoem
Field Value
Repair
Declaration
public static readonly ActionType Repair
Field Value
ResearchBusinessPlans
Declaration
public static readonly ActionType ResearchBusinessPlans
Field Value
ResearchProgrammingPatterns
Declaration
public static readonly ActionType ResearchProgrammingPatterns
Field Value
Rummage
Declaration
public static readonly ActionType Rummage
Field Value
RunAround
Declaration
public static readonly ActionType RunAround
Field Value
RunOnTreadmill
Declaration
public static readonly ActionType RunOnTreadmill
Field Value
Scrap
Declaration
public static readonly ActionType Scrap
Field Value
SelfPublishBook
Declaration
public static readonly ActionType SelfPublishBook
Field Value
Sell
Declaration
public static readonly ActionType Sell
Field Value
Settings
Declaration
public readonly ActionType.TypeSettings Settings
Field Value
ShakeTree
Declaration
public static readonly ActionType ShakeTree
Field Value
ShareIdeas
Declaration
public static readonly ActionType ShareIdeas
Field Value
ShooChild
Declaration
public static readonly ActionType ShooChild
Field Value
ShufflePuzzle
Declaration
public static readonly ActionType ShufflePuzzle
Field Value
Sit
Declaration
public static readonly ActionType Sit
Field Value
SitToilet
Declaration
public static readonly ActionType SitToilet
Field Value
Sleep
Declaration
public static readonly ActionType Sleep
Field Value
StartDating
Declaration
public static readonly ActionType StartDating
Field Value
Starve
Declaration
public static readonly ActionType Starve
Field Value
Store
Declaration
public static readonly ActionType Store
Field Value
StudyBook
Declaration
public static readonly ActionType StudyBook
Field Value
SuggestThriftstores
Declaration
public static readonly ActionType SuggestThriftstores
Field Value
TakeFromFridge
Declaration
public static readonly ActionType TakeFromFridge
Field Value
TakeOutTrash
Declaration
public static readonly ActionType TakeOutTrash
Field Value
TakeShower
Declaration
public static readonly ActionType TakeShower
Field Value
Talk
Declaration
public static readonly ActionType Talk
Field Value
TalkAboutBestSpots
Declaration
public static readonly ActionType TalkAboutBestSpots
Field Value
TalkAboutCartoons
Declaration
public static readonly ActionType TalkAboutCartoons
Field Value
TalkAboutFamily
Declaration
public static readonly ActionType TalkAboutFamily
Field Value
TalkAboutFavoriteToys
Declaration
public static readonly ActionType TalkAboutFavoriteToys
Field Value
TalkAboutFeelings
Declaration
public static readonly ActionType TalkAboutFeelings
Field Value
TalkAboutFood
Declaration
public static readonly ActionType TalkAboutFood
Field Value
TalkAboutFunnyCityName
Declaration
public static readonly ActionType TalkAboutFunnyCityName
Field Value
TalkAboutNaps
Declaration
public static readonly ActionType TalkAboutNaps
Field Value
TalkAboutNatureWalks
Declaration
public static readonly ActionType TalkAboutNatureWalks
Field Value
TalkAboutNeighborhood
Declaration
public static readonly ActionType TalkAboutNeighborhood
Field Value
TalkAboutOutdoors
Declaration
public static readonly ActionType TalkAboutOutdoors
Field Value
TalkAboutSchool
Declaration
public static readonly ActionType TalkAboutSchool
Field Value
TalkAboutSpicyFood
Declaration
public static readonly ActionType TalkAboutSpicyFood
Field Value
TalkAboutWatchingTv
Declaration
public static readonly ActionType TalkAboutWatchingTv
Field Value
TalkAboutWork
Declaration
public static readonly ActionType TalkAboutWork
Field Value
TellComplexJoke
Declaration
public static readonly ActionType TellComplexJoke
Field Value
TellDadJoke
Declaration
public static readonly ActionType TellDadJoke
Field Value
TellEngagingStory
Declaration
public static readonly ActionType TellEngagingStory
Field Value
TellFunnyStory
Declaration
public static readonly ActionType TellFunnyStory
Field Value
TellJoke
Declaration
public static readonly ActionType TellJoke
Field Value
TellJokeAboutSomething
Declaration
public static readonly ActionType[] TellJokeAboutSomething
Field Value
TellRidiculousStory
Declaration
public static readonly ActionType TellRidiculousStory
Field Value
TellStory
Declaration
public static readonly ActionType TellStory
Field Value
ThisIsInappropriate
Declaration
public static readonly ActionType ThisIsInappropriate
Field Value
ThrowAway
Declaration
public static readonly ActionType ThrowAway
Field Value
TinkerWith
Declaration
public static readonly ActionType TinkerWith
Field Value
ToggleAllLights
Declaration
public static readonly ActionType ToggleAllLights
Field Value
ToggleLight
Declaration
public static readonly ActionType ToggleLight
Field Value
ToggleNewspapers
Declaration
public static readonly ActionType ToggleNewspapers
Field Value
Types
Declaration
public static readonly ReadOnlyDictionary<string, ActionType> Types
Field Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyDictionary<TKey, TValue><System.String, ActionType> |
|
VisitLot
Declaration
public static readonly ActionType VisitLot
Field Value
VisitorGoHome
Declaration
public static readonly ActionType VisitorGoHome
Field Value
WaitForOrder
Declaration
public static readonly ActionType WaitForOrder
Field Value
WakeUp
Declaration
public static readonly ActionType WakeUp
Field Value
Walk
Declaration
public static readonly ActionType Walk
Field Value
WashHands
Declaration
public static readonly ActionType WashHands
Field Value
WatchTv
Declaration
public static readonly ActionType[] WatchTv
Field Value
WatchWalkthroughs
Declaration
public static readonly ActionType WatchWalkthroughs
Field Value
Woodworking
Declaration
public static readonly ActionType Woodworking
Field Value
Work
Declaration
public static readonly ActionType Work
Field Value
WriteBook
Declaration
public static readonly ActionType[] WriteBook
Field Value
Properties
SourceString
A (localized) string that is displayed when hovering over an EmotionModifier that has this source
Declaration
public string SourceString { get; }
Property Value
Type |
Description |
System.String |
|
Methods
AreDating(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines whether the person and the interaction partner are currently dating
Declaration
public static CanExecuteResult AreDating(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether the action is automatic (unused)
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if they are dating, otherwise
|
CanBeSexual(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines whether a person can invoke a sexual activity.
A Person can invoke such an activity iff they're not a Child and automatic
is either false or the person is not asexual (Asexual).
Declaration
public static CanExecuteResult CanBeSexual(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether this action is automatic
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if the person cannot be sexual, otherwise
|
CanDoImportantAction(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines whether an important action can be executed.
An important action can be executed if it is manual, not in the current household, or the per-save option AiImportantActions is true.
Declaration
public static CanExecuteResult CanDoImportantAction(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether the action is automatic
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if an important action can be executed, otherwise
|
CanDoSocialAction(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines whether a person is currently able to do a social action with the ActionInfo's action object.
This method returns if the action is manual (automatic
is false), or if AiRelationships is true, or if there is an existing relationship between the two parties.
This method is automatically called when TalkAction is used.
Declaration
public static CanExecuteResult CanDoSocialAction(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether the action is automatic
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if a social action can be executed, otherwise
|
CanExecute(ActionInfo, Boolean)
Declaration
public CanExecuteResult CanExecute(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether the action is automatically executed
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
A TinyLife.Actions.CanExecuteResult that represents whether the action can be executed right now
|
CanExecuteAll(ActionInfo, Boolean, ActionType.CanExecuteDelegate[])
A helper method intended to be used with ActionType.CanExecuteDelegate that determines if all of the passed ActionType.CanExecuteDelegate checks pass.
If one of the passed checks does not pass, its result is returned. If all of them pass, is returned. In the context of this method, a null ActionType.CanExecuteDelegate counts as .
This method is designed to be used with the other helper methods in this class, for example:
CanExecuteAll(info, automatic, HasChair, IsFunctional, IsEmptyHanded)
Declaration
public static CanExecuteResult CanExecuteAll(ActionInfo info, bool automatic, params ActionType.CanExecuteDelegate[] conditions)
Parameters
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if all of the conditions are valid, else the first invalid result
|
CanPickUpOrIsHoldingForTarget(ActionInfo, Func<(Furniture Parent, Furniture Item), Boolean>, Func<Furniture, Boolean>, Nullable<CanExecuteResult>, Boolean, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that returns in the following cases:
- The held object
isAllowed
and the action object matches the isParentAllowed
condition - The held object is null and the action objectt
isAllowed
This helper method is useful in cases like
Eat, where the action should be allowed if the person is holding a food plate and clicking a chair, or if a person is clicking the food plate itself.
PickUpAndGoTo(ActionInfo, ObjectCategory, ObjectCategory, Boolean) provides a
MultiAction requivalent to this method.
Declaration
public static CanExecuteResult CanPickUpOrIsHoldingForTarget(ActionInfo info, Func<(Furniture Parent, Furniture Item), bool> isParentAllowed, Func<Furniture, bool> isAllowed, CanExecuteResult? parentNotFoundResult = null, bool allowAnyInvolved = false, bool needsObjectSpot = false)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Func<T, TResult><System.ValueTuple<T1, T2><Furniture, Furniture>, System.Boolean> |
isParentAllowed |
Whether the object that the required item should be a child of, or placed onto, is correct
|
System.Func<T, TResult><Furniture, System.Boolean> |
isAllowed |
A predicate that checks if the given item is the one searched for
|
System.Nullable<T><TinyLife.Actions.CanExecuteResult> |
parentNotFoundResult |
If the parent furniture has to be visible somewhere, even if the action object is being held, this TinyLife.Actions.CanExecuteResult is returned if it's not around. If this value is null, no parent has to exist.
|
System.Boolean |
allowAnyInvolved |
Whether any GetInvolvedObjects<T>(ObjectCategory, Boolean, Boolean) should be passed to isAllowed , instead of just the action object
|
System.Boolean |
needsObjectSpot |
Whether a free object spot on the goal parent is required in the area. If there isn't one around, parentNotFoundResult is returned.
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
A result that represents the validity of the action
|
CanPickUpOrIsHoldingForTarget(ActionInfo, Func<Furniture, Boolean>, Func<(Person Person, Furniture Item), Boolean>, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that returns in the following cases:
- The held object
isAllowed
and the action object matches the isPersonAllowed
condition - The held object is null and the action objectt
isAllowed
This helper method is useful in cases like
AskToTaste, where the action should be allowed if the person is holding a food plate and clicking a chair, or if a person is clicking the food plate itself.
Declaration
public static CanExecuteResult CanPickUpOrIsHoldingForTarget(ActionInfo info, Func<Furniture, bool> isAllowed, Func<(Person Person, Furniture Item), bool> isPersonAllowed = null, bool allowAnyInvolved = false)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Func<T, TResult><Furniture, System.Boolean> |
isAllowed |
A predicate that checks if the given item is the one searched for
|
System.Func<T, TResult><System.ValueTuple<T1, T2><Person, Furniture>, System.Boolean> |
isPersonAllowed |
Whether the object that the required item should be a child of, or placed onto, is correct
|
System.Boolean |
allowAnyInvolved |
Whether any GetInvolvedObjects<T>(ObjectCategory, Boolean, Boolean) should be passed to isAllowed , instead of just the action object
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
A result that represents the validity of the action
|
CanPickUpOrIsHoldingForTarget(ActionInfo, ObjectCategory, Func<Furniture, Boolean>, Nullable<CanExecuteResult>, Boolean, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that returns in the following cases:
- The held object
isAllowed
and the action object matches the goalParent
category - The held object is null and the action objectt
isAllowed
This helper method is useful in cases like
Eat, where the action should be allowed if the person is holding a food plate and clicking a chair, or if a person is clicking the food plate itself.
PickUpAndGoTo(ActionInfo, ObjectCategory, ObjectCategory, Boolean) provides a
MultiAction requivalent to this method.
Declaration
public static CanExecuteResult CanPickUpOrIsHoldingForTarget(ActionInfo info, ObjectCategory goalParent, Func<Furniture, bool> isAllowed, CanExecuteResult? parentNotFoundResult = null, bool allowAnyInvolved = false, bool needsObjectSpot = false)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
ObjectCategory |
goalParent |
The object that the required item should be a child of
|
System.Func<T, TResult><Furniture, System.Boolean> |
isAllowed |
A predicate that checks if the given item is the one searched for
|
System.Nullable<T><TinyLife.Actions.CanExecuteResult> |
parentNotFoundResult |
If the parent furniture has to be visible somewhere, even if the action object is being held, this TinyLife.Actions.CanExecuteResult is returned if it's not around. If this value is null, no parent has to exist.
|
System.Boolean |
allowAnyInvolved |
Whether any GetInvolvedObjects<T>(ObjectCategory, Boolean, Boolean) should be passed to isAllowed , instead of just the action object
|
System.Boolean |
needsObjectSpot |
Whether a free object spot on the goalParent is required in the area. If there isn't one around, a special execution result is returned.
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
A result that represents the validity of the action
|
CanPlaceHeldItem(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines whether or not the item that is currently held by the given person can be placed in an object spot on the given object.
Declaration
public static CanExecuteResult CanPlaceHeldItem(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether or not this action is started automatically. This property is unused, but present for ease of use with CanExecute
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if the object has a free object spot, otherwise
|
CanWorkAtDeskObject(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines if the action object (which is expected to be a desk object like a computer) meets all of the criteria for working at it
Declaration
public static CanExecuteResult CanWorkAtDeskObject(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether this action is automatic (unused)
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if the desk object can be worked at, several possible results like a "NoChair" and a "HoldingItem" result otherwise
|
Construct(ActionInfo, ActionVariety)
Declaration
public Action Construct(ActionInfo info, ActionVariety variety = null)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The info that this action should be constructed with
|
ActionVariety |
variety |
The variety, or null if this action has no varieties
|
Returns
Type |
Description |
Action |
A new action instance with the given information
|
GetDisplayName(ActionInfo, Boolean)
Returns a localized string that explains this action type in short.
Note that, for instantiated actions, GetDisplayName() should be used.
Declaration
public string GetDisplayName(ActionInfo info, bool includeIcon = true)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info, can be null if no action info is present
|
System.Boolean |
includeIcon |
Whether the GetIconName(ActionInfo) texture should be included at the start of the name
|
Returns
Type |
Description |
System.String |
This action type's display name
|
GetIconName(ActionInfo)
Returns the name of this action type's icon, which is either the manually assigned icon (IconName), or an automatically assigned icon based on this action type's requirements, including RequiredSkill, RequiredEmotion and RequiredPersonality.
The icon name can be used in a MLEM.Ui.Elements.Paragraph as a MLEM.Formatting.Codes.ImageCode as follows: <c IconName>
Declaration
public string GetIconName(ActionInfo info)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info, can be null if no action info is present
|
Returns
Type |
Description |
System.String |
The name of this action type's icon
|
GetSkillPriorityMod(Person, SkillType)
Returns a modifier based on whether the person's PersonalityType, Job or existing Skill boost or require the passed skill, which can be used for PassivePriority if an action involves a skill building activity.
Actions like PracticeWriting and PracticeProgramming use this to make sure that they are only executed if AiSkillBuilding is enabled and if the person could use the skill.
The modifier returned can be multiplied with a constant, default passive priority.
Declaration
public static float GetSkillPriorityMod(Person person, SkillType skill)
Parameters
Type |
Name |
Description |
Person |
person |
The person to execute an action.
|
SkillType |
skill |
The skill whose building is involved in the action.
|
Returns
Type |
Description |
System.Single |
A modifier that is between 0 and 1, based on whether the person's personality or existing skills boost or require the passed skill.
|
GetVarieties(ActionInfo)
Constructs and returns a set of Varieties for this action.
Note that the information specified in the Varieties documentation applies.
This method also handles the appropriate error detection, so that the game does not crash when varities cause an exception.
Declaration
public IEnumerable<ActionVariety> GetVarieties(ActionInfo info)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info to create the varieties for
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T><ActionVariety> |
The varieties for the given action info
|
HasChairOrIsStandingDesk(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines if the given object is sat on a table or desk that has a chair or sat on a standing desk that doesn't need a chair
Declaration
public static CanExecuteResult HasChairOrIsStandingDesk(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether or not this action is started automatically. This property is unused, but present for ease of use with CanExecute
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if there is a chair, a result if there is no valid chair
|
HasSpaceInHousehold(ActionInfo, Boolean)
Declaration
public static CanExecuteResult HasSpaceInHousehold(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info.
|
System.Boolean |
automatic |
Whether this action is automatic, which is unused in this method.
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
A TinyLife.Actions.CanExecuteResult that indicates whether there is space in the active household.
|
IsActionType(Type)
Returns whether this action type's ConstructedType is or extends the passed type t
.
This method is equivalent to Settings.ConstructedType.IsAssignableTo(t)
.
Declaration
public bool IsActionType(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
The type to compare this action's constructed type to
|
Returns
Type |
Description |
System.Boolean |
true if the passed type is a supertype of, or the same type as, this action's constructed type
|
IsDislikedOrMean(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines if the action is executed manually, the given ActionInfo's person has the Mean personality type, or if the interaction partner has the Disliked relationship type (or lower).
If the person's current Emotion is Angry, this method also returns .
Declaration
public static CanExecuteResult IsDislikedOrMean(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether this action is automatic
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if any of the conditions are met, otherwise
|
IsEmptyHanded(ActionInfo, Boolean)
Declaration
public static CanExecuteResult IsEmptyHanded(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether this action is automatic (unused)
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if the person's hands are empty, a "HoldingItem" result otherwise
|
IsNotEmotional(ActionInfo, EmotionType[])
Declaration
public static CanExecuteResult IsNotEmotional(ActionInfo info, params EmotionType[] emotions)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info.
|
EmotionType[] |
emotions |
The emotions that should be queried.
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
A TinyLife.Actions.CanExecuteResult that is invalid based on one of the given emotions , or if none of the emotions are present.
|
Exceptions
Type |
Condition |
System.ArgumentOutOfRangeException |
Thrown if the emotions array has no entries.
|
IsNotExpired(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines whether the action object or any involved objects are expired, and returns an "Expired" result if it is
Declaration
public static CanExecuteResult IsNotExpired(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether the action is automatic (unused)
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if the action object is not expired, an "Expired" result otherwise
|
IsReadyForRomance(ActionInfo, Boolean)
A helper method intended to be used with ActionType.CanExecuteDelegate that determines if the Person and their interaction partner are ready to engage in romantic activities.
Two people are considered ready if they are Unrelated, both Adult or older, and when the action is either started manually, or they have a high enough FriendLevel and either an existing romantic relationship or AiRelationships is enabled.
This method will also return a "TooSad" result if the person is currently feeling Sad.
This method should be used for SocialAction actions that are romantic in nature.
Declaration
public static CanExecuteResult IsReadyForRomance(ActionInfo info, bool automatic)
Parameters
Type |
Name |
Description |
ActionInfo |
info |
The action info
|
System.Boolean |
automatic |
Whether this action is automatic
|
Returns
Type |
Description |
TinyLife.Actions.CanExecuteResult |
if any of the conditions are met, otherwise
|
Register(ActionType.TypeSettings)
Declaration
public static ActionType Register(ActionType.TypeSettings settings)
Parameters
Returns
Type |
Description |
ActionType |
The resulting action type instance
|
Implements
Extension Methods