Module fuses

A list of fuses.

This module scanns all the files in the repository and manages all the fuses found in a list of Fuse objects.

local fuses = require("Shaderfuse/fuses")
fuses.fetch(user_config.pathToRepository..'Shaders/',false)
for i, fuse in ipairs(fuses.list) do
  fuse:read()
  ...

Dependencies: bmd.readdir

Functions

get_fuse (category, fusename) Get a fuse object form the list of fuses.
fetch (path[, details=false]) Initialize the fuses structure.

Tables

fuses Local structure to manage the Fuse objects.


Functions

get_fuse (category, fusename)
Get a fuse object form the list of fuses.

Searches in the list of fuses for an object of category category and the name fusename.

Parameters:

  • category string The category (folder name in the Shaders subdirectory) to search in
  • fusename string The name (file name without suffix) of the fuse to search for

Returns:

    Fuse the Fuse object; nil if not found
fetch (path[, details=false])
Initialize the fuses structure.

Traverses the path and searches for Fuses to add them to the fuses.list.

Parameters:

  • path string The path to search through for fuse files.
  • details bool true, if the fuses should be read for details (default false)

Tables

fuses
Local structure to manage the Fuse objects.

This hash fuses contains a list structure with the valid Fuse object instances and with categories the names of the folders those Fuses were found in.

Fields:

  • list A structure to manage a list of fuses.
  • categories Hash to look up categories.
generated by LDoc 1.4.6 Last updated 2023-02-12 22:00:16