diff options
| author | historia <[not public]> | 2026-07-13 18:36:29 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-13 18:36:29 -0400 |
| commit | 1bedf06969b8ab8e51dd4301a0831200df5c8f59 (patch) | |
| tree | acdcbcc3a26896c678edeffad0cb0d8ec9b2857b /internal/admin/static/objecteditor.js | |
| parent | 8952653be9bfeeb9aadf59f845de507630d65dc4 (diff) | |
| download | thehouseoficarus-1bedf06969b8ab8e51dd4301a0831200df5c8f59.tar.gz | |
feat(admin): tooltips added for confusing fields, hide more optional fields with buttons
Diffstat (limited to 'internal/admin/static/objecteditor.js')
| -rw-r--r-- | internal/admin/static/objecteditor.js | 44 |
1 files changed, 7 insertions, 37 deletions
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 += '<div style="margin-top:8px;border:1px solid rgba(100,160,255,.15);border-radius:4px;overflow:hidden">'; - h += '<div style="padding:6px 10px;background:rgba(100,160,255,.08);cursor:pointer;font-size:10px;color:#6af;font-weight:bold;text-transform:uppercase;letter-spacing:.5px" onclick="toggleSafespotHelp()">'; - h += '<span style="font-size:8px;margin-right:4px">' + (helpCollapsed ? '▶' : '▼') + '</span>'; - h += 'How Tiers, Levels, Decay & Respawn Work'; - h += '</div>'; - if (!helpCollapsed) { - h += '<div style="padding:8px;background:rgba(100,160,255,.05);font-size:10px;color:#aaa;line-height:1.6">'; - h += '<b>Tier</b> — Player tier (base 1; +1 with <code>unlocked_rock_cover</code> flag) must be ≥ safespot tier to hide.<br>'; - h += '<b>Levels of Decay</b> — Degradation stages (N levels above all subtable entries). Level messages shown when hiding; degrade messages broadcast when damaged. Level 0 = destroyed, all occupants evicted.<br>'; - h += '<b>Decay</b> — Two independent paths: <code>decay_ticks</code> (forced degrade after N ticks of use) and <code>decay_chance</code> (per-tick random degrade). Either or both can be set; 0 disables that path.<br>'; - h += '<b>Respawn on hide</b> — Resets the cover to full levels when the first person hides on an empty/unused cover.<br>'; - h += '<b>Respawn ticks</b> — Auto-reforms the cover after N ticks when fully destroyed (level 0). 0 = instance permanently removed.<br>'; - h += '<b>Max Block Size</b> — Determines which mob sizes are blocked (small < medium < large < massive). Empty = blocks everything.<br>'; - h += '<b>Unsafe Chance</b> — Per-tick probability of being forced out of cover regardless of decay (0 = never forced out).'; - h += '</div>'; - } - h += '</div>'; - } - 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; |
