diff options
| author | historia <[not public]> | 2026-07-08 00:13:32 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-08 00:13:32 -0400 |
| commit | 3682acf24575731deef587a19c940814ad8a9a81 (patch) | |
| tree | 56c7fd1110ddf87fb0683c4350d9903b69f36eaf | |
| parent | 14428577e1c7a6c2bdc96f700b7df0d68ec06ba6 (diff) | |
| download | thehouseoficarus-3682acf24575731deef587a19c940814ad8a9a81.tar.gz | |
fix: removed irrelevant gather fields for fishing objects
| -rw-r--r-- | data/.admin_history.json | 1 | ||||
| -rw-r--r-- | internal/admin/static/objecteditor.js | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/data/.admin_history.json b/data/.admin_history.json deleted file mode 100644 index 4dcac1d..0000000 --- a/data/.admin_history.json +++ /dev/null @@ -1 +0,0 @@ -{"history":[{"time":"2026-07-07T23:12:16-04:00","description":"detach room 1009 from course test2","file_path":"data/courses/test2.yaml","old_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - exit_dir: east\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\n - exit_dir: northwest\n fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1006\n verb: climb\n xp: 0\n - exit_dir: north\n fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1008\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1009\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","new_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - exit_dir: east\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\n - exit_dir: northwest\n fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1006\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1008\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","is_delete":false,"is_create":false},{"time":"2026-07-07T23:12:16-04:00","description":"delete room 1009 (cleaned 1 exits)","file_path":"data/rooms/intro/1009.yaml","old_content":"id: 1009\nname: 'Room #1009'\ncolor: \"\"\ndescription: []\nexits: {}\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"","is_delete":true,"is_create":false,"extra_files":[{"file_path":"data/rooms/intro/1008.yaml","old_content":"id: 1008\nname: 'Room #1008'\ncolor: \"\"\ndescription: []\nexits:\n north:\n room: 1009\n hidden: true\n always_blocked: true\n southwest:\n room: 2004\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"id: 1008\nname: 'Room #1008'\ncolor: \"\"\ndescription: []\nexits:\n southwest:\n room: 2004\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n"}]},{"time":"2026-07-07T23:12:18-04:00","description":"detach room 1008 from course test2","file_path":"data/courses/test2.yaml","old_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - exit_dir: east\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\n - exit_dir: northwest\n fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1006\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1008\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","new_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - exit_dir: east\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1006\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","is_delete":false,"is_create":false},{"time":"2026-07-07T23:12:18-04:00","description":"delete room 1008 (cleaned 1 exits)","file_path":"data/rooms/intro/1008.yaml","old_content":"id: 1008\nname: 'Room #1008'\ncolor: \"\"\ndescription: []\nexits:\n southwest:\n room: 2004\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"","is_delete":true,"is_create":false,"extra_files":[{"file_path":"data/rooms/intro/1006.yaml","old_content":"id: 1006\nname: 'Room #1006'\ncolor: \"\"\ndescription: []\nexits:\n northwest:\n room: 1008\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"id: 1006\nname: 'Room #1006'\ncolor: \"\"\ndescription: []\nexits: {}\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n"}]},{"time":"2026-07-07T23:12:20-04:00","description":"detach room 1006 from course test2","file_path":"data/courses/test2.yaml","old_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - exit_dir: east\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases: []\n room_id: 1006\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","new_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","is_delete":false,"is_create":false},{"time":"2026-07-07T23:12:20-04:00","description":"delete room 1006 (cleaned 1 exits)","file_path":"data/rooms/intro/1006.yaml","old_content":"id: 1006\nname: 'Room #1006'\ncolor: \"\"\ndescription: []\nexits: {}\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"","is_delete":true,"is_create":false,"extra_files":[{"file_path":"data/rooms/intro/1007.yaml","old_content":"id: 1007\nname: 'Room #1007'\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1006\n hidden: true\n always_blocked: true\n west:\n room: 2004\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"id: 1007\nname: 'Room #1007'\ncolor: \"\"\ndescription: []\nexits:\n west:\n room: 2004\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n"}]},{"time":"2026-07-07T23:12:21-04:00","description":"detach room 1007 from course test2","file_path":"data/courses/test2.yaml","old_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - exit_dir: northeast\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: DONEZO\n room_id: 1007\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","new_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","is_delete":false,"is_create":false},{"time":"2026-07-07T23:12:21-04:00","description":"delete room 1007 (cleaned 1 exits)","file_path":"data/rooms/intro/1007.yaml","old_content":"id: 1007\nname: 'Room #1007'\ncolor: \"\"\ndescription: []\nexits:\n west:\n room: 2004\n hidden: true\n always_blocked: true\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"","is_delete":true,"is_create":false,"extra_files":[{"file_path":"data/rooms/intro/1005.yaml","old_content":"id: 1005\nname: 'Room #1005'\ncolor: \"\"\ndescription: []\nexits:\n north:\n room: 2004\n northeast:\n room: 1007\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"id: 1005\nname: 'Room #1005'\ncolor: \"\"\ndescription: []\nexits:\n north:\n room: 2004\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n"}]},{"time":"2026-07-07T23:12:22-04:00","description":"detach room 1005 from course test2","file_path":"data/courses/test2.yaml","old_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - exit_dir: south\n fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\n - fail_damage:\n - 0\n - 0\n phases:\n - delay: 1\n message: You do it\n room_id: 1005\n verb: jump\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","new_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","is_delete":false,"is_create":false},{"time":"2026-07-07T23:12:22-04:00","description":"delete room 1005 (cleaned 1 exits)","file_path":"data/rooms/intro/1005.yaml","old_content":"id: 1005\nname: 'Room #1005'\ncolor: \"\"\ndescription: []\nexits:\n north:\n room: 2004\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"","is_delete":true,"is_create":false,"extra_files":[{"file_path":"data/rooms/intro/2004.yaml","old_content":"id: 2004\nname: Test Room\ncolor: \"\"\ndescription:\n - text: It's a test room\nexits:\n north:\n room: 2003\n northwest:\n room: 2002\n south:\n room: 1005\n west:\n room: 2005\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"id: 2004\nname: Test Room\ncolor: \"\"\ndescription:\n - text: It's a test room\nexits:\n north:\n room: 2003\n northwest:\n room: 2002\n west:\n room: 2005\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n"}]},{"time":"2026-07-07T23:12:27-04:00","description":"delete course test2 (last obstacle removed)","file_path":"data/courses/test2.yaml","old_content":"completion_xp: 50\nname: Test 222\nobstacles:\n - fail_damage:\n - 0\n - 0\n phases:\n - delay: 3\n message: Test\n - delay: 2\n message: Test\n room_id: 2004\n verb: climb\n xp: 0\nrequired_level: 1\nstart_room: 2004\n","new_content":"","is_delete":true,"is_create":false},{"time":"2026-07-07T23:34:12-04:00","description":"Update object anglerfish_spot","file_path":"data/objects/anglerfish_spot.yaml","old_content":"aliases: []\ncolor: \"51\"\ndescription: A faint glow emanates from the depths. Use a fishing rod with bait here.\ngather:\n bait: fishing_bait\n depleted_message: \"\"\n drops:\n - depletes: false\n item_id: raw_anglerfish\n level: 82\n message: \"\"\n quantity: 0\n table: \"\"\n weight: 100\n xp: 120\n exhausted_message: \"\"\n fail_message: Nothing seems to bite.\n gather_message: You cast your line into the deep water...\n respawn_broadcast: \"\"\n skill: fishing\n success:\n base: 0.3\n cap: 0.8\n per_level: 0.005\n tools:\n - axe\n - axe\nhidden: false\nid: anglerfish_spot\ninroom_description: \"\"\nname: anglerfish spot\nremoval_item: \"\"\n","new_content":"color: \"51\"\ndescription: A faint glow emanates from the depths. Use a fishing rod with bait here.\ngather:\n bait: fishing_bait\n depleted_message: \"\"\n drops:\n - depletes: false\n item_id: raw_anglerfish\n level: 82\n message: \"\"\n quantity: 0\n table: \"\"\n weight: 100\n xp: 120\n exhausted_message: \"\"\n fail_message: Nothing seems to bite.\n gather_message: You cast your line into the deep water...\n respawn_broadcast: \"\"\n skill: fishing\n success:\n base: 0.3\n cap: 0.8\n per_level: 0.005\n tools:\n - fishing_rod\nhidden: false\nid: anglerfish_spot\nname: anglerfish spot\n","is_delete":false,"is_create":false}],"redo":null}
\ No newline at end of file diff --git a/internal/admin/static/objecteditor.js b/internal/admin/static/objecteditor.js index b99ca74..fdaefd2 100644 --- a/internal/admin/static/objecteditor.js +++ b/internal/admin/static/objecteditor.js @@ -36,9 +36,9 @@ var SECTIONS = [ ['bait', 'Bait Item', 'search', 'fishing_bait', '', function(d) { return d.skill === 'fishing'; }, 'items'], ['gather_message', 'Gather Message', 'text', 'You swing your pickaxe at the rock...', 'wide'], ['fail_message', 'Fail Message', 'text', 'You chip away but get nothing useful.', 'wide'], - ['depleted_message', 'Depleted Message', 'text', "You don't see any ore in this rock.", 'wide'], + ['depleted_message', 'Depleted Message', 'text', "You don't see any ore in this rock.", 'wide', function(d) { return d.skill !== 'fishing'; }], ['exhausted_message', 'Exhausted Message', 'text', 'The tree comes crashing down!', 'wide', function(d) { return d.skill === 'woodcutting'; }], - ['respawn_broadcast', 'Respawn Broadcast', 'text', 'A glint of copper catches your eye from some {name}.', 'wide'], + ['respawn_broadcast', 'Respawn Broadcast', 'text', 'A glint of copper catches your eye from some {name}.', 'wide', function(d) { return d.skill !== 'fishing'; }], ], inline: [ {label:'Success', path:'success', row:0, fields:[ @@ -966,12 +966,15 @@ function toggleGatherConditionals() { var skill = skillEl ? skillEl.value : ''; var fishing = skill === 'fishing'; var wood = skill === 'woodcutting'; - var els = ['bait', 'exhausted_message', 'deplete_timer', 'nest_chance']; - var vis = {bait: fishing, exhausted_message: wood, deplete_timer: wood, nest_chance: wood}; + var els = ['bait', 'exhausted_message', 'depleted_message', 'deplete_timer', 'nest_chance', 'respawn_broadcast']; + var vis = {bait: fishing, exhausted_message: wood, depleted_message: !fishing, deplete_timer: wood, nest_chance: wood, respawn_broadcast: !fishing}; els.forEach(function(key) { var el = document.getElementById('f_gather_' + key); if (el) el.closest('.obj-field').style.display = vis[key] ? '' : 'none'; }); + document.querySelectorAll('[id^="f_gather_drops_"][id$="_depletes"]').forEach(function(el) { + el.closest('.obj-field').style.display = fishing ? 'none' : ''; + }); } function setupSearchFields() { ced_setupSearchFields(); } |
