add a simple inventory
This commit is contained in:
parent
d1118f8230
commit
3055a7caac
1 changed files with 13 additions and 0 deletions
13
examples/addSimpleInventory.js
Normal file
13
examples/addSimpleInventory.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
// Checkout the repo examples to get an idea of other ways you can use scripting
|
||||||
|
// https://github.com/latitudegames/Scripting/blob/master/examples
|
||||||
|
|
||||||
|
const modifier = (text) => {
|
||||||
|
|
||||||
|
state.inventory = [{name: 'candy', quantity: 1}, {name: 'Turtles', quantity: 240}]
|
||||||
|
|
||||||
|
return { text }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't modify this part
|
||||||
|
modifier(text)
|
Reference in a new issue