Fixed hungry mod and improved light node
parent
672d806a44
commit
517758f27e
|
@ -542,34 +542,6 @@ minetest.register_node("default:lava_source", {
|
|||
groups = {lava=3, liquid=2, hot=3, igniter=1},
|
||||
})
|
||||
|
||||
minetest.register_node("default:torch", {
|
||||
description = "Torch",
|
||||
drawtype = "torchlike",
|
||||
wield_light = 5,
|
||||
--tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"},
|
||||
tiles = {
|
||||
{name="default_torch_on_floor_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
{name="default_torch_on_ceiling_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
|
||||
{name="default_torch_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
|
||||
},
|
||||
inventory_image = "default_torch_on_floor.png",
|
||||
wield_image = "default_torch_on_floor.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = LIGHT_MAX-1,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
|
||||
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
|
||||
},
|
||||
groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
mesecon_lamp_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-0.2000,0.375,-0.2000,0.2000,0.5,0.2000},
|
||||
|
@ -579,7 +551,9 @@ mesecon_lamp_box = {
|
|||
|
||||
minetest.register_node("default:torch", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_torch.png"},
|
||||
tiles = {"default_torch.png", "default_torch_side.png"},
|
||||
inventory_image = "default_torch.png",
|
||||
wield_light = 5,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
legacy_wallmounted = true,
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 180 B |
|
@ -7,7 +7,6 @@ if enabled then
|
|||
local hunger_per_meter = 1/500 --1 hp per 500 meter walk
|
||||
local hunger_per_cubic = 1/100 --1 hp per 100 blocks dig
|
||||
|
||||
local hunger = 0
|
||||
local hunger = 0
|
||||
|
||||
local player = nil
|
||||
|
@ -22,6 +21,7 @@ if enabled then
|
|||
minetest.register_on_dignode(function(pos, oldnode, player)
|
||||
hunger = hunger + hunger_per_cubic
|
||||
if hunger >= 0.5 then
|
||||
hunger = 0
|
||||
player:set_hp(player:get_hp()-hunger)
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue