# phtn-gaming/ultimateproptool architecture

> Architecture diagram of the GitHub repository phtn-gaming/ultimateproptool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/phtn-gaming/ultimateproptool
- Repository: https://github.com/phtn-gaming/ultimateproptool

## Overview

Ultimate Prop Tool is a Cities: Skylines 1 mod for laying out and placing props, trees, and decals along editable paths. Players select an asset, choose a path mode, draw and adjust a preview, then commit or copy-place it; the main tool coordinates generation and placement. The map includes documented capabilities whose detailed implementation was not sampled; those links are documented rather than inferred from naming. Source excerpts and the SOURCE INDEX support the internal call relationships shown.

Main entry points: [`Code/Tool/PropLineToolReborn.cs`](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/PropLineToolReborn.cs) (Placement tool), [`Code/UI/ToolPanel.cs`](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolPanel.cs) (Tool panel), [`Code/Mod.cs`](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Mod.cs) (Mod bootstrap), [`Code/UI/SettingsPreview.cs`](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/SettingsPreview.cs) (Settings previews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Mod lifecycle and settings"]
  node_mod["Mod bootstrap<br/>[Mod.cs]"]
  node_settings[("Saved settings<br/>[ModSettings.cs]")]
  node_localization["Localization<br/>[Localization.cs]"]
  node_product["Product metadata<br/>[ProductInfo.cs]"]
end

subgraph group_interaction["Tool interaction"]
  node_tool["Placement tool"]
  node_escape["Escape policy<br/>[EscapePolicy.cs]"]
  node_fencespacing["Fence spacing state"]
  node_previewitem["Preview item<br/>[PreviewItem.cs]"]
  node_spatial["Placement checks"]
end

subgraph group_geometry["Path and placement geometry"]
  node_straight["Straight layout"]
  node_curve["Curved layout<br/>[CurveLineLayout.cs]"]
  node_multicurve["Freeform layout"]
  node_circle["Circle layout"]
  node_fence["Fence layout<br/>[FenceLineLayout.cs]"]
  node_editing["Editing geometry<br/>[EditingGeometry.cs]"]
  node_elevation["Elevation layout<br/>[ElevationLayout.cs]"]
  node_footprint["Placement footprint"]
  node_intersection["Footprint intersection"]
  node_grid["Position grid"]
  node_fenceprefab["Fence prefab geometry"]
end

subgraph group_interface["User interface"]
  node_panel["Tool panel<br/>[ToolPanel.cs]"]
  node_selection["Tool selection monitor"]
  node_shortcuts["Keyboard shortcuts"]
  node_toolbar["Toolbar layout<br/>[ToolbarLayout.cs]"]
  node_settingslayout["Settings layout<br/>[SettingsLayout.cs]"]
  node_settingspreview["Settings previews<br/>[SettingsPreview.cs]"]
  node_icons["Icon atlas<br/>[IconAtlas.cs]"]
  node_font["UI font<br/>[UiFont.cs]"]
  node_viewport["Panel viewport<br/>[PanelViewport.cs]"]
  node_assetname["Asset display name"]
  node_compatibility["Compatibility status"]
end

node_player(("Player"))
node_game["Cities: Skylines"]

node_player -->|"uses mod in"| node_game
node_mod -->|"initializes"| node_settings
node_mod -->|"creates"| node_panel
node_mod -->|"initializes"| node_icons
node_mod -->|"adds previews"| node_settingspreview
node_mod -->|"configures"| node_tool
node_tool -->|"reads settings"| node_settings
node_tool -->|"gets text"| node_localization
node_tool -->|"delegates to"| node_escape
node_tool -->|"uses state"| node_fencespacing
node_tool -->|"uses items"| node_previewitem
node_tool -->|"generates layout"| node_straight
node_tool -->|"generates layout"| node_curve
node_tool -->|"generates layout"| node_multicurve
node_tool -->|"generates layout"| node_circle
node_tool -->|"generates layout"| node_fence
node_tool -->|"uses geometry"| node_editing
node_tool -->|"calculates heights"| node_elevation
node_tool -->|"checks placement"| node_spatial
node_tool -->|"uses footprint"| node_footprint
node_tool -->|"uses positions"| node_grid
node_tool -->|"uses geometry"| node_fenceprefab
node_spatial -->|"reads footprint"| node_footprint
node_spatial -->|"checks overlap"| node_intersection
node_fence -->|"measures curves"| node_curve
node_fence -->|"uses item limit"| node_straight
node_curve -->|"uses item limit"| node_straight
node_multicurve -->|"uses layout"| node_straight
node_multicurve -->|"uses curves"| node_curve
node_multicurve -->|"uses fence layout"| node_fence
node_panel -->|"controls"| node_tool
node_panel -->|"reads settings"| node_settings
node_panel -->|"gets text"| node_localization
node_panel -->|"creates viewport"| node_viewport
node_panel -->|"uses layout"| node_toolbar
node_panel -->|"shows names"| node_assetname
node_panel -->|"shows status"| node_compatibility
node_panel -->|"uses sprites"| node_icons
node_selection -->|"notifies selection"| node_tool
node_selection -->|"updates panel"| node_panel
node_shortcuts -->|"dispatches input"| node_tool
node_settingslayout -->|"uses preview"| node_settingspreview
node_settingspreview -->|"uses sprites"| node_icons
node_settingspreview -->|"uses font"| node_font
node_settingspreview -->|"previews layout"| node_toolbar
node_mod -->|"configures language"| node_localization
node_mod -->|"uses identity"| node_product
node_player -->|"draws and edits"| node_tool

click node_mod "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Mod.cs"
click node_settings "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/ModSettings.cs"
click node_localization "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Localization.cs"
click node_product "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/ProductInfo.cs"
click node_tool "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/PropLineToolReborn.cs"
click node_escape "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/EscapePolicy.cs"
click node_fencespacing "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/FenceSpacingState.cs"
click node_previewitem "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/PreviewItem.cs"
click node_spatial "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/SpatialPlacementChecks.cs"
click node_straight "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/StraightLineLayout.cs"
click node_curve "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/CurveLineLayout.cs"
click node_multicurve "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/MultiCurveLineLayout.cs"
click node_circle "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/CircleLineLayout.cs"
click node_fence "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/FenceLineLayout.cs"
click node_editing "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/EditingGeometry.cs"
click node_elevation "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/ElevationLayout.cs"
click node_footprint "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/PlacementFootprint.cs"
click node_intersection "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/FootprintIntersection.cs"
click node_grid "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/VanillaPositionGrid.cs"
click node_fenceprefab "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/FencePrefabGeometry.cs"
click node_panel "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolPanel.cs"
click node_selection "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolSelectionMonitor.cs"
click node_shortcuts "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolKeyShortcuts.cs"
click node_toolbar "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolbarLayout.cs"
click node_settingslayout "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/SettingsLayout.cs"
click node_settingspreview "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/SettingsPreview.cs"
click node_icons "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/IconAtlas.cs"
click node_font "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/UiFont.cs"
click node_viewport "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/PanelViewport.cs"
click node_assetname "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/AssetDisplayName.cs"
click node_compatibility "https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/CompatibilityStatus.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mod,node_settings,node_localization,node_product toneBlue
class node_tool,node_escape,node_fencespacing,node_previewitem,node_spatial toneAmber
class node_straight,node_curve,node_multicurve,node_circle,node_fence,node_editing,node_elevation,node_footprint,node_intersection,node_grid,node_fenceprefab toneMint
class node_panel,node_selection,node_shortcuts,node_toolbar,node_settingslayout,node_settingspreview,node_icons,node_font,node_viewport,node_assetname,node_compatibility toneRose
class node_player,node_game toneIndigo
```

## Components

### Mod lifecycle and settings

- [Mod bootstrap](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Mod.cs): `Code/Mod.cs`
- [Saved settings](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/ModSettings.cs): `Code/ModSettings.cs`
- [Localization](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Localization.cs): `Code/Localization.cs`
- [Product metadata](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/ProductInfo.cs): `Code/ProductInfo.cs`

### Tool interaction

- [Placement tool](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/PropLineToolReborn.cs): `Code/Tool/PropLineToolReborn.cs`
- [Escape policy](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/EscapePolicy.cs): `Code/Tool/EscapePolicy.cs`
- [Fence spacing state](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/FenceSpacingState.cs): `Code/Tool/FenceSpacingState.cs`
- [Preview item](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/PreviewItem.cs): `Code/Tool/PreviewItem.cs`
- [Placement checks](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Tool/SpatialPlacementChecks.cs): `Code/Tool/SpatialPlacementChecks.cs`

### Path and placement geometry

- [Straight layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/StraightLineLayout.cs): `Code/Geometry/StraightLineLayout.cs`
- [Curved layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/CurveLineLayout.cs): `Code/Geometry/CurveLineLayout.cs`
- [Freeform layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/MultiCurveLineLayout.cs): `Code/Geometry/MultiCurveLineLayout.cs`
- [Circle layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/CircleLineLayout.cs): `Code/Geometry/CircleLineLayout.cs`
- [Fence layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/FenceLineLayout.cs): `Code/Geometry/FenceLineLayout.cs`
- [Editing geometry](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/EditingGeometry.cs): `Code/Geometry/EditingGeometry.cs`
- [Elevation layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/ElevationLayout.cs): `Code/Geometry/ElevationLayout.cs`
- [Placement footprint](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/PlacementFootprint.cs): `Code/Geometry/PlacementFootprint.cs`
- [Footprint intersection](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/FootprintIntersection.cs): `Code/Geometry/FootprintIntersection.cs`
- [Position grid](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/VanillaPositionGrid.cs): `Code/Geometry/VanillaPositionGrid.cs`
- [Fence prefab geometry](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/Geometry/FencePrefabGeometry.cs): `Code/Geometry/FencePrefabGeometry.cs`

### User interface

- [Tool panel](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolPanel.cs): `Code/UI/ToolPanel.cs`
- [Tool selection monitor](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolSelectionMonitor.cs): `Code/UI/ToolSelectionMonitor.cs`
- [Keyboard shortcuts](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolKeyShortcuts.cs): `Code/UI/ToolKeyShortcuts.cs`
- [Toolbar layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/ToolbarLayout.cs): `Code/UI/ToolbarLayout.cs`
- [Settings layout](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/SettingsLayout.cs): `Code/UI/SettingsLayout.cs`
- [Settings previews](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/SettingsPreview.cs): `Code/UI/SettingsPreview.cs`
- [Icon atlas](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/IconAtlas.cs): `Code/UI/IconAtlas.cs`
- [UI font](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/UiFont.cs): `Code/UI/UiFont.cs`
- [Panel viewport](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/PanelViewport.cs): `Code/UI/PanelViewport.cs`
- [Asset display name](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/AssetDisplayName.cs): `Code/UI/AssetDisplayName.cs`
- [Compatibility status](https://github.com/phtn-gaming/ultimateproptool/blob/main/Code/UI/CompatibilityStatus.cs): `Code/UI/CompatibilityStatus.cs`

### Other components

- **Player**
- **Cities: Skylines**

## Connections

- Player → Cities: Skylines: uses mod in (evidence: `README.md`)
- Mod bootstrap → Saved settings: initializes (evidence: `Code/Mod.cs`)
- Mod bootstrap → Tool panel: creates (evidence: `Code/Mod.cs`)
- Mod bootstrap → Icon atlas: initializes (evidence: `Code/Mod.cs`)
- Mod bootstrap → Settings previews: adds previews (evidence: `Code/Mod.cs`)
- Mod bootstrap → Placement tool: configures (evidence: `Code/Mod.cs`)
- Placement tool → Saved settings: reads settings (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Localization: gets text (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Escape policy: delegates to (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Fence spacing state: uses state (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Preview item: uses items (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Straight layout: generates layout (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Curved layout: generates layout (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Freeform layout: generates layout (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Circle layout: generates layout (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Fence layout: generates layout (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Editing geometry: uses geometry (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Elevation layout: calculates heights (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Placement checks: checks placement (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Placement footprint: uses footprint (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Position grid: uses positions (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement tool → Fence prefab geometry: uses geometry (evidence: `Code/Tool/PropLineToolReborn.cs`)
- Placement checks → Placement footprint: reads footprint (evidence: `Code/Tool/SpatialPlacementChecks.cs`)
- Placement checks → Footprint intersection: checks overlap (evidence: `Code/Tool/SpatialPlacementChecks.cs`)
- Fence layout → Curved layout: measures curves (evidence: `Code/Geometry/FenceLineLayout.cs`)
- Fence layout → Straight layout: uses item limit (evidence: `Code/Geometry/FenceLineLayout.cs`)
- Curved layout → Straight layout: uses item limit (evidence: `Code/Geometry/CurveLineLayout.cs`)
- Freeform layout → Straight layout: uses layout (evidence: `Code/Geometry/MultiCurveLineLayout.cs`)
- Freeform layout → Curved layout: uses curves (evidence: `Code/Geometry/MultiCurveLineLayout.cs`)
- Freeform layout → Fence layout: uses fence layout (evidence: `Code/Geometry/MultiCurveLineLayout.cs`)
- Tool panel → Placement tool: controls (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Saved settings: reads settings (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Localization: gets text (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Panel viewport: creates viewport (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Toolbar layout: uses layout (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Asset display name: shows names (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Compatibility status: shows status (evidence: `Code/UI/ToolPanel.cs`)
- Tool panel → Icon atlas: uses sprites (evidence: `Code/UI/ToolPanel.cs`)
- Tool selection monitor → Placement tool: notifies selection (evidence: `Code/UI/ToolSelectionMonitor.cs`)
- Tool selection monitor → Tool panel: updates panel (evidence: `Code/UI/ToolSelectionMonitor.cs`)
- Keyboard shortcuts → Placement tool: dispatches input (evidence: `Code/UI/ToolKeyShortcuts.cs`)
- Settings layout → Settings previews: uses preview (evidence: `Code/UI/SettingsLayout.cs`)
- Settings previews → Icon atlas: uses sprites (evidence: `Code/UI/SettingsPreview.cs`)
- Settings previews → UI font: uses font (evidence: `Code/UI/SettingsPreview.cs`)
- Settings previews → Toolbar layout: previews layout (evidence: `Code/UI/SettingsPreview.cs`)
- Mod bootstrap → Localization: configures language (evidence: `Code/Mod.cs`)
- Mod bootstrap → Product metadata: uses identity (evidence: `Code/Mod.cs`)
- Player → Placement tool: draws and edits (evidence: `README.md`)
