getting close to actually being able to run mineclone with this

This commit is contained in:
FaceDeer
2022-08-03 20:43:31 -06:00
parent bb6cb4efa1
commit 457b79b48d
16 changed files with 65 additions and 29 deletions

View File

@ -11,6 +11,10 @@ end
local oil_sounds = {footstep = {name = "oil_oil_footstep", gain = 0.2}}
local water_source = df_dependencies.node_name_water_source
local water_flowing = df_dependencies.node_name_water_flowing
local bucket_empty = df_dependencies.node_name_bucket_empty
minetest.register_node("oil:oil_source", {
description = S("Oil"),
_doc_items_longdesc = oil_desc,
@ -124,7 +128,7 @@ if minetest.get_modpath("dynamic_liquid") then
minetest.register_abm({
label = "oil:oil floats",
nodenames = {"oil:oil_source"},
neighbors = {"default:water_source"},
neighbors = {water_source},
interval = 1.0,
chance = 1,
catch_up = true,
@ -132,7 +136,7 @@ if minetest.get_modpath("dynamic_liquid") then
local next_pos = {x=pos.x, y=pos.y+1, z=pos.z}
local next_node = minetest.get_node(next_pos)
local above_name = next_node.name
if above_name == "default:water_source" then
if above_name == water_source then
minetest.swap_node(next_pos, {name="oil:oil_source"})
minetest.swap_node(pos, next_node)
else
@ -145,7 +149,7 @@ if minetest.get_modpath("dynamic_liquid") then
next_pos.z = next_pos.z + displacement
end
next_node = minetest.get_node(next_pos)
if next_node.name == "default:water_source" then
if next_node.name == water_source then
if above_name ~= "air" then
-- we're not on the surface, so try any lateral movement
minetest.swap_node(next_pos, {name="oil:oil_source"})
@ -169,14 +173,14 @@ if minetest.get_modpath("dynamic_liquid") then
minetest.register_abm({
label = "oil:oil settles",
nodenames = {"oil:oil_source"},
neighbors = {"default:water_flowing"},
neighbors = {water_flowing},
interval = 1.0,
chance = 1,
catch_up = true,
action = function(pos, node)
local next_pos = {x=pos.x, y=pos.y-1, z=pos.z}
local next_node = minetest.get_node(next_pos)
if next_node.name == "default:water_flowing" then
if next_node.name == water_flowing then
minetest.swap_node(next_pos, {name="oil:oil_source"})
minetest.swap_node(pos, next_node)
end
@ -198,7 +202,7 @@ if minetest.get_modpath("bucket") then
type = "fuel",
recipe = "oil:oil_bucket",
burntime = 370, -- same as coalblock
replacements = {{"oil:oil_bucket", "bucket:bucket_empty"}},
replacements = {{"oil:oil_bucket", bucket_empty}},
})
if minetest.get_modpath("basic_materials") then
@ -207,7 +211,7 @@ if minetest.get_modpath("bucket") then
output = "basic_materials:paraffin",
recipe = "oil:oil_bucket",
cooktime = 5,
replacements = {{"oil:oil_bucket", "bucket:bucket_empty"}},
replacements = {{"oil:oil_bucket", bucket_empty}},
})
end
end

View File

@ -1,4 +1,4 @@
name = oil
description = Oil liquid type
depends = default
optional_depends = dynamic_liquid, bucket, doc, basic_materials
depends = df_dependencies
optional_depends = dynamic_liquid, doc, basic_materials