tidy code, fix hud error on 5.9dev
This commit is contained in:
parent
414f7922fd
commit
479efd8e8f
4 changed files with 21 additions and 5 deletions
|
|
@ -31,7 +31,7 @@ function register_door(name, def)
|
|||
inventory_image = def.inventory_image,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not pointed_thing.type == "node" then
|
||||
if pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ function register_door(name, def)
|
|||
end
|
||||
|
||||
pos.y = pos.y + dir
|
||||
if not minetest.get_node(pos).name == check_name then
|
||||
if minetest.get_node(pos).name ~= check_name then
|
||||
return false
|
||||
end
|
||||
if minetest.is_protected(pos, user:get_player_name()) then
|
||||
|
|
@ -166,6 +166,7 @@ function register_door(name, def)
|
|||
type = "fixed",
|
||||
fixed = def.selection_box_bottom
|
||||
},
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = def.groups,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
|
|
@ -206,6 +207,7 @@ function register_door(name, def)
|
|||
type = "fixed",
|
||||
fixed = def.selection_box_top
|
||||
},
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = def.groups,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
|
|
@ -246,6 +248,7 @@ function register_door(name, def)
|
|||
type = "fixed",
|
||||
fixed = def.selection_box_bottom
|
||||
},
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = def.groups,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
|
|
@ -286,6 +289,7 @@ function register_door(name, def)
|
|||
type = "fixed",
|
||||
fixed = def.selection_box_top
|
||||
},
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = def.groups,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
|
|
@ -318,6 +322,7 @@ local name = "protector:door_wood"
|
|||
register_door(name, {
|
||||
description = S("Protected Wooden Door"),
|
||||
inventory_image = "doors_wood.png^protector_logo.png",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {
|
||||
snappy = 1, choppy = 2, dig_immediate = 2,
|
||||
unbreakable = 1, axey = 1, --door = 1
|
||||
|
|
@ -362,6 +367,7 @@ local name = "protector:door_steel"
|
|||
register_door(name, {
|
||||
description = S("Protected Steel Door"),
|
||||
inventory_image = "doors_steel.png^protector_logo.png",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {
|
||||
snappy = 1, bendy = 2, cracky = 1,
|
||||
level = mcl and 0 or 2, pickaxey = 2, unbreakable = 1, -- door = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue