Skip to content

Commit d99c3be

Browse files
committed
add extra info to log messages...
... and move load_statistics to bottom of page
1 parent 2ec99de commit d99c3be

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

entity.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ local have_warned = false
7272
function smartshop.update(...)
7373
if not have_warned then
7474
have_warned = true
75-
core.log("warning", "Depricated use of smartshop.update(). "
75+
core.log("warning", "[smartshop] Depricated use of smartshop.update(). "
7676
.. "Use smartshop.update_entities() instead\n"
7777
.. debug.traceback())
7878
end

statistics.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ local function load_statistics()
5151
file:close()
5252
end
5353
end
54-
if not smartshop.disable_statistics then
55-
load_statistics()
56-
end
5754

5855

5956
-- Sum up all available item_name at every pos
@@ -238,7 +235,7 @@ local have_warned_count = false
238235
function smartshop.itemsatpos(...)
239236
if not have_warned_count then
240237
have_warned_count = true
241-
core.log("warning", "Depricated use of smartshop.itemsatpos(). "
238+
core.log("warning", "[smartshop] Depricated use of smartshop.itemsatpos(). "
242239
.. "Use smartshop.set_count_pos() instead\n"
243240
.. debug.traceback())
244241
end
@@ -264,7 +261,7 @@ local have_warned_price = false
264261
function smartshop.itempriceatpos(...)
265262
if not have_warned_price then
266263
have_warned_price = true
267-
core.log("warning", "Depricated use of smartshop.itempriceatpos(). "
264+
core.log("warning", "[smartshop] Depricated use of smartshop.itempriceatpos(). "
268265
.. "Use smartshop.set_price_pos() instead\n"
269266
.. debug.traceback())
270267
end
@@ -307,3 +304,8 @@ if smartshop.report_interval > 0 then
307304
end)
308305
end
309306

307+
308+
if not smartshop.disable_statistics then
309+
load_statistics()
310+
end
311+

0 commit comments

Comments
 (0)