Page 1 of 2

[MOD]New doors like in minecraft

PostPosted: Tue Feb 21, 2012 22:50
by Stefan97

PostPosted: Tue Feb 21, 2012 22:50
by bwog
You need to upload the images somewhere, we can't read files on your computer.

PostPosted: Tue Feb 21, 2012 23:29
by IPushButton2653
I can test. My computer is about to die of oldness anyway. Needing a new one soon.

PostPosted: Tue Feb 21, 2012 23:36
by sdzen
Image

PostPosted: Tue Feb 21, 2012 23:41
by IPushButton2653
IT WORKS!!!!!!!!! I CAN'T WALK THROUGH IT!!!!!!!! AND I CAN SEE IT!!!!!!! OMG I LOVE THIS GUY (no homo)

PostPosted: Tue Feb 21, 2012 23:43
by Utilisatrice
Hi,

Amazing, i test in first and it work, thank's !

The door works 100%. Fix.

Need a Bed now x).

PostPosted: Tue Feb 21, 2012 23:43
by sdzen
this has made my top ten finally someone did it right and with out a painful patch set that comes with it

PostPosted: Tue Feb 21, 2012 23:43
by JoseMing
i installed that door and is very cool +5

PostPosted: Tue Feb 21, 2012 23:45
by IPushButton2653
Only one small problem.(for me anyway) The face direction seems off. Like you have to place the door from inside. And me growing up on MC makes this seem odd. But it's an easy fix

PostPosted: Tue Feb 21, 2012 23:47
by sdzen
i didnt notice but now that you point it out i will be haunted by the small little detail!!!! :(

PostPosted: Tue Feb 21, 2012 23:48
by JoseMing
yeah IpushButton have right, but the door is very cool (Y)

PostPosted: Tue Feb 21, 2012 23:49
by IPushButton2653
I'm sorry, I'm OCD when it comes to the small details >.<
But I plan on fixing it for my own sake and including in my mod pack.

PostPosted: Tue Feb 21, 2012 23:50
by sdzen
hmmmmmmmm

PostPosted: Tue Feb 21, 2012 23:52
by IPushButton2653
It's too complicated, but I am fixing textures to match my TP and adding to my mod pack. Thanks @Stefan97!

PostPosted: Fri Feb 24, 2012 16:00
by Jordach
@stefan, can I use this in my mc for mt texture pack to become part of it?

If so then thank you!

EDIT: Was this (also) made by ZLovesPancakes? Folder name: zlpdoors

EDIT2: Sdzen was that on rays server?

EDIT3: THIS WAS MADE MADE BY ZLOVES PANCAKES, I SAW THAT IN MY CONSOLE.

PostPosted: Sat Feb 25, 2012 23:32
by Temperest
I've added Mesecons actuation:

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
--------------------------------------------------------------------------------
--    Doors
--------------------------------------------------------------------------------
--    This mod adds 'minecraftlike' doors to the game
--
--    (c) 2011 Fernando Zapata
--    Code licensed under GNU GPLv3
--    Content licensed under CC BY-SA 3.0
--
--    2012-01-08    11:03:57
--------------------------------------------------------------------------------

local WALLMX = 3
local WALLMZ = 5
local WALLPX = 2
local WALLPZ = 4

--------------------------------------------------------------------------------

minetest.register_node( 'zlpdoors:door', {
    description         = 'Door',
    drawtype            = 'signlike',
    tile_images         = { 'door_door.png' },
    inventory_image     = 'door_door.png',
    wield_image         = 'door_door.png',
    paramtype2          = 'wallmounted',
    selection_box       = { type = 'wallmounted' },
    material            = minetest.digprop_constanttime(1.0),
})

minetest.register_craft( {
    output              = 'zlpdoors:door',
    recipe = {
        { 'default:wood', 'default:wood' },
        { 'default:wood', 'default:wood' },
        { 'default:wood', 'default:wood' },
    },
})

minetest.register_craft({
    type = 'fuel',
    recipe = 'zlpdoors:door',
    burntime = 30,
})

minetest.register_node( 'zlpdoors:door_a_c', {
    Description         = 'Top Closed Door',
    drawtype            = 'signlike',
    tile_images         = { 'door_door_a.png' },
    inventory_image     = 'door_door_a.png',
    paramtype           = 'light',
    paramtype2          = 'wallmounted',
    walkable            = true,
    selection_box       = { type = "wallmounted", },
    material            = minetest.digprop_constanttime(1.0),
    legacy_wallmounted  = true,
    drop                = 'zlpdoors:door',
})

minetest.register_node( 'zlpdoors:door_b_c', {
    Description         = 'Bottom Closed Door',
    drawtype            = 'signlike',
    tile_images         = { 'door_door_b.png' },
    inventory_image     = 'door_door_b.png',
    paramtype           = 'light',
    paramtype2          = 'wallmounted',
    walkable            = true,
    selection_box       = { type = "wallmounted", },
    material            = minetest.digprop_constanttime(1.0),
    legacy_wallmounted  = true,
    drop                = 'zlpdoors:door',
})

minetest.register_node( 'zlpdoors:door_a_o', {
    Description         = 'Top Open Door',
    drawtype            = 'signlike',
    tile_images         = { 'door_door_a_r.png' },
    inventory_image     = 'door_door_a_r.png',
    paramtype           = 'light',
    paramtype2          = 'wallmounted',
    walkable            = false,
    selection_box       = { type = "wallmounted", },
    material            = minetest.digprop_constanttime(1.0),
    legacy_wallmounted  = true,
    drop                = 'zlpdoors:door',
})

minetest.register_node( 'zlpdoors:door_b_o', {
    Description         = 'Bottom Open Door',
    drawtype            = 'signlike',
    tile_images         = { 'door_door_b_r.png' },
    inventory_image     = 'door_door_b_r.png',
    paramtype           = 'light',
    paramtype2          = 'wallmounted',
    walkable            = false,
    selection_box       = { type = "wallmounted", },
    material            = minetest.digprop_constanttime(1.0),
    legacy_wallmounted  = true,
    drop                = 'zlpdoors:door',
})

--------------------------------------------------------------------------------

local round = function( n )
    if n >= 0 then
        return math.floor( n + 0.5 )
    else
        return math.ceil( n - 0.5 )
    end
end

local on_door_placed = function( pos, node, placer )
    if node.name ~= 'zlpdoors:door' then return end

    upos = { x = pos.x, y = pos.y - 1, z = pos.z }
    apos = { x = pos.x, y = pos.y + 1, z = pos.z }
    und = minetest.env:get_node( upos )
    abv = minetest.env:get_node( apos )

    dir = placer:get_look_dir()

    if     round( dir.x ) == 1  then
        newparam = WALLPX
    elseif round( dir.x ) == -1 then
        newparam = WALLMX
    elseif round( dir.z ) == 1  then
        newparam = WALLPZ
    elseif round( dir.z ) == -1 then
        newparam = WALLMZ
    end

    if und.name == 'air' then
        minetest.env:add_node( pos,  { name = 'zlpdoors:door_a_c', param2 = newparam } )
        minetest.env:add_node( upos, { name = 'zlpdoors:door_b_c', param2 = newparam } )
    elseif abv.name == 'air' then
        minetest.env:add_node( pos,  { name = 'zlpdoors:door_b_c', param2 = newparam } )
        minetest.env:add_node( apos, { name = 'zlpdoors:door_a_c', param2 = newparam } )
    else
        minetest.env:remove_node( pos )
        placer:get_inventory():add_item( "main", 'zlpdoors:door' )
        minetest.chat_send_player( placer:get_player_name(), 'not enough space' )
    end
end

local on_door_punched = function( pos, node, puncher )
    if string.find( node.name, 'zlpdoors:door' ) == nil then return end

    upos = { x = pos.x, y = pos.y - 1, z = pos.z }
    apos = { x = pos.x, y = pos.y + 1, z = pos.z }

    if string.find( node.name, '_c', -2 ) ~= nil then
        if     node.param2 == WALLPX then
            newparam = WALLMZ
        elseif node.param2 == WALLMZ then
            newparam = WALLMX
        elseif node.param2 == WALLMX then
            newparam = WALLPZ
        elseif node.param2 == WALLPZ then
            newparam = WALLPX
        end
    elseif string.find( node.name, '_o', -2 ) ~= nil then
        if     node.param2 == WALLMZ then
            newparam = WALLPX
        elseif node.param2 == WALLMX then
            newparam = WALLMZ
        elseif node.param2 == WALLPZ then
            newparam = WALLMX
        elseif node.param2 == WALLPX then
            newparam = WALLPZ
        end
    end

    if ( node.name == 'zlpdoors:door_a_c' ) then
        minetest.env:add_node( pos,  { name = 'zlpdoors:door_a_o', param2 = newparam } )
        minetest.env:add_node( upos, { name = 'zlpdoors:door_b_o', param2 = newparam } )

    elseif ( node.name == 'zlpdoors:door_b_c' ) then
        minetest.env:add_node( pos,  { name = 'zlpdoors:door_b_o', param2 = newparam } )
        minetest.env:add_node( apos, { name = 'zlpdoors:door_a_o', param2 = newparam } )

    elseif ( node.name == 'zlpdoors:door_a_o' ) then
        minetest.env:add_node( pos,  { name = 'zlpdoors:door_a_c', param2 = newparam } )
        minetest.env:add_node( upos, { name = 'zlpdoors:door_b_c', param2 = newparam } )

    elseif ( node.name == 'zlpdoors:door_b_o' ) then
        minetest.env:add_node( pos,  { name = 'zlpdoors:door_b_c', param2 = newparam } )
        minetest.env:add_node( apos, { name = 'zlpdoors:door_a_c', param2 = newparam } )

    end
end

local on_door_digged = function( pos, node, digger )
    upos = { x = pos.x, y = pos.y - 1, z = pos.z }
    apos = { x = pos.x, y = pos.y + 1, z = pos.z }

    if ( node.name == 'zlpdoors:door_a_c' ) or ( node.name == 'zlpdoors:door_a_o' ) then
        minetest.env:remove_node( upos )
    elseif ( node.name == 'zlpdoors:door_b_c' ) or ( node.name == 'zlpdoors:door_b_o' ) then
        minetest.env:remove_node( apos )
    end
end

--------------------------------------------------------------------------------

minetest.register_on_placenode( on_door_placed )
minetest.register_on_punchnode( on_door_punched )
minetest.register_on_dignode( on_door_digged )

--------------------------------------------------------------------------------

-- Mesecon Stuff:
mesecon:register_on_signal_on(on_door_punched)
mesecon:register_on_signal_off(on_door_punched)

print( ' ++ loaded : Doors by ZLovesPancakes' )


Now any mesecon signal will trigger the opening/closing of the door.

NOTE: add "jeija" to the entries in depends.txt.

PostPosted: Tue Feb 28, 2012 14:42
by jordan4ibanez
bump

PostPosted: Tue Feb 28, 2012 15:52
by RAPHAEL
I decided to do a metal version of the doors: zlpdoorsmetal

Download: http://www.mediafire.com/?w874nz9jcgadd77

PostPosted: Tue Feb 28, 2012 19:17
by sfan5
sdzen wrote:Image

Thats something with WorldEdit

PostPosted: Tue Feb 28, 2012 21:41
by sdzen
are you speaking of my screenshot because that happens more oft then not

PostPosted: Wed Feb 29, 2012 23:01
by IPushButton2653
This will be a major asset to me in the future

PostPosted: Wed Feb 29, 2012 23:08
by IPushButton2653
Iron doors didn't work. It placed a "ghost" of it on the node above it. But upon removal of the ghost and door, one door lead to two doors

PostPosted: Thu Mar 01, 2012 04:10
by RAPHAEL
IPushButton2653 wrote:Iron doors didn't work. It placed a "ghost" of it on the node above it. But upon removal of the ghost and door, one door lead to two doors

Could you explain some more? It works for me and has on 3 different minetest installs.

PostPosted: Sun Mar 25, 2012 07:58
by mali_nexa
I reviewed your "Door mod" and my "Minecraft texture pack" (when i get 20 subs download link will be uploaded) .

Here's The link: http://www.youtube.com/watch?v=HGuhzc_nVyI

Subscribe if you like it!!!

EDIT DAMMIT; dont forget to watch: http://www.youtube.com/watch?v=ShOrZpGKBBw&feature=context&context=C41e9f48VDvjVQa1PpcFOxuWjBYXcSVvQHneNO8XLlTKEA-0dLdc0=

Tutorial for n00bs!!!

PostPosted: Sun Mar 25, 2012 20:35
by jordan4ibanez
mali_nexa wrote:I reviewed your "Door mod" and my "Minecraft texture pack" (when i get 20 subs download link will be uploaded) .

Here's The link: http://www.youtube.com/watch?v=HGuhzc_nVyI

Subscribe if you like it!!!

EDIT DAMMIT; dont forget to watch: http://www.youtube.com/watch?v=ShOrZpGKBBw&feature=context&context=C41e9f48VDvjVQa1PpcFOxuWjBYXcSVvQHneNO8XLlTKEA-0dLdc0=

Tutorial for n00bs!!!

why would you make people sub to you for an upload?

PostPosted: Mon Mar 26, 2012 00:03
by bgsmithjr
Why would you review a mod? Just review minetest.

PostPosted: Mon Mar 26, 2012 00:25
by RabbiBob
How does one remove a door?

PostPosted: Mon Mar 26, 2012 01:14
by bgsmithjr
It depends on which version you are using. Point at the hinges when you punch.

PostPosted: Wed Mar 28, 2012 13:38
by jordan4ibanez
Please, can a moderator slap a gpl license on this and move it to mod releases? ( or could the mod creator do it? )

PostPosted: Wed Mar 28, 2012 13:39
by Death Dealer
jordan4ibanez wrote:Please, can a moderator slap a gpl license on this and move it to mod releases? ( or could the mod creator do it? )

the mod has been dropped by the creater for now.