Show / Hide Table of Contents

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
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
IEditablePluginData
ISimplePluginData
IStorage
ISerializable
Namespace: Eco.Gameplay.Holidays
Assembly: Eco.Gameplay.dll
Syntax
public sealed class HolidayManager : Singleton<HolidayManager>, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IEditablePluginData, ISimplePluginData, IStorage, ISerializable

Constructors

HolidayManager()

Declaration
public HolidayManager()

Properties

Config

Declaration
public HolidayConfig Config { get; }
Property Value
Type Description
HolidayConfig

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
Type Name Description
TimedTask timer

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
public void Run()

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

IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
IEditablePluginData
ISimplePluginData
IStorage
ISerializable

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
☀
☾