Fix item page
This commit is contained in:
parent
a89dd6e741
commit
01648189a8
3 changed files with 17 additions and 10 deletions
|
@ -58,6 +58,7 @@
|
|||
<script type="text/javascript" src="/js/build_utils.js"></script>
|
||||
<script type="text/javascript" src="/js/icons.js"></script>
|
||||
<script type="text/javascript" src="/js/damage_calc.js"></script>
|
||||
<script type="text/javascript" src="/js/powders.js"></script>
|
||||
<!-- <script type="text/javascript" src="/js/powders.js"></script> -->
|
||||
<script type="text/javascript" src="/js/load.js"></script>
|
||||
<script type="text/javascript" src="/js/load_ing.js"></script>
|
||||
|
|
|
@ -1877,6 +1877,7 @@ function displayIDProbabilities(parent_id, item, amp) {
|
|||
parent_elem.appendChild(table_elem);
|
||||
for (const [id,val] of Object.entries(itemMap.get(item_name))) {
|
||||
if (rolledIDs.includes(id)) {
|
||||
if (!item.get("maxRolls").get(id)) { continue; }
|
||||
let min = item.get("minRolls").get(id);
|
||||
let max = item.get("maxRolls").get(id);
|
||||
//Apply corkian amps
|
||||
|
|
25
js/item.js
25
js/item.js
|
@ -20,14 +20,17 @@ function init_itempage() {
|
|||
//displayExpandedItem(expandItem(itemMap.get(item_url_tag).statMap, []), "item-view");
|
||||
try{
|
||||
item = expandItem(itemMap.get(item_url_tag.replaceAll("%20"," ")), []);
|
||||
displaysq2ExpandedItem(item, "item-view");
|
||||
displaysq2AdditionalInfo("additional-info", item);
|
||||
displaysq2IDCosts("identification-costs", item);
|
||||
if (item.get("set") && sets[item.get("set")]) {
|
||||
displaysq2AllSetBonuses("set-bonus-info",item.get("set"));
|
||||
if (item.get('category') === 'weapon') {
|
||||
item.set('powders', []);
|
||||
apply_weapon_powders(item);
|
||||
}
|
||||
console.log(item);
|
||||
displaysq2IDProbabilities("identification-probabilities", item, amp_state);
|
||||
displayExpandedItem(item, "item-view");
|
||||
displayAdditionalInfo("additional-info", item);
|
||||
displayIDCosts("identification-costs", item);
|
||||
if (item.get("set") && sets[item.get("set")]) {
|
||||
displayAllSetBonuses("set-bonus-info",item.get("set"));
|
||||
}
|
||||
displayIDProbabilities("identification-probabilities", item, amp_state);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.log(error.stack);
|
||||
|
@ -56,6 +59,8 @@ function toggleAmps(button_id) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
load_init(init_itempage);
|
||||
//load_ing_init(init);
|
||||
(async function() {
|
||||
let load_promises = [ load_init() ];
|
||||
await Promise.all(load_promises);
|
||||
init_itempage();
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue