1
0
mirror of https://github.com/mt-mods/basic_materials.git synced 2025-06-28 22:26:15 +02:00

4 Commits

Author SHA1 Message Date
19c690d7e9 improve warnin message 2022-02-06 11:59:31 -05:00
7dfea8748a graceful user error fallback 2022-02-06 11:08:10 -05:00
d9e06980d3 add README file and documentation 2022-01-29 22:07:53 -05:00
924bd84372 Merge pull request #3 from mt-mods/rm_default
rm -rf default - electric boogaloo
2022-01-26 21:29:56 -05:00
2 changed files with 51 additions and 1 deletions

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# Basic Materials mod
mod that adds basic material nodes and items
## Install
### Option 1: use content tab in minetest
* click the content tab
* search for basic materials
* click install on basic materials
### Option 2: download from [ContentDB](https://content.minetest.net/packages/VanessaE/basic_materials/)
* click the above link or search for basic materials on ContentDB
* select the download button on the basic materials page
* extract the zip downloaded from the previous step
* place in your mods folder
### Option 3: use git
* `git clone https://github.com/mt-mods/basic_materials.git`
* `cd basic_materials`
* `git submodule init`
* `git submodule update`
to update please use the following commands starting inside the mod directory
* `git submodule sync`
* `git submodule update`

View File

@ -1,7 +1,27 @@
local S = minetest.get_translator("basic_materials")
local sound_api = dofile(basic_materials.modpath .. "/sound_api_core/init.lua")
local chains_sbox = {type = "fixed",fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }}
local sound_api = loadfile(basic_materials.modpath .. "/sound_api_core/init.lua")
if not sound_api then
sound_api = {}
local metatable = {
__index = function(_, _)
return function(input)
minetest.log(
"warning",
"[basic_materials]: " ..
"The sound api submodule for game agnostic sound loading could not be found at " ..
basic_materials.modpath .. "/sound_api_core. " ..
"documentation for using submodules can be found at https://git-scm.com/docs/git-submodule." ..
"defaulting back to mod provided input or nil."
)
if input then return input else return nil end
end
end,
}
setmetatable(sound_api, metatable)
end
minetest.register_node("basic_materials:cement_block", {
description = S("Cement"),
tiles = {"basic_materials_cement_block.png"},