better organization

concrete
blueprints
oil derricks
master
Izzy 2018-06-23 00:31:23 -06:00
parent 9cac441bec
commit 095e48f4e2
14 changed files with 1880 additions and 330 deletions

138
blueprints.lua Normal file
View File

@ -0,0 +1,138 @@
minetest.register_craftitem("bitumen:blueprint_paper", {
description = "Blueprint Paper",
stack_max = 99,
inventory_image = "default_paper.png^[colorize:blue:120",
groups = {flammable = 3},
})
minetest.register_craft( {
type = "shapeless",
output = "bitumen:blueprint_paper",
recipe = {"default:paper", "dye:blue"},
})
minetest.register_craftitem("bitumen:blueprint_book", {
description = "Blueprint Paper",
stack_max = 99,
inventory_image = "default_book.png^[colorize:blue:120",
groups = {flammable = 3},
})
minetest.register_craft({
output = 'bitumen:blueprint_bookshelf',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'bitumen:blueprint_book', 'bitumen:blueprint_book', 'bitumen:blueprint_book'},
{'group:wood', 'group:wood', 'group:wood'},
}
})
bitumen.registered_blueprints = {
-- ["bitumen:cement_mixer_blueprint"] = 1,
}
-- registers the blueprint item, adds it to the bookshelf, and registers the constructor craft recipe
bitumen.register_blueprint = function(def)
local name = def.name.."_blueprint"
local parent_def = minetest.registered_nodes[def.name]
if parent_def == nil then
print("Warning: parent node not registered yet. Place bitumen.register_blueprint call after node registration.")
return
end
minetest.register_craftitem(name, {
description = parent_def.description.." Blueprint",
stack_max = 1,
inventory_image = parent_def.inventory_image .. "^bitumen_blueprint.png",
groups = {flammable = 3},
})
-- the actual constructor must be registered elsewhere
minetest.register_craft({
output = def.name..'_constructor',
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', name, 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
}
})
bitumen.registered_blueprints[name] = def
end
local blueprint_bookshelf_formspec =
"size[8,8;]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"list[context;blueprints;0,0.3;8,3;]" ..
"list[current_player;main;0,3.85;8,1;]" ..
"list[current_player;main;0,5.08;8,3;8]" ..
"listring[context;blueprints]" ..
"listring[current_player;main]" ..
default.get_hotbar_bg(0,3.85)
minetest.register_node("bitumen:blueprint_bookshelf", {
description = "Blueprint Bookshelf",
tiles = {"default_junglewood.png", "default_junglewood.png", "default_junglewood.png",
"default_junglewood.png", "default_bookshelf.png^[colorize:blue:120", "default_junglewood.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
sounds = default.node_sound_wood_defaults(),
stack_max = 1,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", blueprint_bookshelf_formspec)
local inv = meta:get_inventory()
inv:set_size("blueprints", 8 * 3)
-- fill in the known blueprints
local list = {}
for name,def in pairs(bitumen.registered_blueprints) do
table.insert(list, name)
end
inv:set_list("blueprints", list)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack)
return 0
end,
allow_metadata_inventory_move = function(pos, listname, index, stack)
return 0
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
-- print(" -- "..listname.. " " ..index.." "..dump(stack))
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory(meta)
inv:set_stack(listname, index, stack)
end,
})

264
concrete.lua Normal file
View File

@ -0,0 +1,264 @@
minetest.register_node("bitumen:concrete", {
description = "Foundation Concrete",
drawtype = "normal",
tiles = {"default_silver_sand.png^[colorize:black:120"},
groups = {cracky = 1},
})
minetest.register_node("bitumen:concrete_slab", {
description = "Foundation Concrete Slab",
drawtype = "nodebox",
tiles = {"default_silver_sand.png^[colorize:black:120"},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
},
},
})
minetest.register_abm({
nodenames = {"bitumen:wet_concrete", "bitumen:wet_concrete_full"},
interval = 5,
chance = 5,
action = function(pos)
minetest.get_node_timer(pos):start(30*60) -- concrete takes half an hour to cure at best
end
})
bitumen.register_fluid("bitumen", "wet_concrete", {
desc = "Wet Concrete",
groups = {flammable=1, petroleum=1},
colorize = "^[colorize:gray:230",
post_effect_color = {a = 10, r = 30, g = 20, b = 10},
no_default_soak = true,
evap_chance = 0,
def = {
on_timer = function(pos)
local level = minetest.get_node_level(pos)
if level > 48 then
minetest.set_node(pos, {name="bitumen:concrete"})
elseif level > 16 then
minetest.set_node(pos, {name="bitumen:concrete_slab"})
else
minetest.set_node(pos, {name="air"})
end
end
},
})
minetest.register_node("bitumen:cement_mixer", {
paramtype = "light",
drawtype = "mesh",
mesh = "cement_mixer.obj",
description = "Cement Mixer",
inventory_image = "bitumen_cement_mixer_invimg.png",
tiles = {
"default_snow.png",
},
selection_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, 1.5, .5 },
{ 1.5, 1.5, 1.5, -1.5, 4.5, -1.5 },
},
},
collision_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, 1.5, .5 },
{ -1.5, -1.5, -1.5, -1.4, 3, -1.4 },
{ 1.5, -1.5, -1.5, 1.4, 3, -1.4 },
{ -1.5, -1.5, 1.5, -1.4, 3, 1.4 },
{ 1.5, -1.5, 1.5, 1.4, 3, 1.4 },
{ 1.5, 1.5, 1.5, -1.5, 4.5, -1.5 },
}
},
paramtype2 = "facedir",
groups = {choppy=1, petroleum_fixture=1},
sounds = default.node_sound_wood_defaults(),
on_timer = function(pos, elapsed)
end,
-- spit out some concrete
on_punch = function(pos)
print("concrete mixer punched")
local take = bitumen.pipes.push_fluid({x=pos.x, y=pos.y-1, z=pos.z}, "bitumen:wet_concrete", 20, 5)
print("take ".. take)
end,
})
bitumen.register_blueprint({name="bitumen:cement_mixer"})
minetest.register_abm({
nodenames = {"bitumen:concrete_mixer"},
interval = 2,
chance = 1,
action = function(pos)
minetest.get_node_timer(pos):start(30*60) -- concrete takes half an hour to cure at best
end
})
minetest.register_node("bitumen:chalk", {
description = "Chalk",
drawtype = "normal",
tiles = {"default_clay.png^[colorize:white:80"},
groups = {crumbly = 3, cracky = 3},
})
minetest.register_node("bitumen:lime", {
description = "Lime",
drawtype = "normal",
tiles = {"default_clay.png^[colorize:white:160"},
groups = {crumbly = 3},
})
minetest.register_craft({
type = 'cooking',
output = 'bitumen:lime',
recipe = 'bitumen:chalk',
cooktime = 5,
})
minetest.register_craft({
type = 'cooking',
output = 'bitumen:lime',
recipe = 'default:coral_brown',
cooktime = 5,
})
minetest.register_craft({
type = 'cooking',
output = 'bitumen:lime',
recipe = 'default:coral_orange',
cooktime = 5,
})
minetest.register_craft({
type = 'cooking',
output = 'bitumen:lime',
recipe = 'default:coral_skeleton',
cooktime = 5,
})
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:chalk",
wherein = {"default:stone"},
clust_scarcity = 32 * 32 * 32,
clust_size = 6,
y_min = 2,
y_max = 30,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = -343,
octaves = 1,
persist = 0.0
},
biomes = {"savanna", "savanna_shore", "savanna_ocean",
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground",
"floatland_coniferous_forest", "floatland_coniferous_forest_ocean"}
})
-- 1 part cement
-- 2 parts water
-- 3 parts sand
-- 3 parts gravel
-- 3 crafts for combinations of water and river water
minetest.register_craft( {
type = "shapeless",
output = "bitumen:wet_concrete 9",
recipe = {
"bitumen:lime",
"bucket:bucket_water",
"bucket:bucket_water",
"group:sand",
"group:sand",
"group:sand",
"default:gravel",
"default:gravel",
"default:gravel",
},
replacements = {
{ "bucket:bucket_water", "bucket:bucket_empty" }
}
})
minetest.register_craft( {
type = "shapeless",
output = "bitumen:wet_concrete 9",
recipe = {
"bitumen:lime",
"bucket:bucket_river_water",
"bucket:bucket_river_water",
"group:sand",
"group:sand",
"group:sand",
"default:gravel",
"default:gravel",
"default:gravel",
},
replacements = {
{ "bucket:bucket_water", "bucket:bucket_empty" }
}
})
minetest.register_craft( {
type = "shapeless",
output = "bitumen:wet_concrete 9",
recipe = {
"bitumen:lime",
"bucket:bucket_water",
"bucket:bucket_river_water",
"group:sand",
"group:sand",
"group:sand",
"default:gravel",
"default:gravel",
"default:gravel",
},
replacements = {
{ "bucket:bucket_water", "bucket:bucket_empty" }
}
})

