From 4bd00fa328e6a9ae895d225d19c57fc43b3bfcae Mon Sep 17 00:00:00 2001 From: Andrea Rendine Date: Sun, 14 Feb 2016 21:24:43 +0100 Subject: [PATCH] No check on null stores Unlike other stuff, stores in the side box never disappear during the game when they reach 0, once they've been "seen" (i.e., once State stores[store] has been set). But on reload they appear only if the quantity is positive. For the sake of consistency, now null stores are visible on load (see what you're missing, bro). --- script/room.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/room.js b/script/room.js index d569154..0acc7e1 100644 --- a/script/room.js +++ b/script/room.js @@ -750,7 +750,7 @@ var Room = { updateStoresView: function() { var stores = $('div#stores'); - var resources = $('div#resources'); + var resources = $('div#resources'); var special = $('div#special'); var weapons = $('div#weapons'); var needsAppend = false, rNeedsAppend = false, sNeedsAppend = false, wNeedsAppend = false, newRow = false; @@ -825,7 +825,7 @@ var Room = { $SM.startThieves(); } - if(row.length === 0 && num > 0) { + if(row.length === 0) { row = $('
').attr('id', id).addClass('storeRow'); $('
').addClass('row_key').text(lk).appendTo(row); $('
').addClass('row_val').text(Math.floor(num)).appendTo(row); @@ -844,7 +844,7 @@ var Room = { row.insertAfter(location.find('#' + curPrev)); } newRow = true; - } else if(num>= 0){ + } else { $('div#' + row.attr('id') + ' > div.row_val', location).text(Math.floor(num)); } }