aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/static
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-08 00:13:32 -0400
committerhistoria <[not public]>2026-07-08 00:13:32 -0400
commit3682acf24575731deef587a19c940814ad8a9a81 (patch)
tree56c7fd1110ddf87fb0683c4350d9903b69f36eaf /internal/admin/static
parent14428577e1c7a6c2bdc96f700b7df0d68ec06ba6 (diff)
downloadthehouseoficarus-3682acf24575731deef587a19c940814ad8a9a81.tar.gz
fix: removed irrelevant gather fields for fishing objects
Diffstat (limited to 'internal/admin/static')
-rw-r--r--internal/admin/static/objecteditor.js11
1 files changed, 7 insertions, 4 deletions
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(); }