From e6b4cb9f5816c6ee239233bc85f74ee446a161c2 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 1 Jul 2026 16:37:45 -0400 Subject: feat: shop system overhauled, gui conversation tree editor overhauled --- internal/admin/static/mobeditor.js | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'internal/admin/static/mobeditor.js') diff --git a/internal/admin/static/mobeditor.js b/internal/admin/static/mobeditor.js index a65e578..59eb16c 100644 --- a/internal/admin/static/mobeditor.js +++ b/internal/admin/static/mobeditor.js @@ -89,6 +89,24 @@ var MOB_SECTIONS = [ detect: function(d) { return d.talk && d.talk.nodes; }, fields: [] }, + { + id: 'shop', label: 'Shop', path: 'shop', + detect: function(d) { return !!d.shop; }, + fields: [ + ['message', 'Greeting', 'text', 'What would you like to buy or sell?'], + ['buy_percentage', 'Buy %', 'number', '40', 'narrow'], + ['change_percentage', 'Change %', 'number', '3', 'narrow'], + ['restock_ticks', 'Restock Ticks', 'number', '', 'narrow'], + ['buys_anything', 'Buys Anything', 'checkbox'], + ], + subtables: [ + {label:'Items', key:'items', addLabel:'+ Add Item', fields:[ + ['item_id', 'Item ID', 'search', '', '', null, 'items'], + ['stock', 'Stock', 'number', '', 'narrow'], + ['restock_ticks', 'Restock Ticks', 'number', '', 'narrow'], + ]} + ] + }, { id: 'drops', label: 'Drops', path: 'drops', detect: function(d) { return d.drops && (d.drops.remains || (d.drops.loot && d.drops.loot.length > 0)); }, @@ -197,7 +215,7 @@ function renderCurrent() { function renderMobCard(sec, data) { var collapsed = expandedCards[sec.id] === false; - var h = '