diff options
Diffstat (limited to 'internal/admin/static/moduleeditor.js')
| -rw-r--r-- | internal/admin/static/moduleeditor.js | 8 |
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 = {}; |
