Replace xdecor fire by fire from Minetest Game
This commit is contained in:
parent
69bc2be4e3
commit
832534072d
@ -12,7 +12,7 @@ minetest.register_craftitem("xdecor:bowl_soup", {
|
|||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
on_use = function(itemstack, user)
|
on_use = function(itemstack, user)
|
||||||
itemstack:replace("xdecor:bowl 1")
|
itemstack:replace("xdecor:bowl 1")
|
||||||
if minetest.get_modpath("hunger") then
|
if rawget(_G, "hunger") then
|
||||||
minetest.item_eat(20)
|
minetest.item_eat(20)
|
||||||
else
|
else
|
||||||
user:set_hp(20)
|
user:set_hp(20)
|
||||||
@ -21,25 +21,27 @@ minetest.register_craftitem("xdecor:bowl_soup", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("xdecor:flint_steel", {
|
if rawget(_G, "fire") then
|
||||||
description = "Flint & Steel",
|
minetest.register_tool("xdecor:flint_steel", {
|
||||||
inventory_image = "xdecor_flint_steel.png",
|
description = "Flint & Steel",
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
inventory_image = "xdecor_flint_steel.png",
|
||||||
local player = user:get_player_name()
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
local pt = pointed_thing
|
local player = user:get_player_name()
|
||||||
|
local pt = pointed_thing
|
||||||
|
|
||||||
if pt.type == "node" and minetest.get_node(pt.above).name == "air" then
|
if pt.type == "node" and minetest.get_node(pt.above).name == "air" then
|
||||||
if not minetest.is_protected(pt.above, player) then
|
if not minetest.is_protected(pt.above, player) then
|
||||||
minetest.set_node(pt.above, {name="xdecor:fire"})
|
minetest.set_node(pt.above, {name="fire:basic_flame"})
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player, "[!] This area is protected")
|
minetest.chat_send_player(player, "[!] This area is protected")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
itemstack:add_wear(1000)
|
itemstack:add_wear(2000)
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_tool("xdecor:hammer", {
|
minetest.register_tool("xdecor:hammer", {
|
||||||
description = "Hammer",
|
description = "Hammer",
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
default
|
default
|
||||||
doors
|
|
||||||
xpanes
|
|
||||||
bucket
|
bucket
|
||||||
|
doors
|
||||||
stairs
|
stairs
|
||||||
oresplus?
|
xpanes
|
||||||
3d_armor?
|
3d_armor?
|
||||||
|
fire?
|
||||||
|
oresplus?
|
||||||
|
17
nodes.lua
17
nodes.lua
@ -297,18 +297,11 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
inv:set_size("enderchest", 8*4)
|
inv:set_size("enderchest", 8*4)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
xdecor.register("fire", {
|
if rawget(_G, "fire") then
|
||||||
description = "Fancy Fire",
|
minetest.register_alias("xdecor:fire", "fire:basic_flame")
|
||||||
drawtype = "plantlike",
|
else
|
||||||
light_source = 14,
|
minetest.register_alias("xdecor:fire", "air")
|
||||||
walkable = false,
|
end
|
||||||
tiles = {{ name = "xdecor_fire_anim.png",
|
|
||||||
animation = {type="vertical_frames", length=1.5 }}},
|
|
||||||
damage_per_second = 4,
|
|
||||||
drop = "",
|
|
||||||
selection_box = xdecor.pixelbox(16, {{4, 0, 4, 8, 3, 8}}),
|
|
||||||
groups = {dig_immediate=3, hot=3, not_in_creative_inventory=1}
|
|
||||||
})
|
|
||||||
|
|
||||||
xdecor.register("ivy", {
|
xdecor.register("ivy", {
|
||||||
description = "Ivy",
|
description = "Ivy",
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 570 B |
Loading…
Reference in New Issue
Block a user