Game.Buildings.LocalModifierType
Assembly: Game
Namespace: Game.Buildings
Type: enum
Base: System.Enum (underlying type: System.Int32)
Summary:
Enumeration describing local modifier types that can be applied to buildings, zones or local simulation contexts. These modifiers represent gameplay-affecting parameters such as crime accumulation, forest fire characteristics, and citizen wellbeing/health. Modders can use this enum to identify which local effect to query or apply in building/zone logic, save/load data, or UI displays.
Fields
-
CrimeAccumulation
Represents modifiers that affect how quickly crime accumulates locally (rate of criminal activity or detection). Use this to influence policement/dispatch logic, crime probability calculations or to drive UI indicators for safety. -
ForestFireResponseTime
Represents modifiers that change the response time to forest fires in a local area. Affects how quickly firefighting resources are considered to arrive or how long the fire grows before suppression begins. -
ForestFireHazard
Represents modifiers that affect the hazard level or likelihood/severity of forest fires. Can be used to scale fire spread, ignition probability, or intensity in local fire simulation. -
Wellbeing
Represents modifiers affecting general citizen wellbeing or happiness metrics at a local level. Can be used to adjust satisfaction, services demand, or to feed into other simulation systems that depend on wellbeing. -
Health
Represents modifiers that alter local health-related characteristics (disease spread, healthcare demand, recovery rates). Use this to modify how health services are consumed or how health-related events propagate.
Note: enum values are assigned sequentially starting at 0 unless explicitly set. If you need stable values across saves and versions, assign explicit integer values when extending this enum.
Properties
- (No explicit properties defined on this enum.)
Standard enum backing field:public int value__
(inherited from System.Enum / System.ValueType).
Constructors
- (No user-defined constructors.)
Enums are value types with an implicit default constructor. Underlying integer values can be cast to/from this enum type: - Implicit ordinal assignment: first member = 0, next = 1, etc.
- Recommended: if you might extend the enum later, assign explicit integer values to preserve save compatibility.
Methods
- (No instance methods beyond those provided by System.Enum / System.Object.)
Common useful methods: ToString()
— get the name of the enum member.Enum.Parse(typeof(LocalModifierType), string)
/Enum.TryParse<T>
— parse from string.HasFlag
— not typically used for non-flags enums (this enum is not defined with [Flags]).
Usage Example
// Example: apply behavior based on a local modifier type
void ApplyLocalModifier(LocalModifierType modifier, float magnitude)
{
switch (modifier)
{
case LocalModifierType.CrimeAccumulation:
// e.g. increase local crime accumulation rate by 'magnitude'
// CrimeManager.Instance.ModifyAccumulation(localAreaId, magnitude);
break;
case LocalModifierType.ForestFireResponseTime:
// e.g. shorten or lengthen fire response time
// FireManager.Instance.ModifyResponseTime(localAreaId, magnitude);
break;
case LocalModifierType.ForestFireHazard:
// e.g. increase fire hazard probability
// FireManager.Instance.ModifyHazard(localAreaId, magnitude);
break;
case LocalModifierType.Wellbeing:
// e.g. adjust wellbeing score for residents in the area
// WellbeingManager.Instance.ModifyWellbeing(localAreaId, magnitude);
break;
case LocalModifierType.Health:
// e.g. change health-related parameters like disease spread or recovery
// HealthManager.Instance.ModifyHealth(localAreaId, magnitude);
break;
}
}
Additional notes for modders: - When storing enum values in save files or serialized data, prefer explicit integer assignments if you expect to add new members later to avoid breaking compatibility. - This enum is a semantic identifier only — actual effects must be implemented by hooking into relevant managers/systems in the game (crime, fire, wellbeing, health).