Skip to content
Snippets Groups Projects
  1. Jul 05, 2016
    • Foghrye4's avatar
      Adding minetest.clear_craft · 281e9f39
      Foghrye4 authored
      Modifications by est31: grammar fixes in doc + error messages and
      a little style fix, no functional change.
      281e9f39
  2. Jul 03, 2016
    • kwolekr's avatar
      Add MapSettingsManager and new mapgen setting script API functions · 3c63c304
      kwolekr authored
      This commit refactors the majority of the Mapgen settings system.
      - MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
        instead of the EmergeManager.
      - New Script API functions added:
          core.get_mapgen_setting
          core.get_mapgen_setting_noiseparams,
          core.set_mapgen_setting, and
          core.set_mapgen_setting_noiseparams.
      - minetest.get/set_mapgen_params are deprecated by the above new functions.
      - It is now possible to view and modify any arbitrary mapgen setting from a mod,
        rather than the base MapgenParams structure.
      - MapgenSpecificParams has been removed.
      3c63c304
    • kwolekr's avatar
      Mapgen: Refactor mapgen creation and management · 92705306
      kwolekr authored
      - Move mapgen creation logic out of EmergeManager and into Mapgen
      - Internally represent mapgen type as an enum value, instead of a string
      - Remove the need for a MapgenFactory per mapgen
      92705306
  3. Jun 24, 2016
  4. Jun 12, 2016
  5. Jun 11, 2016
  6. Jun 05, 2016
    • paramat's avatar
      Biome API: Add per-biome riverbed material and depth · d24f3841
      paramat authored
      Mgvalleys: Remove riverbed sand placement from base terrain generation
      Riverbed material placement moved to MapgenBasic::generateBiomes()
      Document fields and add note that the biome API is still unstable
      d24f3841
  7. Jun 04, 2016
  8. May 30, 2016
    • est31's avatar
      Add minetest.check_password_entry callback · 27db9292
      est31 authored
      Gives a convenient way to check a player's password.
      
      This entirely bypasses the SRP protocol, so should be used
      with great care.
      
      This function is not intended to be used
      in-game, but solely by external protocols, where no
      authentication of the minetest engine is provided, and
      also only for protocols, in which the user already gives the
      server the plaintext password.
      
      Examples for good use are the classical http form, or irc,
      an example for a bad use is a password change dialog inside
      formspec.
      
      Users should be aware that they lose the advantages of the SRP
      protocol if they enter their passwords for servers outside the
      normal entry box, like in in-game formspec menus,
      or through irc /msg s,
      
      This patch also fixes an auth.h mistake which has mixed up the
      order of params inside the decode_srp_verifier_and_salt function.
      
      Zeno-: Added errorstream message for invalid format when I committed
      27db9292
    • Zeno-'s avatar
      Remove unused code in s_security.cpp (#4172) · a9bc7dc4
      Zeno- authored
      Note that the macro CHECK_FILE_ERR implements the code removed
      a9bc7dc4
  9. May 28, 2016
    • Auke Kok's avatar
      Particles: Add option to remove particles on collision · d499ec48
      Auke Kok authored
      Adds the particle option `collision_removal = bool`
      
      Some particles are hard to use right now since they either go through
      solid blocks (without collision detection), and with collision
      detection enabled they (e.g. raindrops) would just stop dead on the
      floor and sit there until they expire, or worse, scrape along a wall
      or ceiling.
      
      We can solve the problem by adding a boolean flag that tells the
      particle to be removed if it ever collides with something. This will
      make it easier to add rain that doesn't fall through your roof or stick
      on the top of it. Or clouds and smoke that don't go through trees.
      
      Particles that collide with this flag are marked expired
      unconditionally, causing them to be treated like normal expired
      particles and cleaned up normally.
      
      Documentation is adjusted accordingly.
      
      An added bonus of this patch is that particles can potentially collide
      many times with nodes, and this reduces the amount of collisions to 1
      (max), which may end up reducing particle load on the client.
      d499ec48
    • red-001's avatar
      62d15ac7
    • kwolekr's avatar
      Fix MgStoneType and BiomeType enum names · 9b5c492b
      kwolekr authored
      9b5c492b
    • kwolekr's avatar
      Move biome calculation to BiomeGen · 76f48564
      kwolekr authored
      BiomeGen defines an interface that, given a set of BiomeParams, computes biomes
      for a given area using the algorithm implemented by that specific BiomeGen.
      This abstracts away the old system where each mapgen supplied the noises
      required for biome generation.
      76f48564
  10. May 01, 2016
    • est31's avatar
      Pathfinder: Fix style · ac8bb457
      est31 authored
      * Fix naming style for methods and classes:
      	Use camelCase for methods and PascalCase for classes as
      	code style demands it. And use sneak_case for methods that
      	are not member of a class.
      * Replace "* " with " *" for Pointers
      * Same for references
      * Put function body opening braces on new line
      * Other misc minor non functional style improvements
      ac8bb457
  11. Mar 15, 2016
    • est31's avatar
      Add option to not send pre v25 init packet · af301831
      est31 authored
      The legacy init packet (pre v25) sends information about the client's
      password that a server could use to log in to other servers if the
      username and password are the same. All the other benefits of SRP of
      protocol v25 are missed if the legacy init packet is still sent during
      connection creation.
      
      This patch adds an option to not send the v25 init packet. Not sending
      the v25 packet means breaking compat with pre v25 servers, but as the
      option is not enabled by default, no servers are affected unless the
      user explicitly flips the switch. More than 90% of the servers on the
      serverlist support post v25 protocols.
      
      The patch also fixes a bug with greying out of non compliant servers
      being done wrongly, the min and max params were mixed.
      af301831
    • est31's avatar
      Much better API for auth.{cpp, h} · e0151d10
      est31 authored
      * No function overloading
      * Adhere coding style and with method names following
        lowercase_underscore_style
      * Use std::string in external API, handling these is
        much more fun
      e0151d10
  12. Mar 12, 2016
    • Auke Kok's avatar
      Allow nodes to specify which sides to connect to. · 37b4f0d3
      Auke Kok authored
      NDT_CONNECTED attempts to connect to any side of nodes that it can
      connect to, which is troublesome for FACEDIR type nodes that generally
      may only have one usable face, and can be rotated.
      
      We introduce a node parameter `connect_sides` that is valid for
      any node type. If specified, it lists faces of the node (in "top",
      "bottom", "front", "left", "back", "right", form, as array) that
      connecting nodeboxes can connect to. "front" corresponds to the south
      facing side of a node with facedir = 0.
      
      If the node is rotatable using *simple* FACEDIR, then the attached
      face is properly rotated before checking. This allows e.g. a chest
      to be attached to only from the rear side.
      37b4f0d3
    • Auke Kok's avatar
      Nodebox: Allow nodeboxes to "connect" · e737b1c2
      Auke Kok authored
      We introduce a new nodebox type "connected", and allow these nodes to
      have optional nodeboxes that connect it to other connecting nodeboxes.
      
      This is all done at scenedraw time in the client. The client will
      inspect the surrounding nodes and if they are to be connected to,
      it will draw the appropriate connecting nodeboxes to make those
      connections.
      
      In the node_box definition, we have to specify separate nodeboxes for
      each valid connection. This allows us to make nodes that connect only
      horizontally (the common case) by providing optional nodeboxes for +x,
      -x, +z, -z directions. Or this allows us to make wires that can connect
      up and down, by providing nodeboxes that connect it up and down (+y,
      -y) as well.
      
      The optional nodeboxes can be arrays. They are named "connect_top,
      "connect_bottom", "connect_front", "connect_left", "connect_back" and
      "connect_right". Here, "front" means the south facing side of the node
      that has facedir = 0.
      
      Additionally, a "fixed" nodebox list present will always be drawn,
      so one can make a central post, for instance. This "fixed" nodebox
      can be omitted, or it can be an array of nodeboxes.
      
      Collision boxes are also updated in exactly the same fashion, which
      allows you to walk over the upper extremities of the individual
      node boxes, or stand really close to them. You can also walk up
      node noxes that are small in height, all as expected, and unlike the
      NDT_FENCELIKE nodes.
      
      I've posted a screenshot demonstrating the flexibility at
          http://i.imgur.com/zaJq8jo.png
      In the screenshot, all connecting nodes are of this new subtype.
      
      Transparent textures render incorrectly, Which I don't think is
      related to this text, as other nodeboxes also have issues with this.
      
      A protocol bump is performed in order to be able to send older clients
      a nodeblock that is usable for them. In order to avoid abuse of users
      we send older clients a "full-size" node, so that it's impossible for
      them to try and walk through a fence or wall that's created in this
      fashion. This was tested with a pre-bump client connected against a
      server running the new protocol.
      
      These nodes connect to other nodes, and you can select which ones
      those are by specifying node names (or group names) in the
      connects_to string array:
            connects_to = { "group:fence", "default:wood" }
      By default, nodes do not connect to anything, allowing you to create
      nodes that always have to be paired in order to connect. lua_api.txt
      is updated to reflect the extension to the node_box API.
      
      Example lua code needed to generate these nodes can be found here:
          https://gist.github.com/sofar/b381c8c192c8e53e6062
      e737b1c2
  13. Mar 09, 2016
    • Auke Kok's avatar
      Add consistent monotonic day counter - get_day_count() · 4e59fcf5
      Auke Kok authored
      I've written several experimental bits of code that revolve around the
      need for a consistent calendar, but implementing one is extremely hard
      in mods due to time changes and mods overriding core.get_timeofday(),
      which will conflict.
      
      The second part of the problem is that doing this from a mod requires
      constant maintenance of a settings file.
      
      An implementation in core is trivial, however, and solves all of
      these problems at virtually no cost: No extra branches in server
      steps, and a single branch when minetest.set_time_of_day(), which is
      entirely reasonable.
      
      We store the day_count value in env_meta.txt.
      
      The use case is obvious: This change allows mods to create an actual
      virtual calendar, or properly account for seasonal changes, etc..
      
      We add a "/days" chatcommand that displays the current day count. No
      permissions are needed. It can only retrieve the day count, not
      modify it.
      4e59fcf5
  14. Mar 07, 2016
  15. Mar 03, 2016
  16. Feb 26, 2016
  17. Feb 22, 2016
    • Jeija's avatar
      Add Lua interface to HTTPFetchRequest · 31e0667a
      Jeija authored
      This allows mods to perform both asynchronous and synchronous HTTP
      requests. Mods are only granted access to HTTP APIs if either mod
      security is disabled or if they are whitelisted in any of the
      the secure.http_mods and secure.trusted_mods settings.
      
      Adds httpfetch_caller_alloc_secure to generate random, non-predictable
      caller IDs so that lua mods cannot spy on each others HTTP queries.
      31e0667a
  18. Feb 20, 2016
  19. Feb 19, 2016
    • ShadowNinja's avatar
      Require request_insecure_environment to be called from the mod's main scope · 4827ee12
      ShadowNinja authored
      Previously you could steal a secure environment from a trusted mod by wrapping
      request_insecure_environment with some code like this:
      
      local rie_cp = minetest.request_insecure_environment
      local stolen_ie
      function minetest.request_insecure_environment()
      	local ie = rie_cp()
      	stolen_ie = stolen_ie or ie
      	return ie
      end
      4827ee12
  20. Feb 11, 2016
  21. Jan 28, 2016
    • est31's avatar
      Don't print whole json data buffer to errorstream on error · 860d70bd
      est31 authored
      `errorstream` must not be overly verbose as clientside it is directly printed
      onto the ingame chat window. These days, the serverlist can contain > 200k bytes,
      so better print it to warningstream if the data buffer is too long.
      860d70bd
  22. Jan 23, 2016
  23. Jan 20, 2016
    • Auke Kok's avatar
      Allow per-tiles culling. · 882a89d6
      Auke Kok authored
      Backface culling is enabled by default for all tiles, as this
      is how the lua parser initializes each tiledef. We revert to
      always using the value from the tiledef since it is always
      read and serialized.
      
      Mods that wish to enable culling for e.g. mesh nodes, now can
      specify the following to enable backface culling:
      
          tiles = {{ name = "tex.png", backface_culling = true }},
      
      Note the double '{' and use of 'name' key here! In the same
      fashion, backface_culling can be disabled for any node now.
      
      I've tested this against the new door models and this properly
      allows me to disable culling per node. I've also tested this
      against my crops mod which uses mesh nodes where culling needs
      to be disabled, and tested also with plantlike drawtype nodes
      where we want this to continue to be disabled.
      
      No default setting has changed. The defaults are just migrated
      from nodedef.cpp to c_content.cpp.
      882a89d6
Loading