mirror of
				https://github.com/mt-mods/basic_materials.git
				synced 2025-11-04 06:25:28 +01:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			e4a122dfdd
			...
			user_error
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					19c690d7e9 | ||
| 
						 | 
					7dfea8748a | 
							
								
								
									
										22
									
								
								nodes.lua
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								nodes.lua
									
									
									
									
									
								
							@@ -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"},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user