Skip to content

Commit

Permalink
Is ground content (#13)
Browse files Browse the repository at this point in the history
* protect2 isn't ground content

* protect_hidden isn't ground content

* unrelated luacheck fix
  • Loading branch information
SwissalpS authored Feb 26, 2024
1 parent db42717 commit b56c82e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions admin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ minetest.register_node("protector:protect_hidden", {
floodable = false,
drop = "",
groups = {not_in_creative_inventory = 1, unbreakable = 1},
is_ground_content = false,
on_blast = function() end,
-- 1px block inside door hinge near node top
collision_box = {
Expand Down
4 changes: 2 additions & 2 deletions doors_chest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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

Expand Down Expand Up @@ -128,7 +128,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
Expand Down
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ minetest.register_node("protector:protect2", {
inventory_image = "protector_logo.png",
sounds = default.node_sound_stone_defaults(),
groups = {dig_immediate = 2, unbreakable = 1},
is_ground_content = false,
paramtype = "light",
paramtype2 = "wallmounted",
legacy_wallmounted = true,
Expand Down

0 comments on commit b56c82e

Please sign in to comment.