Files
sacred_k/src/mods/inventory_save.h
T
khallaandClaude Opus 5.5 6ca96d54b4 Shared chest tabs, rune stacks and rune master, Q pickup, Kettenblitz tooltip and range
- Shared chest: tabs "Truhe"/"Gemeinsam" as a column left of the grid
  (game tab sheet), grids placed every tick, persistent across heroes
- Inventory tab texts capitalized (RegisterText / CapitalizeText)
- Combat-art runes stack like potions (itemstack, renamed from potionstack)
- Rune master: any rune for any number of runes, price by rune count
  (4 runes = 1,000, x10 per missing rune), bought rune goes into the
  backpack, Buy disabled without runes, gold or room, last rune remembered
  per hero (saved), the chosen rune's name below its icon, dropping a
  stack gives up one rune
- Keys: the old key handling no longer takes over after the save screen
  (text field focus only counts while its dialog is shown)
- Esc crash: tooltips forgotten when the game destroys them
- Pick up (Q) sends the pickup order directly; search reach doubled
- Kettenblitz: tooltip shows hits per chain, chains, cast and jump range;
  cast range 900 (longer ray segments), jumps half of that

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 03:40:42 +02:00

17 lines
643 B
C++

#pragma once
// Per-hero data of other mods, saved with the hero's inventory JSON (save
// games and hero files, src/mods/inventory_save.cpp) under "hero": {key: ...}.
#include <nlohmann/json.hpp>
namespace mods::inventory_save {
// `hero`: the hero's inventory index (= its creature id, below the chest's 0x11).
using HeroDataWriteFn = nlohmann::json (*)(unsigned hero); // null: nothing to save
using HeroDataReadFn = void (*)(unsigned hero, const nlohmann::json& data);
// Call at startup (static initialisation).
void RegisterHeroData(const char* key, HeroDataWriteFn write, HeroDataReadFn read);
} // namespace mods::inventory_save