/tg/ Station 13 - Modules - TypesVar Details - Proc Details

give_turf_traits

A bespoke element that adds a set of traits to the turf while occupied by at least one attached movabled.

Vars

trait_sourcesList of sources we are using to reapply traits when turf changes
traitsA list of traits that are added to the turf while occupied.

Procs

add_to_occupied_turfsRegisters the turf signals if it was previously unoccupied and adds it to the list of occupied turfs. Otherwise, it just adds the movable to the assoc value of lists occupying the turf.
on_movedRemoves the trait from the old turf and adds it to the new one.
pre_change_turfSignals are carried over when the turf is changed, but traits aren't, so they've to be readded post-change.
remove_from_occupied_turfsUnregisters the turf signals if it's no longer unoccupied and removes it from the list of occupied turfs. Otherwise, it just removes the movable from the assoc value of lists occupying the turf.
reoccupy_turfReapply turf traits to the provided turf

Var Details

trait_sources

List of sources we are using to reapply traits when turf changes

traits

A list of traits that are added to the turf while occupied.

Proc Details

add_to_occupied_turfs

Registers the turf signals if it was previously unoccupied and adds it to the list of occupied turfs. Otherwise, it just adds the movable to the assoc value of lists occupying the turf.

on_moved

Removes the trait from the old turf and adds it to the new one.

pre_change_turf

Signals are carried over when the turf is changed, but traits aren't, so they've to be readded post-change.

remove_from_occupied_turfs

Unregisters the turf signals if it's no longer unoccupied and removes it from the list of occupied turfs. Otherwise, it just removes the movable from the assoc value of lists occupying the turf.

reoccupy_turf

Reapply turf traits to the provided turf