Minetest mod: Toggle privs in areas
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
884 B

if minetest.get_modpath("vehicles") then
minetest.register_privilege("vehicles", {
description = "Player is allowed to drive vehicles.",
give_to_singleplayer= true,
})
minetest.register_node("creative_regions:protector_vehicles", {
description = "No driving protector",
tiles = {"default_cobble.png^vehicles_wheel.png"},
is_ground_content = true,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=1},
light_source = 1,
after_place_node = function(pos, placer, itemstack, pointed_thing)
return creative_regions.protector_set_area_privs(pos, placer, itemstack, pointed_thing, "-vehicles", "No driving Protector")
end,
can_dig = creative_regions.protector_can_dig,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
return creative_regions.protector_remove_area_privs(pos, oldnode, oldmetadata, digger, "No driving protector")
end
})
end