From 1bedf06969b8ab8e51dd4301a0831200df5c8f59 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 13 Jul 2026 18:36:29 -0400 Subject: feat(admin): tooltips added for confusing fields, hide more optional fields with buttons --- internal/admin/static/objecteditor.js | 44 ++++++----------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) (limited to 'internal/admin/static/objecteditor.js') diff --git a/internal/admin/static/objecteditor.js b/internal/admin/static/objecteditor.js index 6ae1dba..363cca9 100644 --- a/internal/admin/static/objecteditor.js +++ b/internal/admin/static/objecteditor.js @@ -70,14 +70,14 @@ var SECTIONS = [ id: 'safespot', label: 'Safespot', path: 'safespot', detect: function(d) { return d.safespot; }, fields: [ - ['tier', 'Tier', 'number', '1', 'narrow'], - ['max_block_size', 'Max Block Size', 'select', '|small|medium|large|massive'], + ['tier', 'Tier', 'number', '1', 'narrow', null, null, 'Player tier must be >= safespot tier to hide (+1 with unlocked_rock_cover flag)'], + ['max_block_size', 'Max Block Size', 'select', '|small|medium|large|massive', null, null, null, 'Blocks mobs smaller than this size. Empty = blocks everything, massive blocks all four sizes.'], ['max_occupants', 'Max Occupants', 'number', '1', 'narrow'], - ['unsafe_chance', 'Unsafe Chance', 'number', '0.05', 'narrow'], - ['decay_ticks', 'Decay Ticks', 'number', '100', 'narrow'], - ['decay_chance', 'Decay Chance', 'number', '0.01', 'narrow'], - ['respawn_ticks', 'Respawn Ticks', 'number', '50', 'narrow'], - ['respawn_on_hide', 'Respawn on hide', 'checkbox'], + ['unsafe_chance', 'Unsafe Chance', 'number', '0.05', 'narrow', null, null, 'Per-tick probability of being forced out of cover (0 = never)'], + ['decay_ticks', 'Decay Ticks', 'number', '100', 'narrow', null, null, 'Forced degrade after N ticks of use. 0 disables this decay path'], + ['decay_chance', 'Decay Chance', 'number', '0.01', 'narrow', null, null, 'Per-tick random degrade chance. 0 disables this decay path'], + ['respawn_ticks', 'Respawn Ticks', 'number', '50', 'narrow', null, null, 'Auto-reforms cover after N ticks when fully destroyed. 0 = permanently removed'], + ['respawn_on_hide', 'Respawn on hide', 'checkbox', '', '', null, null, 'Resets cover to full levels when first person hides on an empty/unused cover'], ], subtables: [ {label:'Levels of Decay (lower is more decayed)', key:'levels', vertical: true, fields:[ @@ -321,27 +321,6 @@ function renderCard(sec, data) { }); } - if (sec.id === 'safespot') { - var helpCollapsed = window._safespotHelpCollapsed === undefined ? true : window._safespotHelpCollapsed; - h += '
'; - } - if (sec.id === 'gather') { h += ced_renderTagHelp('gather'); } @@ -776,15 +755,6 @@ function hideBaitField() { renderObjectEditor(objectID, objectData); } -function toggleSafespotHelp() { - if (window._safespotHelpCollapsed === undefined) { - window._safespotHelpCollapsed = false; - } else { - window._safespotHelpCollapsed = !window._safespotHelpCollapsed; - } - renderCurrent(); -} - function removeSection(id) { var sec = SECTIONS.find(function(s) { return s.id === id; }); if (!sec) return; -- cgit v1.2.3