From 7b5ed92e003d8a4bf9bdc69d43b7354eb2260dfa Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 5 Jul 2026 19:18:50 -0400 Subject: feat: duplicate items/obj/mobs from sidebar. item inputs fields changed to search fields --- internal/admin/static/hazardeditor.js | 63 +++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 10 deletions(-) (limited to 'internal/admin/static/hazardeditor.js') diff --git a/internal/admin/static/hazardeditor.js b/internal/admin/static/hazardeditor.js index ff2857d..c4eb0b5 100644 --- a/internal/admin/static/hazardeditor.js +++ b/internal/admin/static/hazardeditor.js @@ -8,13 +8,13 @@ var HAZARD_SECTIONS = [ { id: 'core', label: 'Core', always: true, fields: [ - ['name', 'Name', 'text'], - ['description', 'Description', 'textarea', '', 'wide'], - ['warn_message', 'Warn Message', 'text', '', 'wide'], - ['hit_message', 'Hit Message', 'text'], - ['miss_message', 'Miss Message', 'text'], - ['required_item', 'Required Item', 'text'], - ['speed', 'Speed', 'number', '', 'narrow'], + ['name', 'Name', 'text', 'toxic gas'], + ['description', 'Description', 'textarea', 'A cloud of toxic gas fills the room.', 'wide'], + ['warn_message', 'Warn Message', 'text', 'The air grows thick with toxic fumes...', 'wide'], + ['hit_message', 'Hit Message', 'text', 'You cough and choke on the toxic gas!'], + ['miss_message', 'Miss Message', 'text', 'You hold your breath and avoid the fumes.'], + ['required_item', 'Required Item', 'text', 'e.g. gas_mask'], + ['speed', 'Speed', 'number', '10', 'narrow'], ] }, { @@ -22,9 +22,9 @@ var HAZARD_SECTIONS = [ detect: function(d) { return d.attack_type || d.attack || d.attack_bonus || d.max_hit; }, fields: [ ['attack_type', 'Attack Type', 'select', 'stab|slash|crush|ranged|science'], - ['attack', 'Attack', 'number', '', 'narrow'], - ['attack_bonus', 'Attack Bonus', 'number', '', 'narrow'], - ['max_hit', 'Max Hit', 'number', '', 'narrow'], + ['attack', 'Attack', 'number', '5', 'narrow'], + ['attack_bonus', 'Attack Bonus', 'number', '0', 'narrow'], + ['max_hit', 'Max Hit', 'number', '3', 'narrow'], ] } ]; @@ -99,6 +99,7 @@ function renderHazardEditor(id, data) { html += '