Skip to content

Commit cd8d54d

Browse files
committed
docs: document decay + upkeep in item-data READMEs (6b)
1 parent cdd50c4 commit cd8d54d

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The bot is live: it pairs with Rust+ over FCM, holds a socket per server, and
1010
auto-provisions its own Discord channels. Pairing/connection, the chat bridge,
1111
in-game `!commands` and slash surfaces, live map events, map rendering, smart
1212
devices (switches, alarms, storage monitors), and an offline item database with
13-
recycle/craft/research calculators are all shipped. Cameras are next.
13+
recycle/craft/research/decay/upkeep calculators are all shipped. Cameras are next.
1414

1515
## Features
1616

@@ -48,14 +48,14 @@ configurable per-server prefix (default `!`) and per-command cooldowns:
4848
- **Server**`!pop`, `!time`, `!wipe`
4949
- **Team**`!online`, `!offline`, `!team`, `!alive`, `!steamid [name]`, `!prox [name]`
5050
- **Live events**`!cargo`, `!heli`, `!chinook`, `!small`, `!large`, `!events`
51-
- **Items**`!item`, `!recycle`, `!craft`, `!research` (name or id)
51+
- **Items**`!item`, `!recycle`, `!craft`, `!research`, `!decay`, `!upkeep` (name or id)
5252
- **Control**`!mute` / `!unmute` (gate all bot→game output)
5353

5454
### Slash commands
5555

5656
- **Server data** (ephemeral, with a `server` selector when several are paired) —
5757
`/pop`, `/time`, `/wipe`, `/online`, `/offline`, `/team`, `/alive`, `/small`, `/large`
58-
- **Items** (ephemeral) — `/item`, `/recycle`, `/craft`, `/research` (name or id)
58+
- **Items** (ephemeral) — `/item`, `/recycle`, `/craft`, `/research`, `/decay`, `/upkeep` (name or id)
5959
- **Utility**`/help`, `/uptime`, `/leader` (Manage Server — transfer in-game team leadership)
6060
- **Admin**`/setup`, `/workspace reset`, `/workspace simulate-server`
6161

@@ -75,8 +75,9 @@ configurable per-server prefix (default `!`) and per-command cooldowns:
7575
### Item database & calculators
7676

7777
- An **offline, versioned item dataset** (bundled, ~1200 items) behind one
78-
lookup seam, exposing four calculators both in-game and as ephemeral slash
79-
commands: item info, recycler yields, craft recipes, and research scrap cost.
78+
lookup seam, exposing six calculators both in-game and as ephemeral slash
79+
commands: item info, recycler yields, craft recipes, research scrap cost,
80+
decay time, and building-block upkeep cost.
8081
- **Name-or-id lookup** — type a name (case-insensitive, partial), an exact name,
8182
or a numeric id; multiple matches return a short "did you mean" list.
8283
- **Provenance-aware** — each result footers the date its data was sourced, and a
@@ -127,7 +128,7 @@ See [docs/development/running-locally.md](docs/development/running-locally.md).
127128
| `RustPlusBot.Features.Commands` | In-game `!commands`, slash surfaces, `/help`/`/leader` |
128129
| `RustPlusBot.Features.Events` | Live map-event classification + `#events` feed |
129130
| `RustPlusBot.Features.Map` | Map image rendering with toggleable layers |
130-
| `RustPlusBot.Features.ItemData` | Bundled item dataset, lookup seam, recycle/craft/research data |
131+
| `RustPlusBot.Features.ItemData` | Bundled item dataset, lookup seam, recycle/craft/research/decay/upkeep data |
131132
| `RustPlusBot.Host` | Generic Host entry point, DI wiring, startup validation |
132133

133134
The `tools/` folder holds maintainer utilities that are not part of the running
@@ -147,7 +148,7 @@ Subsystems are built in order; each has its own spec → plan → build cycle.
147148
| 3 | Chat bridge + `!commands` + slash surfaces | Done |
148149
| 4 | Smart devices (switches, alarms, storage monitors) | Done |
149150
| 5 | Cameras | Planned |
150-
| 6 | Item database & calculators (recycle/craft/research) | In progress |
151+
| 6 | Item database & calculators (recycle/craft/research/decay/upkeep) | In progress |
151152

152153
## License
153154

tools/RustPlusBot.ItemData.Generator/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A maintainer CLI that regenerates the embedded Rust item dataset
44
(`src/RustPlusBot.Features.ItemData/Data/item-data.json`) consumed by the bot's
5-
`/item`, `/recycle`, `/craft`, and `/research` calculators.
5+
`/item`, `/recycle`, `/craft`, `/research`, `/decay`, and `/upkeep` calculators.
66

77
This tool is **not** part of the running bot — it is referenced by nothing in
88
the application graph. It exists so the bundled item data can be refreshed when
@@ -13,11 +13,11 @@ Rust updates, rather than shipping a frozen copy that silently rots.
1313
The reference data has two very different freshness profiles:
1414

1515
- **Item names / ids** are well maintained and current.
16-
- **Calculator data** (recycle yields, craft recipes, research costs) is sourced
17-
from rustlabs and tends to lag game updates.
16+
- **Calculator data** (recycle yields, craft recipes, research costs, decay
17+
times, upkeep costs) is sourced from rustlabs and tends to lag game updates.
1818

1919
So the dataset carries per-section provenance dates (`Sources.NamesAsOf`,
20-
`RecycleAsOf`, `CraftAsOf`, `ResearchAsOf`), surfaced to users as a
20+
`RecycleAsOf`, `CraftAsOf`, `ResearchAsOf`, `DecayAsOf`, `UpkeepAsOf`), surfaced to users as a
2121
"data as of `<date>`" footer, and this tool can re-emit a fresh snapshot on
2222
demand. It **validates loudly and refuses to overwrite a good bundle with
2323
garbage** if the upstream shape drifts.
@@ -35,12 +35,16 @@ garbage** if the upstream shape drifts.
3535
| `rustlabsRecycleData.json` | recycler yields |
3636
| `rustlabsCraftData.json` | craft ingredients + time |
3737
| `rustlabsResearchData.json` | research scrap cost |
38+
| `rustlabsDecayData.json` | decay time + HP |
39+
| `rustlabsUpkeepData.json` | upkeep cost (resource + quantity range) |
3840

3941
2. Projects them into our own typed schema (`ItemDataset` /
4042
`ItemRecord` / …, defined in `RustPlusBot.Features.ItemData`), keyed by item id,
4143
with calculator data inlined per item (null where an item has none).
42-
3. **Validates** the result (`DatasetValidator`): a minimum item-count floor and
43-
that every recycle-yield / craft-ingredient id resolves to a known item.
44+
3. **Validates** the result (`DatasetValidator`): a minimum item-count floor,
45+
that every recycle-yield / craft-ingredient / upkeep-cost id resolves to a
46+
known item, that upkeep quantity ranges are well-formed (`min <= max`), and
47+
that decay values are non-negative.
4448
4. On any validation error, prints the errors to stderr and exits non-zero
4549
**without writing** — the existing good bundle is never clobbered.
4650
5. On success, writes the dataset as indented JSON and exits 0.

0 commit comments

Comments
 (0)