From 65e951a7ee92726c939dcd7ad91b6742b6f82d18 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Thu, 18 Aug 2022 14:29:33 +0200 Subject: [PATCH] Fix issue #90 (Disappearing tank contents) --- README.md | 2 +- basis/nodedata_meta.lua | 1 + coal_power_station/firebox.lua | 2 +- coal_power_station/oilfirebox.lua | 2 +- furnace/firebox.lua | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8fbab06..0bf4e76 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ It is highly recommended that you install the following mods, too: For large servers with many player `lsqlite3` is recommended. The package has to be installed via [luarocks](https://luarocks.org/): - luarocks install lsqlite3 + luarocks --lua-version 5.1 install lsqlite3 To enable this `unsafe` package, add 'techage' to the list of trusted mods in minetest.conf: diff --git a/basis/nodedata_meta.lua b/basis/nodedata_meta.lua index 875ce6d..7141a41 100644 --- a/basis/nodedata_meta.lua +++ b/basis/nodedata_meta.lua @@ -65,6 +65,7 @@ function api.store_mapblock_data(key, mapblock_data) if pos then item._POS_ = nil local data = serialize(item) + item._POS_ = pos local meta = M(pos) meta:set_string("ta_data", data) meta:mark_as_private("ta_data") diff --git a/coal_power_station/firebox.lua b/coal_power_station/firebox.lua index 1b732cd..ebf716f 100644 --- a/coal_power_station/firebox.lua +++ b/coal_power_station/firebox.lua @@ -86,7 +86,7 @@ minetest.register_node("techage:coalfirebox", { after_place_node = function(pos, placer) if firebox.is_free_position(pos, placer:get_player_name()) then - techage.add_node(pos, "techage:coalfirebox") + techage.add_node(pos, "techage:coalfirebox", true) local nvm = techage.get_nvm(pos) nvm.running = false nvm.burn_cycles = 0 diff --git a/coal_power_station/oilfirebox.lua b/coal_power_station/oilfirebox.lua index b2cc309..7fd7ad2 100644 --- a/coal_power_station/oilfirebox.lua +++ b/coal_power_station/oilfirebox.lua @@ -88,7 +88,7 @@ minetest.register_node("techage:oilfirebox", { after_place_node = function(pos, placer) if firebox.is_free_position(pos, placer:get_player_name()) then - techage.add_node(pos, "techage:oilfirebox") + techage.add_node(pos, "techage:oilfirebox", true) local nvm = techage.get_nvm(pos) nvm.running = false nvm.burn_cycles = 0 diff --git a/furnace/firebox.lua b/furnace/firebox.lua index e3678db..03483bb 100644 --- a/furnace/firebox.lua +++ b/furnace/firebox.lua @@ -105,7 +105,7 @@ minetest.register_node("techage:furnace_firebox", { on_construct = function(pos) local nvm = techage.get_nvm(pos) - techage.add_node(pos, "techage:furnace_firebox") + techage.add_node(pos, "techage:furnace_firebox", true) nvm.running = false nvm.burn_cycles = 0 nvm.liquid = {}