View File

@ -1,82 +1,12 @@
-- a few hacks
minetest.register_craft({
type = 'shapeless',
output = 'bitumen:bitumen 1',
recipe = { 'bitumen:tar_sand' },
output = 'bitumen:drill_pipe 12',
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
}
})
-- items
minetest.register_craft({
output = 'bitumen:oil_drum 2',
recipe = {
{'default:steel_ingot', 'technic:rubber', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
}
})
minetest.register_craft({
output = 'bitumen:lpg_regulator 4',
recipe = {
{'default:brass_ingot', '', 'default:brass_ingot'},
{'', 'bitumen:lpg_pipe', 'bitumen:lpg_pipe'},
{'', 'technic:rubber', ''},
}
})
minetest.register_craft({
output = 'bitumen:gas_can 2',
recipe = {
{'default:reddye', 'homedecor:plastic_sheet', 'default:yellowdye'},
{'homedecor:plastic_sheet', '', 'homedecor:plastic_sheet'},
{'homedecor:plastic_sheet', 'homedecor:plastic_sheet', 'homedecor:plastic_sheet'},
}
})
minetest.register_craft({
type = 'shapeless',
output = 'bitumen:small_lpg_bottle 1',
recipe = { 'bitumen:lpg_regulator','vessels:steel_bottle' },
}
})
-- stainless?
minetest.register_craft({
output = 'bitumen:medium_lpg_tank 1',
recipe = {
{'default:steel_ingot', 'bitumen:lpg_regulator','default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
}
})
minetest.register_craft({
output = 'bitumen:cracking_boiler',
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'pipeworks:steel_pipe', 'technic:lv_electric_furnace', 'pipeworks:steel_pipe'},
{'', 'technic:lv_cable0', ''},
}
})
minetest.register_craft({
output = 'bitumen:cracking_column',
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', '', 'pipeworks:steel_pipe'},
{'default:steel_ingot', '', 'default:steel_ingot'},
}
})

View File

@ -1,5 +1,14 @@
local function combine_table(a, b)
a = a or {}
for k,v in pairs(a) do
b[k] = v
end
return b
end
local function register_fluid(modname, name, info)
@ -19,7 +28,7 @@ local function register_fluid(modname, name, info)
end
minetest.register_node(fname, {
minetest.register_node(fname, combine_table(info.def, {
description = info.desc,
drawtype = "nodebox",
paramtype = "light",
@ -64,14 +73,14 @@ local function register_fluid(modname, name, info)
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1
}
}
})
}))
-- this is a special node used to optimize large pools of water
-- its flowing abm runs much less frequently
minetest.register_node(full_fname, {
minetest.register_node(full_fname, combine_table(info.def, {
description = info.desc,
drawtype = "nodebox",
paramtype = "light",
@ -116,7 +125,7 @@ local function register_fluid(modname, name, info)
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1
}
}
})
}))
@ -179,10 +188,12 @@ local function register_fluid(modname, name, info)
}
local soak_names = {}
for n,_ in pairs(soak) do
table.insert(soak_names, n)
if info.no_default_soak ~= true then
for n,_ in pairs(soak) do
table.insert(soak_names, n)
end
end
-- todo: superflammability
-- boil-off for water near fire
@ -357,6 +368,7 @@ end
bitumen.register_fluid = register_fluid
-- distillation products
register_fluid("bitumen", "mineral_spirits", {
@ -437,6 +449,9 @@ register_fluid("bitumen", "tar", {
evap_chance = 0,
})
-- oil itself
register_fluid("bitumen", "crude_oil", {
desc = "Crude Oil",
groups = {flammable=1, petroleum=1},
@ -454,10 +469,48 @@ register_fluid("bitumen", "crude_oil", {
-- other
bitumen.register_fluid("bitumen", "drill_mud", {
desc = "Drilling Mud",
groups = {petroleum=1},
reflow_interval = 5,
reflow_chance = 1,
flow_interval = 1,
flow_chance = 1,
colorize = "^[colorize:brown:40",
post_effect_color = {a = 103, r = 80, g = 76, b = 90},
evap_chance = 0,
})
bitumen.register_fluid("bitumen", "drill_mud_dirty", {
desc = "Dirty Drilling Mud",
groups = {petroleum=1},
reflow_interval = 5,
reflow_chance = 1,
flow_interval = 1,
flow_chance = 1,
colorize = "^[colorize:brown:140",
post_effect_color = {a = 103, r = 80, g = 76, b = 90},
evap_chance = 0,
})
--temp hack for dev
minetest.register_node("bitumen:crudesource", {
description = "thing",
tiles = { "default_copper_block.png" },
@ -465,7 +518,6 @@ minetest.register_node("bitumen:crudesource", {
})
--temp hack for dev
minetest.register_abm({
nodenames = {"bitumen:crudesource"},
interval = 1,
@ -479,28 +531,4 @@ minetest.register_abm({
end
})
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:crude_oil_full",
wherein = {"default:stone"},
clust_scarcity = 64 * 64 * 64,
-- clust_scarcity = 16 * 16 * 16,
clust_size = 30,
y_min = -10000,
y_max = -500,
noise_threshold = 0.04,
noise_params = {
offset = 0.5,
scale = 0.7,
spread = {x = 40, y = 40, z = 40},
seed = 2316,
octaves = 4,
persist = 0.7
},
--[[ it's all "underground" anyway
biomes = {
"taiga", "tundra", "snowy_grassland", "coniferous_forest",
"coniferous_forest_dunes",
}
]]
})

View File

@ -41,27 +41,37 @@ end
-- first, to initialize the pipe API
-- first initialize the internal APIs
dofile(modpath.."/magic_nodes.lua")
dofile(modpath.."/blueprints.lua")
dofile(modpath.."/pipes.lua")
dofile(modpath.."/burner.lua")
-- next core nodes
dofile(modpath.."/fluids.lua")
dofile(modpath.."/concrete.lua")
--dofile(modpath.."/craftitems.lua")
--dofile(modpath.."/containers.lua")
--dofile(modpath.."/pumping.lua")
-- now the kitchen sink
dofile(modpath.."/heater.lua")
dofile(modpath.."/pump.lua")
dofile(modpath.."/oilshale.lua")
dofile(modpath.."/wells.lua")
dofile(modpath.."/sphere_tank.lua")
dofile(modpath.."/refinery.lua")
-- where players should look for information
dofile(modpath.."/crafts.lua")
dofile(modpath.."/ore_gen.lua")
-- completely unrelated experiments:
minetest.register_node("bitumen:glass", {
description = "Glass",
drawtype = "glasslike_framed_optional",

113
magic_nodes.lua Normal file
View File

@ -0,0 +1,113 @@
--[[
Due to engine limitations with non-trivial technical hurdles, minetest
collision boxes can only occupy a 3x3x3 node space at most. To work
around this limitation, magic invisible undiggable nodes are added to
fill in the shape of a mesh. The nodes are tracked in meta and removed
on destruction.
]]
bitumen.magic = {}
local function add(a, b)
return {
x = a.x + b[1],
y = a.y + b[2], -- wtf?
z = a.z + b[3]
}
end
bitumen.magic.set_nodes = function(pos, nodename, def)
local set = {}
for _,delta in ipairs(def) do
local p = add(pos, delta)
local n = minetest.get_node(p)
if true or n.name == "air" then
print("magic node at ".. minetest.pos_to_string(p))
minetest.set_node(p, {name= nodename})
-- minetest.set_node(p, {name= "default:glass"})
-- save the parent node
local meta = minetest.get_meta(p)
meta:set_string("magic_parent", minetest.serialize(pos))
table.insert(set, p)
end
end
-- save positions for all the magic nodes
local meta = minetest.get_meta(pos)
local oldset = meta:get_string("magic_children") or ""
if oldset == "" then
oldset = {}
else
oldset = minetest.deserialize(oldset)
end
for _,p in ipairs(set) do
table.insert(oldset, p)
end
meta:set_string("magic_children", minetest.serialize(oldset))
end
bitumen.magic.set_collision_nodes = function(pos, def)
bitumen.magic.set_nodes(pos, "bitumen:collision_node", def)
end
bitumen.magic.gensphere = function(center, radius)
local out = {}
for x = -radius, radius do
for y = -radius, radius do
for z = -radius, radius do
if math.sqrt(x * x + y * y + z * z) <= radius then
table.insert(out, {center[1]+x, center[2]+y, center[3]+z})
end
end
end
end
return out
end
bitumen.magic.gencube = function(low, high)
local out = {}
for x = low[1], high[1] do
for y = low[2], high[2] do
for z = low[3], high[3] do
table.insert(out, {x, y, z})
end
end
end
return out
end
bitumen.magic.on_destruct = function(pos)
local meta = minetest.get_meta(pos)
local magic = meta:get_string("magic_children")
if magic == nil then
return
end
magic = minetest.deserialize(magic)
if magic == nil then
return
end
-- clean up all the magic
for _,p in ipairs(magic) do
minetest.set_node(p, {name = "air"})
end
end

251
models/cement_mixer.obj Normal file
View File

@ -0,0 +1,251 @@
# Blender v2.72 (sub 0) OBJ File: 'cement_mixer.blend'
# www.blender.org
mtllib cement_mixer.mtl
o Cube.002
v 1.313328 -1.500000 1.478222
v 1.313328 -1.500000 1.346956
v 1.444594 -1.500000 1.346956
v 1.444594 -1.500000 1.478222
v 1.313328 1.519445 1.478222
v 1.313328 1.519445 1.346956
v 1.444594 1.519445 1.346956
v 1.444594 1.519445 1.478222
v 1.308299 -1.500000 -1.351962
v 1.308299 -1.500000 -1.483228
v 1.439565 -1.500000 -1.483228
v 1.439565 -1.500000 -1.351962
v 1.308299 1.551144 -1.351962
v 1.308299 1.551144 -1.483228
v 1.439565 1.551144 -1.483228
v 1.439565 1.551144 -1.351962
v -1.474257 -0.058090 -1.344278
v -1.474257 -0.058090 -1.475544
v -1.342991 -0.058090 -1.475544
v -1.342991 -0.058090 -1.344278
v -1.474257 1.494246 -1.344278
v -1.474257 1.494246 -1.475544
v -1.342991 1.494246 -1.475544
v -1.342991 1.494246 -1.344278
v -1.474257 -1.500000 1.475563
v -1.474257 -1.500000 1.344296
v -1.342991 -1.500000 1.344296
v -1.342991 -1.500000 1.475563
v -1.474257 1.509615 1.475563
v -1.474257 1.509615 1.344296
v -1.342991 1.509615 1.344296
v -1.342991 1.509615 1.475563
v -1.474257 -1.500000 -1.344618
v -1.474257 -1.500000 -1.475884
v -1.342991 -1.500000 -1.475884
v -1.342991 -1.500000 -1.344618
v -1.474257 1.494246 -1.344618
v -1.474257 1.494246 -1.475884
v -1.342991 1.494246 -1.475884
v -1.342991 1.494246 -1.344618
v 0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 -0.500000 0.500000
v -0.500000 -0.500000 -0.500000
v 0.500000 0.500000 -0.500000
v 0.500000 0.500000 0.500000
v -0.500000 0.500000 0.500000
v -0.500000 0.500000 -0.500000
v 1.500001 1.500000 -1.500000
v 1.499999 1.500000 1.500001
v -1.500000 1.500000 1.499999
v -1.500000 1.500000 -1.500000
v 1.500001 4.500000 -1.500000
v 1.499999 4.500000 1.500001
v -1.500000 4.500000 1.499999
v -1.500000 4.500000 -1.500000
v 1.397050 4.500000 -1.397048
v 1.397048 4.500000 1.397049
v -1.397049 4.500000 -1.397049
v -1.397049 4.500000 1.397048
v 1.397050 2.587555 -1.397048
v 1.397048 2.587555 1.397049
v -1.397049 2.587555 -1.397049
v -1.397049 2.587555 1.397048
vt 0.891383 0.258854
vt 0.903350 0.258854
vt 0.903350 0.538585
vt 0.891383 0.538585
vt 0.879416 0.258854
vt 0.879417 0.538585
vt 0.927284 0.538585
vt 0.915317 0.538585
vt 0.915317 0.258854
vt 0.927284 0.258854
vt 0.776284 0.375819
vt 0.764317 0.375819
vt 0.764317 0.363658
vt 0.776284 0.363658
vt 0.752350 0.363658
vt 0.752350 0.375819
vt 0.855483 0.258854
vt 0.867450 0.258854
vt 0.867450 0.541522
vt 0.855483 0.541522
vt 0.831549 0.258854
vt 0.843516 0.258854
vt 0.843516 0.541522
vt 0.831549 0.541522
vt 0.879416 0.541522
vt 0.776284 0.351497
vt 0.788251 0.351497
vt 0.788251 0.363658
vt 0.776284 0.387980
vt 0.764317 0.387980
vt 0.938666 0.143813
vt 0.926699 0.143813
vt 0.926699 0.000000
vt 0.938666 0.000000
vt 0.531028 0.741146
vt 0.542995 0.741146
vt 0.542995 0.884959
vt 0.531028 0.884959
vt 0.950633 0.143813
vt 0.950633 0.000000
vt 0.914732 0.000000
vt 0.914732 0.143813
vt 0.764317 0.351497
vt 0.752350 0.351497
vt 0.939251 0.258854
vt 0.951218 0.258854
vt 0.951218 0.537675
vt 0.939251 0.537675
vt 0.927284 0.537675
vt 0.975152 0.537675
vt 0.963185 0.537675
vt 0.963185 0.258854
vt 0.975152 0.258854
vt 0.740383 0.375819
vt 0.740383 0.363658
vt 0.740383 0.351497
vt 1.000000 0.948378
vt 0.988033 0.948378
vt 0.988033 0.670981
vt 1.000000 0.670981
vt 0.987119 0.258854
vt 0.987119 0.536251
vt 0.975152 0.536251
vt 0.999086 0.536251
vt 0.999086 0.258854
vt 0.976066 0.670981
vt 0.976066 0.948378
vt 0.752350 0.387980
vt 0.740383 0.387980
vt 0.348698 0.741146
vt 0.439863 0.741146
vt 0.439863 0.833789
vt 0.348698 0.833789
vt 0.675920 0.196526
vt 0.740383 0.262035
vt 0.740383 0.393052
vt 0.546992 0.196526
vt 0.182331 0.000000
vt 0.182331 0.092643
vt 0.091165 0.092643
vt 0.091165 0.000000
vt 0.364661 0.463216
vt 0.364662 0.370573
vt 0.455827 0.370573
vt 0.455827 0.463216
vt 0.740383 0.258854
vt 0.831549 0.351497
vt 0.531028 0.833789
vt 0.273496 0.463216
vt 0.546992 0.463216
vt 0.546992 0.741146
vt 0.273496 0.741146
vt 0.273496 0.277930
vt 0.546992 0.277930
vt 0.740383 0.131017
vt 0.740383 0.000000
vt 0.273496 0.185286
vt 0.000000 0.185286
vt 0.914732 0.258854
vt 0.273496 0.000000
vt 0.546992 0.000000
vt 0.000000 0.741146
vt 0.000000 0.463216
vt 0.556378 0.402590
vt 0.556378 0.661444
vt 0.546992 0.670981
vt 0.546992 0.393052
vt 0.811103 0.402590
vt 0.820488 0.393052
vt 0.811103 0.661444
vt 0.820488 0.670981
vt 0.801717 0.670981
vt 0.801717 0.929836
vt 0.546992 0.929836
vt 0.174349 1.000000
vt 0.174349 0.741146
vt 0.348698 1.000000
vt 0.976066 0.929836
vt 0.000000 1.000000
vn -1.000000 -0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 1.000000 -0.000000
vn -0.707100 -0.707100 -0.000000
vn -0.000000 -0.707100 0.707100
vn 0.000000 -0.707100 -0.707100
vn 0.707100 -0.707100 0.000000
usemtl Material
s off
f 5/1/1 6/2/1 2/3/1 1/4/1
f 6/5/2 7/1/2 3/4/2 2/6/2
f 7/7/3 8/8/3 4/9/3 3/10/3
f 8/2/4 5/9/4 1/8/4 4/3/4
f 1/11/5 2/12/5 3/13/5 4/14/5
f 8/15/6 7/13/6 6/12/6 5/16/6
f 13/17/1 14/18/1 10/19/1 9/20/1
f 14/21/2 15/22/2 11/23/2 10/24/2
f 15/18/3 16/5/3 12/25/3 11/19/3
f 16/22/4 13/17/4 9/20/4 12/23/4
f 9/14/5 10/26/5 11/27/5 12/28/5
f 16/11/6 15/29/6 14/30/6 13/12/6
f 21/31/1 22/32/1 18/33/1 17/34/1
f 22/35/2 23/36/2 19/37/2 18/38/2
f 23/39/3 24/31/3 20/34/3 19/40/3
f 24/41/4 21/33/4 17/32/4 20/42/4
f 17/13/5 18/43/5 19/26/5 20/14/5
f 24/43/6 23/13/6 22/15/6 21/44/6
f 29/45/1 30/46/1 26/47/1 25/48/1
f 30/10/2 31/45/2 27/48/2 26/49/2
f 31/50/3 32/51/3 28/52/3 27/53/3
f 32/46/4 29/52/4 25/51/4 28/47/4
f 25/16/5 26/54/5 27/55/5 28/15/5
f 32/56/6 31/44/6 30/15/6 29/55/6
f 37/57/1 38/58/1 34/59/1 33/60/1
f 38/53/2 39/61/2 35/62/2 34/63/2
f 39/64/3 40/62/3 36/61/3 35/65/3
f 40/66/4 37/59/4 33/58/4 36/67/4
f 33/68/5 34/16/5 35/12/5 36/30/5
f 40/16/6 39/68/6 38/69/6 37/54/6
f 41/70/5 42/71/5 43/72/5 44/73/5
f 48/74/7 47/75/7 51/76/7 52/77/7
f 41/78/3 45/79/3 46/80/3 42/81/3
f 42/82/4 46/83/4 47/84/4 43/85/4
f 43/86/1 47/21/1 48/87/1 44/56/1
f 45/71/2 41/35/2 44/88/2 48/72/2
f 52/89/1 51/90/1 55/91/1 56/92/1
f 47/84/8 46/83/8 50/93/8 51/94/8
f 45/95/9 48/74/9 52/77/9 49/96/9
f 46/80/10 45/79/10 49/97/10 50/98/10
f 59/86/3 60/96/3 64/41/3 63/99/3
f 51/94/4 50/93/4 54/100/4 55/101/4
f 49/102/2 52/103/2 56/89/2 53/92/2
f 50/98/3 49/97/3 53/89/3 54/103/3
f 57/104/6 58/105/6 54/106/6 53/107/6
f 59/108/6 57/104/6 53/107/6 56/109/6
f 58/105/6 60/110/6 55/111/6 54/106/6
f 60/110/6 59/108/6 56/109/6 55/111/6
f 61/112/6 63/113/6 64/114/6 62/106/6
f 60/115/2 58/116/2 62/70/2 64/117/2
f 57/66/4 59/118/4 63/113/4 61/112/4
f 58/119/1 57/102/1 61/116/1 62/115/1

486
models/oil_derrick.obj Normal file
View File

@ -0,0 +1,486 @@
# Blender v2.72 (sub 0) OBJ File: 'oil_derrick.blend'
# www.blender.org
mtllib oil_derrick.mtl
v 1.250000 0.100000 1.250000
v 1.250000 0.100000 1.750000
v 1.750000 0.100000 1.750000
v 1.750000 0.100000 1.250000
v 0.250000 8.500000 0.250000
v 0.250000 8.500000 0.750000
v 0.750000 8.500000 0.750000
v 0.750000 8.500000 0.250000
v -1.250000 0.100000 -1.250000
v -1.250000 0.100000 -1.750000
v -1.750000 0.100000 -1.750000
v -1.750000 0.100000 -1.250000
v -0.250000 8.500000 -0.250000
v -0.250000 8.500000 -0.750000
v -0.750000 8.500000 -0.750000
v -0.750000 8.500000 -0.250000
v 1.250000 0.100000 -1.250000
v 1.250000 0.100000 -1.750000
v 1.750000 0.100000 -1.750000
v 1.750000 0.100000 -1.250000
v 0.250000 8.500000 -0.250000
v 0.250000 8.500000 -0.750000
v 0.750000 8.500000 -0.750000
v 0.750000 8.500000 -0.250000
v -0.500000 8.500000 0.500000
v -0.500000 8.500000 -0.500000
v 0.500000 8.500000 -0.500000
v 0.500000 8.500000 0.500000
v -0.500000 9.500000 0.500000
v -0.500000 9.500000 -0.500000
v 0.500000 9.500000 -0.500000
v 0.500000 9.500000 0.500000
v -1.250000 0.100000 1.250000
v -1.250000 0.100000 1.750000
v -1.750000 0.100000 1.750000
v -1.750000 0.100000 1.250000
v -0.250000 8.500000 0.250000
v -0.250000 8.500000 0.750000
v -0.750000 8.500000 0.750000
v -0.750000 8.500000 0.250000
v 2.750000 -2.500000 2.750000
v 2.750000 -2.500000 3.250000
v 3.250000 -2.500000 3.250000
v 3.250000 -2.500000 2.750000
v 2.000000 0.000000 2.000000
v 2.000000 0.000000 2.500000
v 2.500000 0.000000 2.500000
v 2.500000 0.000000 2.000000
v -2.750000 -2.500000 2.750000
v -2.750000 -2.500000 3.250000
v -3.250000 -2.500000 3.250000
v -3.250000 -2.500000 2.750000
v -2.000000 0.000000 2.000000
v -2.000000 0.000000 2.500000
v -2.500000 0.000000 2.500000
v -2.500000 0.000000 2.000000
v -2.750000 -2.500000 -2.750000
v -2.750000 -2.500000 -3.250000
v -3.250000 -2.500000 -3.250000
v -3.250000 -2.500000 -2.750000
v -2.000000 0.000000 -2.000000
v -2.000000 0.000000 -2.500000
v -2.500000 0.000000 -2.500000
v -2.500000 0.000000 -2.000000
v 2.750000 -2.500000 -2.750000
v 2.750000 -2.500000 -3.250000
v 3.250000 -2.500000 -3.250000
v 3.250000 -2.500000 -2.750000
v 2.000000 0.000000 -2.000000
v 2.000000 0.000000 -2.500000
v 2.500000 0.000000 -2.500000
v 2.500000 0.000000 -2.000000
v -2.500000 0.500000 2.500000
v -2.500000 0.500000 -2.500000
v -2.500000 0.000000 -2.500000
v -2.500000 0.000000 2.500000
v 2.500000 0.500000 2.500000
v 2.500000 0.000000 2.500000
v -1.500000 0.500000 1.500000
v 2.500000 0.500000 -2.500000
v 1.500000 0.500000 -1.500000
v 1.500000 0.500000 1.500000
v -1.500000 0.500000 -1.500000
v 2.500000 0.000000 -2.500000
v -1.500000 0.000000 1.500000
v 1.500000 0.000000 -1.500000
v -1.500000 0.000000 -1.500000
v 1.500000 0.000000 1.500000
v 0.230000 -0.500000 -0.500000
v 0.500000 -0.500000 -0.230000
v 0.365000 -0.500000 -0.463827
v 0.463827 -0.500000 -0.365000
v 0.500000 -0.500000 0.230000
v 0.230000 -0.500000 0.500000
v 0.463827 -0.500000 0.365000
v 0.365000 -0.500000 0.463827
v -0.230000 -0.500000 0.500000
v -0.500000 -0.500000 0.230000
v -0.365000 -0.500000 0.463827
v -0.463827 -0.500000 0.365000
v -0.500000 -0.500000 -0.230000
v -0.230000 -0.500000 -0.500000
v -0.463827 -0.500000 -0.365000
v -0.365000 -0.500000 -0.463827
v 0.500000 0.500000 -0.230000
v 0.230000 0.500000 -0.500000
v 0.463827 0.500000 -0.365000
v 0.365000 0.500000 -0.463827
v 0.230000 0.500000 0.500000
v 0.500000 0.500000 0.230000
v 0.365000 0.500000 0.463827
v 0.463827 0.500000 0.365000
v -0.500000 0.500000 0.230000
v -0.230000 0.500000 0.500000
v -0.463827 0.500000 0.365000
v -0.365000 0.500000 0.463827
v -0.230000 0.500000 -0.500000
v -0.500000 0.500000 -0.230000
v -0.365000 0.500000 -0.463827
v -0.463827 0.500000 -0.365000
vt 0.403777 0.000000
vt 0.439963 0.006495
vt 0.403777 0.630529
vt 0.367590 0.624034
vt 0.841478 0.000000
vt 0.877979 0.004368
vt 0.877979 0.629461
vt 0.841478 0.625093
vt 0.658971 0.625094
vt 0.622470 0.629461
vt 0.622470 0.004368
vt 0.658972 0.000000
vt 0.439963 0.004368
vt 0.476465 0.000000
vt 0.476464 0.625094
vt 0.439963 0.629461
vt 0.986448 0.703355
vt 0.986448 0.740302
vt 0.949689 0.740302
vt 0.949689 0.703355
vt 0.073518 0.942427
vt 0.073518 0.979374
vt 0.036759 0.979374
vt 0.036759 0.942427
vt 0.914480 0.000000
vt 0.950982 0.004368
vt 0.950982 0.629461
vt 0.914480 0.625094
vt 0.987483 0.629461
vt 0.950982 0.625094
vt 0.950982 0.000000
vt 0.987483 0.004368
vt 0.549468 0.625093
vt 0.512966 0.629461
vt 0.512966 0.004368
vt 0.549467 0.000000
vt 0.804977 0.004368
vt 0.804977 0.629461
vt 0.949689 0.666408
vt 0.986448 0.666408
vt 0.110277 0.979374
vt 0.110277 0.942427
vt 0.147036 0.942427
vt 0.147036 0.979374
vt 0.877979 0.000000
vt 0.914480 0.004368
vt 0.914480 0.629461
vt 0.877979 0.625094
vt 0.768475 0.000000
vt 0.768475 0.625094
vt 0.585969 0.625094
vt 0.549468 0.629461
vt 0.549467 0.004368
vt 0.585969 0.000000
vt 0.476465 0.004368
vt 0.512966 0.000000
vt 0.512966 0.625094
vt 0.476465 0.629461
vt 0.294072 0.979374
vt 0.294072 0.942427
vt 0.330831 0.942427
vt 0.330831 0.979374
vt 0.183795 0.979374
vt 0.183795 0.942427
vt 0.220554 0.942427
vt 0.220554 0.979374
vt 0.586999 0.983790
vt 0.586999 0.909896
vt 0.660517 0.909896
vt 0.660517 0.983790
vt 0.792030 0.851144
vt 0.865548 0.851144
vt 0.865548 0.925038
vt 0.792030 0.925038
vt 0.718512 0.998932
vt 0.718512 0.925038
vt 0.792030 0.998932
vt 0.586999 0.836001
vt 0.660517 0.836001
vt 0.718512 0.851144
vt 0.939066 0.851144
vt 0.939066 0.925038
vt 0.731974 0.000000
vt 0.768475 0.004368
vt 0.768475 0.629461
vt 0.731974 0.625094
vt 0.695473 0.004368
vt 0.695473 0.629461
vt 0.622470 0.625094
vt 0.585969 0.629461
vt 0.585969 0.004368
vt 0.622470 0.000000
vt 0.685634 0.629461
vt 0.718512 0.645984
vt 0.685634 0.836001
vt 0.652756 0.819478
vt 0.281670 0.738941
vt 0.316879 0.749558
vt 0.316879 0.942427
vt 0.281670 0.931810
vt 0.211252 0.931810
vt 0.176044 0.942427
vt 0.176044 0.749558
vt 0.211252 0.738941
vt 0.035209 0.749558
vt 0.070418 0.738941
vt 0.070417 0.931810
vt 0.035209 0.942427
vt 0.986448 0.629461
vt 0.949689 0.629461
vt 0.697276 0.909896
vt 0.697276 0.946843
vt 0.660517 0.946843
vt 0.619878 0.629461
vt 0.652756 0.645984
vt 0.619878 0.836001
vt 0.586999 0.819478
vt 0.879272 0.629461
vt 0.914480 0.640078
vt 0.914480 0.832947
vt 0.879272 0.822331
vt 0.176044 0.931810
vt 0.140835 0.942427
vt 0.140835 0.749558
vt 0.176044 0.738941
vt 0.841736 0.640078
vt 0.876944 0.629461
vt 0.876944 0.822330
vt 0.841736 0.832947
vt 0.257313 0.979374
vt 0.257313 0.942427
vt 0.697276 0.983790
vt 0.105626 0.738941
vt 0.105626 0.931810
vt 0.949689 0.640078
vt 0.949689 0.832947
vt 0.914480 0.822331
vt 0.246461 0.749558
vt 0.246461 0.942427
vt 0.404349 0.641146
vt 0.439558 0.630529
vt 0.439558 0.823399
vt 0.404349 0.834015
vt 0.939066 0.961985
vt 0.975825 0.925038
vt 0.975825 0.961985
vt 0.000000 0.979374
vt 0.000000 0.942427
vt 0.316879 0.738941
vt 0.352087 0.749558
vt 0.352087 0.942427
vt 0.316879 0.931810
vt 0.105626 0.749558
vt 0.105626 0.942427
vt 0.211252 0.749558
vt 0.246461 0.738941
vt 0.246461 0.931810
vt 0.211252 0.942427
vt 0.000000 0.749558
vt 0.035209 0.738941
vt 0.035209 0.931810
vt 0.367590 0.942427
vt 0.367590 0.979374
vt 0.513481 0.629461
vt 0.550240 0.629461
vt 0.550240 0.998932
vt 0.476722 0.998932
vt 0.439963 0.998932
vt 0.073518 0.665047
vt 0.294072 0.665047
vt 0.367590 0.738941
vt 0.073518 0.443365
vt 0.000000 0.369471
vt 0.367590 0.369471
vt 0.586999 0.998932
vt 0.073518 0.073894
vt 0.073518 0.295576
vt 0.294072 0.073894
vt 0.367590 0.000000
vt 0.476722 0.629461
vt 0.513481 0.998932
vt 0.718512 0.629461
vt 0.755271 0.629461
vt 0.755271 0.851143
vt 0.367590 0.630529
vt 0.404349 0.630529
vt 0.404349 0.852212
vt 0.841736 0.629461
vt 0.841736 0.851143
vt 0.000000 0.738941
vt 0.586999 0.629461
vt 0.294072 0.443365
vt 0.000000 0.000000
vt 0.294072 0.295576
vt 0.792030 0.629461
vt 0.367590 0.852212
vt 0.804977 0.851143
vt 0.418599 0.852212
vt 0.418599 0.926106
vt 0.384781 0.926106
vt 0.384781 0.852212
vt 0.384781 1.000000
vt 0.418599 1.000000
vt 0.982810 0.851144
vt 0.982810 0.925038
vt 0.948991 0.925038
vt 0.948991 0.851144
vt 0.919216 0.925038
vt 0.929141 0.927711
vt 0.936407 0.935013
vt 0.939066 0.944989
vt 0.939066 0.978980
vt 0.936407 0.988956
vt 0.929141 0.996259
vt 0.919216 0.998932
vt 0.885398 0.998932
vt 0.875473 0.996259
vt 0.868208 0.988956
vt 0.865548 0.978980
vt 0.865548 0.944989
vt 0.868208 0.935013
vt 0.875473 0.927711
vt 0.885398 0.925038
vt 0.704261 0.836001
vt 0.704261 0.909896
vt 0.670442 0.909896
vt 0.670442 0.836001
vt 0.428524 0.852212
vt 0.428524 0.926106
vt 0.435789 0.852212
vt 0.435789 0.926106
vt 0.714186 0.836001
vt 0.714185 0.909896
vt 0.367590 1.000000
vt 0.367590 0.926106
vt 0.374856 0.926106
vt 0.374856 1.000000
vt 0.428524 1.000000
vt 1.000000 0.851144
vt 1.000000 0.925038
vt 0.992734 0.925038
vt 0.992734 0.851144
vt 0.374856 0.852212
vt 0.862889 0.988956
vt 0.855623 0.996259
vt 0.845698 0.998932
vt 0.811880 0.998932
vt 0.801955 0.996259
vt 0.794690 0.988956
vt 0.792030 0.978980
vt 0.792030 0.944989
vt 0.794690 0.935013
vt 0.801955 0.927711
vt 0.811880 0.925038
vt 0.845698 0.925038
vt 0.855623 0.927711
vt 0.862889 0.935013
usemtl Material
s off
f 5/1 6/2 2/3 1/4
f 6/5 7/6 3/7 2/8
f 7/9 8/10 4/11 3/12
f 8/13 5/14 1/15 4/16
f 1/17 2/18 3/19 4/20
f 8/21 7/22 6/23 5/24
f 13/25 14/26 10/27 9/28
f 14/29 15/30 11/31 10/32
f 15/33 16/34 12/35 11/36
f 16/37 13/5 9/8 12/38
f 9/20 10/39 11/40 12/17
f 16/41 15/42 14/43 13/44
f 21/45 22/46 18/47 17/48
f 22/49 23/37 19/38 18/50
f 23/51 24/52 20/53 19/54
f 24/55 21/56 17/57 20/58
f 17/59 18/60 19/61 20/62
f 24/63 23/64 22/65 21/66
f 29/67 30/68 26/69 25/70
f 30/71 31/72 27/73 26/74
f 31/75 32/76 28/74 27/77
f 32/78 29/79 25/69 28/68
f 25/76 26/80 27/71 28/74
f 32/73 31/72 30/81 29/82
f 37/83 38/84 34/85 33/86
f 38/12 39/87 35/88 34/9
f 39/89 40/90 36/91 35/92
f 40/87 37/83 33/86 36/88
f 33/42 34/41 35/22 36/21
f 40/64 39/63 38/44 37/43
f 45/93 46/94 42/95 41/96
f 46/97 47/98 43/99 42/100
f 47/101 48/102 44/103 43/104
f 48/105 45/106 41/107 44/108
f 41/109 42/40 43/39 44/110
f 48/111 47/112 46/113 45/69
f 53/114 54/115 50/116 49/117
f 54/118 55/119 51/120 50/121
f 55/122 56/123 52/124 51/125
f 56/126 53/127 49/128 52/129
f 49/60 50/59 51/130 52/131
f 56/112 55/132 54/70 53/113
f 61/133 62/124 58/123 57/134
f 62/47 63/135 59/136 58/137
f 63/138 64/97 60/100 59/139
f 64/140 61/141 57/142 60/143
f 57/144 58/82 59/145 60/146
f 64/147 63/148 62/24 61/23
f 69/149 70/150 66/151 65/152
f 70/106 71/153 67/154 66/107
f 71/155 72/156 68/157 67/158
f 72/159 69/160 65/161 68/148
f 65/66 66/65 67/131 68/130
f 72/62 71/61 70/162 69/163
f 74/164 75/165 76/166
f 73/167 76/168 78/16
f 82/169 79/170 73/171
f 81/172 80/173 74/174
f 80/175 84/166 75/165
f 87/176 85/177 76/173
f 86/178 84/179 78/174
f 77/180 78/164 84/181
f 79/182 85/183 87/184
f 83/71 87/184 86/183
f 82/185 88/186 85/187
f 81/38 86/188 88/189
f 73/181 74/164 76/166
f 77/180 73/167 78/16
f 80/173 81/172 82/169
f 74/174 73/171 79/170
f 77/190 80/173 82/169
f 73/171 77/190 82/169
f 74/191 80/175 75/165
f 74/174 79/170 83/192
f 83/192 81/172 74/174
f 84/179 86/178 87/176
f 78/174 76/173 85/177
f 75/193 84/179 87/176
f 76/173 75/193 87/176
f 80/167 77/180 84/181
f 78/174 85/177 88/194
f 88/194 86/178 78/174
f 83/80 79/182 87/184
f 81/195 83/71 86/183
f 79/196 82/185 85/187
f 82/197 81/38 88/189
f 106/198 89/199 102/200 117/201
f 94/202 109/200 114/199 97/203
f 98/204 113/205 118/206 101/207
f 105/208 107/209 108/210 106/211 117/212 119/213 120/214 118/215 113/216 115/217 116/218 114/219 109/220 111/221 112/222 110/223
f 90/224 105/225 110/226 93/227
f 89/199 106/198 108/228 91/229
f 91/229 108/228 107/230 92/231
f 92/232 107/233 105/225 90/224
f 93/227 110/226 112/69 95/79
f 95/234 112/235 111/236 96/237
f 96/237 111/236 109/200 94/202
f 97/203 114/199 116/229 99/238
f 99/239 116/240 115/241 100/242
f 100/242 115/241 113/205 98/204
f 101/207 118/206 120/82 103/81
f 103/235 120/196 119/243 104/236
f 104/236 119/243 117/201 102/200
f 89/219 91/244 92/245 90/246 93/247 95/248 96/249 94/250 97/251 99/252 100/253 98/254 101/255 103/256 104/257 102/220

View File

@ -41,51 +41,6 @@ minetest.register_node( "bitumen:oil_shale", {
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:tar_sand",
wherein = {"default:desert_stone", "default:sandstone", "default:stone"},
clust_scarcity = 64 * 64 * 64,
clust_size = 20,
y_min = -15,
y_max = 500,
noise_threshold = 0.4,
noise_params = {
offset = 0.5,
scale = 0.7,
spread = {x = 40, y = 40, z = 40},
seed = 2316,
octaves = 4,
persist = 0.7
},
biomes = {
"taiga", "snowy_grassland",
"grassland", "desert", "sandstone_desert", "cold_desert",
}
})
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:oil_shale",
wherein = {"default:sandstone"},
clust_scarcity = 96 * 96 * 96,
clust_size = 30,
y_min = -15,
y_max = 500,
noise_threshold = 0.4,
noise_params = {
offset = 0.5,
scale = 0.7,
spread = {x = 40, y = 40, z = 40},
seed = 23136,
octaves = 4,
persist = 0.7
},
biomes = { "sandstone_desert"},
})

91
ore_gen.lua Normal file
View File

@ -0,0 +1,91 @@
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:crude_oil_full",
wherein = {"default:stone"},
clust_scarcity = 64 * 64 * 64,
-- clust_scarcity = 16 * 16 * 16,
clust_size = 30,
y_min = -10000,
y_max = -500,
noise_threshold = 0.04,
noise_params = {
offset = 0.5,
scale = 0.7,
spread = {x = 40, y = 40, z = 40},
seed = 2316,
octaves = 4,
persist = 0.7
},
--[[ it's all "underground" anyway
biomes = {
"taiga", "tundra", "snowy_grassland", "coniferous_forest",
"coniferous_forest_dunes",
}
]]
})
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:tar_sand",
wherein = {"default:desert_stone", "default:sandstone", "default:stone"},
clust_scarcity = 64 * 64 * 64,
clust_size = 20,
y_min = -15,
y_max = 500,
noise_threshold = 0.4,
noise_params = {
offset = 0.5,
scale = 0.7,
spread = {x = 40, y = 40, z = 40},
seed = 2316,
octaves = 4,
persist = 0.7
},
biomes = {
"taiga", "snowy_grassland",
"grassland", "desert", "sandstone_desert", "cold_desert",
}
})
minetest.register_ore({
ore_type = "blob",
ore = "bitumen:oil_shale",
wherein = {"default:sandstone"},
clust_scarcity = 96 * 96 * 96,
clust_size = 30,
y_min = -15,
y_max = 500,
noise_threshold = 0.4,
noise_params = {
offset = 0.5,
scale = 0.7,
spread = {x = 40, y = 40, z = 40},
seed = 23136,
octaves = 4,
persist = 0.7
},
biomes = { "sandstone_desert"},
})

View File

@ -319,6 +319,7 @@ bitumen.pipes.push_fluid = function(pos, fluid, amount, extra_pressure)
local phash = net_members[hash]
if phash == nil then
print("no network to push to")
return 0 -- no network
end
local pnet = networks[phash]
@ -329,11 +330,12 @@ bitumen.pipes.push_fluid = function(pos, fluid, amount, extra_pressure)
-- BUG: check for "full" nodes
pnet.fluid = fluid
else
print("here "..fluid.." ".. dump(minetest.registered_nodes[fluid]))
return 0 -- no available liquids
end
else -- only suck in existing fluid
if fluid ~= pnet.fluid and fluid ~= pnet.fluid.."_full" then
--print("no water near intake")
--print("wrong fluid")
return 0
end
end
@ -353,7 +355,7 @@ bitumen.pipes.push_fluid = function(pos, fluid, amount, extra_pressure)
end
pnet.in_pressure = math.max(pnet.in_pressure, input_pres)
--print("net pressure: ".. pnet.in_pressure)
print("net pressure: ".. pnet.in_pressure)
local rate = amount --math.max(1, math.ceil(ulevel / 2))
local cap = 64

View File

@ -1,83 +1,5 @@
local function add(a, b)
return {
x = a.x + b[1],
y = a.y + b[2], -- wtf?
z = a.z + b[3]
}
end
local function set_magic_collision_nodes(pos, def)
local set = {}
for _,delta in ipairs(def) do
local p = add(pos, delta)
local n = minetest.get_node(p)
if true or n.name == "air" then
print("magic node at ".. minetest.pos_to_string(p))
minetest.set_node(p, {name= "bitumen:collision_node"})
-- minetest.set_node(p, {name= "default:glass"})
-- save the parent node
local meta = minetest.get_meta(p)
meta:set_string("magic_parent", minetest.serialize(p))
table.insert(set, p)
end
end
-- save positions for all the magic nodes
local meta = minetest.get_meta(pos)
local oldset = meta:get_string("magic_children") or ""
if oldset == "" then
oldset = {}
else
oldset = minetest.deserialize(oldset)
end
for _,p in ipairs(set) do
table.insert(oldset, p)
end
meta:set_string("magic_children", minetest.serialize(oldset))
end
local function gensphere(center, radius)
local out = {}
for x = -radius, radius do
for y = -radius, radius do
for z = -radius, radius do
if math.sqrt(x * x + y * y + z * z) <= radius then
table.insert(out, {center[1]+x, center[2]+y, center[3]+z})
end
end
end
end
return out
end
local function gencube(low, high)
local out = {}
for x = low[1], high[1] do
for y = low[2], high[2] do
for z = low[3], high[3] do
table.insert(out, {x, y, z})
end
end
end
return out
end
local function vmin(a, b)
return {
x = math.min(a.x, b.x),
@ -112,12 +34,6 @@ local function check_foundation(p1, p2, accept)
end
minetest.register_node("bitumen:concrete", {
description = "Foundation Concrete",
drawtype = "normal",
tiles = {"default_silver_sand.png^[colorize:black:20"},
groups = {cracky = 1},
})
local tank_builder_formspec =
"size[10,8;]" ..
@ -245,36 +161,23 @@ minetest.register_node("bitumen:sphere_tank", {
meta:set_float("capacity", math.floor(3.14159 * .75 * 9 * 9 * 9 * 64))
meta:set_string("infotext", "0%")
set_magic_collision_nodes(pos, gensphere({0, 11, 0}, 9.99))
bitumen.magic.set_collision_nodes(pos, gensphere({0, 11, 0}, 9.99))
set_magic_collision_nodes(pos, gencube({8, 0, 0}, {8, 8, 0}))
set_magic_collision_nodes(pos, gencube({0, 0, 8}, {0, 8, 8}))
set_magic_collision_nodes(pos, gencube({-8, 0, 0}, {-8, 8, 0}))
set_magic_collision_nodes(pos, gencube({0, 0, -8}, {0, 8, -8}))
bitumen.magic.set_collision_nodes(pos, gencube({8, 0, 0}, {8, 8, 0}))
bitumen.magic.set_collision_nodes(pos, gencube({0, 0, 8}, {0, 8, 8}))
bitumen.magic.set_collision_nodes(pos, gencube({-8, 0, 0}, {-8, 8, 0}))
bitumen.magic.set_collision_nodes(pos, gencube({0, 0, -8}, {0, 8, -8}))
set_magic_collision_nodes(pos, gencube({-6, 0, -6}, {-6, 8, -6}))
set_magic_collision_nodes(pos, gencube({6, 0, -6}, {6, 8, -6}))
set_magic_collision_nodes(pos, gencube({-6, 0, 6}, {-6, 8, 6}))
set_magic_collision_nodes(pos, gencube({6, 0, 6}, {6, 8, 6}))
bitumen.magic.set_collision_nodes(pos, gencube({-6, 0, -6}, {-6, 8, -6}))
bitumen.magic.set_collision_nodes(pos, gencube({6, 0, -6}, {6, 8, -6}))
bitumen.magic.set_collision_nodes(pos, gencube({-6, 0, 6}, {-6, 8, 6}))
bitumen.magic.set_collision_nodes(pos, gencube({6, 0, 6}, {6, 8, 6}))
--]]
bitumen.pipes.on_construct(pos)
end,
on_destruct = function(pos)
local meta = minetest.get_meta(pos)
local magic = meta:get_string("magic_children")
if magic == nil then
return
end
magic = minetest.deserialize(magic)
-- clean up all the magic
for _,p in ipairs(magic) do
minetest.set_node(p, {name = "air"})
end
end,
on_destruct = bitumen.magic.on_destruct,
can_dig = function(pos, player)
local meta = minetest.get_meta(pos);

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

503
wells.lua
View File

@ -2,39 +2,6 @@
bitumen.register_fluid("bitumen", "drill_mud", {
desc = "Drilling Mud",
groups = {petroleum=1},
reflow_interval = 5,
reflow_chance = 1,
flow_interval = 1,
flow_chance = 1,
colorize = "^[colorize:brown:40",
post_effect_color = {a = 103, r = 80, g = 76, b = 90},
evap_chance = 0,
})
bitumen.register_fluid("bitumen", "drill_mud_dirty", {
desc = "Dirty Drilling Mud",
groups = {petroleum=1},
reflow_interval = 5,
reflow_chance = 1,
flow_interval = 1,
flow_chance = 1,
colorize = "^[colorize:brown:140",
post_effect_color = {a = 103, r = 80, g = 76, b = 90},
evap_chance = 0,
})
@ -47,7 +14,10 @@ local function check_drill_stack(opos)
pos.y = pos.y - 1
while 1 == 1 do
if minetest.get_node(pos).name == "bitumen:drill_pipe" then
local name = minetest.get_node(pos).name
if name == "bitumen:drill_pipe" then
elseif name == "bitumen:drill_mud_extractor" then
elseif name == "bitumen:drill_mud_injector" then
-- noop
else
-- end of the stack
@ -119,16 +89,6 @@ minetest.register_node("bitumen:drill_pipe", {
minetest.register_craft({
output = 'bitumen:drill_pipe 12',
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
}
})
minetest.register_node("bitumen:well_siphon", {
paramtype = "light",
@ -171,15 +131,17 @@ local function drill(pos)
local meta = minetest.get_meta(pos)
local dp = meta:get_string("drilldepth") or ""
--print("dp" .. dump(dp))
print("dp" .. dump(dp))
if dp == "" then
dp = check_drill_stack(pos)
meta:set_string("drilldepth", minetest.serialize(dp))
else
dp = minetest.deserialize(dp)
--print("deserialized " .. dump(pos))
dp.y = dp.y - 1
end
local n = minetest.get_node(dp)
@ -196,18 +158,19 @@ local function drill(pos)
-- minetest.emerge_area(pos, pos)
end
local hit_oil = false
if n.name == "ignore" then
minetest.emerge_area(dp, {x=dp.x, y=dp.y - 20, z=dp.z})
print("emerging " .. minetest.pos_to_string(dp))
return
elseif n.name == "bitumen:drill_pipe" then
dp = check_drill_stack(pos)
elseif n.name == "bitumen:drill_pipe" or n.name == "bitumen:drill_mud_injector" or n.name == "bitumen:drill_mud_extractor"then
dp = check_drill_stack(dp)
elseif n.name == "bitumen:crude_oil" or n.name == "bitumen:crude_oil_full" then
pos.y = pos.y + 2
minetest.set_node(pos, {name = "bitumen:crude_oil"})
minetest.set_node_level(pos, 64)
hit_oil = true
else
print("drilling at "..dp.y.." of "..n.name )
minetest.set_node(dp, {name = "bitumen:drill_pipe"})
@ -215,39 +178,455 @@ local function drill(pos)
meta:set_string("drilldepth", minetest.serialize(dp))
return minetest.registered_nodes[n.name].description, dp.y, hit_oil
end
minetest.register_node("bitumen:drill_rig", {
description = "Drill Rig",
tiles = {"default_tin_block.png", "default_steel_block.png", "default_steel_block.png",
"default_tin_block.png", "default_tin_block.png", "default_steel_block.png"},
minetest.register_node("bitumen:drill_controls", {
description = "Drilling Controls",
tiles = {"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png",
"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png"},
drawtype = "normal",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=2, petroleum_fixture=1},
groups = { }, -- undiggable: part of the drill rig
sounds = default.node_sound_wood_defaults(),
can_dig = function(pos,player)
return true
on_receive_fields = function(pos, form, fields, player)
local cmd = "none"
if fields.drill then
cmd = "drill"
elseif fields.retract then
cmd = "retract"
elseif fields.stop then
cmd = "stop"
elseif fields.up then
cmd = "up"
elseif fields.down then
cmd = "down"
elseif fields.explore then
cmd = "explore"
elseif fields.forceload then
cmd = "forceload"
elseif fields.un_forceload then
cmd = "un_forceload"
end
if cmd ~= "none" then
local meta = minetest.get_meta(pos)
local dpos = minetest.deserialize(meta:get_string("magic_parent"))
local dmeta = minetest.get_meta(dpos)
--print(dump(dpos))
--if 1==1 then return end
local state = minetest.deserialize(dmeta:get_string("state"))
state.command = cmd
dmeta:set_string("state", minetest.serialize(state))
end
end,
on_timer = dcb_node_timer,
on_punch = function(pos)
drill(pos)
-- on_rick_click = function(pos, node, player, itemstack, pointed_thing)
-- minetest.show_formspec(player:get_player_name(), fs)]]
-- return itemstack -- don't take anything
-- end,
})
minetest.register_node("bitumen:drill_pipe_chest", {
description = "Drilling Controls",
tiles = {"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png",
"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{ -.5, -1.5, -.5, .5, 1.5, .5 },
},
},
selection_box = {
type = "fixed",
fixed = {
{ -.5, -1.5, -.5, .5, 1.5, .5 },
},
},
collision_box = {
type = "fixed",
fixed = {
{ -.5, -1.5, -.5, .5, 1.5, .5 },
},
},
groups = { }, -- undiggable: part of the drill rig
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 4*8)
end,
})
minetest.register_node("bitumen:drill_mud_injector", {
description = "Drilling Mud Injector",
tiles = {"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png",
"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, .5, .5 },
},
},
selection_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, .5, .5 },
},
},
collision_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, .5, .5 },
},
},
groups = { petroleum_fixture=1 }, -- undiggable: part of the drill rig
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("bitumen:drill_mud_extractor", {
description = "Drilling Mud Extractor",
tiles = {"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png",
"default_bronze_block.png", "default_bronze_block.png", "default_bronze_block.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, .5, .5 },
},
},
selection_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, .5, .5 },
},
},
collision_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, .5, .5 },
},
},
groups = { petroleum_fixture=1 }, -- undiggable: part of the drill rig
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("bitumen:drill_rig", {
description = "Drill Rig",
paramtype = "light",
drawtype = "mesh",
mesh = "oil_derrick.obj",
description = "Drilling Derrick",
inventory_image = "bitumen_cement_mixer_invimg.png",
tiles = {
"default_obsidian_block.png",
},
selection_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, 1.5, .5 },
},
},
collision_box = {
type = "fixed",
fixed = {
{ -.5, -.5, -.5, .5, 1.5, .5 },
-- { -1.5, -1.5, -1.5, -1.4, 3, -1.4 },
-- { 1.5, -1.5, -1.5, 1.4, 3, -1.4 },
-- { -1.5, -1.5, 1.5, -1.4, 3, 1.4 },
-- { 1.5, -1.5, 1.5, 1.4, 3, 1.4 },
-- { 1.5, 1.5, 1.5, -1.5, 4.5, -1.5 },
}
},
paramtype2 = "facedir",
groups = {choppy=1 },
sounds = default.node_sound_wood_defaults(),
on_timer = dcb_node_timer,
on_construct = function(pos)
bitumen.magic.set_collision_nodes(pos, {
{3, -2, 3}, {3, -1, 3},
{3, -2, -3}, {3, -1, -3},
{-3, -2, 3}, {-3, -1, 3},
{-3, -2, -3}, {-3, -1, -3},
{-2, 0, -2}, {-2, 0, -1}, {-2, 0, 0}, {-2, 0, 1}, {-2, 0, 2},
{2, 0, -2}, {2, 0, -1}, {2, 0, 0}, {2, 0, 1}, {2, 0, 2},
{-1, 0, -2}, {0, 0, -2}, {1, 0, -2},
{-1, 0, 2}, {0, 0, 2}, {1, 0, 2},
{0, 9, 0},
{0, 8, 0},
})
bitumen.magic.set_collision_nodes(pos, bitumen.magic.gencube({1, 1, 1}, {1, 7, 1}))
bitumen.magic.set_collision_nodes(pos, bitumen.magic.gencube({1, 1, -1}, {1, 7, -1}))
bitumen.magic.set_collision_nodes(pos, bitumen.magic.gencube({-1, 1, 1}, {-1, 7, 1}))
bitumen.magic.set_collision_nodes(pos, bitumen.magic.gencube({-1, 1, -1}, {-1, 7, -1}))
local controls_delta = {1, 2, 0}
local pipe_chest_delta = {0, 2, 1}
local mud_injector_delta = {0, -1, 0}
local mud_extractor_delta = {0, -2, 0}
bitumen.magic.set_nodes(pos, "bitumen:drill_controls", {controls_delta})
bitumen.magic.set_nodes(pos, "bitumen:drill_pipe_chest", {pipe_chest_delta})
bitumen.magic.set_nodes(pos, "bitumen:drill_mud_injector", {mud_injector_delta})
bitumen.magic.set_nodes(pos, "bitumen:drill_mud_extractor", {mud_extractor_delta})
local function add(p, d)
return {x=p.x + d[1], y=p.y + d[2], z=p.z + d[3]}
end
local altnodes = {
controls = add(pos, controls_delta),
pipe_chest = add(pos, pipe_chest_delta),
mud_injector = add(pos, mud_injector_delta),
mud_extractor = add(pos, mud_extractor_delta),
}
local state = {
state = "idle",
command = "none",
depth = pos.y - 3, -- depth of the next non-pipe node
max_depth = pos.y - 3,
forceload_oil = false, -- forceload the oil field to make the fluids flow
last_drilled_node = "none"
}
local meta = minetest.get_meta(pos)
meta:set_string("altnodes", minetest.serialize(altnodes))
meta:set_string("state", minetest.serialize(state))
meta:set_string("drilldepth", minetest.serialize(add(pos, {0, -3, 0})))
end,
on_destruct = bitumen.magic.on_destruct,
-- on_punch = function(pos)
-- drill(pos)
-- end,
})
local function get_controls_formspec(state)
local up_down = ""
if state.state == "idle" then
up_down = "button[5,3;6,1;up;Up One]" ..
"button[5,4;6,1;down;Down One]"
end
local stop = ""
if state.state ~= "idle" then
stop = "button[5,0;5,1;stop;Stop]"
end
local drill = ""
if state.state ~= "drilling" then
drill = "button[5,1;5,1;drill;Drill]"
end
local retract= ""
if state.state ~= "retracting" then
retract = "button[5,2;6,1;retract;Retract Pipe]"
end
local state_strings = {
drilling = "Drilling",
retracting = "Retracting",
idle = "Idle",
}
local state_str = state_strings[state.state] or "None"
return "" ..
"size[10,8;]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"label[1,1;"..state_str.."]" ..
"label[1,2;Last Node: "..(state.last_drilled_node or "none").."]" ..
"label[1,3;Depth: "..state.depth.."]" ..
stop ..
drill ..
retract ..
up_down ..
""
end
local function retract(pos)
local meta = minetest.get_meta(pos)
local dp = meta:get_string("drilldepth") or ""
if dp == "" then
dp = check_drill_stack(pos)
meta:set_string("drilldepth", minetest.serialize(dp))
else
dp = minetest.deserialize(dp)
--print("deserialized " .. dump(pos))
--dp.y = dp.y - 1
end
local n = minetest.get_node(dp)
if n.name == "ignore" then
if minetest.forceload_block(dp, true) then
print("forceload successful: ".. minetest.pos_to_string(dp))
local n = minetest.get_node(dp)
end
-- minetest.emerge_area(pos, pos)
end
local removed = false
if n.name == "ignore" then
minetest.emerge_area(dp, {x=dp.x, y=dp.y - 20, z=dp.z})
print("emerging " .. minetest.pos_to_string(dp))
return dp.y, false, false
elseif n.name == "bitumen:drill_pipe" then
minetest.set_node(dp, {name = "air"})
removed = true
elseif n.name == "bitumen:drill_mud_injector" or n.name == "bitumen:drill_mud_extractor"then
return dp.y, false, true
else
print("retract at "..dp.y.." of "..n.name )
end
dp.y = dp.y + 1
meta:set_string("drilldepth", minetest.serialize(dp))
return dp.y, removed, false
end
minetest.register_abm({
nodenames = {"bitumen:drill_rig"},
interval = 1,
interval = 2,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
--print("trydrill")
drill(pos)
--if 1==1 then return end
local meta = minetest.get_meta(pos)
local state = minetest.deserialize(meta:get_string("state"))
local alts = minetest.deserialize(meta:get_string("altnodes"))
-- print(dump(alts))
if alts == nil then
--print("\n\nnull alts: "..dump(pos).."\n\n")
return
end
local inch = 0
if state.command ~= "none" then
if state.command == "drill" then
state.state = "drilling"
elseif state.command == "retract" then
state.state = "retracting"
elseif state.command == "stop" then
state.state = "idle"
elseif state.command == "pump" then
state.state = "pump"
elseif state.command == "explore" then
state.state = "idle"
-- explore extent of oil deposit
elseif state.command == "forceload" then
state.state = "idle"
-- do forceload
elseif state.command == "un_forceload" then
state.state = "idle"
-- undo forceload
elseif state.command == "up" then
state.state = "idle"
inch = 1
elseif state.command == "down" then
state.state = "idle"
inch = -1
end
state.command = "none"
end
local pcmeta, pcinv
if state.state == "drilling" or state.state == "retracting" then
pcmeta = minetest.get_meta(alts.pipe_chest)
pcinv = pcmeta:get_inventory()
end
if state.state == "drilling" or inch == -1 then
local n, y, hit_oil = drill(pos)
if n then
state.last_drilled_node = n
state.depth = y
state.max_depth = math.min(y, state.max_depth or y)
if hit_oil and inch == 0 then
state.state = "idle"
end
end
elseif state.state == "retracting" or inch == 1 then
local y, removed, ended
for i = 1,3 do
y, removed, ended = retract(pos)
if removed then
pcinv:add_item("main", "bitumen:drill_pipe")
end
state.depth = y
if ended or inch == 1 then
break
end
end
elseif state.state == "pump" then
end
-- update the control box formspec
local control_meta = minetest.get_meta(alts.controls)
control_meta:set_string("formspec", get_controls_formspec(state))
meta:set_string("state", minetest.serialize(state))
end
})