Complete revision of fake_fire
@ -1,21 +1,7 @@
|
||||
JP's Fork of LazyJ's Minetest Mod, "Fake Fire"
|
||||
by : JP.
|
||||
|
||||
Replaced LazyJ's smoke nodes pictures by smoke particles. Lighter, prettier, configurable smoke.
|
||||
|
||||
======================================================================
|
||||
|
||||
|
||||
LazyJ's Fork of Semmett9's Minetest Mod, "Fake Fire"
|
||||
by:
|
||||
LazyJ
|
||||
|
||||
This is my fork of Semmett9's "Fake Fire" mod. Some code clean-up, a
|
||||
bunch of changes and a few new things have been added.
|
||||
|
||||
|
||||
|
||||
======================================================================
|
||||
Semmett9's "Fake Fire" mod. kilbith's fork.
|
||||
Some textures by LazyJ.
|
||||
Fancy mesh fire model/texture by NathanS (CC-0).
|
||||
==============================================================
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
@ -1,62 +0,0 @@
|
||||
##### JP's Fork of LazyJ's Minetest Mod, "Fake Fire"
|
||||
|
||||
Replaced LazyJ's smoke nodes pictures by smoke particles. Lighter, prettier, configurable smoke.
|
||||
|
||||
|
||||
|
||||
##### LazyJ's Fork of Semmett9's "Fake Fire" Mod
|
||||
|
||||
This fork of 'Fake Fire' is based off of Semmett9's 2014_03_14 release of the
|
||||
mod.
|
||||
|
||||
At LinuxGaming.us, we have a creative-leaning Minetest server. Destruction by
|
||||
arson is not something we like. When the Fake Fire mod was installed we finally
|
||||
could make warm hearths and campfires without fear of burning down our builds.
|
||||
We could also use Fake Fire to simulate things burning without worrying our
|
||||
neighbors about the fires spreading and destroying their stuff.
|
||||
|
||||
As a creative bunch of Minetesters, we often come up with new ideas for things.
|
||||
This fork of "Fake Fire" incorporates some of those ideas.
|
||||
|
||||
|
||||
Semmett9's original version of this mod can be found here:
|
||||
|
||||
* Minetest.net
|
||||
http://forum.minetest.net/viewtopic.php?id=6145
|
||||
|
||||
* Ad.Fly
|
||||
http://adf.ly/RbzwV
|
||||
|
||||
Yes, it has advertisements. That's what helps to pay for hosting Semmett9's
|
||||
website and server costs. Everything has a cost. Someone pays. Even when it
|
||||
comes to so-called free, open-source software. Someone pays. Everything has a
|
||||
cost. Try running your own business and you will understand. There are no
|
||||
free lunches in life.
|
||||
|
||||
Ok, done ranting. ;)-
|
||||
|
||||
|
||||
~ LazyJ, 2014_06_19
|
||||
|
||||
|
||||
|
||||
Minetest version: 0.4.9
|
||||
Depends: default
|
||||
Recommended Additional Mods: none
|
||||
License: GPL v2
|
||||
Source Code: http://github.com/LazyJ/fake_fire
|
||||
Download (.zip): http://github.com/LazyJ/fake_fire/archive/master.zip
|
||||
|
||||
Install:
|
||||
* After downloading, unzip the file.
|
||||
* Rename the directory "fake_fire_fork-master" to "fake_fire"
|
||||
* Copy the "fake_fire" directory into either
|
||||
../minetest/worlds/yourworld'sname/worldmods/
|
||||
or
|
||||
../minetest/mods/
|
||||
* If you put "fake_fire" in the ../minetest/mods/ directory, either
|
||||
enable the mod from within Minetest's "Configure" button
|
||||
(main menu, bottom right) or by adding this line to the
|
||||
world's "world.mt" file:
|
||||
load_mod_fake_fire = true
|
||||
|
@ -1,86 +0,0 @@
|
||||
CHANGELOG
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
2014_07_27:
|
||||
|
||||
* Replaced LazyJ's smoke nodes pictures by smoke particles. Lighter, prettier, configurable smoke.
|
||||
* Code clean-up.
|
||||
|
||||
|
||||
2014_06_21:
|
||||
|
||||
* Added changelog.txt, 2014_06_19. Some changes are much older than this.
|
||||
I've been making little tweaks to it for several months and finally decided
|
||||
to give it an overhaul.
|
||||
* Code clean-up.
|
||||
* Split the init.lua file stuff into separate files and moved them into the
|
||||
"modfiles" folder.
|
||||
* I had added a lump of coal to be dropped when the flame was dug but, as
|
||||
one of our moderators pointed out, once word got out, new players would
|
||||
snuff-out every fake_fire they found just to get easy coal. The coal drop
|
||||
was removed.
|
||||
* Changed the flint crafting recipe to require 2 gravel instead of one.
|
||||
This resolves a crafting conflict with another mod. The recipe is also
|
||||
shapless now.
|
||||
* Added crafting recipes for 1 cobble to 1 gravel, then 1 gravel to 1 sand.
|
||||
For Wazuland2 these recipes are commented out because another mod takes
|
||||
care of them (the reason for changing the flint recipe).
|
||||
* Health-damage disabled. This fork is strictly for decoration.
|
||||
* Waving added to flames and smoke.
|
||||
* Rising, disappearing smoke-puffs added. Smoke columns will rise to 14
|
||||
spaces above the flame or chimney top.
|
||||
* Smoke can be punched to remove.
|
||||
* Never-ending flint and steel disabled. May add it as a priv later.
|
||||
* Extinguishing with water and lava(??) disabled. Again, this fork is
|
||||
strictly for decoration so dousing the flames with water or lava would just
|
||||
make a big, needless mess. Much easier and cleaner to just punch the flame.
|
||||
* Flame images are hidden from creative inventory but are still provided
|
||||
for in the code and image files if you want them to be visible. Just remove
|
||||
the "not_in_creative_inventory" part from the groups of the flame types and
|
||||
they will be visible again. Having the images in inventory is useful when
|
||||
playing in creative mode or if you want to torture griefers who put in the
|
||||
time and effort to get the materials to make the fire hoping to be able to
|
||||
burn things only to discover that it is *fake* and *harmless*. Bwa-hahaha!
|
||||
* Added ice-fire, a blue-colored flame that only ignites on snow and ice
|
||||
stuff.
|
||||
* Added added ability to switch between smoking and non-smoking flames by
|
||||
punching them. Default is non-smoking.
|
||||
* Added stone and sandstone chimney caps that can produce smoke when punched
|
||||
(smoking and non-smoking versions). Useful for small builds where a 3x3
|
||||
chimney would be too oversized in proportion to the reset of the build.
|
||||
* Added animated, glowing embers. This hearth-warming block emits a
|
||||
mid-level light and simulates the hot coals under a flame. Flames are not
|
||||
required and the embers blocks are smokeless.
|
||||
|
||||
|
||||
|
||||
2014_06_23:
|
||||
|
||||
* Flames - "sunlight_propagates = true,"
|
||||
-- Adding sunlight_propagtes and leaving comments as a future reference.
|
||||
-- If true, sunlight will go infinitely through this (no shadow is cast).
|
||||
-- Because fire produces light it should be "true" so fire *doesn't* have
|
||||
-- a shadow.
|
||||
|
||||
* Embers - "sunlight_propagates = true,"
|
||||
-- Adding sunlight_propagtes and leaving comments as a future reference.
|
||||
-- If true, sunlight will go infinitely through this (no shadow is cast).
|
||||
-- Because embers produce some light it should be somewhat "true" but this
|
||||
-- is an area where Minetest lacks in subtlety so I'm opting for 100% that
|
||||
-- embers *don't* have a shadow.
|
||||
|
||||
* Bug Fix - Server Crash when Flint-Steel Clicked on Nothing (sky).
|
||||
-- Players can see farther than they can reach. Even though the player
|
||||
-- was aiming for a node several spaces ahead of them, Minetest's targeting
|
||||
-- range doesn't extend that far. The player saw the node they were aiming
|
||||
-- at, Minetest's target range ended and Minetest saw "nothing"
|
||||
-- (a nil value). The bug was a conflict in the code so when that
|
||||
-- particular nil value popped up, Minetest was confused by the bug, threw
|
||||
-- up it's hands in frustration and said "I quit!" by crashing.
|
||||
|
||||
* Original init.lua Added
|
||||
-- What I thought was the original init.lua file turned out to be one I had
|
||||
-- tinkered with months ago. So I extracted the actual original init.lua
|
||||
-- file from a zip file of the original mod. Why bother including it in my
|
||||
-- fork? Because it's a reference to compare to and learn from.
|
||||
|
@ -1,3 +1,222 @@
|
||||
dofile(minetest.get_modpath("fake_fire").."/modfiles/nodes.lua")
|
||||
dofile(minetest.get_modpath("fake_fire").."/modfiles/crafts.lua")
|
||||
dofile(minetest.get_modpath("fake_fire").."/modfiles/abms.lua")
|
||||
local function start_smoke(pos, node, clicker, chimney)
|
||||
local this_spawner_meta = minetest.get_meta(pos)
|
||||
local id = this_spawner_meta:get_int("smoky")
|
||||
local s_handle = this_spawner_meta:get_int("sound")
|
||||
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
|
||||
|
||||
if id ~= 0 then
|
||||
if s_handle then
|
||||
minetest.after(0, function(s_handle)
|
||||
minetest.sound_stop(s_handle)
|
||||
end, s_handle)
|
||||
end
|
||||
minetest.delete_particlespawner(id)
|
||||
this_spawner_meta:set_int("smoky", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
return
|
||||
end
|
||||
|
||||
if above == "air" and (not id or id == 0) then
|
||||
id = minetest.add_particlespawner({
|
||||
amount = 4, time = 0, collisiondetection = false,
|
||||
minpos = {x=pos.x-0.25, y=pos.y+0.4, z=pos.z-0.25},
|
||||
maxpos = {x=pos.x+0.25, y=pos.y+5, z=pos.z+0.25},
|
||||
minvel = {x=-0.2, y=0.3, z=-0.2}, maxvel = {x=0.2, y=1, z=0.2},
|
||||
minacc = {x=0,y=0,z=0}, maxacc = {x=0,y=0.5,z=0},
|
||||
minexptime = 1, maxexptime = 3,
|
||||
minsize = 4, maxsize = 8,
|
||||
texture = "smoke_particle.png",
|
||||
})
|
||||
if chimney == 1 then
|
||||
s_handle = nil
|
||||
this_spawner_meta:set_int("smoky", id)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
else
|
||||
s_handle = minetest.sound_play("fire_small", {
|
||||
pos = pos,
|
||||
max_hear_distance = 5,
|
||||
loop = true
|
||||
})
|
||||
this_spawner_meta:set_int("smoky", id)
|
||||
this_spawner_meta:set_int("sound", s_handle)
|
||||
end
|
||||
return end
|
||||
end
|
||||
|
||||
local function stop_smoke(pos)
|
||||
local this_spawner_meta = minetest.get_meta(pos)
|
||||
local id = this_spawner_meta:get_int("smoky")
|
||||
local s_handle = this_spawner_meta:get_int("sound")
|
||||
|
||||
if id ~= 0 then
|
||||
minetest.delete_particlespawner(id)
|
||||
end
|
||||
|
||||
if s_handle then
|
||||
minetest.after(0, function(s_handle)
|
||||
minetest.sound_stop(s_handle)
|
||||
end, s_handle)
|
||||
end
|
||||
|
||||
this_spawner_meta:set_int("smoky", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
end
|
||||
|
||||
-- FLAME TYPES
|
||||
local flame_types = {"fake", "ice"}
|
||||
|
||||
for _, f in ipairs(flame_types) do
|
||||
minetest.register_node("fake_fire:"..f.."_fire", {
|
||||
inventory_image = f.."_fire_inv.png",
|
||||
description = f.." fire",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1},
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name=f.."_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
start_smoke(pos, node, clicker)
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
minetest.sound_play("fire_extinguish", {
|
||||
pos = pos, max_hear_distance = 5
|
||||
})
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("fake_fire:fancy_fire", {
|
||||
inventory_image = "fancy_fire_inv.png",
|
||||
description = "Fancy Fire",
|
||||
drawtype = "mesh",
|
||||
mesh = "fancy_fire.obj",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3},
|
||||
sunlight_propagates = true,
|
||||
light_source = 14,
|
||||
walkable = false,
|
||||
damage_per_second = 4,
|
||||
tiles = {
|
||||
{name='fire_basic_flame_animated.png',
|
||||
animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1}}, {name='fake_fire_logs.png'}},
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
start_smoke(pos, node, clicker)
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
minetest.sound_play("fire_extinguish", {
|
||||
pos = pos, max_hear_distance = 5
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
-- EMBERS
|
||||
minetest.register_node("fake_fire:embers", {
|
||||
description = "Glowing Embers",
|
||||
tiles = {
|
||||
{name="embers_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=2}},
|
||||
},
|
||||
light_source = 9,
|
||||
groups = {crumbly=3},
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
-- CHIMNEYS
|
||||
local materials = {"stone", "sandstone"}
|
||||
|
||||
for _, m in ipairs(materials) do
|
||||
minetest.register_node("fake_fire:chimney_top_"..m, {
|
||||
description = "Chimney Top - "..m,
|
||||
tiles = {"default_"..m..".png^chimney_top.png", "default_"..m..".png"},
|
||||
groups = {snappy=3},
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
local chimney = 1
|
||||
start_smoke(pos, node, clicker, chimney)
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:chimney_top_'..m,
|
||||
recipe = {"default:torch", "stairs:slab_"..m}
|
||||
})
|
||||
end
|
||||
|
||||
-- FLINT and STEEL
|
||||
minetest.register_tool("fake_fire:flint_and_steel", {
|
||||
description = "Flint and steel",
|
||||
inventory_image = "flint_and_steel.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={flamable = {uses=65, maxlevel=1}}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
|
||||
if string.find(minetest.get_node(pointed_thing.under).name, "ice") then
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:ice_fire"})
|
||||
else
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:fake_fire"})
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), "This area is protected!")
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
itemstack:add_wear(65535/65)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
-- CRAFTS
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:flint_and_steel',
|
||||
recipe = {"default:obsidian_shard", "default:steel_ingot"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:embers',
|
||||
recipe = {"default:torch", "group:wood", "default:torch"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:fancy_fire',
|
||||
recipe = {"fake_fire:fake_fire", "building_blocks:sticks"}
|
||||
})
|
||||
|
||||
-- ALIASES
|
||||
minetest.register_alias("fake_fire:smokeless_fire", "fake_fire:fake_fire")
|
||||
minetest.register_alias("fake_fire:smokeless_ice_fire", "fake_fire:ice_fire")
|
||||
minetest.register_alias("fake_fire:smokeless_chimney_top_stone", "fake_fire:chimney_top_stone")
|
||||
minetest.register_alias("fake_fire:smokeless_chimney_top_sandstone", "fake_fire:chimney_top_sandstone")
|
||||
minetest.register_alias("fake_fire:flint", "fake_fire:flint_and_steel")
|
||||
|
133
fake_fire/models/fancy_fire.obj
Normal file
@ -0,0 +1,133 @@
|
||||
# Blender v2.72 (sub 2) OBJ File: 'campfire.blend'
|
||||
# www.blender.org
|
||||
v 0.353153 -0.337287 0.000000
|
||||
v -0.366847 -0.337287 0.000000
|
||||
v -0.366847 0.382713 -0.000000
|
||||
v -0.186847 -0.337287 0.311769
|
||||
v 0.173153 -0.337287 -0.311769
|
||||
v -0.186846 0.382713 0.311769
|
||||
v 0.173154 0.382713 -0.311769
|
||||
v -0.186846 -0.337287 -0.311769
|
||||
v 0.173154 -0.337287 0.311769
|
||||
v -0.186846 0.382713 -0.311769
|
||||
v 0.173153 0.382713 0.311769
|
||||
v 0.353153 0.382713 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
g Flames.001_Cube.004_Fire
|
||||
s off
|
||||
f 4/1 5/2 7/3 6/4
|
||||
f 8/1 9/2 11/3 10/4
|
||||
f 1/1 2/2 3/3 12/4
|
||||
v 0.151217 -0.347540 0.439253
|
||||
v 0.151217 -0.207593 0.411057
|
||||
v 0.008458 -0.207593 0.411057
|
||||
v 0.008458 -0.347540 0.439253
|
||||
v 0.151217 -0.526542 -0.449208
|
||||
v 0.151217 -0.386595 -0.477403
|
||||
v 0.008458 -0.386595 -0.477403
|
||||
v 0.008458 -0.526542 -0.449208
|
||||
v -0.419949 -0.512482 0.485423
|
||||
v -0.419949 -0.369723 0.485423
|
||||
v -0.444739 -0.369723 0.344833
|
||||
v -0.444739 -0.512482 0.344833
|
||||
v 0.472595 -0.512482 0.328044
|
||||
v 0.472595 -0.369723 0.328044
|
||||
v 0.447805 -0.369723 0.187453
|
||||
v 0.447805 -0.512482 0.187453
|
||||
v 0.033402 -0.347540 0.433815
|
||||
v 0.025205 -0.207593 0.406838
|
||||
v -0.111388 -0.207593 0.448342
|
||||
v -0.103191 -0.347540 0.475320
|
||||
v -0.224900 -0.526542 -0.416268
|
||||
v -0.233097 -0.386595 -0.443246
|
||||
v -0.369690 -0.386595 -0.401741
|
||||
v -0.361493 -0.526542 -0.374763
|
||||
v 0.254175 -0.345963 0.293196
|
||||
v 0.254175 -0.277187 0.265611
|
||||
v 0.181422 -0.282425 0.252550
|
||||
v 0.181422 -0.351201 0.280135
|
||||
v 0.343511 -0.517901 -0.135488
|
||||
v 0.343511 -0.449125 -0.163073
|
||||
v 0.270757 -0.454364 -0.176133
|
||||
v 0.270757 -0.523140 -0.148548
|
||||
v -0.418506 -0.513914 0.100698
|
||||
v -0.418472 -0.439812 0.100704
|
||||
v -0.392481 -0.439819 0.031309
|
||||
v -0.392514 -0.513921 0.031304
|
||||
v 0.022046 -0.514125 0.265705
|
||||
v 0.022080 -0.440022 0.265710
|
||||
v 0.048071 -0.440029 0.196316
|
||||
v 0.048038 -0.514131 0.196310
|
||||
v -0.249910 -0.307656 -0.062181
|
||||
v -0.249882 -0.234638 -0.074807
|
||||
v -0.278776 -0.246254 -0.142048
|
||||
v -0.278804 -0.319272 -0.129422
|
||||
v 0.183295 -0.339072 -0.242901
|
||||
v 0.183323 -0.266053 -0.255527
|
||||
v 0.154429 -0.277669 -0.322768
|
||||
v 0.154401 -0.350687 -0.310143
|
||||
vt 0.418293 0.016195
|
||||
vt 0.418293 0.216092
|
||||
vt 0.218396 0.216092
|
||||
vt 0.218396 0.016195
|
||||
vt 0.002609 0.212891
|
||||
vt 0.002609 0.012994
|
||||
vt 0.989254 0.012994
|
||||
vt 0.989254 0.212891
|
||||
vt 0.010050 0.219323
|
||||
vt 0.010050 0.019426
|
||||
vt 0.996695 0.019426
|
||||
vt 0.996695 0.219323
|
||||
vt 0.618448 0.016195
|
||||
vt 0.618448 0.216092
|
||||
vt 0.418551 0.216092
|
||||
vt 0.418551 0.016195
|
||||
vt 0.010050 0.228781
|
||||
vt 0.010050 0.028884
|
||||
vt 0.996695 0.028884
|
||||
vt 0.996695 0.228781
|
||||
vt 0.005089 0.207467
|
||||
vt 0.005089 0.007570
|
||||
vt 0.991734 0.007570
|
||||
vt 0.991734 0.207467
|
||||
g Campfire_Cube.003_Logs-Stone
|
||||
s off
|
||||
f 20/5 19/6 18/7 17/8
|
||||
f 14/9 13/10 17/11 18/12
|
||||
f 15/13 14/14 18/15 19/16
|
||||
f 13/17 14/18 15/19 16/20
|
||||
f 13/21 16/22 20/23 17/24
|
||||
f 16/25 15/26 19/27 20/28
|
||||
f 28/5 27/6 26/7 25/8
|
||||
f 22/9 21/10 25/11 26/12
|
||||
f 23/13 22/14 26/15 27/16
|
||||
f 21/17 22/18 23/19 24/20
|
||||
f 21/21 24/22 28/23 25/24
|
||||
f 24/25 23/26 27/27 28/28
|
||||
f 36/5 35/6 34/7 33/8
|
||||
f 30/9 29/10 33/11 34/12
|
||||
f 31/13 30/14 34/15 35/16
|
||||
f 29/17 30/18 31/19 32/20
|
||||
f 29/21 32/22 36/23 33/24
|
||||
f 32/25 31/26 35/27 36/28
|
||||
f 44/5 43/6 42/7 41/8
|
||||
f 38/9 37/10 41/11 42/12
|
||||
f 39/13 38/14 42/15 43/16
|
||||
f 37/17 38/18 39/19 40/20
|
||||
f 37/21 40/22 44/23 41/24
|
||||
f 40/25 39/26 43/27 44/28
|
||||
f 52/5 51/6 50/7 49/8
|
||||
f 46/9 45/10 49/11 50/12
|
||||
f 47/13 46/14 50/15 51/16
|
||||
f 45/17 46/18 47/19 48/20
|
||||
f 45/21 48/22 52/23 49/24
|
||||
f 48/25 47/26 51/27 52/28
|
||||
f 60/5 59/6 58/7 57/8
|
||||
f 54/9 53/10 57/11 58/12
|
||||
f 55/13 54/14 58/15 59/16
|
||||
f 53/17 54/18 55/19 56/20
|
||||
f 53/21 56/22 60/23 57/24
|
||||
f 56/25 55/26 59/27 60/28
|
@ -1,26 +0,0 @@
|
||||
minetest.register_abm({
|
||||
nodenames = {
|
||||
"fake_fire:fake_fire",
|
||||
"fake_fire:ice_fire",
|
||||
"fake_fire:chimney_top_stone",
|
||||
"fake_fire:chimney_top_sandstone"
|
||||
},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z}).name == "air"
|
||||
and minetest.get_node({x=pos.x, y=pos.y+2.0, z=pos.z}).name == "air" then
|
||||
local image_number = math.random(4)
|
||||
minetest.add_particlespawner({
|
||||
amount = 6, time = 1, collisiondetection = false,
|
||||
minpos = {x=pos.x-0.25, y=pos.y+0.4, z=pos.z-0.25},
|
||||
maxpos = {x=pos.x+0.25, y=pos.y+8, z=pos.z+0.25},
|
||||
minvel = {x=-0.2, y=0.3, z=-0.2}, maxvel = {x=0.2, y=1, z=0.2},
|
||||
minacc = {x=0,y=0,z=0}, maxacc = {x=0,y=0,z=0},
|
||||
minexptime = 0.5, maxexptime = 3,
|
||||
minsize = 2, maxsize = 10,
|
||||
texture = "smoke_particle_"..image_number..".png",
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
@ -1,89 +0,0 @@
|
||||
-- RECIPE ITEM - FLINT
|
||||
minetest.register_craftitem("fake_fire:flint", {
|
||||
description = "flint",
|
||||
inventory_image = "flint.png",
|
||||
stack_max = 99,
|
||||
liquids_pointable = false,
|
||||
})
|
||||
|
||||
-- FLINT
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:flint',
|
||||
recipe = {
|
||||
"default:gravel",
|
||||
"default:gravel",
|
||||
}
|
||||
})
|
||||
|
||||
-- FLINT & STEEL
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:flint_and_steel',
|
||||
recipe = {
|
||||
"fake_fire:flint",
|
||||
"default:steel_ingot",
|
||||
}
|
||||
})
|
||||
|
||||
-- EMBERS
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:embers',
|
||||
recipe = {
|
||||
"default:torch",
|
||||
"group:wood",
|
||||
}
|
||||
})
|
||||
|
||||
-- STONE CHIMNEY TOP
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:smokeless_chimney_top_stone',
|
||||
recipe = {
|
||||
"default:torch",
|
||||
"stairs:slab_stone",
|
||||
}
|
||||
})
|
||||
|
||||
-- SANDSTONE CHIMNEY TOP
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:smokeless_chimney_top_sandstone',
|
||||
recipe = {
|
||||
"default:torch",
|
||||
"stairs:slab_sandstone",
|
||||
}
|
||||
})
|
||||
|
||||
-- Cobble to Gravel
|
||||
minetest.register_craft({
|
||||
output = 'default:gravel',
|
||||
recipe = {
|
||||
{'default:cobble'},
|
||||
}
|
||||
})
|
||||
|
||||
-- Gravel to Sand
|
||||
minetest.register_craft({
|
||||
output = 'default:sand',
|
||||
recipe = {
|
||||
{'default:gravel'},
|
||||
}
|
||||
})
|
||||
|
||||
-- Desert Sand to Sand
|
||||
minetest.register_craft({
|
||||
output = 'default:sand',
|
||||
recipe = {
|
||||
{'default:desert_sand'},
|
||||
}
|
||||
})
|
||||
|
||||
-- Sand to Desert Sand
|
||||
minetest.register_craft({
|
||||
output = 'default:desert_sand',
|
||||
recipe = {
|
||||
{'default:sand'},
|
||||
}
|
||||
})
|
@ -1,213 +0,0 @@
|
||||
local cp = nil
|
||||
|
||||
local function register_fake_fire(name, def)
|
||||
assert(name, "local registration called without name")
|
||||
assert(def, "local registration called without node definition")
|
||||
|
||||
def.is_ground_content = true
|
||||
def.inventory_image = def.inventory_image or name..".png"
|
||||
def.drawtype = "plantlike"
|
||||
def.waving = 1
|
||||
def.light_source = def.lightsource or 14
|
||||
def.sunlight_propagates = true
|
||||
def.groups = def.groups or {
|
||||
oddly_breakable_by_hand=3, dig_immediate=2,
|
||||
attached_node=1, not_in_creative_inventory=1
|
||||
}
|
||||
def.paramtype = "light"
|
||||
def.walkable = false
|
||||
def.drop = ""
|
||||
def.sounds = def.sounds or minetest.sound_play("fire_small", {pos=cp, loop=true})
|
||||
def.buildable_to = true
|
||||
|
||||
local swap_on_punch = def.swap_on_punch
|
||||
def.on_punch = def.on_punch or function (pos, node, puncher)
|
||||
minetest.sound_play("fire_extinguish", {pos = pos, gain = 1.0, max_hear_distance = 5,})
|
||||
if swap_on_punch then
|
||||
minetest.set_node(pos, {name = swap_on_punch})
|
||||
end
|
||||
end
|
||||
|
||||
def.swap_on_punch = nil
|
||||
def.smoking = nil
|
||||
minetest.register_node("fake_fire:"..name, def)
|
||||
end
|
||||
|
||||
|
||||
-- FLAME TYPES
|
||||
register_fake_fire("fake_fire", {
|
||||
description = "Smokey, Fake Fire",
|
||||
tiles = {
|
||||
{name="fake_fire_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
swap_on_punch = "fake_fire:smokeless_fire",
|
||||
})
|
||||
|
||||
register_fake_fire("smokeless_fire", {
|
||||
description = "Smokeless, Fake Fire",
|
||||
tiles = {
|
||||
{name="fake_fire_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
inventory_image = 'fake_fire.png',
|
||||
swap_on_punch = "fake_fire:fake_fire",
|
||||
})
|
||||
|
||||
register_fake_fire("ice_fire", {
|
||||
description = "Smoky, Fake, Ice Fire",
|
||||
tiles = {
|
||||
{name="ice_fire_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
swap_on_punch = "fake_fire:smokeless_ice_fire",
|
||||
})
|
||||
|
||||
register_fake_fire("smokeless_ice_fire", {
|
||||
description = "Smokeless, Fake, Ice Fire",
|
||||
tiles = {
|
||||
{name="ice_fire_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
inventory_image = 'ice_fire.png',
|
||||
swap_on_punch = "fake_fire:ice_fire",
|
||||
})
|
||||
|
||||
|
||||
-- FLINT and STEEL
|
||||
minetest.register_tool("fake_fire:flint_and_steel", {
|
||||
description = "Flint and steel",
|
||||
inventory_image = "flint_and_steel.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={flamable = {uses=65, maxlevel=1},
|
||||
}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local snow_ice_list = {"snow", "ice",}
|
||||
|
||||
for _, which_one_is_it in pairs(snow_ice_list) do
|
||||
local snow_ice = which_one_is_it
|
||||
|
||||
if pointed_thing.type == "node"
|
||||
and not string.find(minetest.get_node(pointed_thing.under).name, "snow")
|
||||
and not string.find(minetest.get_node(pointed_thing.under).name, "ice")
|
||||
and minetest.get_node(pointed_thing.above).name == "air"
|
||||
then
|
||||
if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:smokeless_fire"})
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), "You can't set a fire in someone else's area!")
|
||||
end
|
||||
elseif pointed_thing.type == "node"
|
||||
and string.find(minetest.get_node(pointed_thing.under).name,snow_ice)
|
||||
and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:smokeless_ice_fire"})
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), "You can't set a fire in someone else's area!")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.sound_play("", {gain = 1.0, max_hear_distance = 2,})
|
||||
itemstack:add_wear(65535/65)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- EMBERS
|
||||
minetest.register_node("fake_fire:embers", {
|
||||
description = "Glowing Embers",
|
||||
tiles = {
|
||||
{name="embers_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=2}},
|
||||
},
|
||||
inventory_image = minetest.inventorycube('fake_fire_embers.png'),
|
||||
is_ground_content = true,
|
||||
light_source = 9,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy=3, crumbly=3, oddly_breakable_by_hand=3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
sounds = minetest.sound_play("fire_small", {pos=cp, loop=true}),
|
||||
})
|
||||
|
||||
|
||||
-- CHIMNEY TOP - STONE
|
||||
minetest.register_node("fake_fire:chimney_top_stone", {
|
||||
description = "Chimney Top - Stone",
|
||||
tiles = {"chimney_top_stone.png", "default_stone.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = "fake_fire:smokeless_chimney_top_stone",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
on_punch = function (pos,node,puncher)
|
||||
minetest.set_node(pos, {name = "fake_fire:smokeless_chimney_top_stone"})
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- CHIMNEY TOP - SANDSTONE
|
||||
minetest.register_node("fake_fire:chimney_top_sandstone", {
|
||||
description = "Chimney Top - Sandstone",
|
||||
tiles = {"chimney_top_sandstone.png", "default_sandstone.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = "fake_fire:smokeless_chimney_top_sandstone",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
on_punch = function (pos,node,puncher)
|
||||
minetest.set_node(pos, {name = "fake_fire:smokeless_chimney_top_sandstone"})
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- SMOKELESS CHIMNEY TOP - STONE
|
||||
minetest.register_node("fake_fire:smokeless_chimney_top_stone", {
|
||||
description = "Chimney Top - Stone",
|
||||
tiles = {"chimney_top_stone.png", "default_stone.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
on_punch = function (pos,node,puncher)
|
||||
minetest.set_node(pos, {name = "fake_fire:chimney_top_stone"})
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- SMOKELESS CHIMNEY TOP - SANDSTONE
|
||||
minetest.register_node("fake_fire:smokeless_chimney_top_sandstone", {
|
||||
description = "Chimney Top - Sandstone",
|
||||
tiles = {"chimney_top_sandstone.png", "default_sandstone.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
on_punch = function (pos,node,puncher)
|
||||
minetest.set_node(pos, {name = "fake_fire:chimney_top_sandstone"})
|
||||
end
|
||||
})
|
BIN
fake_fire/textures/chimney_top.png
Normal file
After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 853 B |
Before Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 215 B |
BIN
fake_fire/textures/fake_fire_inv.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
fake_fire/textures/fake_fire_logs.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
fake_fire/textures/fancy_fire_inv.png
Normal file
After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
fake_fire/textures/ice_fire_inv.png
Normal file
After Width: | Height: | Size: 419 B |
BIN
fake_fire/textures/smoke_particle.png
Normal file
After Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 642 B |
Before Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 666 B |