feat: m1 vertikaler durchstich — mod-lader, registries, attributberechnung, screen-stack

Ersetzt src/ vollstaendig: print_box, include_str! und enum ItemType fallen,
wie Ticket 01-03 es vorgezeichnet haben.

- data/: Mod-Lader mit zwei Suchpfaden, selbstheilender load_order.toml,
  drei Phasen und zweistufiger Deserialisierung (03/04)
- game/: Attributkatalog, Creature, Game::attribute ueber mehrere Quellen,
  Command mit Outcome (01/07/11/12)
- ui/: Screen-Stack mit Response, Grid-Widget, Press-Filter (06/11/12)
- mods/core/: echte TOML-Dateien auf der Platte statt include_str!

10 Tests, darunter der Borrow-Beweis fuer Registries-neben-Game, den
Ticket 12 nicht fuehren konnte.
This commit is contained in:
2026-08-12 15:39:17 +02:00
parent 9c5efab331
commit b39491916f
28 changed files with 3414 additions and 279 deletions

View File

@@ -0,0 +1,48 @@
# Rasse und Klasse sind Charakteroptionen, keine eigenen Konzepte (Ticket 02).
# Die Kategorien sind selbst Inhalt und tragen `pick = N`, damit ein Mod eine
# dritte Wahl ergaenzen kann, ohne dass die Engine davon weiss.
[[categories]]
id = "race"
name = "Rasse"
order = 10
pick = 1
[[categories]]
id = "class"
name = "Klasse"
order = 20
pick = 1
[[options]]
id = "dwarf"
category = "core:race"
name = "Zwerg"
description = "Zäh, misstrauisch, trinkfest."
modifiers = [ { attribute = "constitution", flat = 2 },
{ attribute = "max_health", flat = 10 } ]
[[options]]
id = "elf"
category = "core:race"
name = "Elf"
description = "Flink, hochmütig, langlebig."
modifiers = [ { attribute = "dexterity", flat = 2 },
{ attribute = "luck", flat = 1 } ]
[[options]]
id = "warrior"
category = "core:class"
name = "Krieger"
description = "Schlägt zu, wo andere nachdenken."
modifiers = [ { attribute = "strength", flat = 3 },
{ attribute = "damage", percent = 10 } ]
[[options]]
id = "thief"
category = "core:class"
name = "Dieb"
description = "Nimmt, was nicht niet- und nagelfest ist."
modifiers = [ { attribute = "dexterity", flat = 2 },
{ attribute = "luck", flat = 2 },
{ attribute = "critical_chance", percent = 15 } ]

38
mods/core/items.toml Normal file
View File

@@ -0,0 +1,38 @@
# Es gibt keinen Item-Typ (Ticket 02). Ein Schwert ist ein Gegenstand mit einem
# Modifikator auf `damage`, ein Helm einer mit einem Modifikator auf Rüstung —
# der Unterschied steht in den Modifikatoren, nicht in einer Kategorie.
[[items]]
id = "iron_sword"
name = "Eisenschwert"
base_price = 45
slot = "core:hand"
symbol = "/"
color = "white"
modifiers = [ { attribute = "damage", flat = 5 } ]
[[items]]
id = "leather_cap"
name = "Lederkappe"
base_price = 18
slot = "core:head"
symbol = "^"
color = "yellow"
modifiers = [ { attribute = "max_health", flat = 8 } ]
[[items]]
id = "health_potion"
name = "Heiltrank"
base_price = 12
stackable = true
consumed_on_use = true
symbol = "!"
color = "red"
[[items]]
id = "gold"
name = "Gold"
base_price = 1
stackable = true
symbol = "$"
color = "yellow"

4
mods/core/manifest.toml Normal file
View File

@@ -0,0 +1,4 @@
id = "core"
name = "rustkeep"
version = "0.1.0"
depends = []

17
mods/core/slots.toml Normal file
View File

@@ -0,0 +1,17 @@
# Slots sind Inhalt, kein Aufzaehlungswert — der Charakterbogen rendert die
# vorhandenen, statt ein festes Layout zu mauern (Ticket 02).
[[slots]]
id = "head"
name = "Kopf"
order = 10
[[slots]]
id = "body"
name = "Rumpf"
order = 20
[[slots]]
id = "hand"
name = "Hand"
order = 30