aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/static/moduleeditor.js
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-12 21:16:58 -0400
committerhistoria <[not public]>2026-07-12 21:16:58 -0400
commitf601a40776843f6196221e74ba502c571a5b1bcd (patch)
treea5b3fc0ae5b8774d642439fc4d369b96bf3932ab /internal/admin/static/moduleeditor.js
parentbeb0b73a9e56fdc717d55bbf1a1c7c5b49d4c6a4 (diff)
downloadthehouseoficarus-f601a40776843f6196221e74ba502c571a5b1bcd.tar.gz
fix(admin): standardize most search dropdowns and radio buttons
Diffstat (limited to 'internal/admin/static/moduleeditor.js')
-rw-r--r--internal/admin/static/moduleeditor.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/admin/static/moduleeditor.js b/internal/admin/static/moduleeditor.js
index 739fc2e..fe71f88 100644
--- a/internal/admin/static/moduleeditor.js
+++ b/internal/admin/static/moduleeditor.js
@@ -13,11 +13,11 @@ var MODULE_SECTIONS = [
['max_hit', 'Max Hit', 'number', '10', 'narrow'],
['base_xp', 'Base XP', 'number', '50', 'narrow'],
['category', 'Category', 'select', 'combat|utility|enchant|processing|transport'],
- ['element', 'Element', 'text', 'e.g. fire'],
+ ['element', 'Element', 'select', '|bio|eco|hydro|solar|chaos'],
['destination', 'Destination', 'number', '5', 'narrow'],
],
inline: [
- {label:'Junk Cost', key:'junk_cost', type:'kv', valType:'number'},
+ {label:'Junk Cost', key:'junk_cost', type:'kv_search', searchEntity:'items', valType:'number'},
]
},
{
@@ -144,6 +144,8 @@ function renderCard(sec, data) {
sec.inline.forEach(function(il) {
if (il.type === 'kv') {
h += ced_renderKV(sec, il, data);
+ } else if (il.type === 'kv_search') {
+ h += ced_renderKVSearch(sec, il, data);
}
});
}
@@ -274,7 +276,7 @@ function saveModule() {
if (sec.inline) {
sec.inline.forEach(function(il) {
- if (il.type === 'kv') {
+ if (il.type === 'kv' || il.type === 'kv_search') {
var kvEl = document.querySelector('.obj-kv-list[data-sec="' + sec.id + '"][data-key="' + il.key + '"]');
if (kvEl) {
var map = {};