Some checks needed...

wieszak
Member
 
Posts: 40
Joined: Mon Feb 20, 2012 17:00

Some checks needed...

by wieszak » Wed Feb 29, 2012 15:24

Some oddities (0.4.dev):
- underwater torches - i think maybe there should be glass+torch = some kind of lamp, which can be used underwater, but this is lets say just funny.
Image
- underwater samplings - i don't mind putting it underwater, but they grows there ;) and grows only as wood without leaves:
Image
- and something bizzare: two cactuses gone wild:
Image
such fanciness is probably too much.. i know this is ideal fuel for cooking but... maybe some volume check ? stop growing after reaching some predefined value ?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Feb 29, 2012 15:35

wieszak wrote:Some oddities (0.4.dev):
- underwater torches - i think maybe there should be glass+torch = some kind of lamp, which can be used underwater, but this is lets say just funny.
Image
- underwater samplings - i don't mind putting it underwater, but they grows there ;) and grows only as wood without leaves:
Image
- and something bizzare: two cactuses gone wild:
Image
such fanciness is probably too much.. i know this is ideal fuel for cooking but... maybe some volume check ? stop growing after reaching some predefined value ?

Cactii doesn't grow normally
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Wed Feb 29, 2012 18:08

I've never seen such wild cacti lol
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

wokste
Member
 
Posts: 78
Joined: Sat Feb 11, 2012 09:06

by wokste » Wed Feb 29, 2012 18:47

Maybe adding an option in lua to tell that a node cannot be placed in a liquid.
We must be careful not to clone Notches mistakes.
 

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

by sdzen » Wed Feb 29, 2012 21:20

he is using the nature mod i see
[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
 

wieszak
Member
 
Posts: 40
Joined: Mon Feb 20, 2012 17:00

by wieszak » Wed Feb 29, 2012 21:49

Yes, i'm using nature mod.
I just patched it using some code from mineral detector:
cactus.lua:
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
-- Cactus growing

minetest.register_abm({
    nodenames = { "default:cactus" },
    interval = 7200,
    chance = 25,

    action = function(pos, node, active_object_count, active_object_count_wider)
        -- Grow with a chance (choosing which side to grow)

        local search_distance = 10
        local cactus_found = 0

        for p_x=(pos.x-search_distance), (pos.x+search_distance) do
                for p_y=(pos.y-search_distance), (pos.y+search_distance) do
                        for p_z=(pos.z-search_distance), (pos.z+search_distance) do
                                local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z})

                                if search_n.name == "default:cactus" then
                                        cactus_found = cactus_found + 1
                                end
                        end
                end
        end
        if cactus_found < 15 then
                for i = -1, 1 do
                for j = 0, 1 do
                for k = -1, 1 do
                    if(math.abs(i) + math.abs(j) + math.abs(k) == 1) then
                        if (math.random(1, 30) == 1) then
                                local new_pos = {
                                        x = pos.x + i,
                                        y = pos.y + j,
                                        z = pos.z + k
                                }
                                if (minetest.env:get_node(new_pos).name == "air") then
                                        minetest.env:add_node(new_pos, {name = "default:cactus"})
                                        print ('[nature] A cactus has grown at (' .. new_pos.x .. ',' .. new_pos.y .. ',' .. new_pos.z .. ')')
                                end
                        end
                    end
                end
                end
                end
        end
    end
})


BTW. is there already or is considered in mod API function like find_nodes_in_radius ? returning table of positions or at least count ?
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Thu Mar 01, 2012 02:18

Ya had the same cactus infestationXD mountains of cacti. Don't try burning it, it crashed my game almost every time: /
Keep calm and code python^_^
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Thu Mar 01, 2012 07:57

Death Dealer wrote:Ya had the same cactus infestationXD mountains of cacti. Don't try burning it, it crashed my game almost every time: /


world edit works for this kinna stuff.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by sdzen » Thu Mar 01, 2012 12:14

//replace default:cactus,air
:)
[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
 

wieszak
Member
 
Posts: 40
Joined: Mon Feb 20, 2012 17:00

by wieszak » Thu Mar 01, 2012 12:27

Wow, thanks for the advice ;) Well for this game, since i prevented further growing with this patch i just chop down this... hmm... mutants.
Is this //replace working with unknonwn object also ? I'm assuming yes... I mean the problem is that it happens, not that i have such green mouintain in my game ;)
Last edited by wieszak on Thu Mar 01, 2012 12:45, edited 1 time in total.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 10 guests

cron