aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-10-31 13:52:32 +0100
committerorwell96 <orwell@bleipb.de>2017-10-31 13:52:32 +0100
commit9294e770ca1360f3d90edd4afc02730b87b0765e (patch)
tree6e8de9804ec3b2a13ed137de0e8e723192b5b1cd
parentcac7753158531b17900bb71619bfb03b4e071d5f (diff)
downloadadvtrains-9294e770ca1360f3d90edd4afc02730b87b0765e.tar.gz
advtrains-9294e770ca1360f3d90edd4afc02730b87b0765e.tar.bz2
advtrains-9294e770ca1360f3d90edd4afc02730b87b0765e.zip
Change name of the node database group in order to clone node database code into a library mod
advtrains will keep its own node database code for reasons of crash recovery, with the handicap that improvements to nplib need to be manually backported.
-rw-r--r--advtrains/nodedb.lua8
-rw-r--r--advtrains/signals.lua10
-rw-r--r--advtrains/tracks.lua2
3 files changed, 10 insertions, 10 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index 947c92a..45a51fe 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -1,5 +1,5 @@
--nodedb.lua
---database of all nodes that have 'save_in_nodedb' field set to true in node definition
+--database of all nodes that have 'save_in_at_nodedb' field set to true in node definition
--serialization format:
@@ -140,7 +140,7 @@ end
function ndb.update(pos, pnode)
local node = pnode or minetest.get_node_or_nil(pos)
if not node or node.name=="ignore" then return end
- if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].groups.save_in_nodedb then
+ if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].groups.save_in_at_nodedb then
local nid
for tnid, nname in pairs(ndb_nodeids) do
if nname==node.name then
@@ -235,7 +235,7 @@ end
minetest.register_lbm({
name = "advtrains:nodedb_on_load_update",
- nodenames = {"group:save_in_nodedb"},
+ nodenames = {"group:save_in_at_nodedb"},
run_at_every_load = true,
run_on_every_load = true,
action = ndb.run_lbm,
@@ -255,7 +255,7 @@ ndb.restore_all = function()
if node then
local ori_ndef=minetest.registered_nodes[node.name]
local ndbnode=ndb.get_node_raw(pos)
- if ori_ndef and ori_ndef.groups.save_in_nodedb then --check if this node has been worldedited, and don't replace then
+ if ori_ndef and ori_ndef.groups.save_in_at_nodedb then --check if this node has been worldedited, and don't replace then
if (ndbnode.name~=node.name or ndbnode.param2~=node.param2) then
minetest.swap_node(pos, ndbnode)
atwarn("Replaced",node.name,"@",pos,"with",ndbnode.name)
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index 5c6e484..62b9f03 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -32,7 +32,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
cracky=3,
not_blocking_trains=1,
not_in_creative_inventory=crea,
- save_in_nodedb=1,
+ save_in_at_nodedb=1,
},
mesecons = {effector = {
rules=advtrains.meseconrules,
@@ -65,7 +65,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
cracky=3,
not_blocking_trains=1,
not_in_creative_inventory=crea,
- save_in_nodedb=1,
+ save_in_at_nodedb=1,
},
light_source = 1,
sunlight_propagates=true,
@@ -114,7 +114,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
cracky=3,
not_blocking_trains=1,
not_in_creative_inventory=crea,
- save_in_nodedb=1,
+ save_in_at_nodedb=1,
},
light_source = 1,
sunlight_propagates=true,
@@ -159,7 +159,7 @@ minetest.register_node("advtrains:across_off", {
groups = {
cracky=3,
not_blocking_trains=1,
- save_in_nodedb=1,
+ save_in_at_nodedb=1,
not_in_creative_inventory=nil,
},
light_source = 1,
@@ -200,7 +200,7 @@ minetest.register_node("advtrains:across_on", {
groups = {
cracky=3,
not_blocking_trains=1,
- save_in_nodedb=1,
+ save_in_at_nodedb=1,
not_in_creative_inventory=1,
},
light_source = 1,
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua
index 3771090..fdc8ae9 100644
--- a/advtrains/tracks.lua
+++ b/advtrains/tracks.lua
@@ -303,7 +303,7 @@ function advtrains.register_tracks(tracktype, def, preset)
groups = {
attached_node=1,
["advtrains_track_"..tracktype]=1,
- save_in_nodedb=1,
+ save_in_at_nodedb=1,
dig_immediate=2,
not_in_creative_inventory=(not in_creative_inv and 1 or nil),
not_blocking_trains=1,