lots of tweaks and fixes
parent
095e48f4e2
commit
ac2b0f1b13
|
@ -12,11 +12,6 @@ minetest.register_craftitem("bitumen:blueprint_paper", {
|
||||||
groups = {flammable = 3},
|
groups = {flammable = 3},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = "shapeless",
|
|
||||||
output = "bitumen:blueprint_paper",
|
|
||||||
recipe = {"default:paper", "dye:blue"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("bitumen:blueprint_book", {
|
minetest.register_craftitem("bitumen:blueprint_book", {
|
||||||
description = "Blueprint Paper",
|
description = "Blueprint Paper",
|
||||||
|
@ -27,14 +22,6 @@ minetest.register_craftitem("bitumen:blueprint_book", {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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'},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
18
burner.lua
18
burner.lua
|
@ -33,6 +33,24 @@ local function grab_fuel(inv)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
bitumen.get_melter_active_formspec = function(fuel_percent, item_percent)
|
||||||
|
fuel_percent = fuel_percent or 0
|
||||||
|
item_percent = item_percent or 0
|
||||||
|
return "size[8,8.5]"..
|
||||||
|
default.gui_bg..
|
||||||
|
default.gui_bg_img..
|
||||||
|
default.gui_slots..
|
||||||
|
"list[context;fuel;.75,.5;2,4;]"..
|
||||||
|
"image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
|
||||||
|
(100-fuel_percent)..":default_furnace_fire_fg.png]"..
|
||||||
|
"image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
|
||||||
|
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
|
||||||
|
"list[current_player;main;0,4.25;8,1;]"..
|
||||||
|
"list[current_player;main;0,5.5;8,3;8]"..
|
||||||
|
default.get_hotbar_bg(0, 4.25)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
bitumen.register_burner = function(nodes, callbacks)
|
bitumen.register_burner = function(nodes, callbacks)
|
||||||
local default_callbacks = {
|
local default_callbacks = {
|
||||||
grab_fuel = grab_fuel, -- needs to return the fuel time
|
grab_fuel = grab_fuel, -- needs to return the fuel time
|
||||||
|
|
111
concrete.lua
111
concrete.lua
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("bitumen:concrete", {
|
minetest.register_node("bitumen:concrete", {
|
||||||
description = "Foundation Concrete",
|
description = "Foundation Concrete",
|
||||||
drawtype = "normal",
|
drawtype = "normal",
|
||||||
|
@ -142,54 +143,8 @@ minetest.register_node("bitumen:lime", {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
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
|
-- 1 part cement
|
||||||
|
@ -198,67 +153,3 @@ minetest.register_ore({
|
||||||
-- 3 parts gravel
|
-- 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" }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
172
crafts.lua
172
crafts.lua
|
@ -1,12 +1,176 @@
|
||||||
|
|
||||||
|
|
||||||
|
-- pipes
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'bitumen:drill_pipe 12',
|
output = "bitumen:pipe 6",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{"", "", ""},
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "bitumen:intake 1",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {"bitumen:pipe", "default:tin_ingot"},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "bitumen:spout 1",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {"bitumen:pipe", "default:copper_ingot"},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- drilling
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'bitumen:drill_pipe 6',
|
||||||
|
recipe = {
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- concrete
|
||||||
|
|
||||||
|
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_craft({
|
||||||
|
output = 'bitumen:mineral_oil_furnace 1',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||||
|
{'default:steel_ingot', 'bitumen:mineral_oil_furnace_blueprint', 'default:steel_ingot'},
|
||||||
|
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- concrete's recipe is:
|
||||||
|
-- ---------------------
|
||||||
|
-- 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" }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- blueprints
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "bitumen:blueprint_paper",
|
||||||
|
recipe = {"default:paper", "dye:blue"},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'bitumen:blueprint_book',
|
||||||
|
recipe = {
|
||||||
|
{'bitumen:blueprint_paper'},
|
||||||
|
{'bitumen:blueprint_paper'},
|
||||||
|
{'bitumen:blueprint_paper'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
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'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
106
init.lua
106
init.lua
|
@ -161,3 +161,109 @@ minetest.register_abm({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local function get_chest_formspec(pos)
|
||||||
|
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
|
||||||
|
local formspec =
|
||||||
|
"size[14,12]" ..
|
||||||
|
default.gui_bg ..
|
||||||
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[nodemeta:" .. spos .. ";main;0,0.3;14,7;]" ..
|
||||||
|
"list[current_player;main;3,7.85;8,1;]" ..
|
||||||
|
"list[current_player;main;3,9.08;8,3;8]" ..
|
||||||
|
"listring[nodemeta:" .. spos .. ";main]" ..
|
||||||
|
"listring[current_player;main]" ..
|
||||||
|
default.get_hotbar_bg(3,7.85)
|
||||||
|
return formspec
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("bitumen:large_chest", {
|
||||||
|
description = "Large Chest",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {"default_chest_side.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {cracky = 2, oddly_breakable_by_hand = 3},
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
|
||||||
|
inv:set_size("main", 14*7 )
|
||||||
|
meta:set_string("formspec", get_chest_formspec(pos))
|
||||||
|
end,
|
||||||
|
can_dig = function(pos,player)
|
||||||
|
local meta = minetest.get_meta(pos);
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return inv:is_empty("main") and
|
||||||
|
default.can_interact_with_node(player, pos)
|
||||||
|
end,
|
||||||
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
|
||||||
|
local name = stack:get_name()
|
||||||
|
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local minv = meta:get_inventory()
|
||||||
|
local pinv = player:get_inventory()
|
||||||
|
local sz = pinv:get_size("main")
|
||||||
|
|
||||||
|
for i = 1,sz do
|
||||||
|
local s = pinv:get_stack("main", i)
|
||||||
|
if s and s:get_name() == name then
|
||||||
|
|
||||||
|
local lo = minv:add_item("main", s)
|
||||||
|
if lo and lo:get_count() > 0 then
|
||||||
|
pinv:set_stack("main", i, lo)
|
||||||
|
break
|
||||||
|
else
|
||||||
|
pinv:set_stack("main", i, nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
|
||||||
|
local name = stack:get_name()
|
||||||
|
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local minv = meta:get_inventory()
|
||||||
|
local pinv = player:get_inventory()
|
||||||
|
local sz = minv:get_size("main")
|
||||||
|
|
||||||
|
for i = 1,sz do
|
||||||
|
local s = minv:get_stack("main", i)
|
||||||
|
if s and s:get_name() == name then
|
||||||
|
|
||||||
|
local lo = pinv:add_item("main", s)
|
||||||
|
if lo and lo:get_count() > 0 then
|
||||||
|
minv:set_stack("main", i, lo)
|
||||||
|
break
|
||||||
|
else
|
||||||
|
minv:set_stack("main", i, nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'bitumen:large_chest',
|
||||||
|
recipe = {
|
||||||
|
{'group:wood', 'group:wood', 'group:wood'},
|
||||||
|
{'group:wood', 'default:chest', 'group:wood'},
|
||||||
|
{'group:wood', 'group:wood', 'group:wood'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
@ -14,6 +14,19 @@ bitumen.magic = {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- used to create a large collision box because minetest doesn't allow ones bigger than 3x3x3
|
||||||
|
minetest.register_node("bitumen:collision_node", {
|
||||||
|
paramtype = "light",
|
||||||
|
drawtype = "airlike",
|
||||||
|
--tiles = {"default_mese.png"},
|
||||||
|
walkable = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function add(a, b)
|
local function add(a, b)
|
||||||
return {
|
return {
|
||||||
x = a.x + b[1],
|
x = a.x + b[1],
|
||||||
|
|
146
oilshale.lua
146
oilshale.lua
|
@ -28,14 +28,14 @@ minetest.register_node( "bitumen:tar_sand", {
|
||||||
description = "Tar Sand",
|
description = "Tar Sand",
|
||||||
tiles = { "default_sand.png^[colorize:black:180" },
|
tiles = { "default_sand.png^[colorize:black:180" },
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {crumbly=2, falling_node=1},
|
groups = {crumbly=2, bitumen_mineral = 1, falling_node=1},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
})
|
})
|
||||||
minetest.register_node( "bitumen:oil_shale", {
|
minetest.register_node( "bitumen:oil_shale", {
|
||||||
description = "Oil Shale",
|
description = "Oil Shale",
|
||||||
tiles = { "default_stone.png^[colorize:black:180" },
|
tiles = { "default_stone.png^[colorize:black:180" },
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {cracky=2, },
|
groups = {cracky=2, bitumen_mineral = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -56,27 +56,9 @@ end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function get_melter_active_formspec(fuel_percent, item_percent)
|
|
||||||
fuel_percent = fuel_percent or 0
|
|
||||||
item_percent = item_percent or 0
|
|
||||||
return "size[8,8.5]"..
|
|
||||||
default.gui_bg..
|
|
||||||
default.gui_bg_img..
|
|
||||||
default.gui_slots..
|
|
||||||
"list[context;fuel;.75,.5;2,4;]"..
|
|
||||||
"image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
|
|
||||||
(100-fuel_percent)..":default_furnace_fire_fg.png]"..
|
|
||||||
"image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
|
|
||||||
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
|
|
||||||
"list[current_player;main;0,4.25;8,1;]"..
|
|
||||||
"list[current_player;main;0,5.5;8,3;8]"..
|
|
||||||
default.get_hotbar_bg(0, 4.25)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
bitumen.get_melter_active_formspec = get_melter_active_formspec
|
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
local function grab_fuel(inv)
|
local function grab_fuel(inv)
|
||||||
|
|
||||||
local list = inv:get_list("fuel")
|
local list = inv:get_list("fuel")
|
||||||
|
@ -103,13 +85,131 @@ local function grab_fuel(inv)
|
||||||
return 0 -- no fuel found
|
return 0 -- no fuel found
|
||||||
end
|
end
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
bitumen.register_burner({"bitumen:mineral_oil_furnace_on"}, {
|
||||||
|
start_cook = function(pos)
|
||||||
|
local up = {x=pos.x, y=pos.y + 1, z=pos.z}
|
||||||
|
local meta = minetest.get_meta(up)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
|
||||||
|
local item = inv:remove_item("main", "bitumen:tar_sand 1")
|
||||||
|
if item == nil or item:get_count() <= 0 then
|
||||||
|
item = inv:remove_item("main", "bitumen:oil_shale 1")
|
||||||
|
if item == nil or item:get_count() <= 0 then
|
||||||
|
print("no minerals")
|
||||||
|
return 0 -- no minerals to melt
|
||||||
|
end
|
||||||
|
|
||||||
|
return 6 -- oil shale takes longer
|
||||||
|
end
|
||||||
|
|
||||||
|
return 4
|
||||||
|
end,
|
||||||
|
finish_cook = function(pos)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
|
||||||
|
local back_dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
local backpos = vector.add(pos, back_dir)
|
||||||
|
local backnet = bitumen.pipes.get_net(backpos)
|
||||||
|
if backnet == nil then
|
||||||
|
print("mineral furnace no backnet at "..minetest.pos_to_string(backpos))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pushed = bitumen.pipes.push_fluid(backpos, "bitumen:crude_oil", 32, 2)
|
||||||
|
|
||||||
|
end,
|
||||||
|
get_formspec_on = get_melter_active_formspec,
|
||||||
|
turn_off = function(pos)
|
||||||
|
swap_node(pos, "bitumen:mineral_oil_furnace")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("bitumen:mineral_oil_furnace", {
|
||||||
|
description = "Mineral Deposit Furnace",
|
||||||
|
tiles = {
|
||||||
|
"default_bronze_block.png", "default_bronze_block.png",
|
||||||
|
"default_bronze_block.png", "default_bronze_block.png",
|
||||||
|
"default_bronze_block.png", "default_furnace_front.png",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=2, petroleum_fixture=1},
|
||||||
|
is_ground_content = false,
|
||||||
|
on_place = minetest.rotate_node,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
--can_dig = can_dig,
|
||||||
|
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("formspec", bitumen.get_melter_active_formspec())
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size('fuel', 4)
|
||||||
|
|
||||||
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
|
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_punch = function(pos)
|
||||||
|
swap_node(pos, "bitumen:mineral_oil_furnace_on")
|
||||||
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("bitumen:mineral_oil_furnace_on", {
|
||||||
|
description = "Mineral Deposit Furnace (Active)",
|
||||||
|
tiles = {
|
||||||
|
"default_bronze_block.png", "default_bronze_block.png",
|
||||||
|
"default_bronze_block.png", "default_bronze_block.png",
|
||||||
|
"default_bronze_block.png", {
|
||||||
|
image = "default_furnace_front_active.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 16,
|
||||||
|
aspect_h = 16,
|
||||||
|
length = 1.5
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=2, petroleum_fixture=1},
|
||||||
|
is_ground_content = false,
|
||||||
|
on_place = minetest.rotate_node,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
--can_dig = can_dig,
|
||||||
|
|
||||||
|
on_timer = bitumen.burner_on_timer,
|
||||||
|
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("formspec", bitumen.get_melter_active_formspec())
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size('fuel', 4)
|
||||||
|
|
||||||
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
|
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_punch = function(pos)
|
||||||
|
swap_node(pos, "bitumen:mineral_oil_furnace")
|
||||||
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bitumen.register_blueprint({name="bitumen:mineral_oil_furnace"})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -241,7 +341,7 @@ minetest.register_node("bitumen:engine_on", {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
26
ore_gen.lua
26
ore_gen.lua
|
@ -8,8 +8,8 @@ minetest.register_ore({
|
||||||
clust_scarcity = 64 * 64 * 64,
|
clust_scarcity = 64 * 64 * 64,
|
||||||
-- clust_scarcity = 16 * 16 * 16,
|
-- clust_scarcity = 16 * 16 * 16,
|
||||||
clust_size = 30,
|
clust_size = 30,
|
||||||
y_min = -10000,
|
y_min = -32000,
|
||||||
y_max = -500,
|
y_max = -1000,
|
||||||
noise_threshold = 0.04,
|
noise_threshold = 0.04,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.5,
|
offset = 0.5,
|
||||||
|
@ -81,6 +81,28 @@ minetest.register_ore({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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"}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
22
pipes.lua
22
pipes.lua
|
@ -662,25 +662,3 @@ minetest.register_node("bitumen:pipe", {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "bitumen:pipe 3",
|
|
||||||
recipe = {
|
|
||||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
|
||||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
|
||||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "bitumen:intake 1",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {"bitumen:pipe", "default:tin_ingot"},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "bitumen:spout 1",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {"bitumen:pipe", "default:copper_ingot"},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -221,14 +221,3 @@ minetest.register_abm({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- used to create a large collision box because minetest doesn't allow ones bigger than 3x3x3
|
|
||||||
minetest.register_node("bitumen:collision_node", {
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "airlike",
|
|
||||||
--tiles = {"default_mese.png"},
|
|
||||||
walkable = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
15
wells.lua
15
wells.lua
|
@ -178,7 +178,12 @@ local function drill(pos)
|
||||||
|
|
||||||
meta:set_string("drilldepth", minetest.serialize(dp))
|
meta:set_string("drilldepth", minetest.serialize(dp))
|
||||||
|
|
||||||
return minetest.registered_nodes[n.name].description, dp.y, hit_oil
|
local desc = minetest.registered_nodes[n.name].description
|
||||||
|
if n.name == "air" then
|
||||||
|
desc = "Air" -- because of a cheeky description in the default game
|
||||||
|
end
|
||||||
|
|
||||||
|
return desc, dp.y, hit_oil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -617,8 +622,14 @@ minetest.register_abm({
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif state.state == "pump" then
|
elseif state.state == "pump" then
|
||||||
|
local expos = alts.mud_extractor
|
||||||
|
local exnet = bitumen.pipes.get_net(expos)
|
||||||
|
if exnet.fluid == "bitumen:crude_oil" then
|
||||||
|
-- pump oil
|
||||||
|
else
|
||||||
|
-- must empty the mud out of the pipe first
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue