From 9836513d287396fabcba85956366e6410d7363ef Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 9 Jul 2026 23:21:28 -0400 Subject: fix(admin): remove extraneous message button, arrow buttons and checkboxes work, formatting fixup --- csv.csv | 6 +++++ data/.admin_history.json | 1 - data/rooms/intro/1007.yaml | 2 +- data/rooms/intro/1008.yaml | 12 ++++----- data/rooms/intro/1009.yaml | 16 ++++++------ data/rooms/intro/1010.yaml | 12 ++++----- internal/admin/static/admin.css | 7 +++-- internal/admin/static/intereditor.js | 50 ++++++++++++++++++------------------ 8 files changed, 57 insertions(+), 49 deletions(-) create mode 100644 csv.csv delete mode 100644 data/.admin_history.json diff --git a/csv.csv b/csv.csv new file mode 100644 index 0000000..a26a918 --- /dev/null +++ b/csv.csv @@ -0,0 +1,6 @@ +hello, there, box +hello, there, box +hello, there, box +hello, there, box +hello, there, box + diff --git a/data/.admin_history.json b/data/.admin_history.json deleted file mode 100644 index df6291b..0000000 --- a/data/.admin_history.json +++ /dev/null @@ -1 +0,0 @@ -{"history":[{"time":"2026-07-09T22:10:38-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"id: 1007\nname: 'Room #1007'\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:48-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:49-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:52-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:54-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:56-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:57-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - condition:\n all_of: []\n steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:01-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - condition:\n all_of: []\n steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:02-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:08-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:18-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - condition:\n all_of: []\n on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:26-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - condition:\n all_of: []\n on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:27-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:12:46-04:00","description":"Update object 000_test_object","file_path":"data/objects/000_test_object.yaml","old_content":"color: C4\ndescription: A sinister altar of red biological interfaces. Place scrap here with a bio identifier to produce biojunk. Type 'id' to begin.\ngather:\n skill: mining\n success:\n base: 0\n cap: 1\n per_level: 0\n tools:\n - axe\nhidden: false\nid: 000_test_object\nname: 000 test object\non_use:\n - steps:\n - messages:\n - asdfdfs\n wait: 5\n - messages:\n - sadfdfsadfs\n wait: 3\nsafespot:\n decay_chance: 0\n decay_ticks: 0\n max_occupants: 1\n respawn_on_hide: false\n respawn_ticks: 0\n tier: 1\n unsafe_chance: 0\n","new_content":"color: C4\ndescription: A sinister altar of red biological interfaces. Place scrap here with a bio identifier to produce biojunk. Type 'id' to begin.\ngather:\n skill: mining\n success:\n base: 0\n cap: 1\n per_level: 0\n tools:\n - axe\nhidden: false\nid: 000_test_object\nname: 000 test object\non_use:\n - condition:\n all_of:\n - global_flag: one\n - player_flag: two\n - all_of:\n - player_flag: three\n - global_flag: four\nsafespot:\n decay_chance: 0\n decay_ticks: 0\n max_occupants: 1\n respawn_on_hide: false\n respawn_ticks: 0\n tier: 1\n unsafe_chance: 0\n","is_delete":false,"is_create":false}],"redo":null} \ No newline at end of file diff --git a/data/rooms/intro/1007.yaml b/data/rooms/intro/1007.yaml index 1d02bfe..d7ac03f 100644 --- a/data/rooms/intro/1007.yaml +++ b/data/rooms/intro/1007.yaml @@ -1,5 +1,5 @@ block_transport: false -color: "" +color: "52" description: [] exits: east: diff --git a/data/rooms/intro/1008.yaml b/data/rooms/intro/1008.yaml index d8dd6c9..a6e0081 100644 --- a/data/rooms/intro/1008.yaml +++ b/data/rooms/intro/1008.yaml @@ -1,16 +1,16 @@ -id: 1008 -name: 'Room #1008' -color: "" +block_transport: false +color: "52" description: [] exits: east: room: 1009 south: room: 1007 -objects: [] +hazard: "" +id: 1008 item_spawns: [] mobs: [] +name: 'Room #1008' +objects: [] on_enter: [] -hazard: "" -block_transport: false triggers: [] diff --git a/data/rooms/intro/1009.yaml b/data/rooms/intro/1009.yaml index f75cd82..dfa5d46 100644 --- a/data/rooms/intro/1009.yaml +++ b/data/rooms/intro/1009.yaml @@ -1,20 +1,20 @@ -id: 1009 -name: 'Room #1009' -color: "" +block_transport: false +color: "52" description: [] exits: south: room: 1010 southwest: - room: 1007 - hidden: true always_blocked: true + hidden: true + room: 1007 west: room: 1008 -objects: [] +hazard: "" +id: 1009 item_spawns: [] mobs: [] +name: 'Room #1009' +objects: [] on_enter: [] -hazard: "" -block_transport: false triggers: [] diff --git a/data/rooms/intro/1010.yaml b/data/rooms/intro/1010.yaml index 57610a4..48d3947 100644 --- a/data/rooms/intro/1010.yaml +++ b/data/rooms/intro/1010.yaml @@ -1,16 +1,16 @@ -id: 1010 -name: 'Room #1010' -color: "" +block_transport: false +color: "52" description: [] exits: north: room: 1009 west: room: 1007 -objects: [] +hazard: "" +id: 1010 item_spawns: [] mobs: [] +name: 'Room #1010' +objects: [] on_enter: [] -hazard: "" -block_transport: false triggers: [] diff --git a/internal/admin/static/admin.css b/internal/admin/static/admin.css index 7c8f0a5..a5c3497 100644 --- a/internal/admin/static/admin.css +++ b/internal/admin/static/admin.css @@ -447,15 +447,18 @@ g.ud-hover:hover text{font-weight:bold} .ie-step-label{font-size:10px;color:#6af;text-transform:uppercase;letter-spacing:.3px;font-weight:bold;white-space:nowrap} .ie-step-addmore{color:#6af;border:1px solid rgba(100,160,255,.25);background:transparent;font-size:10px;padding:1px 6px;border-radius:3px;cursor:pointer;font-family:monospace;line-height:1} .ie-step-addmore:hover{background:rgba(100,160,255,.1)} +.ie-step-addmore::after{content:"+"} +.ie-step-row.show-addbar .ie-step-addmore::after{content:"-"} .ie-step-spacer{flex:1} .ie-step-up,.ie-step-dn{padding:2px 6px;font-size:9px} .ie-step-cond-panel{margin:2px 0} +.ie-cond-title{font-size:10px;color:#6af;text-transform:uppercase;letter-spacing:.3px;font-weight:bold;margin-bottom:2px} .ie-step-effects{margin:2px 0} .ie-step-messages{margin:2px 0} .ie-step-addbar{display:none;flex-wrap:wrap;gap:3px;margin-top:2px} .ie-step-row.show-addbar .ie-step-addbar{display:flex} -.ie-step-addbar-bottom{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px} -.ie-step-addbar-bottom .btn{padding:4px 10px;font-size:11px} +.ie-step-addbar-bottom{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:6px} +.ie-step-addbar-bottom .btn{width:100%;box-sizing:border-box;text-align:center;padding:4px 10px;font-size:11px} /* ── Message rows within a step ── */ .ie-msg-row{display:flex;align-items:center;gap:4px} diff --git a/internal/admin/static/intereditor.js b/internal/admin/static/intereditor.js index 653bccf..a17225a 100644 --- a/internal/admin/static/intereditor.js +++ b/internal/admin/static/intereditor.js @@ -78,7 +78,7 @@ function ie_renderStepAddbar(step, secId, idx, si, secPath) { function ie_renderBottomAddbar(secId, secPath, idx) { var h = ''; IE_STEP_KINDS.forEach(function(sk) { - h += ''; + h += ''; }); return h; } @@ -331,7 +331,15 @@ function ie_renderCond(condObj, secId, idx, secPath, kind) { var h = ''; var isGroup = condObj && (condObj.all_of || condObj.any_of); if (condObj && typeof condObj === 'object') { + var condTitleText = ''; + if (kind && kind.indexOf('step-') === 0) { + var sn = parseInt(kind.slice(5), 10); + if (!isNaN(sn)) condTitleText = 'Condition for Step ' + (sn + 1); + } else if (kind === 'entry') { + condTitleText = 'Condition for Action Block'; + } h += '