Skip to content
Snippets Groups Projects
  1. Mar 22, 2016
    • Rui's avatar
      7cba7af8
    • Auke Kok's avatar
      Doors: Allow schematic placement of wooden doors. · ffba9d97
      Auke Kok authored
      If LVM or some other nonmetadata method is used to place a door,
      then metadata is missing that tells us whether the door is left
      or right-hinged.
      
      However, we can detect that nodemeta is missing and see if the node
      name is _a or _b. In the case of _a, nothing needs to be done and we
      can just open the door. In the case of _b we assume the door is right
      hinged, and tune the state nodemeta value so that the door opens the
      right way. This all of course assumes that the schematic method places
      the doors *closed* by default, which is reasonable.
      ffba9d97
  2. Mar 21, 2016
    • Auke Kok's avatar
      Doors: Allow falling nodes to fall onto doors. · 9de43cdf
      Auke Kok authored
      We were cleverly attempting to use an airlike node as the
      top half of the doors, but as airlike nodes are not walkable,
      falling nodes would not stop falling and thus remain an entity
      stuck on top of a door.
      
      After inspecting the builtin/game/falling.lua code, I considered
      the remaining options: (a) revert doors such that the top part is
      actually the door, (b) play with nodedef fields and see if other
      flags may work, or (c) modify the hidden door part to another
      drawtype that properly prevents this issue.
      
      (a) seemed way over the top for now, although it would solve the
      issue, it would cause a rewrite of most of the code including the
      old-door-conversion.
      
      (b) turned up nothing.
      
      (c) turned out to be relatively simple.
      
      So, here's the implementation where I turn the hidden door top
      into a tiny, non-targetable but walkable nodebox that is entirely
      inside the door hinge. It's entirely transparent, so you still
      can't see it, can't hit it, nor can you place anything in it or
      make liquids flow through it. The top part is placed in the right
      position on placement and not touched further.
      
      Falling nodes will properly stop on top of these doors. I've
      adjusted the door conversion code to properly account for the
      issue as well, so the only thing remaining is people who have
      been running a git branch - those can upgrade by re-placing the
      door.
      9de43cdf
    • Rui914's avatar
      Create API for registration of fence gate. · a2ecc51f
      Rui914 authored
      a2ecc51f
  3. Mar 18, 2016
    • Auke Kok's avatar
      Allow digging of protected doors with "protection_bypass" · 22e32a01
      Auke Kok authored
      This was probably lost in either the API rewrite or a merge/rebase.
      
      Fixes #929
      22e32a01
    • Auke Kok's avatar
      Add steel door/trapdoor sounds. · cb57f70a
      Auke Kok authored
      I've found a favorable steel door sound from a parking garage
      door that isn't abrupt or scary, just sounds like a nice solid
      metal door. The sample had both opening and closing sounds, and
      so they match nicely. Amplified and mixed several samples together
      to reduce ambient noise, and get the right level compared to
      wood doors. Attribution was added as well. CC-BY-3.0 sounds.
      cb57f70a
  4. Mar 13, 2016
    • Auke Kok's avatar
      Clean up door tops if fire destroys bottom. · dfee51c2
      Auke Kok authored
      Fixes #909. Door tops are never flammable.
      
      This doesn't guard yet against a voxelmanip removing the top node,
      but that is less of an issue since if a voxelmanip removes the top,
      then the bottom part remains functional and visibly intact. If the
      voxelmanip removes the bottom part, but not the top, then this patch
      makes it clean up the top just fine.
      dfee51c2
    • Auke Kok's avatar
      Add "protection_bypass" priv. · 2fb40be4
      Auke Kok authored
      The access privilege allows players that have it to bypass protection
      on locked doors/trapdoors, chests and bones.
      
      The priv also allows bypassing any minetest.is_protected() check,
      including digging nodes and placing them. It is meant for world
      moderators to clean up and fix map issues.
      
      Original patch by red-001. Split up and rebased/rewritten by sofar.
      
      This patch requires https://github.com/minetest/minetest/pull/3800
      2fb40be4
    • Auke Kok's avatar
      Add a simple, but stylish fence gate. · b998ab1b
      Auke Kok authored
      This fence gate builds on NDT_CONNECTED by assuming fence nodes will
      automatically connect to it's sides properly. The fence gate will
      open and close just like doors, with sounds, but it only opens one
      way. The gate sticks out quite a bit and can be bumped into, so the
      fence may be used as some sort of path switch.
      
      The fence gate offers no form of protection and can be opened and
      closed by anyone. This is done on purpose - the fencegate isn't
      meant to provide protection from players, as fences can be
      trivially jumped over. Instead, these fences should be used for
      protecting crops from hungry sheep, or keeping rabbits in their
      pen, or just decoration. Mods can also modify the mod to add
      protection, of course.
      
      A recipe is added to make these. It's 4 sticks and 2 wood (any)
      as follows:
      
        stick  wood  stick
        stick  wood  stick
      
      The collision box of the open gate is such that if two gates are
      connected but mirrored (making an M shape) then you can walk a large
      entity that's larger than 1.0 wide through the opening. The gate of
      an opened fence can also be stood upon or bumped into.
      
      I've mixed together some sounds to provide a somewhat light sound
      experience, one that one would expect from a small gate latching open
      and close.
      
      This change requires #873, otherwise it doesn't connect to fences.
      b998ab1b
  5. Mar 03, 2016
  6. Feb 29, 2016
  7. Feb 23, 2016
    • Auke Kok's avatar
      Allow mod namespace for door registrations. · 2c355a86
      Auke Kok authored
      This is an adapted version of #861 - by oleastre
      
      Most mods had been calling `doors.register_door() with a door
      name that included the "modname:" prefix, and we should continue
      to allow mods to do so, without registering the nodenames created
      in the "doors:" namespace.
      
      The default case is to use the "modname:" prefix verbatim. If
      mods or code calls this function without a prefix, then "doors:"
      is automatically used.
      
      Now that the namespace is corrected, the copy replacement ABM is
      no longer needed.
      2c355a86
    • Auke Kok's avatar
      Fallback doors.register_door() code. · 77708848
      Auke Kok authored
      This function maps doors.register_door to the new API as far as
      reasonable. We can't map the texture, so we fall back to a default
      texture. An error message is printed if mod writers did not provide the
      needed new tiles field for the door. The created doors are functional
      and a full replacement. Old doors are replaced with the new ones
      through an ABM.
      77708848
    • Auke Kok's avatar
      Fix broken door protection. · 6b055ae1
      Auke Kok authored
      A previous fix overwrote the `def` variable during registration,
      causing protected doors no longer to be placed with protection.
      6b055ae1
  8. Feb 19, 2016
    • Auke Kok's avatar
      Call on_place_node() callbacks after placing door. · ed9fd475
      Auke Kok authored
      Other mods may depend on knowing whether doors are placed
      to setup additional attributes or perform node manipulations.
      
      This is something e.g. mesecons does to connect circuits
      to doors. This was tested with mesecons. Placing a door next
      to a mesecon wire will make the wire automatically
      connect, which was otherwise not happening.
      ed9fd475
    • Auke Kok's avatar
      Open doors when right-clicking a door with a door. · 2cc6640e
      Auke Kok authored
      And similarly, if we wield a door and right click any node
      that has an on_rightclick() handler, call the handler
      instead.
      
      Just to be on the safe side, assure that none of this
      code runs when right-clicking an entity or player, which
      would likely crash the server.
      
      Fold in PR #831 as well - prevent server crash on door
      place on unknown blocks, by @tenplus1.
      2cc6640e
    • Auke Kok's avatar
      Allow building doors on buildable_to nodes. · bbf17c9e
      Auke Kok authored
      This code never allowed placing a door on e.g. a grass
      plant. The code to handle this isn't that complex. With
      this code, doors can be placed on flowers and on normal
      node surfaces without issues.
      bbf17c9e
  9. Feb 18, 2016
  10. Feb 13, 2016
    • Jean-Patrick Guerrero's avatar
    • Auke Kok's avatar
      New mesh door models, and extensive door API · f600a9f6
      Auke Kok authored
      This patch replaces the default door nodes with a new mesh model
      and nodes.
      
      Two new models were added that are 2 blocks high. One for left-hinge
      and one for right-hinge doors. This allows us to make a single texture
      fit on both models. The alternative would have been 1 model and 2
      unmapped textures, which is more work for mod developers.
      
      Doors work exactly like the old doors, including ownership, breaking
      doors, opening and closing.
      
      Under the hood, we can prevent the top part of the door from being
      obstructed by placing an invisible node. This prevents liquids from
      flowing through doors or people placing sand or other blocks in the
      top half. The door code automatically places and removes these as
      needed.
      
      Metadata is used to store door state, just like the old version.
      
      A doors API is added, it allows mods to use the API to open/close or
      toggle door states without worrying about sounds, permissions and
      other details. This is intended for e.g. mesecons. This API allows
      mods to manipulate or inspect doors for players or for themselves.
      
      In-game old door nodes are automatically converted using an ABM and
      preserve ownership and orientation and state.
      
      TNT blows up all doors and trapdoors except for the steel ones,
      who can survive a blast. We return an itemstack in on_blast(),
      which requires a TNT API patch which is also pending.
      
      We enable backface culling for most of these doors, as this gives
      the identical visual appearance that the old doors had. In the case
      of the glass door, there's a slight twist.
      
      The texture files used by the new doors have new names that do
      not conflict with previous texture file names to avoid texture
      pack conflicts.
      
      Thanks to red-001 <red-001@users.noreply.github.com> for some
      of the conversion code, cleanups, and extra textures.
      f600a9f6
  11. Jan 20, 2016
    • Auke Kok's avatar
      Better trapdoor side appearance. · 322967d2
      Auke Kok authored
      We're using a normal wooden side texture to draw the sides
      of trapdoors. But the side textures have only 2 edges that
      have a nice texture for the 2px wide trapdoor. We can
      either repaint the textures, or just rotate the texture
      properly for the two sides that need it.
      
      Because the side texture for wooden doors was just a default:wood
      texture, it clashes with the colors in the trapdoor, and so
      we add a wooden trapdoor-matching tile side texture as well.
      
      This also improves the steel trapdoor side, but without a
      texture change there since that was already a specially
      drawn texture for that node.
      
      We also increase the thickness of the trapdoor to 2px. Right
      now the model is 0.4 large, but this causes the side textures
      to look odd as there's a mismatch in pixel size. By scaling the
      trapdoor side up to exactly 2px, the sides look natural.
      
      Thanks to @kilbith for the suggestion.
      322967d2
    • Auke Kok's avatar
      Allow trapdoors to be rotated all ways. · f4131418
      Auke Kok authored
      There really is no reason to prevent rotation in trapdoors, I
      expect this to be an oversight.
      
      Trapdoors work perfectly well sideways, upside down and can
      work like fences, gates and more. Most commonly, people will
      want to put them in the top half of the node so they remain
      flush with a floor.
      f4131418
  12. Jan 12, 2016
    • Auke Kok's avatar
      Fix trapdoor recipe conflict with iron bar recipe. · 535e611e
      Auke Kok authored
      In oversight, I added this recipe not verifying that it was already
      taken.
      
      We change this to a 2x2 iron bar recipe. The shape and amount are
      reasonable (reduced to output 1 steel trapdoor), and I verified that
      it wasn't in use.
      
      Fixes #779
      535e611e
  13. Jan 06, 2016
  14. Jan 03, 2016
    • Auke Kok's avatar
      Steel Trapdoor. · e9a7782c
      Auke Kok authored
      Adds a steel trapdoor. Textures were painted from scratch, and
      inspired by the current Steel Door. Ownership on the trapdoor
      works as expected, and so does the crafting recipe.
      e9a7782c
  15. Aug 11, 2015
  16. Jun 18, 2015
  17. May 14, 2015
  18. May 12, 2015
  19. Feb 14, 2015
  20. Feb 12, 2015
  21. Jan 24, 2015
  22. Jan 17, 2015
  23. Nov 30, 2014
  24. Aug 07, 2014
  25. Jul 22, 2014
    • Zefram's avatar
      Pair door with door of any type · ea3fcdd0
      Zefram authored
      Mirror the setup of a door placed next to any door, not just next to
      a door of the same type.  This is particularly useful where there are
      multiple door types that have the same appearance, but one wants the
      doors of a pair to have different behaviour in some other respect.
      ea3fcdd0
Loading