has(t: any, ...: string) → boolean
| arg | type | description |
|---|
| t | any | |
| ... | string | |
recognise(mod: any) → string
What a kit module is, by its shape: "inventory", "items", "clock", "clockState", "save", "interact", "dialogue", or nil.
use(list: any) → void
Hand kit modules to friendshipKit: a list of modules (recognised by shape) or a map { inventory = Inv, clock = Clock, ... }. false in a map forgets one. Returns the names now in use.
| arg | type | description |
|---|
| list | any | |
inUse( ) → void
The names of the kits in use.
kit(name: string) → any
A kit module handed over by name ("inventory", "clock", ...), or nil.
| arg | type | description |
|---|
| name | string | |
reset( ) → void
Forget every kit handed over.
count(id: string) → void
| arg | type | description |
|---|
| id | string | |
take(id: string, n: number?) → void
| arg | type | description |
|---|
| id | string | |
| n | number? | |
give(id: string, n: number?) → void
| arg | type | description |
|---|
| id | string | |
| n | number? | |
count(id: string) → void
| arg | type | description |
|---|
| id | string | |
take(id: string, n: number?) → void
| arg | type | description |
|---|
| id | string | |
| n | number? | |
give(id: string, n: number?) → void
| arg | type | description |
|---|
| id | string | |
| n | number? | |
name(id: string) → void
| arg | type | description |
|---|
| id | string | |
tags(id: string) → void
| arg | type | description |
|---|
| id | string | |
items(custom: any?) → any
The items source to use: the game's own (setup's `items`), else inventoryKit when handed over, else the kit's own bag. Always has count and take; give, list, name and tags may be missing on a game's own source.
| arg | type | description |
|---|
| custom | any? | |
clock( ) → any
worldClockKit's clock when it was handed over (and, when its state module was handed over too, a WorldClock runs), else nil.
clockDate( ) → any
Today's date from worldClockKit: { season, day, year, dayIndex, source = "worldClockKit" }, or nil without a clock.
save( ) → any
saveKit's Save module when it was handed over and has loaded this player's profile, else nil.
peer( ) → number
This peer's multiplayer id (0 when not connected).