Class EraDefinition
Serializable description of a calendar era (a named span of years such as "4E", "Year of the Dragon", or "Age of Myth"). The Phase 2 implementation matches eras by year range; the ConditionProvider field is reserved for a future predicate-driven era mode that supersedes year-range matching when assigned.
Inherited Members
Namespace: Scylla.Core.Time
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public sealed class EraDefinition
Constructors
EraDefinition()
Default constructor for serialization.
Declaration
public EraDefinition()
EraDefinition(string, int, int)
Code-only constructor used by tests and built-in calendar presets.
Declaration
public EraDefinition(string name, int startYear, int endYear = 2147483647)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| int | startYear | |
| int | endYear |
Properties
ConditionProvider
Reserved condition provider. Returns the assigned ScriptableObject cast to
IEraConditionProvider, or null if no provider is assigned or
the assigned object does not implement the interface. Currently always null
because no implementations of the interface exist yet.
Declaration
public IEraConditionProvider ConditionProvider { get; }
Property Value
| Type | Description |
|---|---|
| IEraConditionProvider |
EndYear
Inclusive end year. MaxValue means open-ended.
Declaration
public int EndYear { get; }
Property Value
| Type | Description |
|---|---|
| int |
Name
Display name for the era.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
StartYear
Inclusive start year.
Declaration
public int StartYear { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
ContainsYear(int)
Declaration
public bool ContainsYear(int year)
Parameters
| Type | Name | Description |
|---|---|---|
| int | year |
Returns
| Type | Description |
|---|---|
| bool |