Class HolidayManager
Singleton plugin class that manages holidays. This class is responsible for checking if holidays are enabled and swapping out the current holiday.
To utilize this on the client create addressable override content following the name pattern of NormalName_HolidayName. For example if you wanted to
create a holiday for "Christmas" that changed the elk to reindeer you would create a new addressable override content called "Elk_Christmas". When no override
content is present the default content is used.
This system can also be utilized from Eco's modkit. Overridable content can also be loaded from a mod's AssetBundle. Create a GameObject with the same name
scheme in the mod's objects scene.
Inheritance
System.Object
HolidayManager
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public sealed class HolidayManager : Singleton<HolidayManager>, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IEditablePluginData, ISimplePluginData, IStorage, ISerializable
Constructors
HolidayManager()
Declaration
Properties
Config
Declaration
public HolidayConfig Config { get; }
Property Value
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
CurrentEvent
Declaration
public string CurrentEvent { get; }
Property Value
Type |
Description |
System.String |
|
EditObject
Declaration
public object EditObject { get; set; }
Property Value
Type |
Description |
System.Object |
|
Methods
GetCategory()
Declaration
public string GetCategory()
Returns
Type |
Description |
System.String |
|
GetDisplayText()
Declaration
public string GetDisplayText()
Returns
Type |
Description |
System.String |
|
GetStatus()
Declaration
public string GetStatus()
Returns
Type |
Description |
System.String |
|
Initialize(TimedTask)
Declaration
public void Initialize(TimedTask timer)
Parameters
OnEditObjectChanged(Object, String)
Called when the user changes the server settings for the holiday plugin.
Performs the normal config sav operation and checks if holidays are still enabled if they are not clears the current holiday.
Declaration
public void OnEditObjectChanged(object o, string param)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
System.String |
param |
|
Run()
Declaration
ShutdownAsync()
Declaration
public Task ShutdownAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods