[Mod] Fireplace and Chimney [v1.1.7][firestone]

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

[Mod] Fireplace and Chimney [v1.1.7][firestone]

by Bas080 » Mon Dec 31, 2012 03:15

Use big fire for light-decoration. Be careful, fire may jump to nearby flammable nodes.

Crafts
Image

Chimney
ImageImageImage
ImageImageImage
ImageImageImage

Changelog

Download
http://goo.gl/4IpGw
...or see code https://github.com/bas080/firestone

Screenshots
https://dl.dropbox.com/u/419967/Screenshot%20-%2012312012%20-%2003%3A34%3A13%20AM.png
https://dl.dropbox.com/u/419967/Screenshot%20-%2012312012%20-%2003%3A55%3A39%20AM.png

Depends
Default

License
WTFPL textures and LUA
Last edited by Bas080 on Thu Apr 11, 2013 09:47, edited 1 time in total.
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Mon Dec 31, 2012 03:20

Cool now I can make a medieval fortress
question why is it 0.5?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Mon Dec 31, 2012 03:53

question why is it 0.5?


Because I am not confident enough to call it a full version yet. Still requires craft and maybe a texture update. Anybody ideas for craft?
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Mon Dec 31, 2012 04:00

Well I'm making a mod that adds a blaze gem to the game but if you want a default recipe then how about
[S][F][S]
[S][S][S]
[S][S][S]

S=stone
F=Furnace
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Mon Dec 31, 2012 08:17

If you delete the after_place_node and change the abm to
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_abm({
    nodenames = {"firestone:firestone"},
    interval = 2,
    chance = 5,
    action = function(pos)
        local t = {x=pos.x, y=pos.y+1, z=pos.z}
        local n = minetest.env:get_node(t)
        if n.name == "firestone:flame_low" then
            minetest.env:set_node(t, {name="firestone:flame"})
        elseif n.name == "firestone:flame" then
            minetest.env:set_node(t, {name="firestone:flame_low"})
        -- lighting the firestone
        elseif minetest.get_item_group(n.name, "igniter") == 2 then
            minetest.env:set_node(t, {name="firestone:flame"})
        end
       
       
    end,

})

Then you can lighten the firestone by making fire above.

Edit:
Better code. But this won't work with the current fire. I already made a pullrequest to make fire buildable to.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_alias("firestone", "firestone:firestone")

local makes_fire = false -- When set ture the firestone makes fire itself. When false you need to lighten it.

