Prep core item mod
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core crafting
|
||||
--]]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core craftitems
|
||||
--]]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core functions
|
||||
--]]
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
--[[
|
||||
Core
|
||||
--]]
|
||||
|
||||
core = {}
|
||||
|
||||
-- Load files
|
||||
local modpath = minetest.get_modpath("core")
|
||||
dofile(modpath.."/sounds.lua")
|
||||
dofile(modpath.."/functions.lua")
|
||||
dofile(modpath.."/nodes_base.lua") -- Simple solid cubic nodes with simple definitions
|
||||
dofile(modpath.."/nodes_liquid.lua") -- Liquids
|
||||
dofile(modpath.."/nodes_plants.lua") -- Plants
|
||||
dofile(modpath.."/nodes_trees.lua") -- Tree nodes: wood, planks, sapling, leaves
|
||||
dofile(modpath.."/nodes_glass.lua") -- Glass
|
||||
dofile(modpath.."/nodes_climb.lua") -- Climbable nodes
|
||||
dofile(modpath.."/nodes_misc.lua") -- Other and special nodes
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/crafting.lua")
|
|
@ -0,0 +1 @@
|
|||
name = core
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core base nodes
|
||||
--]]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core climbing nodes
|
||||
--]]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core glass nodes
|
||||
--]]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core liquid nodes
|
||||
--]]
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
--[[
|
||||
Core miscellaneous nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("core:cloud", {
|
||||
description = "Cloud",
|
||||
tiles = {"core_cloud.png"},
|
||||
is_ground_content = false,
|
||||
sounds = core.node_sound_defaults(),
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
})
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core plant nodes
|
||||
--]]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
--[[
|
||||
Core tree nodes
|
||||
--]]
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
--[[
|
||||
Core sounds
|
||||
--]]
|
||||
|
||||
function core.node_sound_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "", gain = 1.0}
|
||||
table.dug = table.dug or
|
||||
{name = "core_dug_node", gain = 0.25}
|
||||
table.place = table.place or
|
||||
{name = "core_place_node_hard", gain = 1.0}
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_stone_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_hard_footstep", gain = 0.3}
|
||||
table.dug = table.dug or
|
||||
{name = "core_hard_footstep", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_dirt_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_dirt_footstep", gain = 0.4}
|
||||
table.dug = table.dug or
|
||||
{name = "core_dirt_footstep", gain = 1.0}
|
||||
table.place = table.place or
|
||||
{name = "core_place_node", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_sand_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_sand_footstep", gain = 0.12}
|
||||
table.dug = table.dug or
|
||||
{name = "core_sand_footstep", gain = 0.24}
|
||||
table.place = table.place or
|
||||
{name = "core_place_node", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_gravel_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_gravel_footstep", gain = 0.4}
|
||||
table.dug = table.dug or
|
||||
{name = "core_gravel_footstep", gain = 1.0}
|
||||
table.place = table.place or
|
||||
{name = "core_place_node", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_wood_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_wood_footstep", gain = 0.3}
|
||||
table.dug = table.dug or
|
||||
{name = "core_wood_footstep", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_leaves_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_grass_footstep", gain = 0.45}
|
||||
table.dug = table.dug or
|
||||
{name = "core_grass_footstep", gain = 0.7}
|
||||
table.place = table.place or
|
||||
{name = "core_place_node", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_glass_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_glass_footstep", gain = 0.3}
|
||||
table.dig = table.dig or
|
||||
{name = "core_glass_footstep", gain = 0.5}
|
||||
table.dug = table.dug or
|
||||
{name = "core_break_glass", gain = 1.0}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_metal_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_metal_footstep", gain = 0.4}
|
||||
table.dig = table.dig or
|
||||
{name = "core_dig_metal", gain = 0.5}
|
||||
table.dug = table.dug or
|
||||
{name = "core_dug_metal", gain = 0.5}
|
||||
table.place = table.place or
|
||||
{name = "core_place_node_metal", gain = 0.5}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function core.node_sound_water_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "core_water_footstep", gain = 0.2}
|
||||
core.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
After Width: | Height: | Size: 83 B |
After Width: | Height: | Size: 151 B |
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 688 B |
After Width: | Height: | Size: 359 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 261 B |