mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-24 17:20:19 +01:00
buckets of oil and syrup should work in mineclone now
This commit is contained in:
parent
3df518fc16
commit
b1cbe64c7a
@ -13,10 +13,18 @@ end
|
||||
|
||||
|
||||
df_dependencies.mods_required.bucket = true
|
||||
df_dependencies.mods_required.mcl_buckets = true
|
||||
if minetest.get_modpath("bucket") then
|
||||
df_dependencies.bucket_register_liquid = bucket.register_liquid
|
||||
else
|
||||
-- TODO
|
||||
elseif minetest.get_modpath("mcl_buckets") then
|
||||
df_dependencies.bucket_register_liquid = function(source_liquid, flowing_liquid, bucket_node, texture, desc)
|
||||
mcl_buckets.register_liquid({
|
||||
bucketname = bucket_node,
|
||||
source_take = {source_liquid},
|
||||
source_place = source_liquid,
|
||||
inventory_image = texture,
|
||||
name = desc})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -135,20 +143,6 @@ df_dependencies.register_all_fences = function (name, override_def)
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_fences") then
|
||||
local groups = deep_copy(node_def.groups or {})
|
||||
groups.fence_wood = 1
|
||||
mcl_fences.register_fence_and_fence_gate(name .. "_fence",
|
||||
S("@1 Fence", node_def.description),
|
||||
S("@1 Fence Gate", node_def.description),
|
||||
texture,
|
||||
groups,
|
||||
node_def._mcl_hardness or minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
|
||||
node_def._mcl_blast_resistance or minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
|
||||
{"group:fence_wood"}
|
||||
)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("doors") then
|
||||
doors.register_fencegate(material .. "_fence_gate", {
|
||||
description = S("@1 Fence Gate", node_def.description),
|
||||
@ -166,6 +160,20 @@ df_dependencies.register_all_fences = function (name, override_def)
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_fences") then
|
||||
local groups = deep_copy(node_def.groups or {})
|
||||
groups.fence_wood = 1
|
||||
mcl_fences.register_fence_and_fence_gate(name .. "_fence",
|
||||
S("@1 Fence", node_def.description),
|
||||
S("@1 Fence Gate", node_def.description),
|
||||
texture,
|
||||
groups,
|
||||
node_def._mcl_hardness or minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
|
||||
node_def._mcl_blast_resistance or minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
|
||||
{"group:fence_wood"}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
df_dependencies.register_all_stairs_and_fences = function(name, override_def)
|
||||
|
@ -3,6 +3,8 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||
local select_required = df_dependencies.select_required
|
||||
local select_optional = df_dependencies.select_optional
|
||||
|
||||
df_dependencies.mods_required.farming = true
|
||||
|
||||
-- If the farming mod is installed, add the "straw" group to farming straw.
|
||||
-- This way goblin caps just need to check for group:straw to get cave straw as well
|
||||
local straw_def = minetest.registered_items["farming:straw"]
|
||||
@ -40,6 +42,8 @@ df_dependencies.texture_mineral_coal = select_required({default="default_mineral
|
||||
df_dependencies.texture_glass_bottle = select_required({vessels="vessels_glass_bottle.png", mcl_potions="mcl_potions_potion_bottle.png"})
|
||||
df_dependencies.texture_meselamp = "dfcaverns_glow_mese.png"
|
||||
|
||||
--------------------------------------- mapgen
|
||||
|
||||
local prefix = "dfcaverns_"
|
||||
-- NOTE: These defaults are from df_caverns' config. Update them if those change.
|
||||
|
||||
@ -58,15 +62,16 @@ if minetest.settings:get_bool(prefix.."enable_primordial", true) then
|
||||
end
|
||||
lowest_elevation = lowest_elevation - 193 -- add a little buffer space
|
||||
|
||||
minetest.debug("lowest elevation: " .. tostring(lowest_elevation))
|
||||
|
||||
df_dependencies.mods_required.mcl_init = true
|
||||
df_dependencies.mods_required.mcl_worlds = true
|
||||
df_dependencies.mods_required.mcl_strongholds = true
|
||||
df_dependencies.mods_required.mcl_compatibility = true
|
||||
df_dependencies.mods_required.mcl_mapgen = true
|
||||
|
||||
local old_overworld_min
|
||||
|
||||
if minetest.get_modpath("mcl_init") then -- Mineclone 2
|
||||
local old_overworld_min = mcl_vars.mg_overworld_min -- remember this for weather control
|
||||
old_overworld_min = mcl_vars.mg_overworld_min -- remember this for weather control
|
||||
|
||||
mcl_vars.mg_overworld_min = lowest_elevation
|
||||
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
|
||||
@ -75,16 +80,7 @@ if minetest.get_modpath("mcl_init") then -- Mineclone 2
|
||||
|
||||
-- Important note. This doesn't change the values for the various ores and mobs and biomes and whatnot that have already been registered.
|
||||
-- to keep things consistent, add dependencies to
|
||||
|
||||
if minetest.get_modpath("mcl_worlds") then
|
||||
mcl_worlds.has_weather = function(pos)
|
||||
-- Weather in the Overworld. No weather in the deep caverns
|
||||
return pos.y <= mcl_vars.mg_overworld_max and pos.y >= old_overworld_min
|
||||
end
|
||||
end
|
||||
|
||||
-- minetest.debug(dump(mcl_vars))
|
||||
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/ores.lua")
|
||||
|
||||
-- never mind - add dependency on mcl_strongholds and these will get generated before overworld_min gets changed.
|
||||
@ -95,6 +91,8 @@ if minetest.get_modpath("mcl_init") then -- Mineclone 2
|
||||
--end
|
||||
end
|
||||
if minetest.get_modpath("mcl_compatibility") then -- Mineclone 5
|
||||
old_overworld_min = mcl_vars.mg_overworld_min -- remember this for weather control
|
||||
|
||||
mcl_vars.mg_overworld_min = lowest_elevation
|
||||
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
|
||||
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_overworld_min+4
|
||||
@ -105,6 +103,8 @@ if minetest.get_modpath("mcl_compatibility") then -- Mineclone 5
|
||||
mcl_vars.mg_realm_barrier_overworld_end_min = mcl_vars.mg_end_max-11
|
||||
end
|
||||
if minetest.get_modpath("mcl_mapgen") then -- Mineclone 5
|
||||
old_overworld_min = mcl_mapgen.overworld.min -- remember this for weather control
|
||||
|
||||
mcl_mapgen.overworld.min = lowest_elevation
|
||||
mcl_mapgen.overworld.bedrock_min = mcl_mapgen.overworld.min
|
||||
mcl_mapgen.overworld.bedrock_max = mcl_mapgen.overworld.bedrock_min + (mcl_mapgen.bedrock_is_rough and 4 or 0)
|
||||
@ -118,7 +118,13 @@ if minetest.get_modpath("mcl_mapgen") then -- Mineclone 5
|
||||
mcl_mapgen.on_settings_changed()
|
||||
end
|
||||
end
|
||||
--minetest.after(1, function()
|
||||
--minetest.debug("mcl_vars="..dump(mcl_vars))
|
||||
--minetest.debug("mcl_mapgen="..dump(mcl_mapgen))
|
||||
--end)
|
||||
if minetest.get_modpath("mcl_worlds") then
|
||||
local old_has_weather = mcl_worlds.has_weather
|
||||
mcl_worlds.has_weather = function(pos)
|
||||
-- No weather in the deep caverns
|
||||
if pos.y >= lowest_elevation and pos.y <= old_overworld_min then
|
||||
return false
|
||||
end
|
||||
return old_has_weather(pos)
|
||||
end
|
||||
end
|
||||
|
@ -140,8 +140,6 @@ end
|
||||
----------------------------------------------
|
||||
-- Syrup
|
||||
|
||||
-- TODO: mcl_core.register_liquid
|
||||
|
||||
if df_dependencies.bucket_register_liquid then
|
||||
minetest.register_node("df_farming:dwarven_syrup_source", {
|
||||
description = S("Dwarven Syrup Source"),
|
||||
@ -187,7 +185,7 @@ if df_dependencies.bucket_register_liquid then
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 204, r = 179, g = 131, b = 88},
|
||||
groups = {liquid = 3, flammable = 2},
|
||||
groups = {liquid = 3, flammable = 2, dig_by_piston=1},
|
||||
sounds = df_farming.sounds.syrup,
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1,
|
||||
@ -238,7 +236,7 @@ if df_dependencies.bucket_register_liquid then
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 204, r = 179, g = 131, b = 88},
|
||||
groups = {liquid = 3, flammable = 2, not_in_creative_inventory = 1},
|
||||
groups = {liquid = 3, flammable = 2, not_in_creative_inventory = 1, dig_by_piston=1},
|
||||
sounds = df_farming.sounds.syrup,
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1,
|
||||
|
@ -23,7 +23,7 @@ if minetest.get_modpath("vessels") then
|
||||
n18 = { name = "df_trees:glowing_bottle_red", force_place=true}
|
||||
end
|
||||
|
||||
if not minetest.get_modpath("stairs") then
|
||||
if not df_dependencies.node_name_stair_goblin_cap_stem_wood then
|
||||
-- replace stairs with air
|
||||
n3 = n1
|
||||
n20 = n1
|
||||
@ -31,7 +31,7 @@ if not minetest.get_modpath("stairs") then
|
||||
n22 = n1
|
||||
end
|
||||
|
||||
return {
|
||||
local schematic = {
|
||||
yslice_prob = {},
|
||||
size = {y = 9, x = 11, z = 11},
|
||||
center_pos = {x=5, y=2, z=5},
|
||||
@ -246,3 +246,9 @@ return {
|
||||
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
|
||||
}
|
||||
}
|
||||
|
||||
for index, node in ipairs(schematic.data) do
|
||||
assert(node.name ~= nil, "undefined node name for index " .. tostring(index) .. " in goblin_cap_big_hut schematic data")
|
||||
end
|
||||
|
||||
return schematic
|
@ -35,7 +35,7 @@ if not minetest.get_modpath("stairs") then
|
||||
n22 = nil
|
||||
end
|
||||
|
||||
return {
|
||||
local schematic = {
|
||||
yslice_prob = {},
|
||||
size = {y = 10, x = 13, z = 13},
|
||||
center_pos = {x=6, y=2, z=6},
|
||||
@ -314,3 +314,9 @@ return {
|
||||
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
|
||||
}
|
||||
}
|
||||
|
||||
for index, node in ipairs(schematic.data) do
|
||||
assert(node.name ~= nil, "undefined node name for index " .. tostring(index) .. " in goblin_cap_bigger_hut schematic data")
|
||||
end
|
||||
|
||||
return schematic
|
@ -61,7 +61,7 @@ minetest.register_node("oil:oil_source", {
|
||||
liquid_alternative_source = "oil:oil_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 250, r = 0, g = 0, b = 0},
|
||||
groups = {liquid = 3},
|
||||
groups = {liquid = 3, dig_by_piston=1},
|
||||
sounds = oil_sounds,
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1,
|
||||
@ -113,7 +113,7 @@ minetest.register_node("oil:oil_flowing", {
|
||||
liquid_alternative_source = "oil:oil_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 250, r = 0, g = 0, b = 0},
|
||||
groups = {liquid = 3, not_in_creative_inventory = 1},
|
||||
groups = {liquid = 3, not_in_creative_inventory = 1, dig_by_piston=1},
|
||||
sounds = oil_sounds,
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1,
|
||||
@ -193,8 +193,8 @@ if minetest.get_modpath("dynamic_liquid") then
|
||||
|
||||
end
|
||||
|
||||
if minetest.get_modpath("bucket") then
|
||||
bucket.register_liquid(
|
||||
if df_dependencies.bucket_register_liquid then
|
||||
df_dependencies.bucket_register_liquid(
|
||||
"oil:oil_source",
|
||||
"oil:oil_flowing",
|
||||
"oil:oil_bucket",
|
||||
|
Loading…
Reference in New Issue
Block a user