Constructor


TreasureChest(x: any, y: any, properties: any)

Arguments:

x: any
y: any
properties: any




Methods




TreasureChest:onAdd(parent: any)

Handles making the chest remain appearing open when re-entering the room

Arguments:

parent: any


TreasureChest:onInteract(player: any, dir: any)

Handles opening the chest and giving the player their items

Arguments:

player: any
dir: any

Returns:

1: boolean



Fields


TreasureChest.item: string

[Property item] The name of the item contianed in this treasure chest - cannot be used in conjunction with money


TreasureChest.money: number

[Property money] The amount of money contained in this treasure chest - cannot be used in conjunction with item


TreasureChest.set_flag: string

[Property setflag] An optional flag to set when the treasure chest is opened


TreasureChest.set_value: any

[Property setvalue] The value to set on the flag specified by setflag (Defaults to true)





Undocumented