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
|
|
@ -25,6 +25,23 @@ const WS_MIGRATIONS = [
|
|||
2 => [
|
||||
"ALTER TABLE character_skills ADD COLUMN IF NOT EXISTS attribute VARCHAR(3) NOT NULL DEFAULT '' AFTER name",
|
||||
],
|
||||
// 3: Katalog für Ausrüstung (Selektor im Inventar). Inhalt kommt aus
|
||||
// item_catalog_sync()/sql/seed_items.sql, hier nur die Tabelle.
|
||||
3 => [
|
||||
"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",
|
||||
],
|
||||
];
|
||||
|
||||
function ws_migrations_apply(PDO $pdo): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue