1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

MinetestForFun Game : Update all (but doors)

- Everything is updated, except doors
 - Some textures are moved to other mods (removed from default, but still used by those mods)
This commit is contained in:
LeMagnesium
2016-04-09 21:56:43 +02:00
parent 9a649b77f0
commit de031dddf1
79 changed files with 1673 additions and 1348 deletions

View File

@ -30,3 +30,7 @@ fire_large.ogg sampled from:
fire_basic_flame_animated.png:
Muadtralk
fire_flint_steel.png
Gambit (WTFPL)

View File

@ -5,25 +5,30 @@
fire = {}
-- Register flame node
-- Register flame nodes
minetest.register_node("fire:basic_flame", {
description = "Fire",
drawtype = "firelike",
tiles = {{
name = "fire_basic_flame_animated.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 1},
}},
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",
light_source = 14,
groups = {igniter = 2, dig_immediate = 3, hot = 3},
drop = '',
walkable = false,
buildable_to = true,
sunlight_propagates = true,
damage_per_second = 4,
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
on_construct = function(pos)
minetest.after(0, fire.on_flame_add_at, pos)
@ -33,9 +38,70 @@ minetest.register_node("fire:basic_flame", {
minetest.after(0, fire.on_flame_remove_at, pos)
end,
on_blast = function() end, -- unaffected by explosions
on_blast = function()
end, -- unaffected by explosions
})
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",
light_source = 14,
walkable = false,
buildable_to = true,
sunlight_propagates = true,
damage_per_second = 4,
groups = {igniter = 2, dig_immediate = 3},
drop = "",
on_blast = function()
end,
})
minetest.register_tool("fire:flint_and_steel", {
description = "Flint and Steel",
inventory_image = "fire_flint_steel.png",
on_use = function(itemstack, user, pointed_thing)
local player_name = user:get_player_name()
local pt = pointed_thing
if pt.type == "node" and minetest.get_node(pt.above).name == "air" then
itemstack:add_wear(1000)
local node_under = minetest.get_node(pt.under).name
if minetest.get_item_group(node_under, "flammable") >= 1 then
if not minetest.is_protected(pt.above, player_name) then
minetest.set_node(pt.above, {name = "fire:basic_flame"})
else
minetest.chat_send_player(player_name, "This area is protected")
end
end
end
if not minetest.setting_getbool("creative_mode") then
return itemstack
end
end
})
minetest.register_craft({
output = "fire:flint_and_steel",
recipe = {
{"default:flint", "default:steel_ingot"}
}
})
-- Get sound area of position
@ -135,7 +201,7 @@ minetest.register_abm({
nodenames = {"fire:basic_flame", "fire:permanent_flame"},
neighbors = {"group:puts_out_fire"},
interval = 3,
chance = 2,
chance = 1,
catch_up = false,
action = function(p0, node, _, _)
minetest.remove_node(p0)
@ -149,12 +215,12 @@ minetest.register_abm({
if minetest.setting_getbool("disable_fire") then
-- Extinguish flames quickly with dedicated ABM
-- Remove basic flames only
minetest.register_abm({
nodenames = {"fire:basic_flame"},
interval = 3,
chance = 2,
interval = 7,
chance = 1,
catch_up = false,
action = function(p0, node, _, _)
minetest.remove_node(p0)
@ -177,13 +243,13 @@ else
end,
})
-- Ignite neighboring nodes
-- Ignite neighboring nodes, add basic flames
minetest.register_abm({
nodenames = {"group:flammable"},
neighbors = {"group:igniter"},
interval = 7,
chance = 16,
chance = 12,
catch_up = false,
action = function(p0, node, _, _)
-- If there is water or stuff like that around node, don't ignite
@ -197,23 +263,27 @@ else
end,
})
-- Remove flames and flammable nodes
-- Remove basic flames and flammable nodes
minetest.register_abm({
nodenames = {"fire:basic_flame"},
interval = 5,
chance = 16,
chance = 6,
catch_up = false,
action = function(p0, node, _, _)
-- If there are no flammable nodes around flame, remove flame
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
local p = minetest.find_node_near(p0, 1, {"group:flammable"})
if not p then
minetest.remove_node(p0)
return
end
if math.random(1, 4) == 1 then
-- remove flammable nodes around flame
local p = minetest.find_node_near(p0, 1, {"group:flammable"})
if p then
local node = minetest.get_node(p)
local def = minetest.registered_nodes[node.name]
if def.on_burn then
def.on_burn(p)
else
minetest.remove_node(p)
nodeupdate(p)
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB