mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-16 23:10:18 +01:00
Merge branch 'master' of git://github.com/celeron55/minetest_game
This commit is contained in:
commit
8dac13bc94
|
@ -28,3 +28,5 @@ fire_small.ogg sampled from:
|
|||
fire_large.ogg sampled from:
|
||||
http://www.freesound.org/people/Dynamicell/sounds/17548/
|
||||
|
||||
fire_basic_flame_animated.png:
|
||||
Muadtralk
|
||||
|
|
|
@ -2,15 +2,28 @@
|
|||
|
||||
minetest.register_node("fire:basic_flame", {
|
||||
description = "Fire",
|
||||
drawtype = "glasslike",
|
||||
tiles = {"fire_basic_flame.png"},
|
||||
drawtype = "plantlike",
|
||||
tiles = {{
|
||||
name="fire_basic_flame_animated.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1},
|
||||
}},
|
||||
inventory_image = "fire_basic_flame.png",
|
||||
light_source = 14,
|
||||
groups = {igniter=2,dig_immediate=3},
|
||||
drop = '',
|
||||
walkable = false,
|
||||
damage_per_second = 4,
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
fire.on_flame_add_at(pos)
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
fire.on_flame_remove_at(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
local fire = {}
|
||||
fire = {}
|
||||
fire.D = 6
|
||||
-- key: position hash of low corner of area
|
||||
-- value: {handle=sound handle, name=sound name}
|
||||
|
@ -88,18 +101,6 @@ function fire.flame_should_extinguish(pos)
|
|||
return (#ps ~= 0)
|
||||
end
|
||||
|
||||
minetest.register_on_placenode(function(pos, newnode, placer)
|
||||
if newnode.name == "fire:basic_flame" then
|
||||
fire.on_flame_add_at(pos)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
if oldnode.name == "fire:basic_flame" then
|
||||
fire.on_flame_remove_at(pos)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Ignite neighboring nodes
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:flammable"},
|
||||
|
|
BIN
mods/fire/textures/fire_basic_flame_animated.png
Normal file
BIN
mods/fire/textures/fire_basic_flame_animated.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue
Block a user