The bread and butter of every good city are, of course, buildings.
In CCBK Buildings do not define any actual behavior.
Instead they act as containers for components and addons that can be placed on the map.

Global properties of buildings like name, size, prefab and access type are stored in a ScriptableObject called BuildingInfo.

give buildings that spawn roamers a preferred access point to avoid annoying scenarios where roamers spawn wrong because a road was added

A system deeply embedded in buildings is the ability to replace them.
This can be used to change a buildings appearance and behavior by replacing it with another.

useful for evolving housing, upgradable towers, …

Anything interacting with a Building or one of its parts should not directly carry a reference to it. Instead a BuildingReference can be used which updates its reference when the building is replaced.

The different building parts can either interact directly of through the buildings efficiency.

eg farms growing wheat quicker based on land fertility or storages not accepting wares without enough workers

The efficiency is expressed through two values. IsWorking[bool] is meant to indicate whether the building is generally working or somehow disrupted. The Efficiency[float] expresses how well the building is working from 0-1.

An important field of the Building Component is the Pivot. The Pivot is a transform in the center and root of the Building. It is used to transform and rotate the Building and to place bars and other visuals over the building. If any of these things go wrong check that the Pivot is correctly assigned.

Core Building Components

High level overview of the core building components of CCBK and their walkers, mouse over a component for a short explanation.