2015-08-18 01:33:43 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
fire = {
|
|
|
|
mod = "redo",
|
|
|
|
spread = true -- fire spreads by default (when enabled)
|
|
|
|
}
|
2014-12-03 16:59:36 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
-- 'Enable fire' setting
|
2015-08-18 01:33:43 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
local fire_enabled = minetest.settings:get_bool("enable_fire")
|
|
|
|
|
|
|
|
if fire_enabled == nil then
|
|
|
|
|
|
|
|
-- enable_fire setting not specified, check for disable_fire
|
|
|
|
local fire_disabled = minetest.settings:get_bool("disable_fire")
|
|
|
|
|
|
|
|
if fire_disabled == nil then
|
|
|
|
|
|
|
|
-- Neither setting specified, check whether singleplayer
|
|
|
|
fire_enabled = minetest.is_singleplayer()
|
|
|
|
else
|
|
|
|
fire_enabled = not fire_disabled
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Particle effects
|
|
|
|
|
|
|
|
local function add_effect(pos)
|
|
|
|
|
|
|
|
minetest.add_particlespawner({
|
|
|
|
amount = 1,
|
|
|
|
time = 0.25,
|
|
|
|
minpos = pos,
|
|
|
|
maxpos = pos,
|
|
|
|
minvel = {x = -1, y = 2, z = -1},
|
|
|
|
maxvel = {x = 1, y = 4, z = 1},
|
|
|
|
minacc = {x = 0, y = 0, z = 0},
|
|
|
|
maxacc = {x = 0, y = 0, z = 0},
|
|
|
|
minexptime = 1,
|
|
|
|
maxexptime = 3,
|
|
|
|
minsize = 2,
|
|
|
|
maxsize = 5,
|
|
|
|
texture = "tnt_smoke.png"
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Flood flame function
|
|
|
|
|
|
|
|
local function flood_flame(pos, oldnode, newnode)
|
|
|
|
|
|
|
|
-- Play flame extinguish sound if liquid is not an 'igniter'
|
|
|
|
if minetest.get_item_group(newnode.name, "igniter") == 0 then
|
|
|
|
|
|
|
|
minetest.sound_play("fire_extinguish_flame", {
|
|
|
|
pos = pos, max_hear_distance = 16, gain = 0.15}, true)
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Remove the flame
|
|
|
|
return false
|
|
|
|
end
|
2016-12-03 04:54:44 +00:00
|
|
|
|
|
|
|
-- Flame nodes
|
2015-08-18 01:33:43 +01:00
|
|
|
|
2013-05-18 16:05:16 +02:00
|
|
|
minetest.register_node("fire:basic_flame", {
|
2014-09-21 22:25:00 +02:00
|
|
|
drawtype = "firelike",
|
2015-09-22 21:37:05 +01:00
|
|
|
tiles = {
|
|
|
|
{
|
|
|
|
name = "fire_basic_flame_animated.png",
|
|
|
|
animation = {
|
|
|
|
type = "vertical_frames",
|
|
|
|
aspect_w = 16,
|
|
|
|
aspect_h = 16,
|
|
|
|
length = 1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2013-05-18 16:05:16 +02:00
|
|
|
inventory_image = "fire_basic_flame.png",
|
2015-08-26 02:31:56 +01:00
|
|
|
paramtype = "light",
|
2017-01-05 01:34:22 +00:00
|
|
|
light_source = 13,
|
2013-05-18 16:05:16 +02:00
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
2015-08-26 02:31:56 +01:00
|
|
|
sunlight_propagates = true,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
floodable = true,
|
2013-05-18 16:05:16 +02:00
|
|
|
damage_per_second = 4,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
groups = {igniter = 2, dig_immediate = 3, fire = 1, not_in_creative_inventory = 1},
|
|
|
|
drop = {},
|
|
|
|
|
2016-03-12 20:19:37 -08:00
|
|
|
on_timer = function(pos)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-03-12 20:19:37 -08:00
|
|
|
local f = minetest.find_node_near(pos, 1, {"group:flammable"})
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
if not fire_enabled or not f then
|
|
|
|
|
|
|
|
minetest.swap_node(pos, {name = "air"})
|
|
|
|
|
2016-03-12 20:19:37 -08:00
|
|
|
return
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-12-03 04:54:44 +00:00
|
|
|
-- Restart timer
|
2016-03-12 20:19:37 -08:00
|
|
|
return true
|
|
|
|
end,
|
2014-12-03 16:59:36 +01:00
|
|
|
|
|
|
|
on_construct = function(pos)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
local n = 0
|
|
|
|
|
|
|
|
-- if fire not enabled then reduce amount of time flame stays in world
|
|
|
|
if not fire_enabled then
|
|
|
|
n = 29
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.get_node_timer(pos):start(math.random(30 - n, 60 - n))
|
2013-05-18 16:05:16 +02:00
|
|
|
end,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
on_flood = flood_flame
|
2015-09-22 21:37:05 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("fire:permanent_flame", {
|
|
|
|
description = "Permanent Flame",
|
|
|
|
drawtype = "firelike",
|
|
|
|
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",
|
|
|
|
paramtype = "light",
|
2017-01-05 01:34:22 +00:00
|
|
|
light_source = 13,
|
2015-09-22 21:37:05 +01:00
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
sunlight_propagates = true,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
floodable = true,
|
2015-09-22 21:37:05 +01:00
|
|
|
damage_per_second = 4,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
groups = {igniter = 2, fire = 1, dig_immediate = 3},
|
|
|
|
drop = {},
|
2013-05-18 16:05:16 +02:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
on_flood = flood_flame
|
|
|
|
})
|
2016-05-05 00:55:56 +01:00
|
|
|
|
|
|
|
-- Flint and steel
|
|
|
|
|
2016-03-11 18:27:22 +01:00
|
|
|
minetest.register_tool("fire:flint_and_steel", {
|
|
|
|
description = "Flint and Steel",
|
|
|
|
inventory_image = "fire_flint_steel.png",
|
2016-11-25 02:24:46 +00:00
|
|
|
sound = {breaks = "default_tool_breaks"},
|
|
|
|
|
2016-03-11 18:27:22 +01:00
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2017-03-10 18:43:44 +00:00
|
|
|
local sound_pos = pointed_thing.above or user:get_pos()
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
minetest.sound_play("fire_flint_and_steel",
|
|
|
|
{pos = sound_pos, gain = 0.5, max_hear_distance = 8}, true)
|
|
|
|
|
2017-03-29 21:02:26 +02:00
|
|
|
local player_name = user:get_player_name()
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2017-03-10 18:43:44 +00:00
|
|
|
if pointed_thing.type == "node" then
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2017-03-10 18:43:44 +00:00
|
|
|
local node_under = minetest.get_node(pointed_thing.under).name
|
2016-10-24 22:24:49 +02:00
|
|
|
local nodedef = minetest.registered_nodes[node_under]
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-10-24 22:24:49 +02:00
|
|
|
if not nodedef then
|
|
|
|
return
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2017-03-10 18:43:44 +00:00
|
|
|
if minetest.is_protected(pointed_thing.under, player_name) then
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-10-24 22:24:49 +02:00
|
|
|
minetest.chat_send_player(player_name, "This area is protected")
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-10-24 22:24:49 +02:00
|
|
|
return
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-10-24 22:24:49 +02:00
|
|
|
if nodedef.on_ignite then
|
2017-03-10 18:43:44 +00:00
|
|
|
nodedef.on_ignite(pointed_thing.under, user)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-10-24 22:24:49 +02:00
|
|
|
elseif minetest.get_item_group(node_under, "flammable") >= 1
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
and minetest.get_node(pointed_thing.above).name == "air" then
|
|
|
|
|
2017-03-10 18:43:44 +00:00
|
|
|
minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"})
|
2016-03-11 18:27:22 +01:00
|
|
|
end
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2017-03-29 21:02:26 +02:00
|
|
|
if not (creative and creative.is_enabled_for
|
|
|
|
and creative.is_enabled_for(player_name)) then
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-12-03 04:54:44 +00:00
|
|
|
-- Wear tool
|
2016-11-25 02:24:46 +00:00
|
|
|
local wdef = itemstack:get_definition()
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-11-25 02:24:46 +00:00
|
|
|
itemstack:add_wear(1000)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-12-03 04:54:44 +00:00
|
|
|
-- Tool break sound
|
2016-11-25 02:24:46 +00:00
|
|
|
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
minetest.sound_play(wdef.sound.breaks,
|
|
|
|
{pos = sound_pos, gain = 0.5}, true)
|
2016-11-25 02:24:46 +00:00
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-03-11 18:27:22 +01:00
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "fire:flint_and_steel",
|
|
|
|
recipe = {
|
|
|
|
{"default:flint", "default:steel_ingot"}
|
|
|
|
}
|
|
|
|
})
|
2015-08-18 01:33:43 +01:00
|
|
|
|
2016-05-05 00:55:56 +01:00
|
|
|
-- Override coalblock to enable permanent flame above
|
|
|
|
-- Coalblock is non-flammable to avoid unwanted basic_flame nodes
|
|
|
|
|
|
|
|
minetest.override_item("default:coalblock", {
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-05-05 00:55:56 +01:00
|
|
|
after_destruct = function(pos, oldnode)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-05-05 00:55:56 +01:00
|
|
|
pos.y = pos.y + 1
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-05-05 00:55:56 +01:00
|
|
|
if minetest.get_node(pos).name == "fire:permanent_flame" then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
end
|
|
|
|
end,
|
2015-08-18 01:33:43 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
on_ignite = function(pos, igniter)
|
2015-08-18 01:33:43 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
|
2013-05-18 16:05:16 +02:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
if minetest.get_node(flame_pos).name == "air" then
|
|
|
|
minetest.swap_node(flame_pos, {name = "fire:permanent_flame"})
|
2013-05-18 16:05:16 +02:00
|
|
|
end
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
})
|
2015-08-18 01:33:43 +01:00
|
|
|
|
2016-12-03 04:54:44 +00:00
|
|
|
-- Deprecated function kept temporarily to avoid crashes if mod fire nodes call it
|
|
|
|
|
|
|
|
function fire.update_sounds_around(pos)
|
|
|
|
end
|
|
|
|
|
2016-08-15 21:29:52 +01:00
|
|
|
-- Enable the following ABMs according to 'enable fire' setting
|
2015-08-26 02:31:56 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
if fire_enabled then
|
2015-09-22 21:37:05 +01:00
|
|
|
|
|
|
|
-- Ignite neighboring nodes, add basic flames
|
2015-08-26 02:31:56 +01:00
|
|
|
|
|
|
|
minetest.register_abm({
|
2016-08-08 10:56:13 +01:00
|
|
|
label = "Ignite flame",
|
2015-08-26 02:31:56 +01:00
|
|
|
nodenames = {"group:flammable"},
|
|
|
|
neighbors = {"group:igniter"},
|
|
|
|
interval = 7,
|
2016-03-19 20:49:29 +00:00
|
|
|
chance = 12,
|
2015-11-05 01:17:13 +00:00
|
|
|
catch_up = false,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-07-11 15:11:57 +02:00
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
if fire.spread == false
|
|
|
|
or minetest.find_node_near(pos, 1, {"group:puts_out_fire"}) then
|
2015-08-26 02:31:56 +01:00
|
|
|
return
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-07-11 15:11:57 +02:00
|
|
|
local p = minetest.find_node_near(pos, 1, {"air"})
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2015-08-26 02:31:56 +01:00
|
|
|
if p then
|
|
|
|
minetest.set_node(p, {name = "fire:basic_flame"})
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2016-12-03 04:54:44 +00:00
|
|
|
-- Remove flammable nodes around basic flame
|
2015-08-26 02:31:56 +01:00
|
|
|
|
|
|
|
minetest.register_abm({
|
2016-08-08 10:56:13 +01:00
|
|
|
label = "Remove flammable nodes",
|
2015-08-26 02:31:56 +01:00
|
|
|
nodenames = {"fire:basic_flame"},
|
2016-03-12 20:19:37 -08:00
|
|
|
neighbors = "group:flammable",
|
2015-08-26 02:31:56 +01:00
|
|
|
interval = 5,
|
2016-03-12 20:19:37 -08:00
|
|
|
chance = 18,
|
2015-11-05 01:17:13 +00:00
|
|
|
catch_up = false,
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-07-11 15:11:57 +02:00
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
if fire.spread == false
|
|
|
|
or minetest.find_node_near(pos, 1, {"group:puts_out_fire"}) then
|
|
|
|
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2016-07-11 15:11:57 +02:00
|
|
|
local p = minetest.find_node_near(pos, 1, {"group:flammable"})
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-03-12 20:19:37 -08:00
|
|
|
if p then
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-06-26 14:46:15 +02:00
|
|
|
local flammable_node = minetest.get_node(p)
|
|
|
|
local def = minetest.registered_nodes[flammable_node.name]
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
2016-03-12 17:50:09 -08:00
|
|
|
if def.on_burn then
|
|
|
|
def.on_burn(p)
|
|
|
|
else
|
|
|
|
minetest.remove_node(p)
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
add_effect(p)
|
|
|
|
|
2016-11-22 04:45:31 +00:00
|
|
|
minetest.check_for_falling(p)
|
2015-08-26 02:31:56 +01:00
|
|
|
end
|
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
end
|
2015-08-26 02:31:56 +01:00
|
|
|
})
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
-- used to drop items inside a chest or container
|
|
|
|
|
|
|
|
function fire.drop_items(pos, invstring)
|
|
|
|
|
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
local inv = meta:get_inventory()
|
2015-08-26 02:31:56 +01:00
|
|
|
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
for i = 1, inv:get_size(invstring) do
|
|
|
|
|
|
|
|
local m_stack = inv:get_stack(invstring, i)
|
|
|
|
local obj = minetest.add_item(pos, m_stack)
|
|
|
|
|
|
|
|
if obj then
|
|
|
|
|
|
|
|
obj:set_velocity({
|
|
|
|
x = math.random(-10, 10) / 9,
|
|
|
|
y = 1,
|
|
|
|
z = math.random(-10, 10) / 9
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
2015-08-26 02:31:56 +01:00
|
|
|
end
|
upgrade beds,boats,bucket,carts,creative,doors,farming,fire,stairs,tnt,wool
* beds https://codeberg.org/minenux/minetest-mod-beds/commit/7b6fae96d5e273dad9a373e63eb958145c9bfbef
* boats https://codeberg.org/minenux/minetest-mod-boats/commit/3832de08f705d5d2e7b5a971760e5fad1653305f
* bucket https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5
* carts https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933
* creative https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db
* doors https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b
* farming https://codeberg.org/minenux/minetest-mod-farming/commit/10de84d12d24a87f3aa9abef73f87c6cebb2614c
* fire https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2
* stairs https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110
* tnt https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027
* wool https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a
2022-03-01 23:26:11 -04:00
|
|
|
|
|
|
|
-- override default chest to drop contents on burn
|
|
|
|
|
|
|
|
if minetest.registered_nodes["default:chest"] then
|
|
|
|
|
|
|
|
local groups = minetest.registered_nodes["default:chest"].groups
|
|
|
|
|
|
|
|
groups.flammable = 3
|
|
|
|
|
|
|
|
minetest.override_item("default:chest", {
|
|
|
|
groups = groups,
|
|
|
|
|
|
|
|
on_burn = function(p)
|
|
|
|
|
|
|
|
fire.drop_items(p, "main")
|
|
|
|
|
|
|
|
minetest.remove_node(p)
|
|
|
|
end
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- /fire [on/off] command to quickly stop flames spreading without reset
|
|
|
|
|
|
|
|
minetest.register_chatcommand("fire", {
|
|
|
|
params = "<on/off>",
|
|
|
|
description = "Disbles fire spreading when set to OFF",
|
|
|
|
privs = {server = true},
|
|
|
|
|
|
|
|
func = function (name, param)
|
|
|
|
|
|
|
|
if not param or param == "" then
|
|
|
|
return false, "No paramater set, use /fire (on|off)"
|
|
|
|
end
|
|
|
|
|
|
|
|
if param == "on" or param == "ON" then
|
|
|
|
|
|
|
|
fire.spread = true
|
|
|
|
|
|
|
|
return false, "fire spreading is ON"
|
|
|
|
|
|
|
|
elseif param == "off" or param == "OFF" then
|
|
|
|
|
|
|
|
fire.spread = false
|
|
|
|
|
|
|
|
return false, "fire spreading is OFF"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|