Added compatibility with advtrains mod master
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Fri, 8 Dec 2017 13:04:59 +0000 (14:04 +0100)
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Fri, 8 Dec 2017 13:04:59 +0000 (14:04 +0100)
display_lib/init.lua
ontime_clocks/nodes.lua
signs/common.lua

index 4416928..210aac9 100644 (file)
@@ -149,9 +149,10 @@ end
 --- On_activate callback for display_lib entities. Calls on_display_update callbacks 
 --- of corresponding node for each entity.
 function display_lib.on_activate(entity, staticdata)
-       if entity then
-               call_node_on_display_update(entity.object:getpos(), entity.object)
-       end
+   if entity then
+      entity.object:set_armor_groups({immortal=1})
+      call_node_on_display_update(entity.object:getpos(), entity.object)
+   end
 end
 
 --- On_place callback for display_lib items. Does nothing more than preventing item
index 8055c18..70bbfd1 100644 (file)
@@ -35,7 +35,7 @@ minetest.register_node("ontime_clocks:green_digital", {
                wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } 
        },
        tiles = {"ontime_clocks_digital.png"},
-       groups = {oddly_breakable_by_hand=1},
+       groups = {oddly_breakable_by_hand=1,not_blocking_trains=1},
        display_entities = {
                ["ontime_clocks:display"] = {
                        depth = 13/32 - 0.01,
@@ -73,7 +73,7 @@ minetest.register_node("ontime_clocks:red_digital", {
                wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } 
        },
        tiles = {"ontime_clocks_digital.png"},
-       groups = {oddly_breakable_by_hand=1},
+       groups = {oddly_breakable_by_hand=1,not_blocking_trains=1},
        display_entities = {
                ["ontime_clocks:display"] = {
                        depth = 13/32 - 0.01,
@@ -111,7 +111,7 @@ minetest.register_node("ontime_clocks:white", {
                wall_top = { -7/16, 0.5, -7/16, 7/16, 7/16, 7/16},    
        },
        tiles = {"ontime_clocks_white.png"},
-       groups = {choppy=1,oddly_breakable_by_hand=1},
+       groups = {choppy=1,oddly_breakable_by_hand=1,not_blocking_trains=1},
        display_entities = { 
                ["ontime_clocks:display"] = {
                        depth = 6/16 - 0.01,
@@ -148,7 +148,7 @@ minetest.register_node("ontime_clocks:frameless_black", {
                wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } 
        },
        tiles = {"ontime_clocks_frameless.png"},
-       groups = {choppy=1,oddly_breakable_by_hand=1},
+       groups = {choppy=1,oddly_breakable_by_hand=1,not_blocking_trains=1},
        display_entities = { 
                ["ontime_clocks:display"] = {
                        depth = 7/16,
@@ -185,7 +185,7 @@ minetest.register_node("ontime_clocks:frameless_gold", {
                wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } 
        },
        tiles = {"ontime_clocks_frameless.png^[colorize:#FF0"},
-       groups = {choppy=1,oddly_breakable_by_hand=1},
+       groups = {choppy=1,oddly_breakable_by_hand=1,not_blocking_trains=1},
        display_entities = { 
                ["ontime_clocks:display"] = {
                        depth = 7/16,
@@ -222,7 +222,7 @@ minetest.register_node("ontime_clocks:frameless_white", {
                wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } 
        },
        tiles = {"ontime_clocks_frameless.png^[colorize:#FFF"},
-       groups = {choppy=1,oddly_breakable_by_hand=1},
+       groups = {choppy=1,oddly_breakable_by_hand=1,not_blocking_trains=1},
        display_entities = { 
                ["ontime_clocks:display"] = {
                        depth = 7/16,
index 34abd40..559f7f7 100644 (file)
@@ -149,7 +149,7 @@ function signs.register_sign(mod, name, model)
                        fixed = {-model.width/2, -model.height/2, 0.5,
                                         model.width/2, model.height/2, 0.5 - model.depth},
                },
-               groups = {choppy=2, dig_immediate=2},
+               groups = {choppy=2, dig_immediate=2, not_blocking_trains = 1},
                sounds = default.node_sound_defaults(),
                display_entities = {
                        ["signs:display_text"] = {