diff --git a/api/shop_class.lua b/api/shop_class.lua index 283b931..e096650 100644 --- a/api/shop_class.lua +++ b/api/shop_class.lua @@ -258,6 +258,7 @@ function shop_class:log_purchase(player, i, mechanic) end self.meta:set_string("purchase_history", minetest.serialize(history)) + self.meta:mark_as_private("purchase_history") end -------------------- diff --git a/compat/old_smartshops.lua b/compat/old_smartshops.lua index 8a667f8..15ad289 100644 --- a/compat/old_smartshops.lua +++ b/compat/old_smartshops.lua @@ -146,3 +146,14 @@ if smartshop.settings.enable_refund then end, }) end + +-- we forgot to mark purchase history as private originally, so go through old shops and fix that +minetest.register_lbm({ + name = "smartshop:privatise_purchase_history", + nodenames = { "group:smartshop" }, + run_at_every_load = false, + action = function(pos, node) + local shop = api.get_object(pos) + shop.meta:mark_as_private("purchase_history") + end, +}) diff --git a/mod.conf b/mod.conf index 5b8f377..2145c57 100644 --- a/mod.conf +++ b/mod.conf @@ -6,6 +6,7 @@ author = fluxionary license = LGPL-3.0-or-later media_license = CC-BY-SA-3.0 version = 2023-05-18 -min_minetest_version = 5.6.1 +min_minetest_version = 5.7.0 +supported_games = * depends = fmod, futil optional_depends = currency, default, mesecons, mesecons_mvps, petz, node_entity_queue, pipeworks, tubelib