master
parent
983541e856
commit
56db072407
|
@ -0,0 +1,8 @@
|
|||
Campfire by rnd
|
||||
(attempt to make gameplay more tactical)
|
||||
|
||||
Campfire is built with 2 cobble (cobble,empty,cobble) it can be lighted using tree fuel by punching it. It needs
|
||||
to be built within 10 block distance to other active campfire owned by you or ADMIN or it wont be possible to light it up.
|
||||
|
||||
You need to be close to active campfire owned by you or ADMIN or you start loosing health. After you die you have 1 free minute to get to campfire or your bones.
|
||||
Any player can dig unprotected active campfire but they cant dig campfire owned by ADMIN.
|
4
init.lua
4
init.lua
|
@ -31,7 +31,7 @@ minetest.register_node("campfire:fire_active", {
|
|||
},
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
if meta:get_string("owner")~="ADMIN" then
|
||||
if meta:get_string("owner")~="ADMIN" and not( minetest.is_protected(pos,player:get_player_name()) ) then
|
||||
minetest.set_node(pos,{name = "air"});
|
||||
end
|
||||
return false
|
||||
|
@ -150,6 +150,8 @@ minetest.register_on_joinplayer(function(player)
|
|||
minetest.chat_send_player(name,"You have one minute to get near active campfire owned by you or ADMIN.")
|
||||
end
|
||||
if not campfire.count[name] then campfire.count[name] = 0 end
|
||||
|
||||
player:set_physics_override({speed = 0.75})
|
||||
end
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue