8 22 2022 features (#2)
* add new particle features in 5.6 and above * get rid of nonsensical duplicate tool and merge functionality * replace version check with much more sane features check * remove now useless recipe * remove pointless default depmaster
parent
2c27bc601a
commit
51509658c4
|
@ -4,9 +4,15 @@ Original textures from Semmett9's fake_fire, now found in the homedecor modpack
|
||||||
with adjustments and recolouring by Shara RedCat.
|
with adjustments and recolouring by Shara RedCat.
|
||||||
License: CC-BY-SA 3.0 or higher (https://creativecommons.org/licenses/by/3.0/).
|
License: CC-BY-SA 3.0 or higher (https://creativecommons.org/licenses/by/3.0/).
|
||||||
|
|
||||||
|
flame_spark.png x2048
|
||||||
|
License: CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
|
||||||
|
|
||||||
Code:
|
Code:
|
||||||
License: MIT (https://opensource.org/licenses/MIT)
|
License: MIT (https://opensource.org/licenses/MIT)
|
||||||
By Shara RedCat and tenplus1
|
Shara RedCat
|
||||||
|
tenplus1
|
||||||
|
wsor
|
||||||
|
x2048
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -1,3 +1,3 @@
|
||||||
name = abriflame
|
name = abriflame
|
||||||
depends = default, fire, abriglass
|
depends = fire, abriglass
|
||||||
description = Adds coloured fire through use of fire starter tool.
|
description = Adds coloured fire through use of fire starter tool.
|
59
nodes.lua
59
nodes.lua
|
@ -57,9 +57,9 @@ for _, f in pairs(flame_types) do
|
||||||
inventory_image = f .. "_fire_inv.png",
|
inventory_image = f .. "_fire_inv.png",
|
||||||
wield_image = f .. "_fire_inv.png",
|
wield_image = f .. "_fire_inv.png",
|
||||||
description = f .. " fire",
|
description = f .. " fire",
|
||||||
drawtype = "plantlike",
|
drawtype = "firelike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
groups = {dig_immediate = 3, not_in_creative_inventory = 1, abriflame_fire = 1},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -91,14 +91,44 @@ for _, f in pairs(flame_types) do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if minetest.features.particlespawner_tweenable then
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = { "group:abriflame_fire" },
|
||||||
|
interval = 1,
|
||||||
|
chance = 1,
|
||||||
|
catch_up = false,
|
||||||
|
action = function(pos, node)
|
||||||
|
local color = node.name:split(":")[2]:split("_")[1]
|
||||||
|
if color=="frosted" then
|
||||||
|
color = "white"
|
||||||
|
end
|
||||||
|
minetest.add_particlespawner({
|
||||||
|
pos = { min = vector.add(pos, vector.new(-0.5, -0.5, -0.5)), max = vector.add(pos, vector.new(0.5, 0.5, 0.5)) },
|
||||||
|
vel = { min = vector.new(-0.5, 0.5, -0.5), max = vector.new( 0.5, 0.5, 0.5) },
|
||||||
|
acc = vector.new(0, 0.1, 0),
|
||||||
|
time = 1,
|
||||||
|
amount = 100,
|
||||||
|
exptime = 1,
|
||||||
|
collisiondetection = true,
|
||||||
|
collision_removal = true,
|
||||||
|
glow = 14,
|
||||||
|
texpool = {
|
||||||
|
{ name = "flame_spark.png^[multiply:"..color, alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
{ name = "flame_spark.png^[multiply:#c00", alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
{ name = "flame_spark.png^[multiply:#800", alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
{ name = "flame_spark.png^[multiply:#ff0", alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
{ name = "flame_spark.png^[multiply:#fc0", alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
{ name = "flame_spark.png^[multiply:#cc0", alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
{ name = "flame_spark.png^[multiply:#f80", alpha_tween = { 1, 0 }, scale_tween = { 0.5, 0 }, blend = "screen" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
local old_on_use = minetest.registered_items["fire:flint_and_steel"].on_use
|
||||||
-- fire starter tool
|
-- fire starter tool
|
||||||
minetest.register_tool("abriflame:flint", {
|
minetest.override_item("fire:flint_and_steel", {
|
||||||
description = "Fire Starter",
|
|
||||||
inventory_image = "fire_flint_steel.png",
|
|
||||||
stack_max = 1,
|
|
||||||
liquids_pointable = false,
|
|
||||||
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
if pointed_thing.type ~= "node" then
|
if pointed_thing.type ~= "node" then
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -124,16 +154,7 @@ minetest.register_tool("abriflame:flint", {
|
||||||
minetest.set_node(pos, {name = "abriflame:" .. namesplit[3] .. "_fire"})
|
minetest.set_node(pos, {name = "abriflame:" .. namesplit[3] .. "_fire"})
|
||||||
end
|
end
|
||||||
|
|
||||||
itemstack:add_wear(65535 / 65)
|
return old_on_use(itemstack, user, pointed_thing)
|
||||||
return itemstack
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
minetest.register_alias("abriflame:flint", "fire:flint_and_steel")
|
||||||
|
|
||||||
-- fire starter tool recipe
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "abriflame:flint",
|
|
||||||
recipe = {
|
|
||||||
{"default:mese_crystal_fragment", "default:steel_ingot"}
|
|
||||||
}
|
|
||||||
})
|
|
Binary file not shown.
After Width: | Height: | Size: 443 B |
Loading…
Reference in New Issue