Skip to content
Snippets Groups Projects
  1. Jul 16, 2017
  2. Jul 02, 2017
  3. May 01, 2017
  4. Apr 12, 2017
    • paramat's avatar
      Bushes: Add saplings · a57d2db5
      paramat authored
      Bush saplings grow in half the time of tree saplings.
      Bushes do not need 'from sapling' schematic variants because only the
      stem node is force-placed in the mapgen schematic, so only the sapling
      is force-replaced.
      Bush leaves drop saplings with a rarity that ensures at least 1 sapling
      per bush on average.
      a57d2db5
    • paramat's avatar
      PB&J Pup: Remove mod · d68d2c08
      paramat authored
      Also delete nyancat API documentation from game_api.txt.
      d68d2c08
  5. Feb 25, 2017
    • MarkuBu's avatar
      Leafdecay: Node timer based implementation, API · 60e5b299
      MarkuBu authored
      This implements a node-timer based leafdecay mechanism, and exposes
      an API to use it in mods.
      
      The API is documented in game_api.txt.
      
      `default.register_leafdecay(leafdecaydef)`
      
      `leafdecaydef` is a table, with following members:
      {
      	trunks = { "default:tree"}, -- nodes considered trunks
      	leaves = { "default:leaves", "default:apple"}, -- nodes considered leaves
      	radius = 3, -- activates leafdecay this far from the trunk
      }
      
      The algorithm will drop `leaves` items in the area if no `trunks` are found
      in the `trunk_radius` sized area around the position of the leaf. If a node
      listed in `leaves` has a group `leafdecay_drop > 0`, then the item is dropped,
      otherwise the item is removed but not dropped.
      
      The algorithm also implements a value `default.leafdecay_speed` (default
      15) which can be modified to increase or decrease of the leaf decay. The
      algorithm will vary the actual speed a bit to introduce randomness.
      
      Leaf decay is randomized by 0.1 seconds to reduce the chance that
      decay happens many times on the same second interval. This requires
      nodetimer_interval to be set to values lower than 1.0 to have an
      effect.
      
      The leaves will decay between 2 and 10 seconds after digging the trunk,
      and happen at non-integer second intervals.
      
      -- The API was added by sofar.
      60e5b299
  6. Feb 11, 2017
  7. Jan 26, 2017
  8. Dec 05, 2016
  9. Nov 27, 2016
  10. Nov 25, 2016
    • Auke Kok's avatar
      Keys: Allow easy sharing of access without commands · e4b1c935
      Auke Kok authored
      This code adds the key concept to minetest_game, and integrates it
      with lockable nodes. Currently supported lockable items are the Steel
      Door, the Steel Trapdoor, and the Locked Chest.
      
      The goal of this modification is to introduce a fine-grained multi-
      player permission system that is intuitive and usable without any
      console or chat commands, and doesn't require extra privileges to
      be granted or setup. Keys can also physically be conveyed to other
      players, adding to gameplay and adding some personality that is
      preferable to console commands or editing formspecs.
      
      A skeleton key can be crafted with 1 gold ingot. Skeleton keys can
      then be matched to a lockable node by right-clicking the skeleton
      key on a lockable node, which changes the skeleton key to a "key".
      
      Gold was chosen as it's currently a not-so very useful item, and
      therefore it's likely that players have some, but aren't really
      using it for any purpose.
      
      This key can subsequently used by any player to open or access that
      lockable node, including retrieving items from Locked Chests, or
      putting items in them.
      
      They key is programmed to fit only the particular locked node it is
      programmed to. This is achieved by storing a secret value in both
      key and locked node. If this secret value doesn't match, the key
      will not open the locked node. This allows many keys to be created
      for one chest or door, but a key will only fit one node ever. The
      secrets are stored in node, and item meta for the key.
      
      If a locked node is removed, all keys that opened it are no longer
      valid. Even if a new door/chest is placed in exactly the same spot,
      the old keys will no longer fit that node.
      
      Keys can be smelted back in gold ingots if they are no longer useful.
      
      The method of storing a secret in nodemeta and itemstackmeta is secure
      as there is no way for the client to create new items on the server
      with a particular secret metadata value. Even if you could possible
      create such an itemstack on the client, the server does not ever read
      itemstackmeta from a client package.
      
      The patch adds an API that allows other nodes and nodes added by
      mods to use the same keys as well. The method how to implement this
      is described in game_api.txt. The mod should add 2 callbacks to it's
      node definition. Example code is given.
      
      Textures are from PixelBOX, thanks to Gambit.
      e4b1c935
  11. Nov 21, 2016
    • Auke Kok's avatar
      Carts: Merge boost_cart as "carts" mod · 1e691c44
      Auke Kok authored
      This is all the working code from SmallJoker's boost_cart, poored into
      a more suitable form for minetest_game.
      
      - Mesecons and moreores stuff was removed entirely.
      - Textures were all renamed and moved out of default/
      - Updated license, readme.txt, attribution
      - Changed code license to MIT, left artwork at CC0
      - removed default:rail and made aliases for it
      - :carts:rail is now carts:rail.
      - localized entity def
      - removed copper rail entirely
      - startstop rail was removed, as well as detector rail
      - remodeled to b3d using stujones11 excellent blend model, but sizes
        of cart adjusted to make pixel sizes consistent (0.625) everywhere.
      - slightly more complex texture map for the cart (front/side visibly
        different)
      - rail parameters are passed as a separate def table, and stored in
        a private list. This avoids having to call `get_meta` on every
        node. In return, we need the node name, though.
      - adds metal sounds (based on default metal sound function) and
        cart moving sound.
      - reduced cart speeds to max 7, 5 by pushing.
      - Added on_step() rail event handler, gets called when a cart is on
        a rail.
      - Added various rebased updates from upstream (thanks Krock)
      - Included a fix that removes the 'reverse jiggle' when stopping.
      - Included reworked textures by sofar.
      
      The mod namespace is still public, but I'm NOT declaring it an API. I'd
      rather see it localized instead, for now. Any public interface in this
      code is *experimental* at best, and should be considered non-stable and
      unsupported for now.
      1e691c44
  12. Nov 07, 2016
  13. Nov 02, 2016
  14. Oct 25, 2016
  15. Oct 12, 2016
  16. Oct 10, 2016
    • tenplus1's avatar
      Tnt: Various optimisations · 6fdfd255
      tenplus1 authored
      Pass nodename to tnt.burn function where possible to reduce
      use of 'get_node'.
      Change 'ipairs' to 'pairs'.
      Use 'nodeupdate_single(pos)' instead of 'nodeupdate(pos)' to
      avoid every node triggering recursion, the loop itself takes
      the place of recursion and works upwards through horizontal
      planes as required.
      6fdfd255
  17. Sep 10, 2016
    • Auke Kok's avatar
      Xpanes: Convert to connected nodeboxes · 54235f32
      Auke Kok authored
      I've rewritten this to use connected nodeboxes, but with a caveat. In
      order to make flat nodes look better, I'm keeping one non-connected
      pane that is flat around to convert flat sections to the flat nodes
      instead of connected, as these look better and are easier to work
      with. Once more sides are needed we convert the panes on the fly to
      connected nodes and recalculate the shape.
      
      We don't paint any of the half-panes that the previous generation of
      xpanes did. There's no need and it's harder to work with. Updating the
      nodes also seems more natural and placement and removal works straight
      forward.
      
      The conversion of old panes relies on an LBM, and does a reasonable
      conversion job, but it's not exact, since the panes behave slightly
      different now.
      
      The game API documentation was wrong to begin with. We discard param
      nr. 2 of the API entirely, and correct the tile usage text.
      54235f32
  18. Aug 05, 2016
    • Tim's avatar
      Screwdriver: disallow rotation with `on_rotate = false` · 20fa0373
      Tim authored
      Other screwdriver mods, or mods that cause rotation, might operate without the screwdriver mod loaded and have `screwdriver.disallow` unavailable.
      This allows nodes to default to full-disallow rather than full-rotation in such a situation.
      20fa0373
  19. Jul 18, 2016
    • rubenwardy's avatar
      Move nyancats into a separate mod · 3661cb61
      rubenwardy authored
      Nyancats are independent in the default mod. Nothing else uses them or
      their code. Separating it into a separate mod makes it easier for
      subgames to remove them. It also makes it easier for a mod to depend
      on nyancats, as lots of subgames don't have them.
      
      Default/mapgen.lua: Register biomes, ores and decorations in
      singlenode mapgen. These were never disabled anyway because
      singlenode was removed from the world creation menu.
      3661cb61
  20. Jul 16, 2016
  21. Jul 05, 2016
  22. Jun 27, 2016
  23. Jun 22, 2016
  24. Jun 15, 2016
    • Auke Kok's avatar
      Stairs: Add mossy cobble slab and stair · 2199be51
      Auke Kok authored
      Allow water to turn cobble slab and stairs to turn into mossy versions.
      
      There is no crafting recipe for mossy stairs and mossy slabs, the
      stair/slab API has been modified to allow for a recipeitem that
      is `nil`, which will omit adding a crafting recipe for these two
      items. The API documentation is updated.
      
      The slabs and stairs will turn mossy when water is adjacent, just like
      cobblestone. You can either farm mossy versions by placing them in
      water for a while, then collecting them, or run water over your craft.
      2199be51
  25. May 01, 2016
  26. Apr 30, 2016
    • Auke Kok's avatar
      TNT: Allow mods to override entity physics. · 098ea0d1
      Auke Kok authored
      Introduces an `on_blast(luaobj, damage)` callback that mods can attach
      to an entity def. The function will get called with the damage that
      TNT would make.
      
      The function should return three values:
      
        bool do_damage, bool do_knockback, table drops
      
      do_damage allows the mod to tell the TNT code to perform damage on
      the entity for the mod. The mod code should not do anything with
      the entity HP. The entity should not be immortal. If false, then
      the entity will not be damaged by the TNT mod.
      
      do_knockback allows the mod to tell the TNT mod to perform an
      entity knockback effect. If false, no knockback effect is applied
      to the entity.
      
      the drops table is a list of items to drop. It may be nil. E.g. {
      "wool:red" }.
      
      I've documented both on_blast() API methods in game_api.txt. It is
      a better place than lua_api.txt.
      098ea0d1
  27. Apr 26, 2016
    • Auke Kok's avatar
      TNT: Add on_blast to all nodes with an inventory · 54b87e95
      Auke Kok authored
      Adds a minor helper function that allows efficient retrieval of
      several inventories from a node inventory. We use this helper to
      quickly retrieve the items in chests, vessel shelves, book shelves
      and furnaces, and return these with the nodes itself to the TNT caller.
      
      The TNT caller then performs the entity physics, and we don't need
      to do anything else.
      
      We disable TNT doing anything with bones.
      
      We expose a bug in the code that drops the items - metadata was lost
      entirely. This patch corrects that by properly copying the metadata
      and creating the drops list inclusive metadata.
      54b87e95
  28. Apr 16, 2016
  29. Mar 21, 2016
  30. Mar 13, 2016
    • Auke Kok's avatar
      Basic stone walls, using NDT_CONNECTED. · f8f7502e
      Auke Kok authored
      These basic connected wall nodes automatically connect
      to neigboring stone blocks, other wall blocks and anything
      that's "cracky". The do not connect to wood (fences will do
      that).
      
      The walls are generated using a new walls.register() API.
      Documentation on the API is included in game_api.txt.
      
      This change requires minetest/minetest#3503.
      
      Walls are added for all cobble stone materials. They generally
      look best and are the natural use cases for these materials.
      f8f7502e
  31. Mar 11, 2016
  32. Mar 06, 2016
  33. Feb 18, 2016
  34. Feb 13, 2016
    • 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
  35. Feb 03, 2016
    • Auke Kok's avatar
      Create API for fence.register, and use it. · 2f39cad0
      Auke Kok authored
      This converts the call to minetest.register() for the default
      fence node, so it can be called by other mods to quickly
      setup other fences.
      
      Since this creates an API, insert it into the game_api.txt.
      
      The api looks like minetest.register(name, {def}), and has two
      uncommon fields: "texture" and "material". Any normal nodedef
      property can be passed through, except "drawtype". The "fence"
      group will always be added.
      
      The default fence recipe is modified to be as follows:
        wood, stick, wood
        wood, stick, wood
      
      This recipe yields 4 fence nodes.
      
      This allows us to create according recipes for acacia, pine,
      aspen, and junglewood fences without adding new stick types:
      
        pine wood, stick, pine wood
        pine wood, stick, pine wood
      
      This is a from-scratch implementation, written by heart but inspired
      by (#665 - Add many wooden fences).
      
      Stick and fences nodes are named in a consistent way.
      2f39cad0
Loading