feat(handel): NPC-Registry, Dialog, Laden und Stapelregel
Vierzehnte Registry: NPCs sind keine Wesen — kein Kampfzustand, keine Initiative, keine Attribute. Ihre Antwortliste ist flach; was erst nach einer Antwort erscheint, ist eine Option mit einer Bedingung. - open_shop als elfte Aktion (game/ setzt eine Absicht, die UI schiebt) - Talk/Choose/Buy/Sell, Talk wirkt auf das eigene Feld wie PickUp - Preisspanne statt Goldkonto beim Haendler, Charisma in der Preisfunktion - Warenkorb einmal bei der Etagenerzeugung gezogen - Stapelregel aus Ticket 07 endlich gebaut: 50-120 Gold war 120 Eintraege - Dialog- und Shop-Screen, NPC-Symbol im Grid
This commit is contained in:
@@ -16,7 +16,7 @@ use toml::Spanned;
|
||||
|
||||
use super::registries::{
|
||||
Ability, Affix, Category, CharacterOption, CreatureDef, FloorDef, Item, LootTable, ModifierDef,
|
||||
Prefab, Registries, Slot,
|
||||
Npc, Prefab, Registries, Slot,
|
||||
};
|
||||
|
||||
/// Genau drei harte Fehler (Ticket 04). Alles Uebrige ist Warnung plus
|
||||
@@ -261,6 +261,8 @@ struct ModFile {
|
||||
affixes: Vec<Spanned<toml::Value>>,
|
||||
#[serde(default)]
|
||||
loot_tables: Vec<Spanned<toml::Value>>,
|
||||
#[serde(default)]
|
||||
npcs: Vec<Spanned<toml::Value>>,
|
||||
/// **Keine** Tabelle mit `[[...]]`, sondern ein einzelner Block, der
|
||||
/// feldweise verschmilzt — die ausdrueckliche Ausnahme zu Ticket 03.
|
||||
#[serde(default)]
|
||||
@@ -300,6 +302,7 @@ impl_entry!(CreatureDef);
|
||||
impl_entry!(ModifierDef);
|
||||
impl_entry!(Affix);
|
||||
impl_entry!(LootTable);
|
||||
impl_entry!(Npc);
|
||||
|
||||
struct FileCtx<'a> {
|
||||
module: &'a str,
|
||||
@@ -510,6 +513,7 @@ pub fn load_mods() -> Result<(Registries, Vec<String>), LoadError> {
|
||||
parse_entries(parsed.modifiers, &ctx, &mut reg.modifiers, &mut warnings);
|
||||
parse_entries(parsed.affixes, &ctx, &mut reg.affixes, &mut warnings);
|
||||
parse_entries(parsed.loot_tables, &ctx, &mut reg.loot_tables, &mut warnings);
|
||||
parse_entries(parsed.npcs, &ctx, &mut reg.npcs, &mut warnings);
|
||||
|
||||
// `[balance]` verschmilzt **feldweise** (Ticket 14): Ein Mod, der
|
||||
// einen Knopf dreht, schreibt eine Zeile — und ein neuer Knopf in
|
||||
|
||||
Reference in New Issue
Block a user