OptionalcanOptional pre-add veto. Return { ok: false, reason } to block.
OptionalcanRecursive contents: every Containable reachable from this
Container, including descendants of nested Containers. Walked
depth-first pre-order, so a child appears immediately after its
parent. Containment is acyclic by construction (a Container
can't contain its own ancestor — Containable.setContainer
enforces it), so no cycle protection is needed.
Used by MQL's :I deep-inventory transform; equally available
to controllers that want every nested item without writing the
recursion themselves.
OptionalonOptionalon
Public shape provided by ContainerMixin.
The optional Witness methods (
canAddContainable,canRemoveContainable,onContainableAdded,onContainableRemoved) fire fromContainmentApi.move. Implement only the ones you care about; absence is treated as "no opinion."