Hendrik Langer
4 years ago
4 changed files with 40 additions and 1 deletions
@ -1,4 +1,4 @@ |
|||||
name = creative_regions |
name = creative_regions |
||||
description = Toggle privs in areas |
description = Toggle privs in areas |
||||
depends = default, sfinv |
depends = default, sfinv |
||||
optional_depends = areas, unified_inventory, hunger_ng |
optional_depends = areas, unified_inventory, hunger_ng, vehicles |
||||
|
@ -0,0 +1,23 @@ |
|||||
|
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 |
Loading…
Reference in new issue