Skip to content
Snippets Groups Projects
  1. 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
  2. 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
  3. Feb 11, 2016
  4. Jan 29, 2016
    • Auke Kok's avatar
      New timer design. · ad884f23
      Auke Kok authored
      I could honestly not make much sense of the timer implementation
      that was here. Instead I've implemented the type of timer algorithm
      that I've used before, and tested it instead.
      
      The concept is extremely simple: all timers are put in an ordered
      list. We check every server tick if any of the timers have
      elapsed, and execute the function associated with this timer.
      
      We know that many timers by themselves cause new timers to be
      added to this list, so we iterate *backwards* over the timer
      list. This means that new timers being added while timers are
      being executed, can never be executed in the same function pass,
      as they are always appended to the table *after* the end of
      the table, which we will never reach in the current pass over
      all the table elements.
      
      We switch time keeping to minetest.get_us_time(). dtime is
      likely unreliable and we have our own high-res timer that we
      can fix if it is indeed broken. This removes the need to do
      any sort of time keeping.
      ad884f23
    • Auke Kok's avatar
      Clocksource: use a better clock if available. · 4ac1e9bc
      Auke Kok authored
      clock_gettime() is a far better clock than gettimeofday().
      
      Even better than clock_gettime() is that you can select either
      CLOCK_MONOTONIC, or even CLOCK_MONOTONIC_RAW. These clocks offer
      high precision time. And the _RAW variant will never roll back
      due to NTP drift or daylight savings, or otherwise.
      
      I've adjusted this code to select the right clock method auto-
      matically based on what's available in the OS. This means that
      if you're running a very old linux version, MacOS or other,
      you will automatically get the best clocksource available.
      
      I've tested all Linux clocksources by selectively compiling and
      running a 10k+ timer test suite. In all cases I confirmed that
      the 3 POSIX Linux clocksources worked properly, and were
      selected properly.
      
      I've modified the OS X compile path to use the high-res clock
      source for all time functions, but I can't confirm it works or
      that it compiles.
      
      As for WIN32, I confirmed that the used clocksource is indeed
      a Monotonic clocksource, so good news: that code section appears
      to be exactly what it should be.
      4ac1e9bc
  5. 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
  6. Jan 18, 2016
  7. Jan 16, 2016
  8. Jan 11, 2016
    • paramat's avatar
      Mapgen: Various fixes and improvements · 8fc8cb81
      paramat authored
      Lua_api.txt: Document 'minetest.registered_biomes'
      Minimal: Remove 'mapgen_air' alias
      Cavegen: Add fallback node for 'mapgen_ice'
      Dungeongen: Add fallback node for 'mapgen_river_water_source'
      Mgv5: Remove unnecessary '#include util/directiontables.h'
      Add missing 'this->'s in makeChunk()
      Mgv6: Edit empty line formatting
      Remove leading spaces in makeChunk()
      Add missing spaces after 'for' and 'if'
      Mgv7: Edit empty line formatting
      8fc8cb81
  9. Jan 09, 2016
  10. Jan 07, 2016
  11. Jan 04, 2016
    • ShadowNinja's avatar
      Improve Doxyfile · bd40ee2b
      ShadowNinja authored
      * Add main page.
      * Organize into sections.
      * Add threading sources.
      * Include SpatialAreaStore, LevelDB/Redis, sound, FreeType, and cURL in output.
      * Add logo.
      * Fix project name hardcoding.
      * Remove PAPER_TYPE (only used when GENERATE_LATEX is enabled).
      * Have dot render graphs as SVG (smaller, and works even if dot's text drawing functionality is broken).
      * Enable built-in STL support.
      * Enable search bar.
      * Switch from header-bar based navigation to treeview based navigation.
      * Enable dynamic HTML (collapses graphs).
      * Enable generation timestamp.
      bd40ee2b
  12. Jan 03, 2016
  13. Dec 25, 2015
  14. Dec 15, 2015
  15. Dec 07, 2015
    • est31's avatar
      lua_api.txt: add blank lines before * lists · 9a5a538e
      est31 authored
      If rendered as markdown, lists need a blank line before them
      so that they are recognized as such.
      9a5a538e
    • paramat's avatar
      Mapgen: Add propagate_shadow bool to calcLighting · 49073ba2
      paramat authored
      To terminate unwanted shadows from floatlands or realms above
      Also add to LuaVoxelManip calc_lighting for use in mapgen mods
      Remove the 2 argument calcLighting, mapgens now use the 5
      argument form to specify the volumes for propagateSunlight and
      spreadLight
      In mgsinglenode replace calcLighting with setLighting and
      clean-up use of tabs and spaces
      49073ba2
  16. Dec 06, 2015
  17. Dec 02, 2015
  18. Nov 29, 2015
  19. Nov 08, 2015
  20. Nov 07, 2015
  21. Nov 06, 2015
    • est31's avatar
      Add server side ncurses terminal · 5e507c98
      est31 authored
      This adds a chat console the server owner can use for administration
      or to talk with players.
      It runs in its own thread, which makes the user interface immune to
      the server's lag, behaving just like a client, except timeout.
      As it uses the same console code as the f10 console, things like nick
      completion or a scroll buffer basically come for free.
      The terminal itself is written in a general way so that adding a
      client version later on is just about implementing an interface.
      
      Fatal errors are printed after the console exists and the ncurses
      terminal buffer gets cleaned up with endwin(), so that the error still
      remains visible.
      
      The server owner can chose their username their entered text will
      have in chat and where players can send PMs to.
      Once the username is secured with a password to prevent anybody to
      take over the server, the owner can execute admin tasks over the
      console.
      
      This change includes a contribution by @kahrl who has improved ncurses
      library detection.
      5e507c98
  22. Nov 05, 2015
  23. Nov 03, 2015
  24. Oct 26, 2015
  25. Oct 25, 2015
  26. Oct 24, 2015
    • PilzAdam's avatar
      Improve Lua settings menu · 6f2d9de7
      PilzAdam authored
      * Add key settings to setting table and ignore them later
        This way they are added to the auto-generated minetest.conf.example
      * Add flags type
      * Add input validation for int, float and flags
      * Break in-game graphic settings into multiple sections
      * Parse settingtpes.txt in mods and games
      * Improve description for a lot of settings
      * Fix typos and wording in settingtypes.txt
      * Convert language setting to an enum
      6f2d9de7
  27. Oct 23, 2015
  28. Oct 22, 2015
    • Robert Zenz's avatar
      Add more ways to pass data to check_player_privs · c3284783
      Robert Zenz authored
      The callback can now be invoked with either the player object or name as
      the first parameter, and with either a table or a list of strings, like
      this:
      
          minetest.check_player_privs(player_name, { shout = true, fly = true })
          minetest.check_player_privs(player_name, "shout", "fly")
          minetest.check_player_privs(player, { shout = true, fly = true })
          minetest.check_player_privs(player, "shout", "fly")
      c3284783
  29. Oct 18, 2015
  30. Oct 14, 2015
    • ShadowNinja's avatar
      Refactor logging · 2139d7d4
      ShadowNinja authored
      - Add warning log level
      - Change debug_log_level setting to enumeration string
      - Map Irrlicht log events to MT log events
      - Encapsulate log_* functions and global variables into a class, Logger
      - Unify dstream with standard logging mechanism
      - Unify core.debug() with standard core.log() script API
      2139d7d4
  31. Oct 06, 2015
  32. Oct 04, 2015
    • est31's avatar
      Add new ContentParamType2 "CPT2_DEGROTATE" · b0523adc
      est31 authored
      This might break some mods, but it is important for all uses of the param2 to
      be documented.
      
      This doesn't need a serialisation version or network protocol version change,
      as old clients will still work on new servers, and it is bearable to have
      new clients getting non rotated plants on old servers.
      b0523adc
Loading