mirror of
https://github.com/ShadMOrdre/lib_materials.git
synced 2024-11-17 08:00:27 +01:00
6f45dd4846
Additional Stone types. Additional Snow/Ice types. Additional Sand types. Rewritten Dirt types. Rewritten Ore types. New Fluids (New water types, oil). Biome Generation moved here from lib_ecology. Ore generation refactored.
37 lines
560 B
Lua
37 lines
560 B
Lua
|
|
function table.contains_substring(t, s)
|
|
if type(s) ~= "string" then
|
|
return nil
|
|
end
|
|
|
|
for key, value in pairs(t) do
|
|
if type(value) == 'string' and s:find(value) then
|
|
if key then
|
|
return key
|
|
else
|
|
return true
|
|
end
|
|
end
|
|
end
|
|
return false
|
|
end
|
|
|
|
|
|
function get_node_drops(fullRockNode, cobbleRockNode)
|
|
return {
|
|
max_items = 1,
|
|
items = {
|
|
{
|
|
-- drop the cobble variant with 1/3 chance
|
|
items = {cobbleRockNode},
|
|
rarity = 3,
|
|
},
|
|
{
|
|
-- drop the full node with 2/3 chance
|
|
items = {fullRockNode},
|
|
}
|
|
}
|
|
}
|
|
end
|
|
|