File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,18 @@ local function may_replace(pos, player)
141
141
return false
142
142
end
143
143
144
- -- allow replacing air and liquids
145
- if node_name == " air" or node_definition .liquidtype ~= " none" then
144
+ -- allow replacing air
145
+ if node_name == " air" then
146
+ return true
147
+ end
148
+
149
+ -- don't replace nodes inside protections
150
+ if minetest .is_protected (pos , player :get_player_name ()) then
151
+ return false
152
+ end
153
+
154
+ -- allow replacing liquids
155
+ if node_definition .liquidtype ~= " none" then
146
156
return true
147
157
end
148
158
@@ -154,8 +164,7 @@ local function may_replace(pos, player)
154
164
155
165
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
156
166
-- flowers being squished by bones are more realistical than a squished stone, too
157
- -- exception are of course any protected buildable_to
158
- return node_definition .buildable_to and not minetest .is_protected (pos , player :get_player_name ())
167
+ return node_definition .buildable_to
159
168
end
160
169
161
170
local drop = function (pos , itemstack )
You can’t perform that action at this time.
0 commit comments