Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

LootTrait

const LootTrait: Trait<{ count: number; data: () => ItemData | undefined; id: string; item: string; radius: number; targets: () => TargetFilter; }>

A stack of an item lying in the world, taken into the bag of the nearest of its targets whose body comes within radius and has room, by default a character a player controls now. What no bag can take stays here. With an id, what is left of it is kept in LootLeftTrait for the save.