mirror of
https://github.com/mt-mods/basic_materials.git
synced 2025-06-29 06:30:38 +02:00
Compare commits
4 Commits
rm_default
...
user_error
Author | SHA1 | Date | |
---|---|---|---|
19c690d7e9 | |||
7dfea8748a | |||
d9e06980d3 | |||
924bd84372 |
30
README.md
Normal file
30
README.md
Normal 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`
|
22
nodes.lua
22
nodes.lua
@ -1,7 +1,27 @@
|
|||||||
local S = minetest.get_translator("basic_materials")
|
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 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", {
|
minetest.register_node("basic_materials:cement_block", {
|
||||||
description = S("Cement"),
|
description = S("Cement"),
|
||||||
tiles = {"basic_materials_cement_block.png"},
|
tiles = {"basic_materials_cement_block.png"},
|
||||||
|
Reference in New Issue
Block a user