From bf7c27c2cbf3eb56a0a4c5141e39b152c51614b5 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 1 Jul 2026 04:53:56 -0400 Subject: feat: admin gui map, item, and objects mostly complete --- internal/admin/static/itemeditor.js | 84 ++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 11 deletions(-) (limited to 'internal/admin/static/itemeditor.js') diff --git a/internal/admin/static/itemeditor.js b/internal/admin/static/itemeditor.js index d02945a..7c7c676 100644 --- a/internal/admin/static/itemeditor.js +++ b/internal/admin/static/itemeditor.js @@ -48,10 +48,10 @@ var SECTIONS = [ label: 'Recipes to Craft This Item', key: 'craft', fields: [ ['type', 'Type', 'select', 'smithing|cooking|crafting|fletching|combine|pharmacy|construction'], - ['subtype', 'Subtype', 'select', '|smelt|clean'], + ['subtype', 'Subtype', 'select', '|smelting|cleaning'], ['level', 'Level', 'number', '', 'narrow'], ['xp', 'XP', 'number', '', 'narrow'], - ['wait', 'Wait', 'number', '', 'narrow'], + ['ticks_per_cycle', 'Ticks/Cycle', 'number', '', 'narrow'], ['output_qty', 'Output Qty', 'number', '', 'narrow'], ['station', 'Station', 'select', '|anvil|cooking_range|fire|furnace|pottery_oven|pottery_wheel|spinning_wheel|workbench'], ['tool', 'Tool', 'select', '|pickaxe|axe|fire|chisel|hammer|knife|needle|rake|saw|shears|spade|watering_can|fishing_rod|fly_rod|harpoon|small_net|big_net|lobster_pot'], @@ -65,8 +65,9 @@ var SECTIONS = [ ['end_message', 'End Message', 'text', 'e.g. You\'ve finished smithing.', 'wide'], ], fieldGroups: [ - ['type', 'subtype', 'level', 'xp', 'wait', 'output_qty'], - {fields: ['station', 'tool'], right: true}, + ['type', 'subtype', 'level', 'xp', 'ticks_per_cycle', 'output_qty'], + {note: 'Output Qty is the quantity produced per cycle, only relevant for stackable items.'}, + ['station', 'tool'], {label: 'Success', fields: ['success_base', 'success_per_level', 'success_cap', 'fail']}, ['start_message', 'success_message', 'fail_message', 'end_message'], ], @@ -213,6 +214,7 @@ function renderItemEditor(id, data) { $('#editorMain').innerHTML = html; setupSearchFields(); setupCraftTypeChange(); + updateOutputQtyVisibility(); setTimeout(function() { document.querySelectorAll('.color-field').forEach(function(el) { bindColorField(el); }); }, 50); @@ -229,7 +231,7 @@ function renderCurrent() { function renderCard(sec, data) { var collapsed = expandedCards[sec.id] === false; - var h = '