minetest.register_craft({
    output = '"firestone:firestone" 1',
    recipe = {
        {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
        {'default:coal_lump', 'default:torch', 'default:coal_lump'},
        {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
    }
})

if makes_fire == true then
minetest.register_node("firestone:firestone", {
    description = "Fire node",
    tile_images = {"firestone_firestone_top.png^firestone_embers.png", "firestone_firestone_bottom.png", "firestone_firestone.png"},
    groups = {igniter=2, crumbly=3},
    damage_per_second = 4,
   
    after_place_node = function(pos)
        local t = {x=pos.x, y=pos.y+1, z=pos.z}
        local n = minetest.env:get_node(t)
        if n.name == "air" then
            minetest.env:add_node(t, {name="firestone:flame"})
        end
    end,

    after_dig_node = function(pos)
        local t = {x=pos.x, y=pos.y+1, z=pos.z}
        local n = minetest.env:get_node(t)
        if n.name == "firestone:flame" or n.name == "firestone:flame_low" then
            minetest.env:remove_node(t)
        end
    end,
   
})
else
minetest.register_node("firestone:firestone", {
    description = "Fire node",
    tile_images = {"firestone_firestone_top.png^firestone_embers.png", "firestone_firestone_bottom.png", "firestone_firestone.png"},
    groups = {igniter=2, crumbly=3},
    damage_per_second = 4,

    after_dig_node = function(pos)
        local t = {x=pos.x, y=pos.y+1, z=pos.z}
        local n = minetest.env:get_node(t)
        if n.name == "firestone:flame" or n.name == "firestone:flame_low" then
            minetest.env:remove_node(t)
        end
    end,
   
})
end

minetest.register_node("firestone:flame", {
    description = "Fire",
    drawtype = "plantlike",
    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",
    light_source = 14,
    groups = {igniter=2, immortal, not_in_creative_inventory=1},
    drop = '',
    walkable = false,
    damage_per_second = 4,
})

minetest.register_node("firestone:flame_low", {
    description = "Fire",
    drawtype = "plantlike",
    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",
    light_source = 12,
    groups = {igniter=2, immortal, not_in_creative_inventory=1},
    drop = '',
    walkable = false,
    damage_per_second = 4,
})

minetest.register_abm({
    nodenames = {"firestone:firestone"},
    interval = 2,
    chance = 5,
    action = function(pos)
        local t = {x=pos.x, y=pos.y+1, z=pos.z}
        local n = minetest.env:get_node(t)
        if n.name == "firestone:flame_low" then
            minetest.env:set_node(t, {name="firestone:flame"})
        elseif n.name == "firestone:flame" then
            minetest.env:set_node(t, {name="firestone:flame_low"})
        -- lighting the firestone
        elseif minetest.get_item_group(n.name, "igniter") ~= 0 and makes_fire == false and minetest.registered_nodes[n.name].buildable_to == true then
                minetest.env:set_node(t, {name="firestone:flame"})
        end
       
       
    end,

})
Last edited by Casimir on Mon Dec 31, 2012 09:29, edited 1 time in total.
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Wed Jan 02, 2013 18:05

Made sure the functionality you where talking about is implemented. Did it differently though. You can see it on the github. There is however an issue with your and mine code. The fire abm sometimes removes the fire before the firestone abm turns basic_flame into firestone flame.. something to solve.
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Wed Jan 02, 2013 19:35

Bas080 wrote:There is however an issue with your and mine code. The fire abm sometimes removes the fire before the firestone abm turns basic_flame into firestone flame.. something to solve.

I don't see that as a problem. Just like in the real world you might need several tries. Especially in combination with my stoneagemod - where making fire is expensive.
 

User avatar
fishyWET
Member
 
Posts: 145
Joined: Tue Jan 01, 2013 07:43
GitHub: fishyWET

by fishyWET » Thu Jan 03, 2013 10:46

I would love a firestone with blue flames, could you please create that thanks
LOTR Subgame
Some days you flip the table, (ノಥ益ಥ)ノ ︵┻━┻,
Other days, the table flip you, ┳━┳︵(ₒ⁻ₒ).
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Thu Jan 03, 2013 13:48

Wouldnt that just be retexturing it?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Thu Jan 03, 2013 15:22

i would suggest havin

coal coal coal
coal coal coal
stone stone stone

craft recipe
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Thu Jan 03, 2013 16:52

how about this s=stone c=coal
ccc
scs
sss

or

scs
scs
sss

or

scs
sss
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Thu Jan 03, 2013 19:14

jojoa1997 wrote:scs
sss


too little coal

jojoa1997 wrote:how about this s=stone c=coal
ccc
scs
sss

i was thinking about that variant as well
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Thu Jan 03, 2013 19:22

ccc
c_c
ccc
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Thu Jan 03, 2013 19:45

s=stick , c-coal , t=torch
ctc
scs
sss

t is to ignite coal
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

aximx51v
Member
 
Posts: 60
Joined: Fri Dec 07, 2012 03:47

by aximx51v » Wed Feb 13, 2013 20:17

Hey I really like this mod! I just thought of something to make it better:
A working chimney for the fireplace!

Image



It's got animated smoke, and the chimney is hollow. You can even fall down inside it, if you get yourself aligned perfectly.

Image



Here's the code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_abm(
    {nodenames = {"firestone:chimney"},
    neighbors = {"group:igniter"},
    interval = 5.0,
    chance = 1,
    action = function(pos, node, active_object_count, active_object_count_wider)
            p_bottom = {x=pos.x, y=pos.y-1, z=pos.z}
            n_bottom = minetest.env:get_node(p_bottom)
            local chimney_top = false
            local j = 1
            local node_param = minetest.registered_nodes[n_bottom.name]
            if node_param.groups.igniter then
                while chimney_top == false do
                    upper_pos = {x=pos.x, y=pos.y+j, z=pos.z}
                    upper_node = minetest.env:get_node(upper_pos)
                    if  upper_node.name == "firestone:chimney" then
                         j = j+1
                    elseif upper_node.name == "air" then
                        minetest.env:place_node(upper_pos,{name="firestone:smoke"})
                        chimney_top = true
                        elseif upper_node.name == "firestone:smoke" then
                        local old = minetest.env:get_meta(upper_pos)
                        old:set_int("age", 0)
                        chimney_top = true
                    elseif upper_node.name ~= "air" or upper_node.name ~= "firestone:chimney" or upper_node.name ~= "firestone:smoke" then
                        chimney_top = true
                    end
                end
        end
    end,
})

minetest.register_abm(
    {nodenames = {"firestone:smoke"},
    interval = 5.0,
    chance = 1,
    action = function(pos, node, active_object_count, active_object_count_wider)
        local old = minetest.env:get_meta(pos)
        if old:get_int("age") == 1 then
            minetest.env:remove_node(pos)
        else
            old:set_int("age", 1)
        end
    end
})

minetest.register_craft({
    output = '"firestone:chimney" 4',
    recipe = {
        {'', 'default:stone', ''},
        {'default:stone', '', 'default:stone'},
        {'', 'default:stone', ''},
    }
})

minetest.register_node("firestone:chimney", {
    description = "WIP",
    drawtype = "nodebox",
        node_box = {type = "fixed",
            fixed = {
                {0.3125, -0.5, -0.5, 0.5, 0.5, 0.5},
                {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
                {-0.5, -0.5, -0.5, -0.3125, 0.5, 0.5},
                {-0.5, -0.5, -0.5, 0.5, 0.5, -0.3125},
            },
        },
        selection_box = {
            type = "regular",
        },
    tiles ={"chimney.png", "chimney.png", "chimney_side.png"},
    paramtype = 'light',
    sunlight_propagates = true,
    walkable = true,
    groups = {cracky=2},
})

minetest.register_node("firestone:smoke", {
    description = "smoke",
    drawtype = "plantlike",
    tiles ={{
    name="smoke_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0},
    }},
    sunlight_propagates = true,
    groups = {not_in_creative_inventory=1},
    paramtype = "light",
    walkable = false,
    pointable = false,
    diggable = false,
    buildable_to = true,
    light_source = 10,
    on_place_node = function(pos)
        local old = minetest.env:get_meta(pos)
        old:set_int("age", 0)
    end
})



And here's the textures:

Image

Image

Image


The chimney textures are just cobblestone edited.
The smoke animation was made from tiles from Nemo8's old nPartical mod, dunno if you can use those long term because I can't find a license for it.

Anyway, tell me what you think.
 

BZab
Member
 
Posts: 126
Joined: Mon Jan 28, 2013 10:04

by BZab » Wed Feb 13, 2013 20:22

Nice, but will cobble texture change on my texture pack's texture? :D
 

aximx51v
Member
 
Posts: 60
Joined: Fri Dec 07, 2012 03:47

by aximx51v » Wed Feb 13, 2013 20:55

BZab wrote:Nice, but will cobble texture change on my texture pack's texture? :D


not the way it's set up currently. the chimney uses custom images. it can be changed though :)
 

BZab
Member
 
Posts: 126
Joined: Mon Jan 28, 2013 10:04

by BZab » Wed Feb 13, 2013 21:31

I ask bcoz, eg. non-cubic block use textures of actually used texture pack :D
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Thu Feb 14, 2013 14:29

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    tiles ={"default_cobble.png"},
 

aximx51v
Member
 
Posts: 60
Joined: Fri Dec 07, 2012 03:47

by aximx51v » Fri Feb 15, 2013 04:55

Casimir wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    tiles ={"default_cobble.png"},

He's got it. Replace:
tiles ={"chimney.png", "chimney.png", "chimney_side.png"},
with that, and you're good to go.
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16

by deivan » Fri Feb 15, 2013 10:43

Nice. :)
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Fri Feb 15, 2013 14:05

How far will the fire jump?

Does the distance depend on the flamible item, ie: leaves catch fire closer than wood?
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Fri Feb 15, 2013 15:59

I made Fire Poof Wood, so no need Fire of wood:D
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Fri Feb 15, 2013 16:49

aximx51v wrote:Hey I really like this mod! I just thought of something to make it better:
A working chimney for the fireplace!

Great idea! Your code works well! It has been implemented. I agree that the cobble texture used should be from default and also craft should be with cobble not with stone.

LazyJ wrote:How far will the fire jump?

same as fire, 2 nodes surrounding.

Likwid H-Craft wrote:I made Fire Proof Wood, so no need Fire of wood:D

Good idea!

MOD UPDATED!
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Fri Feb 15, 2013 16:51

So I should upload my, fire proof wood?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Fri Feb 15, 2013 21:07

Likwid H-Craft wrote:So I should upload my, fire proof wood?


What should be the craft to fireproof wood?
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Fri Feb 15, 2013 21:57

Bas080 wrote:
Likwid H-Craft wrote:So I should upload my, fire proof wood?


What should be the craft to fireproof wood?

either do some black magic with mese fragments or coat it in something non flammable in crafting
[h]Zen S.D.[/h] The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Fri Feb 15, 2013 22:47

What, about for maybe, the beta build we have a bucket of water, and later I make a, ore that is fire proof.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Sat Feb 16, 2013 18:48

Oops... I thought I had been careful about having flamable blocks too close to the fireplace... apparently I missed on on the second floor.

Image

Image

Image
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Sat Feb 16, 2013 19:23

Oh man I think I should add fire proofed wood >.< before it to late.

It be in default for, now.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 10 guests

cron