Charakterverwalter: Ausrüstungskatalog mit Selektor im Inventar
- data/item_catalog.csv als kuratierbare Master-Liste (481 Gegenstände nach
OSE-Kernlisten plus Hausrat, Handel und Schatz), Preise in Silbertalern
(OSE-Goldmünzen 1:1), Art aus WS_ITEM_CATEGORIES, Verfügbarkeit gestaffelt
(Methaven/Garana/selten)
- tools/build_item_catalog.py erzeugt app/item_catalog_data.php und
sql/seed_items.sql; item_catalog_sync() spiegelt den Katalog in die neue
Tabelle item_catalog (Migration 3)
- Selektor-Dialog im Inventar filtert serverseitig nach Art, Verfügbarkeit und
Suche (GET item_kind/item_avail/item_q) und übernimmt die Auswahl als
Inventarzeile (POST /characters/{id}/items/from-catalog)
- Admin-Ansicht Ausrüstung listet den Katalog und liest die CSV neu ein
This commit is contained in:
parent
b68e92f581
commit
5f01146d4b
17 changed files with 2029 additions and 4 deletions
|
|
@ -13,6 +13,7 @@
|
|||
-- character_skills gelernte Fertigkeiten eines Charakters
|
||||
-- spells Katalog arkaner Zauber und göttlicher Liturgien
|
||||
-- character_spells gelernte Zauber/Liturgien eines Charakters
|
||||
-- item_catalog Ausrüstungskatalog für den Inventar-Selektor
|
||||
-- character_items Inventar eines Charakters
|
||||
|
||||
CREATE TABLE IF NOT EXISTS schema_migrations (
|
||||
|
|
@ -148,6 +149,20 @@ CREATE TABLE IF NOT EXISTS character_skills (
|
|||
CONSTRAINT fk_character_skills_skill FOREIGN KEY (skill_id) REFERENCES skills (id) ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS item_catalog (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
name VARCHAR(120) NOT NULL,
|
||||
kind VARCHAR(20) NOT NULL DEFAULT 'Ausrüstung',
|
||||
cost DECIMAL(8,2) NOT NULL DEFAULT 0.00,
|
||||
weight VARCHAR(20) NOT NULL DEFAULT '',
|
||||
availability ENUM('methaven', 'garana', 'selten') NOT NULL DEFAULT 'garana',
|
||||
note VARCHAR(255) NOT NULL DEFAULT '',
|
||||
sort_order INT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uq_item_catalog_name (name),
|
||||
KEY idx_item_catalog_filter (kind, availability)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS spells (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
name VARCHAR(120) NOT NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue