From c39a8c6d93e4e49edbfa4e84bf8cde9829731ef1 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 2 May 2021 00:32:03 +0000 Subject: [PATCH] Add info about caching items --- docs/cache_items.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/cache_items.md b/docs/cache_items.md index ff89a11..98f9274 100644 --- a/docs/cache_items.md +++ b/docs/cache_items.md @@ -4,4 +4,24 @@ ![a single trapped chest with three normal double chests under it](media/cache_items.png) +Mosfet will automatically dump items into the closest trapped chest once his +inventory gets full enough. Normally this is when the number of used inventory +slots is >= 27. +If Mosfet can't find a trapped chest nearby, he will place down a normal chest +if he has one in his inventory. Then he will store the items in it. + +Mosfet won't cache items related to his current job. For example, if he's +farming wood, he will keep axes, beds, chests, and food. + +### Advanced Details + +The global `g.minimum_cache_slots` in `bot.py` controls the minimum amount of +used slots needed to trigger item caching. + +In `jobs.py`, each job calls `items.set_wanted()` and `items.set_needed()` to +control which items Mosfet shouldn't cache. No items in the "needed" list will +be cached and all items in the "wanted" list—except for one stack of each—will +be cached. The "needed" list is meant for essentials like tools, food, and beds, +while the "wanted" list is for stuff that's good to have a stack of like seeds +and saplings.