@@ -68,29 +68,31 @@ minetest.register_node("ctf_map:spike", {
68
68
})
69
69
70
70
for _ , team in ipairs (ctf_teams .teamlist ) do
71
- local spikecolor = ctf_teams .team [team ].color
72
-
73
- minetest .register_node (" ctf_map:spike_" .. team , {
74
- description = HumanReadable (team ).. " Team Spike" ,
75
- drawtype = " plantlike" ,
76
- tiles = {" ctf_map_spike.png^[colorize:" .. spikecolor .. " :150" },
77
- inventory_image = " ctf_map_spike.png^[colorize:" .. spikecolor .. " :150" ,
78
- use_texture_alpha = " clip" ,
79
- paramtype = " light" ,
80
- paramtype2 = " meshoptions" ,
81
- sunlight_propagates = true ,
82
- walkable = false ,
83
- damage_per_second = 7 ,
84
- groups = {cracky = 1 , level = 2 },
85
- drop = " ctf_map:spike" ,
86
- selection_box = {
87
- type = " fixed" ,
88
- fixed = {- 0.5 , - 0.5 , - 0.5 , 0.5 , 0 , 0.5 },
89
- },
90
- on_place = function (itemstack , placer , pointed_thing )
91
- return minetest .item_place (itemstack , placer , pointed_thing , 34 )
92
- end
93
- })
71
+ if not ctf_teams .team [team ].not_playing then
72
+ local spikecolor = ctf_teams .team [team ].color
73
+
74
+ minetest .register_node (" ctf_map:spike_" .. team , {
75
+ description = HumanReadable (team ).. " Team Spike" ,
76
+ drawtype = " plantlike" ,
77
+ tiles = {" ctf_map_spike.png^[colorize:" .. spikecolor .. " :150" },
78
+ inventory_image = " ctf_map_spike.png^[colorize:" .. spikecolor .. " :150" ,
79
+ use_texture_alpha = " clip" ,
80
+ paramtype = " light" ,
81
+ paramtype2 = " meshoptions" ,
82
+ sunlight_propagates = true ,
83
+ walkable = false ,
84
+ damage_per_second = 7 ,
85
+ groups = {cracky = 1 , level = 2 },
86
+ drop = " ctf_map:spike" ,
87
+ selection_box = {
88
+ type = " fixed" ,
89
+ fixed = {- 0.5 , - 0.5 , - 0.5 , 0.5 , 0 , 0.5 },
90
+ },
91
+ on_place = function (itemstack , placer , pointed_thing )
92
+ return minetest .item_place (itemstack , placer , pointed_thing , 34 )
93
+ end
94
+ })
95
+ end
94
96
end
95
97
96
98
minetest .register_on_player_hpchange (function (player , hp_change , reason )
0 commit comments