fmod

Description

fmod 🔗

flux's mod boilerplate

public API 🔗

  • modname = fmod.create(fork)

    creates the boilerplate i use in all my mods, so i don't have to worry about keeping them all up-to-date when i tweak things.

    fork is an optional parameter for other people to use if they fork a mod.

the api which is created looks like

modname = {
		modname = modname,
		modpath = modpath,
		title = mod_conf:get("title") or modname,
		description = mod_conf:get("description"),
		author = mod_conf:get("author"),
		license = mod_conf:get("license"),
		version = mod_conf:get("version"),
		fork = fork or "flux",

		S = S,

		has = build_has(mod_conf),

		check_version = function(required)
			assert(mod_conf:get("version") >= required, f("%s requires a newer version of %s; please update it", minetest.get_current_modname(), modname))
		end,

		log = function(level, messagefmt, ...)
			return minetest.log(level, f("[%s] %s", modname, f(messagefmt, ...)))
		end,

		dofile = function(...)
			return dofile(table.concat({modpath, ...}, DIR_DELIM) .. ".lua")
		end,
}

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.

Releases

2024-04-03

Download

Luanti 5.8+

2024-04-03 02:13 UTC

2024-04-03 🔗

No release notes

2023-12-04

Download

Luanti 5.7+

2023-12-04 02:13 UTC

2023-12-04 🔗

No release notes

2023-11-07

Download

Luanti 5.7+

2023-11-07 02:13 UTC

2023-11-07 🔗

No release notes

2023-08-17

Download

Luanti 5.7+

2023-08-17 02:12 UTC

2023-08-17 🔗

No release notes

2023-08-09

Download

Luanti 5.7+

2023-08-09 02:14 UTC

2023-08-09 🔗

No release notes

All releases

Information

Provides

fmod

Dependencies

Required
No required dependencies

Information

Type
Mod
Technical Name
fmod
Languages
English
License
LGPL-3.0-or-later for code,
CC-BY-SA-4.0 for media.
Maintenance State
Actively Developed
Added
2022-11-27 22:18 UTC
Maintainers
fluxionary

Used By