From 3055a7caac8496fd6f889f34d13855c81c73ab2b Mon Sep 17 00:00:00 2001 From: Matt Brockman Date: Thu, 14 Jan 2021 19:06:30 -0800 Subject: [PATCH] add a simple inventory --- examples/addSimpleInventory.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/addSimpleInventory.js diff --git a/examples/addSimpleInventory.js b/examples/addSimpleInventory.js new file mode 100644 index 0000000..3302b6b --- /dev/null +++ b/examples/addSimpleInventory.js @@ -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)