Game.Simulation.TaxAreaType
Assembly:
Assembly-CSharp.dll
Namespace: Game.Simulation
Type:
public enum
Base:
System.Byte
Summary:
Enumeration that identifies the different tax-area categories used by the simulation to apply tax rates, policies and area-specific behavior. Values are stored as bytes and are typically used when tagging areas, lots or buildings for tax calculation, UI display and policy application in the Cities: Skylines 2 simulation.
Fields
-
None
Represents no tax area assigned (value = 0). Used when an area or object doesn't belong to any specific tax category. -
Residential
Tax area for residential zones/buildings (value = 1). Applied to living spaces when computing residential tax rules and rates. -
Commercial
Tax area for commercial zones/buildings (value = 2). Used for shops, services and business tax handling. -
Industrial
Tax area for industrial zones/buildings (value = 3). Used for factories, warehouses and other industrial tax logic. -
Office
Tax area for office zones/buildings (value = 4). Used for office buildings and related tax handling.
Properties
- This enum does not declare any properties. It provides named constant values with an underlying byte type.
Constructors
- Enums do not define constructors. The named values are compile-time constants with underlying type System.Byte.
Methods
- There are no custom methods defined on this enum. Standard System.Enum methods (ToString, Parse, HasFlag, etc.) are available for working with enum values.
Usage Example
// Read a byte value (for example from saved data) and cast to the enum
byte savedValue = 2;
Game.Simulation.TaxAreaType area = (Game.Simulation.TaxAreaType)savedValue;
// Use in code to decide tax logic
switch (area)
{
case Game.Simulation.TaxAreaType.Residential:
ApplyResidentialTax();
break;
case Game.Simulation.TaxAreaType.Commercial:
ApplyCommercialTax();
break;
case Game.Simulation.TaxAreaType.Industrial:
ApplyIndustrialTax();
break;
case Game.Simulation.TaxAreaType.Office:
ApplyOfficeTax();
break;
default:
ApplyDefaultTax();
break;
}
// Example: assign a tax area to a building data structure
void SetBuildingTaxArea(Building building, Game.Simulation.TaxAreaType taxArea)
{
building.TaxArea = (byte)taxArea; // stored as byte in underlying data
}