A minetest mod for mapmaking
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
341B

  1. return {
  2. -- Get an entry from a list for a given detail level
  3. --
  4. -- textures: An array of textures
  5. -- detail: The detail level
  6. --
  7. -- Returns the entry at detail, or the last entry if detail is out-of-bounds
  8. get_clamped = function(textures, detail)
  9. return textures[math.min(detail, #textures)];
  10. end
  11. };