From 3f5bc78910e14488c2dbedb25d153837410340d9 Mon Sep 17 00:00:00 2001 From: Matt Brockman Date: Thu, 14 Jan 2021 19:08:10 -0800 Subject: [PATCH] added inventory to readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 92ec07f..e378a65 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ The `state` variable can be used to store information that's persistent across f who should see the message. E.g., `[{ text: 'Only you can see this!', visibleTo: ['Sam', 'Jane']}]` * The `state.memory.context` value will replace the user defined memory if it exists * `state.displayStats` takes an array of objects [{key, value, color}] which will be displayed for users in the score section as [key]: [value] in the preferred color (defaults to user color). See https://github.com/latitudegames/Scripting/blob/master/examples/showTextLength.js for an example. +* `state.inventory` takes an array of objects [{name, quantity}] which will be make the inventory option available in the adventure menu (right). For now, this just displays all items and thier quantities from the inventory. +See https://github.com/latitudegames/Scripting/blob/master/examples/addSimpleInventory.js for an example. + * `state.currentRobot` is the currently assigned scoreBot. Changing this to an available bot will request that bot to do scoring. Available bots are [`KillBot`, `JudgeBot`, `EmpathyBot`, `SuccessBot`] - expect changes to the scoring on the bots as well as the messages produced by them. If the requested bot is unavailable no score changes will be returned. * You can set any variable on state to store and modify adventures throughout an adventure.