Kartik Scripts

Buildings & Multi-Unit Entrances

Buildings & Multi-Unit Entrances

Several properties can share one entrance, an apartment building, a motel, a condo. Kartik Properties handles this automatically with buildings, a unit picker, and a searchable building directory for large blocks.


Buildings (automatic grouping)

Units whose entrances sit at the same door (within ~10 cm) are automatically grouped into a building. There's no manual key to manage, the building ID is auto-assigned.

  • Grouping is purely coordinate-based, mirrored on client and server, so what you see at the door matches how the tablet groups units.
  • Existing properties are back-filled into buildings on load (clustered by entrance); the building name defaults to the first unit's label at that door.
  • Entrances placed a metre or more apart are separate doors on purpose (buzzer-panel style) and don't group.

Building Inventory (management)

Both hubs group their stock by building:

  • Block mode: Company → Property Inventory shows building cards; click a building to drill into its unit cards. Search/sort by building name.
  • Classic mode: Job Hub → Building Inventory, same grouping.

Adding units to a building

You can expand a building with more units (e.g. more motel rooms):

  • Per-building "+ Add units" clones a template unit at the building's door.
  • Gated by BUILD_PROPERTY, clamped by the interior allotment and available society/treasury funds (each unit charges the construction cost).

At the door, the unit picker

When you approach a shared entrance:

  • Press E → a unit picker context menu lists the units at that door (sorted by unit number), each with Enter / Knock / Lock / Manage and a lock-state icon. Your own residence is highlighted.
  • Door actions from the radial/keybind (Lock/Unlock, Lockpick) are unit-aware: with one unit they act directly; with several they ask which unit first. The server owns every authority check.

Big buildings, the searchable directory

Shared entrances with more than 12 units (UNIT_PICKER_MAX) would make a context menu unusable, so they instead open a building directory in the tablet:

  • A searchable, paginated list of every unit, your own units first.
  • Each row shows label, unit number, listing status, lock state, and whether it's a walk-in.
  • Actions (enter / knock / lock / manage) dispatch straight back to the world.

Blips

Owned/leased properties show map blips, grouped by the same entrance key one blip per door, named "<label> · N units" when a door carries several of your units. Owned styling wins over leased on a mixed pin. Configure blips in shared/zones.lua.

On this page