Show / Hide Table of Contents

Class BonusCause

Defines when a bonus should trigger.

Inheritance
System.Object
BonusCause
ActionCause
CraftBonusCause
HarvestBonusCause
ResourceTagCause
SkillLevelCause
ToolBonusCause
Implements
IDescribable
Namespace: Eco.Gameplay.Bonuses
Assembly: Eco.Gameplay.dll
Syntax
public abstract class BonusCause : Object, IDescribable

Constructors

BonusCause()

Declaration
protected BonusCause()

Methods

Description()

Describe when this cause triggers (Example: "when crafting wooden planks").

Declaration
public abstract LocString Description()
Returns
Type Description
LocString

IsTriggered(BonusContext)

Check if this cause is triggered for the given context. All causes in a Bonus must return true for the bonus to apply.

Declaration
public abstract bool IsTriggered(BonusContext context)
Parameters
Type Name Description
BonusContext context
Returns
Type Description
System.Boolean

Implements

IDescribable

Extension Methods

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