mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Add a Way of checking for specific Feature with Lua Adds minetest.get_feature() and minetest.has_feature()
This commit is contained in:
parent
c824abd7b2
commit
a4183994a4
3 changed files with 34 additions and 0 deletions
|
@ -912,6 +912,11 @@ minetest.get_modnames() -> list of installed mods
|
|||
minetest.get_worldpath() -> eg. "/home/user/.minetest/world"
|
||||
^ Useful for storing custom data
|
||||
minetest.is_singleplayer()
|
||||
minetest.features
|
||||
^ table containing API feature flags: {foo=true, bar=true}
|
||||
minetest.has_feature(arg) -> bool, missing_features
|
||||
^ arg: string or table in format {foo=true, bar=true}
|
||||
^ missing_features: {foo=true, bar=true}
|
||||
|
||||
minetest.debug(line)
|
||||
^ Always printed to stderr and logfile (print() is redirected here)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue