mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-11 18:50:27 +01:00
initial work
This commit is contained in:
parent
47a63a1f09
commit
1d8cb46272
@ -1,7 +1,10 @@
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
|
||||
local default_path = minetest.get_modpath("default")
|
||||
local sound
|
||||
if minetest.get_modpath("default") then
|
||||
sound = default.node_sound_leaves_defaults()
|
||||
end
|
||||
|
||||
local get_node_box = function(connector_thickness)
|
||||
return {
|
||||
@ -72,12 +75,6 @@ local get_web_nodes = function(pos, webs, anchors)
|
||||
end
|
||||
end
|
||||
|
||||
local sound
|
||||
if default_path then
|
||||
sound = default.node_sound_leaves_defaults()
|
||||
end
|
||||
|
||||
|
||||
local web_line = function(pos, dir, distance)
|
||||
local anchored
|
||||
local web_spine = {}
|
||||
|
19
df_caverns/dependencies.lua
Normal file
19
df_caverns/dependencies.lua
Normal file
@ -0,0 +1,19 @@
|
||||
if minetest.get_modpath("fireflies") then
|
||||
df_caverns.node_id.fireflies = minetest.get_content_id("fireflies:firefly")
|
||||
end
|
||||
|
||||
df_caverns.node_id.cobble = minetest.get_content_id("default:cobble")
|
||||
df_caverns.node_id.desert_sand = minetest.get_content_id("default:desert_sand")
|
||||
df_caverns.node_id.dirt = minetest.get_content_id("default:dirt")
|
||||
df_caverns.node_id.gravel = minetest.get_content_id("default:gravel")
|
||||
df_caverns.node_id.ice = minetest.get_content_id("default:ice")
|
||||
df_caverns.node_id.lava = minetest.get_content_id("default:lava_source")
|
||||
df_caverns.node_id.meseore = minetest.get_content_id("default:stone_with_mese")
|
||||
df_caverns.node_id.mossycobble = minetest.get_content_id("default:mossycobble")
|
||||
df_caverns.node_id.obsidian = minetest.get_content_id("default:obsidian")
|
||||
df_caverns.node_id.sand = minetest.get_content_id("default:sand")
|
||||
df_caverns.node_id.silver_sand = minetest.get_content_id("default:silver_sand")
|
||||
df_caverns.node_id.snow = minetest.get_content_id("default:snow")
|
||||
df_caverns.node_id.stone = minetest.get_content_id("default:stone")
|
||||
df_caverns.node_id.stone_with_coal = minetest.get_content_id("default:stone_with_coal")
|
||||
df_caverns.node_id.water = minetest.get_content_id("default:water_source")
|
@ -2,40 +2,23 @@ df_caverns.node_id = {}
|
||||
|
||||
minetest.after(1, function() df_caverns.node_id = nil end) -- should only be used during initialization.
|
||||
|
||||
if minetest.get_modpath("ice_sprites") then
|
||||
df_caverns.node_id.sprite = minetest.get_content_id("ice_sprites:ice_sprite")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("fireflies") then
|
||||
df_caverns.node_id.fireflies = minetest.get_content_id("fireflies:firefly")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("df_farming") then
|
||||
df_caverns.node_id.dead_fungus = minetest.get_content_id("df_farming:dead_fungus")
|
||||
end
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
dofile(modpath.."/dependencies.lua")
|
||||
|
||||
if minetest.get_modpath("big_webs") then
|
||||
df_caverns.node_id.big_webs = minetest.get_content_id("big_webs:webbing")
|
||||
df_caverns.node_id.big_webs_egg = minetest.get_content_id("big_webs:web_egg")
|
||||
end
|
||||
|
||||
df_caverns.node_id.air = minetest.get_content_id("air")
|
||||
if minetest.get_modpath("ice_sprites") then
|
||||
df_caverns.node_id.sprite = minetest.get_content_id("ice_sprites:ice_sprite")
|
||||
end
|
||||
|
||||
df_caverns.node_id.cobble = minetest.get_content_id("default:cobble")
|
||||
df_caverns.node_id.desert_sand = minetest.get_content_id("default:desert_sand")
|
||||
df_caverns.node_id.dirt = minetest.get_content_id("default:dirt")
|
||||
df_caverns.node_id.gravel = minetest.get_content_id("default:gravel")
|
||||
df_caverns.node_id.ice = minetest.get_content_id("default:ice")
|
||||
df_caverns.node_id.lava = minetest.get_content_id("default:lava_source")
|
||||
df_caverns.node_id.meseore = minetest.get_content_id("default:stone_with_mese")
|
||||
df_caverns.node_id.mossycobble = minetest.get_content_id("default:mossycobble")
|
||||
df_caverns.node_id.obsidian = minetest.get_content_id("default:obsidian")
|
||||
df_caverns.node_id.sand = minetest.get_content_id("default:sand")
|
||||
df_caverns.node_id.silver_sand = minetest.get_content_id("default:silver_sand")
|
||||
df_caverns.node_id.snow = minetest.get_content_id("default:snow")
|
||||
df_caverns.node_id.stone = minetest.get_content_id("default:stone")
|
||||
df_caverns.node_id.stone_with_coal = minetest.get_content_id("default:stone_with_coal")
|
||||
df_caverns.node_id.water = minetest.get_content_id("default:water_source")
|
||||
if minetest.get_modpath("df_farming") then
|
||||
df_caverns.node_id.dead_fungus = minetest.get_content_id("df_farming:dead_fungus")
|
||||
end
|
||||
|
||||
df_caverns.node_id.air = minetest.get_content_id("air")
|
||||
|
||||
df_caverns.node_id.cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
|
||||
df_caverns.node_id.cobble_fungus_fine = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus_fine")
|
||||
|
3
df_dependencies/README.md
Normal file
3
df_dependencies/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
The DF_Caverns modpack was originally written based on the minetest_game. It made extensive use of various nodes and helper functions that came from minetest_game's constituent mods.
|
||||
|
||||
When Mineclone games rose in popularity, the task of making it compatible was a daunting one - there were dependencies on minetest_game's mods scattered everywhere. To make the task manageable, I created this mod to serve as a central location where analogous objects could be taken from those games to be referenced in a generic way.
|
0
df_dependencies/default.lua
Normal file
0
df_dependencies/default.lua
Normal file
23
df_dependencies/init.lua
Normal file
23
df_dependencies/init.lua
Normal file
@ -0,0 +1,23 @@
|
||||
df_dependencies = {}
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
local debug_dump = false
|
||||
|
||||
if minetest.get_modpath("default") then
|
||||
dofile(modpath.."/default.lua")
|
||||
end
|
||||
|
||||
if debug_dump then
|
||||
local file = io.open(minetest.get_worldpath().."/df_dependencies.json", "w")
|
||||
if file then
|
||||
local items = {}
|
||||
for item, _ in pairs(df_dependencies) do
|
||||
table.insert(items, item)
|
||||
end
|
||||
table.sort(items)
|
||||
file:write(minetest.serialize(items))
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
|
||||
-- This mod is meant to only exist at initialization time. Other mods should make copies of anything it points to for their own use.
|
||||
minetest.after(1, function() df_dependencies = nil end)
|
4
df_dependencies/mod.conf
Normal file
4
df_dependencies/mod.conf
Normal file
@ -0,0 +1,4 @@
|
||||
name = df_dependencies
|
||||
description = A utility mod for df_caverns that gathers all dependencies on the default minetest_game in one place, to ease compatibility efforts with mineclone and other such non-default games
|
||||
depends = default
|
||||
optional_depends =
|
Loading…
Reference in New Issue
Block a user