Class SpoilageItem
A durability item that can spoil, like food and flowers.
Inheritance
System.Object
SpoilageItem
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public abstract class SpoilageItem : DurabilityItem, IItem, ILinkableParameterized<LinkConfig>, ILinkable, IHasIcon, IController, IViewController, IHasUniversalID, INotifyPropertyChanged
Constructors
SpoilageItem()
Declaration
Properties
BaseShelfLife
Declaration
public abstract float BaseShelfLife { get; }
Property Value
| Type |
Description |
| System.Single |
|
DefaultMinRequiredDurabilityInTradeOffers
Declaration
public override float DefaultMinRequiredDurabilityInTradeOffers { get; }
Property Value
| Type |
Description |
| System.Single |
|
Overrides
SpoilageTime
Declaration
public ImmutableCountdown SpoilageTime { get; set; }
Property Value
Methods
Clone()
Declaration
public override Item Clone()
Returns
Overrides
GetDurability()
Declaration
public override float GetDurability()
Returns
| Type |
Description |
| System.Single |
|
Overrides
GetSpoilageTimeBasedOnDurability(Single, Boolean)
Create a new immutable countdown based on the given durability value and the current storage modifier.
Declaration
public ImmutableCountdown GetSpoilageTimeBasedOnDurability(float durability, bool paused = false)
Parameters
| Type |
Name |
Description |
| System.Single |
durability |
|
| System.Boolean |
paused |
|
Returns
SetDurability(Single)
Declaration
public override void SetDurability(float d)
Parameters
| Type |
Name |
Description |
| System.Single |
d |
|
Overrides
SetSpoilageTimeBasedOnDurability(Single)
Declaration
public void SetSpoilageTimeBasedOnDurability(float durability)
Parameters
| Type |
Name |
Description |
| System.Single |
durability |
|
UpdateSpoilageTime(Single)
Sets the spoilage time based on durability or updates the durability with spoilage progress if the storage is still the same.
Declaration
public void UpdateSpoilageTime(float shelfLifeMultiplier = 1F)
Parameters
| Type |
Name |
Description |
| System.Single |
shelfLifeMultiplier |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods