Compare commits
5 Commits
99718d2e4e
...
d4d4bac512
Author | SHA1 | Date |
---|---|---|
David Leal | d4d4bac512 | |
wsor4035 | 51509658c4 | |
unknown | 2c27bc601a | |
unknown | 1e4b023bf7 | |
wsor4035 | d8b3aa75a8 |
|
@ -1,6 +1,4 @@
|
||||||
|
|
||||||
name: luacheck
|
name: luacheck
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -9,10 +7,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@main
|
||||||
- name: apt
|
- name: apt
|
||||||
run: sudo apt-get install -y luarocks
|
run: sudo apt-get install -y luarocks
|
||||||
- name: luacheck install
|
- name: luacheck install
|
||||||
run: luarocks install --local luacheck
|
run: luarocks install --local luacheck
|
||||||
- name: luacheck run
|
- name: luacheck run
|
||||||
run: $HOME/.luarocks/bin/luacheck ./
|
run: $HOME/.luarocks/bin/luacheck ./
|
||||||
|
|
10
license.txt
10
license.txt
|
@ -1,12 +1,18 @@
|
||||||
|
|
||||||
Textures:
|
Textures:
|
||||||
Original textures from Semmett9's fake_fire, now found in the homedecor modpack (https://github.com/minetest-mods/homedecor_modpack),
|
Original textures from Semmett9's fake_fire, now found in the homedecor modpack (https://github.com/mt-mods/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.
|
89
nodes.lua
89
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
|
||||||
|
@ -114,40 +144,17 @@ minetest.register_tool("abriflame:flint", {
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
local nod = minetest.get_node(pointed_thing.under).name
|
local node = minetest.get_node(pointed_thing.under).name
|
||||||
|
local nodesplit, namesplit = node:split(":"), {}
|
||||||
if nod == "abriglass:stained_glass_green" then
|
if #nodesplit == 2 then
|
||||||
minetest.set_node(pos, {name = "abriflame:green_fire"})
|
namesplit = nodesplit[2]:split("_")
|
||||||
elseif nod == "abriglass:stained_glass_yellow" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:yellow_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_black" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:black_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_orange" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:orange_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_cyan" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:cyan_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_magenta" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:magenta_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_purple" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:purple_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_blue" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:blue_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_red" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:red_fire"})
|
|
||||||
elseif nod == "abriglass:stained_glass_frosted" then
|
|
||||||
minetest.set_node(pos, {name = "abriflame:frosted_fire"})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
itemstack:add_wear(65535 / 65)
|
if nodesplit[1] == "abriglass" and #namesplit == 3 and namesplit[1] == "stained" then
|
||||||
return itemstack
|
minetest.set_node(pos, {name = "abriflame:" .. namesplit[3] .. "_fire"})
|
||||||
|
end
|
||||||
|
|
||||||
|
return old_on_use(itemstack, user, pointed_thing)
|
||||||
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