Game.Prefabs.TerraformingType
Assembly:
Assembly-CSharp (game assembly for Cities: Skylines 2)
Namespace:
Game.Prefabs
Type:
public enum
Base:
System.Enum (underlying type: System.Int32)
Summary:
Represents the different terraforming operations/tools available for modifying terrain in the game. Use this enum to select the behavior of a terraforming tool or to interpret saved prefab/tool settings. The members have the default integral values: Shift = 0, Level = 1, Soften = 2, Slope = 3.
Fields
-
Shift
Represents a "shift" operation — moves terrain up or down (offsetting heights). -
Level
Represents a "level" operation — flattens terrain to a constant target height. -
Soften
Represents a "soften" (smooth) operation — reduces sharp height variations to create smoother terrain. -
Slope
Represents a "slope" operation — creates or enforces a slope/tilt across terrain (used to form angled surfaces).
Properties
None
Enums do not define instance properties. Use the enum value directly (e.g., TerraformingType.Level) to select behavior.
Constructors
None (compiler-generated)
Enums do not have user-defined constructors. The runtime provides the underlying value-type behavior automatically.
Methods
None
No instance methods are defined on this enum. Use typical enum operations (comparison, switch statements, casting to/from int) as needed.
Usage Example
using Game.Prefabs;
public class TerraformTool
{
public TerraformingType Mode { get; set; } = TerraformingType.Shift;
public float TargetHeight { get; set; }
public void Apply(TerrainData terrain)
{
switch (Mode)
{
case TerraformingType.Shift:
// offset terrain heights
break;
case TerraformingType.Level:
// set terrain heights to TargetHeight
break;
case TerraformingType.Soften:
// smooth terrain
break;
case TerraformingType.Slope:
// create slope towards a direction/angle
break;
}
}
}