Skip to content
Snippets Groups Projects
  1. Mar 11, 2016
    • Auke Kok's avatar
      Introduce "protection_bypass" privilege. · f627ef39
      Auke Kok authored
      This privilege allows map protection bypassing for server operators
      and world moderators.
      
      Initially I had thought that bypassing protection mods would have been
      something that could entirely be done inside mods and minetest_game,
      but the concept of protection is defined in core, in the code of
      core.is_protected().
      
      I don't feel that it would be logical to introduce a protection
      concept in core, but not some way around that for server operators
      to maintain map parts that need fixing, de-griefing or cleanup.
      
      Others had noticed the same problems, and proposed a patch to
      minetest_game. That patch is fine by itself, but it fails to add
      protection bypass functionality for digging normal nodes and placing
      nodes.
      
      So, instead, we indroduce the new priv "protection_bypass" in core,
      and modify 'on_place_node' and 'node_dig' to allow bypassing node
      protections if the player holds this priv.
      
      This priv was tested with protector redo by tenplus1.
      
      A followup patch to Minetest Game will include allowing special checks
      for doors, trapdoors, chests in Minetest Game.
      
      Protection mods will likely want to mimic the changes in their relevant
      code sections.
      f627ef39
  2. Mar 09, 2016
    • Auke Kok's avatar
      Avoid try/catch for settings. · dc8bf4e9
      Auke Kok authored
      We can just test for the presence of these settings nicely here,
      no need to use a try / catch construct.
      dc8bf4e9
    • 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
  3. Mar 07, 2016
  4. Mar 05, 2016
  5. Mar 04, 2016
  6. Mar 03, 2016
  7. Mar 01, 2016
  8. Feb 28, 2016
  9. Feb 27, 2016
Loading