Add solid biofuel
This commit is contained in:
parent
52e86cd29d
commit
f2bef40bea
|
@ -49,6 +49,16 @@ function owl_tech.can_smelter_recips_recips_go_in_this_mashien(meta,name,dst_its
|
|||
return ret
|
||||
end
|
||||
--------------------------------
|
||||
-- smelter recips func
|
||||
function owl_tech.can_mixer_recips_recips_go_in_this_mashien(meta,name,dst_its) -- chek for tire , and slots for free space for res and add res
|
||||
local ret =false
|
||||
if MIXER_RESIPS[name][5]<=owl_tech.get_mashine_tire(meta)
|
||||
and (dst_its:is_empty() or(dst_its:get_name()==MIXER_RESIPS[name][3] and dst_its:get_count()+MIXER_RESIPS[name][4]<=dst_its:get_stack_max())) then
|
||||
ret =true
|
||||
end
|
||||
return ret
|
||||
end
|
||||
--------------------------------
|
||||
--"mcl_fire:flint_and_steel"
|
||||
minetest.clear_craft({output = "mcl_fire:flint_and_steel",})
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -55,7 +55,6 @@ minetest.register_node("owl_tech:base_steam_turbin", {
|
|||
local timer =minetest.get_node_timer(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("battari_slot", 1) ---Can charge items in slot WIP
|
||||
|
||||
timer:start(0.2)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
|
@ -63,9 +62,9 @@ minetest.register_node("owl_tech:base_steam_turbin", {
|
|||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("battari_slot", 1)
|
||||
if owl_tech:get_charge_max(meta)-owl_tech:get_charge(meta)>0 and owl_tech.get_pull_volume(meta,1)>=owl_tech:get_voltage(meta)*2 then
|
||||
owl_tech.set_pull_volume(meta,1, owl_tech.get_pull_volume(meta,1)-owl_tech:get_voltage(meta)*2 )
|
||||
owl_tech:set_charge(meta,owl_tech:get_charge(meta)+owl_tech:get_voltage(meta))
|
||||
if owl_tech:get_charge_max(meta)-owl_tech:get_charge(meta)>owl_tech:get_voltage(meta)*2 and owl_tech.get_pull_volume(meta,1)>=owl_tech:get_voltage(meta) then
|
||||
owl_tech.set_pull_volume(meta,1, owl_tech.get_pull_volume(meta,1)-owl_tech:get_voltage(meta) )
|
||||
owl_tech:set_charge(meta,owl_tech:get_charge(meta)+owl_tech:get_voltage(meta)*2)
|
||||
end
|
||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})).name,"fluid_pipe") then --get from pipe steam
|
||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y-1,z=pos.z})
|
||||
|
|
|
@ -26,6 +26,7 @@ local ore_duration = 2
|
|||
local ingot_duration = 4
|
||||
local smel_metal_duration = 4
|
||||
local biomassa_duration =4
|
||||
local mixer_durtation= 2
|
||||
|
||||
-- key-input_name ----1)input_amount 2)recip_tire 3)output_name 4)output_amount 5)duration(use for 100) 6)seconds_chanse(0-100) 7)output_name_second 8)output_amount_second 9)Input full name
|
||||
-- minus 10 key
|
||||
|
@ -58,13 +59,27 @@ MACERATO_RECIPS = {
|
|||
leaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("owl_tech:biomassa"),(1),("mcl_core:leaves")},
|
||||
spruceleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("owl_tech:biomassa"),(1),("mcl_core:spruceleaves")},
|
||||
mangroveleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("owl_tech:biomassa"),(1),("mcl_mangrove:mangroveleaves")},
|
||||
--wood dust
|
||||
tree = {(1),(1),("owl_tech:wood_dust"),(1),(biomassa_duration),(25),("owl_tech:biomassa"),(0),("mcl_core:tree")},
|
||||
darktree = {(1),(1),("owl_tech:wood_dust"),(1),(biomassa_duration),(25),("owl_tech:biomassa"),(0),("mcl_core:darktree")},
|
||||
acaciatree = {(1),(1),("owl_tech:wood_dust"),(1),(biomassa_duration),(25),("owl_tech:biomassa"),(0),("mcl_core:acaciatree")},
|
||||
sprucetree = {(1),(1),("owl_tech:wood_dust"),(1),(biomassa_duration),(25),("owl_tech:biomassa"),(0),("mcl_core:sprucetree")},
|
||||
birchtree = {(1),(1),("owl_tech:wood_dust"),(1),(biomassa_duration),(25),("owl_tech:biomassa"),(0),("mcl_core:birchtree")},
|
||||
jungletree = {(1),(1),("owl_tech:wood_dust"),(1),(biomassa_duration),(25),("owl_tech:biomassa"),(0),("mcl_core:jungletree")},
|
||||
}
|
||||
-- key-input_name ----1)1 input amount 2)2 input amount 3)output name 4)output amount 5)recipt tire 6)duration(use for 100) 7)name 1 input 8)name 2 input
|
||||
SMELTER_RECIPS={
|
||||
tin_ingotcopper_ingot={(1),(3),("owl_tech:bronze_ingot"),(4),(1),(smel_metal_duration),'owl_tech:tin_ingot','owl_tech:copper_ingot'},
|
||||
copper_ingottin_ingot={(3),(1),("owl_tech:bronze_ingot"),(4),(1),(smel_metal_duration),'owl_tech:copper_ingot','owl_tech:tin_ingot'},
|
||||
gold_ingotsilver_ingot={(2),(2),("owl_tech:electrum_ingot"),(4),(1),(smel_metal_duration),'owl_tech:gold_ingot','owl_tech:silver_ingot'},
|
||||
silver_ingotgold_ingot={(2),(2),("owl_tech:electrum_ingot"),(4),(1),(smel_metal_duration),'owl_tech:silver_ingot','owl_tech:gold_ingot'},
|
||||
gold_ingotsilver_ingot={(1),(1),("owl_tech:electrum_ingot"),(1),(1),(smel_metal_duration),'owl_tech:gold_ingot','owl_tech:silver_ingot'},
|
||||
silver_ingotgold_ingot={(1),(1),("owl_tech:electrum_ingot"),(1),(1),(smel_metal_duration),'owl_tech:silver_ingot','owl_tech:gold_ingot'},
|
||||
}
|
||||
MIXER_RESIPS={
|
||||
tin_dustcopper_dust={(1),(3),("owl_tech:bronze_dust"),(4),(1),(mixer_durtation),'owl_tech:tin_dust','owl_tech:copper_dust'},
|
||||
copper_dusttin_dust={(3),(1),("owl_tech:bronze_dust"),(4),(1),(mixer_durtation),'owl_tech:copper_dust','owl_tech:tin_dust'},
|
||||
gold_dustsilver_dust={(1),(1),("owl_tech:electrum_dust"),(2),(1),(mixer_durtation),'owl_tech:gold_dust','owl_tech:silver_dust'},
|
||||
silver_dustgold_dust={(1),(1),("owl_tech:electrum_dust"),(2),(1),(mixer_durtation),'owl_tech:silver_dust','owl_tech:gold_dust'},
|
||||
wood_dustbiomassa={(1),(1),("owl_tech:wood_and_biomass"),(2),(1),(mixer_durtation),'owl_tech:wood_dust','owl_tech:biomassa'},
|
||||
}
|
||||
-- key-input_name ----1)input_amount 2)recip_tire 3)output_name 4)output_amount 5)duration(use for 100) 6)seconds_chanse(0-100) 7)output_name_second 8)output_amount_second 9)Input full name
|
||||
SIEV_RESIPS={
|
||||
|
@ -78,6 +93,14 @@ SIEV_RESIPS={
|
|||
saltpeter_dirt_dust= {(1),(1),("owl_tech:saltpeter_dust"),(2),(ore_duration),(25),("owl_tech:sulfur_dust"),(1),("owl_tech:saltpeter_dirt_dust")},
|
||||
sulfur_dirt_dust= {(1),(1),("owl_tech:sulfur_dust"),(2),(ore_duration),(25),("owl_tech:saltpeter_dust"),(1),("owl_tech:sulfur_dirt_dust")},
|
||||
diamond_dirt_dust= {(1),(1),("owl_tech:diamond_dust"),(2),(ore_duration),(25),("owl_tech:diamond_dust"),(1),("owl_tech:diamond_dirt_dust")},
|
||||
--sapling
|
||||
acacialeaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:acaciasapling"),(1),("mcl_core:acacialeves")},
|
||||
birchleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:birchsapling"),(1),("mcl_core:birchleaves")},
|
||||
darkleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:darksapling"),(1),("mcl_core:darkleaves")},
|
||||
jungleleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:junglesapling"),(1),("mcl_core:jungleleaves")},
|
||||
leaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:sapling"),(1),("mcl_core:leaves")},
|
||||
spruceleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:sprucesapling"),(1),("mcl_core:spruceleaves")},
|
||||
--mangroveleaves = {(1),(2),("owl_tech:biomassa"),(2),(biomassa_duration),(25),("mcl_core:"),(1),("mcl_mangrove:mangroveleaves")},
|
||||
}
|
||||
-- key-input_name ----1)input_amount 2)recip_tire 3)output_name 4)output_amount 5)duration(use for 100) 6)seconds_chanse(0-100) 7)output_name_second 8)output_amount_second 9)Input full name
|
||||
--froge hammer resips
|
||||
|
|
|
@ -4,11 +4,11 @@ local path = minetest.get_modpath(name)
|
|||
|
||||
--[[USE for get tire machine 1)Name 2)name 3)voltage 4)max_charge 5)color_code 6)metal name for crafte 7)has_macerator 8)help item list 9)has_alloy_smeter
|
||||
10)has_siev 11)has_furnance 12)forge hammer 13)has vertical miner 14)delay verticalminer 15)has quarry 16 )distance quarry 17)wood planter 18)wood_chopper 19)distance
|
||||
20)seed planter 21)seed harvester ]]
|
||||
20)seed planter 21)seed harvester 22)has mixer]]
|
||||
|
||||
local table_all_machines={
|
||||
{"Base","base",32,1600,"#575757","steel",true,{"owl_tech:diamond","owl_tech:copper_heat_element","owl_tech:steel_mesh","mesecons_pistons:piston_normal_off","owl_tech:bronze_sharp_blade"},true,true
|
||||
,true,true,true,18,true,16,true,true,2,true,true}
|
||||
,true,true,true,18,true,16,true,true,2,true,true,true}
|
||||
}
|
||||
|
||||
for i = 1, #table_all_machines, 1 do
|
||||
|
@ -1237,4 +1237,147 @@ for i = 1, #table_all_machines, 1 do
|
|||
}
|
||||
})
|
||||
end
|
||||
if table_all_machines[i][22] then
|
||||
--Mixer
|
||||
local function set_formspect_base_alloy_smelter(meta)
|
||||
local max_charge = owl_tech:get_charge_max(meta)
|
||||
local curent_charge = owl_tech:get_charge(meta)
|
||||
local redines = owl_tech.get_item_redines(meta)
|
||||
local formspec = "size[9,8.75]"..
|
||||
"label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
|
||||
"list[current_player;main;0,4.5;9,3;9]"..
|
||||
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
|
||||
"list[current_player;main;0,7.74;9,1;]"..
|
||||
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
|
||||
"label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Steam alloy smelter"))).."]"..
|
||||
"list[context;input_in;2.5,2.5;1,1;]"..
|
||||
mcl_formspec.get_itemslot_bg(2.5,2.5,1,1)..
|
||||
"list[context;input_in_add;4,2.5;1,1;]"..
|
||||
mcl_formspec.get_itemslot_bg(4,2.5,1,1)..
|
||||
"list[context;dst;5.5,1.5;1,1;]"..
|
||||
mcl_formspec.get_itemslot_bg(5.5,1.5,1,1)..
|
||||
"label[0,1.5;"..minetest.formspec_escape(minetest.colorize("#313131", (max_charge.."--"..curent_charge.."--"..table_all_machines[i][3]))).."]"..
|
||||
"label[0,2;"..minetest.formspec_escape(minetest.colorize("#313131", (redines.." / 100"))).."]"..
|
||||
"listring[context;dst]"..
|
||||
"listring[current_player;main]"..
|
||||
"listring[context;input_in]"..
|
||||
"listring[context;input_in_add]"..
|
||||
"listring[current_player;main]"..
|
||||
"listring[current_player;main]"
|
||||
meta:set_string("formspec", formspec)
|
||||
end
|
||||
-------------------------------------------
|
||||
--mixer
|
||||
minetest.register_node("owl_tech:"..table_all_machines[i][2].."_mixer", {
|
||||
description = S( table_all_machines[i][1].." mixer"),
|
||||
_doc_items_longdesc = S("Mixes the dust"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:"..table_all_machines[i][5]..":128)^owl_tech_steam_input.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:"..table_all_machines[i][5]..":128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:"..table_all_machines[i][5]..":128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:"..table_all_machines[i][5]..":128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:"..table_all_machines[i][5]..":128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:"..table_all_machines[i][5]..":128)^owl_tech_mixer.png",
|
||||
},
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {pickaxey=2, owl_tech_machine=1,owl_tech_electro_mashine=1},
|
||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
owl_tech:add_electro(pos,table_all_machines[i][3],table_all_machines[i][4])
|
||||
owl_tech.set_mashine_tire(meta,i+1)
|
||||
owl_tech.reset_item_redines(meta)
|
||||
meta:set_int("eat_in_tick",0)
|
||||
meta:set_int("bonus",0)
|
||||
set_formspect_base_alloy_smelter(meta)
|
||||
local timer =minetest.get_node_timer(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("input_in", 1)
|
||||
inv:set_size("input_in_add", 1)
|
||||
inv:set_size("dst", 1)
|
||||
timer:start(0.2)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local input_its = inv:get_stack('input_in', 1)
|
||||
local input_its_add = inv:get_stack('input_in_add', 1)
|
||||
local dst_its = inv:get_stack('dst', 1)
|
||||
if not input_its:is_empty() then -- chek for item in slots
|
||||
local name1= string.sub(input_its:get_name(), 10)
|
||||
local name2 = string.sub(input_its_add:get_name(), 10)
|
||||
local name =""
|
||||
local recipt_true = false
|
||||
if MIXER_RESIPS[name1..name2]~=nil then
|
||||
recipt_true= true
|
||||
name=name1..name2
|
||||
elseif MIXER_RESIPS[name2..name1]~=nil then
|
||||
recipt_true= true
|
||||
name=name2..name1
|
||||
end
|
||||
if recipt_true and owl_tech.get_item_redines(meta)>0 and owl_tech.get_item_redines(meta)<100 then --recipt real
|
||||
if owl_tech.can_mixer_recips_recips_go_in_this_mashien(meta,name,dst_its) then-- chek for all itemslot and machine tire
|
||||
local steam_new =owl_tech:get_charge(meta)-meta:get_int("eat_in_tick")
|
||||
owl_tech:set_charge(meta,steam_new)
|
||||
owl_tech.add_item_redines(meta,meta:get_int("bonus"))
|
||||
end
|
||||
elseif recipt_true and owl_tech.get_item_redines(meta)>=100 then
|
||||
if owl_tech.can_mixer_recips_recips_go_in_this_mashien(meta,name,dst_its) then-- chek for all itemslot and machine tire
|
||||
input_its:set_count(input_its:get_count()-MIXER_RESIPS[name][1]) --Remove item from input slot
|
||||
inv:set_stack('input_in', 1, input_its)
|
||||
input_its_add:set_count(input_its_add:get_count()-MIXER_RESIPS[name][2]) --Remove item from input slot
|
||||
inv:set_stack('input_in_add', 1, input_its_add )
|
||||
|
||||
if not dst_its:is_empty() then-- Add main output
|
||||
dst_its:set_count(dst_its:get_count()+MIXER_RESIPS[name][4])
|
||||
inv:set_stack('dst', 1, dst_its)
|
||||
else
|
||||
local item ={name=MIXER_RESIPS[name][3], count=MIXER_RESIPS[name][4], wear=0, metadata=""}
|
||||
dst_its:add_item(item)
|
||||
inv:set_stack('dst', 1, dst_its)
|
||||
end
|
||||
meta:set_int("eat_in_tick",0)
|
||||
meta:set_int("bonus",0)
|
||||
owl_tech.reset_item_redines(meta)
|
||||
end
|
||||
elseif recipt_true and 100/MIXER_RESIPS[name][6]*12<=owl_tech:get_charge(meta) and owl_tech.get_item_redines(meta)==0 then --begin for work
|
||||
local amount=owl_tech.calculate_recipe_tire_bonus(meta,MIXER_RESIPS[name][5],MIXER_RESIPS[name][6])
|
||||
meta:set_int("eat_in_tick",((100/MIXER_RESIPS[name][6]*12)/(100/amount)))
|
||||
meta:set_int("bonus",amount)
|
||||
local steam_new =owl_tech:get_charge(meta)-meta:get_int("eat_in_tick")
|
||||
owl_tech:set_charge(meta,steam_new)
|
||||
owl_tech.add_item_redines(meta,meta:get_int("bonus"))
|
||||
end
|
||||
|
||||
else
|
||||
owl_tech.reset_item_redines(meta)
|
||||
end
|
||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})).name,"owl_tech_electro_wire")>0
|
||||
and owl_tech:get_charge_max(meta)-owl_tech:get_charge(meta)>=owl_tech:get_voltage(meta) then --get from wire electro
|
||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if owl_tech:get_charge(meta_up)>0 and owl_tech:get_voltage(meta)==owl_tech:get_voltage(meta_up) then
|
||||
owl_tech.send_electro_from_wire_in_pos(meta_up,pos)
|
||||
end
|
||||
end
|
||||
meta:set_string("infotext",owl_tech:get_charge(meta))
|
||||
set_formspect_base_alloy_smelter(meta)
|
||||
timer:start(0.2)
|
||||
end
|
||||
})
|
||||
--Crafte controller
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "owl_tech:"..table_all_machines[i][2].."_mixer",
|
||||
recipe = {
|
||||
{"owl_tech:"..table_all_machines[i][6].."_plate",table_all_machines[i][8][5],"owl_tech:"..table_all_machines[i][6].."_plate"},
|
||||
{"owl_tech:circuit_tire_"..i,"owl_tech:"..table_all_machines[i][6].."_frames","owl_tech:circuit_tire_"..i},
|
||||
{"owl_tech:"..table_all_machines[i][6].."_plate","owl_tech:"..table_all_machines[i][6].."_plate","owl_tech:"..table_all_machines[i][6].."_plate"}
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
|
@ -631,6 +631,7 @@ minetest.register_node("owl_tech:wood_pyrolis", {
|
|||
_mcl_hardness = 5,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_int("recipt_type",0) --0 nil 1 wood in charcola 2 biomas in solid_biofuel
|
||||
owl_tech.set_mashine_tire(meta,2) --all steam mishine has 1 tire
|
||||
owl_tech.reset_item_redines(meta)
|
||||
local timer =minetest.get_node_timer(pos)
|
||||
|
@ -664,6 +665,7 @@ minetest.register_node("owl_tech:wood_pyrolis", {
|
|||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output")
|
||||
)
|
||||
--woood pyrolis
|
||||
if owl_tech.get_item_redines(meta)>0 and owl_tech.get_item_redines(meta)<100 then
|
||||
if input_stack:get_count()>=4 and (output_stack:get_free_space()>=6 or output_stack:is_empty())
|
||||
and minetest.get_item_group(input_stack:get_name(),"tree")>0 and (output_stack:get_name()=="mcl_core:charcoal_lump" or output_stack:is_empty())
|
||||
|
@ -671,7 +673,8 @@ minetest.register_node("owl_tech:wood_pyrolis", {
|
|||
and owl_tech:get_max_volume_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"))-fluid_output>=250 then --has bonus coal
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"))-fluid_output>=250
|
||||
and meta:get_int("recipt_type")==1 then --has bonus coal
|
||||
owl_tech.add_item_redines(meta,5)
|
||||
owl_tech:set_charge_in_hatch_pos(owl_tech:get_hatch_ofset_X(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Y(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Z(meta,1,"energy_hatch_input")
|
||||
,input_energy-5)
|
||||
|
@ -683,12 +686,14 @@ minetest.register_node("owl_tech:wood_pyrolis", {
|
|||
and owl_tech:get_max_volume_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"))-fluid_output>=250 then --has bonus coal
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"))-fluid_output>=250
|
||||
and meta:get_int("recipt_type")==0 then --has bonus coal
|
||||
meta:set_int("recipt_type",1)
|
||||
owl_tech.add_item_redines(meta,5)
|
||||
owl_tech:set_charge_in_hatch_pos(owl_tech:get_hatch_ofset_X(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Y(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Z(meta,1,"energy_hatch_input")
|
||||
,input_energy-5)
|
||||
end
|
||||
if owl_tech.get_item_redines(meta)>=100 then
|
||||
if owl_tech.get_item_redines(meta)>=100 and meta:get_int("recipt_type")==1 then
|
||||
if not output_stack:is_empty() then-- Add main output
|
||||
output_stack:set_count(output_stack:get_count()+6)
|
||||
owl_tech:set_item_in_input_output_pos(
|
||||
|
@ -726,6 +731,76 @@ minetest.register_node("owl_tech:wood_pyrolis", {
|
|||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"),fluid_output+250)
|
||||
end
|
||||
meta:set_int("recipt_type",0)
|
||||
owl_tech.reset_item_redines(meta)
|
||||
end
|
||||
--biomas make
|
||||
if owl_tech.get_item_redines(meta)>0 and owl_tech.get_item_redines(meta)<100 then
|
||||
if input_stack:get_count()>=4 and (output_stack:get_free_space()>=6 or output_stack:is_empty())
|
||||
and input_stack:get_name()=="owl_tech:wood_and_biomass" and (output_stack:get_name()=="owl_tech:solid_biofuel" or output_stack:is_empty())
|
||||
and input_energy>=100
|
||||
and owl_tech:get_max_volume_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"))-fluid_output>=250
|
||||
and meta:get_int("recipt_type")==2 then --has bonus coal
|
||||
owl_tech.add_item_redines(meta,5)
|
||||
owl_tech:set_charge_in_hatch_pos(owl_tech:get_hatch_ofset_X(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Y(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Z(meta,1,"energy_hatch_input")
|
||||
,input_energy-5)
|
||||
end
|
||||
end
|
||||
if owl_tech.get_item_redines(meta)==0 and input_stack:get_count()>=4 and (output_stack:get_free_space()>=6 or output_stack:is_empty())
|
||||
and input_stack:get_name()=="owl_tech:wood_and_biomass" and (output_stack:get_name()=="owl_tech:solid_biofuel" or output_stack:is_empty())
|
||||
and input_energy>=100
|
||||
and owl_tech:get_max_volume_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"))-fluid_output>=250
|
||||
and meta:get_int("recipt_type")==0 then --has bonus coal
|
||||
meta:set_int("recipt_type",2)
|
||||
owl_tech.add_item_redines(meta,5)
|
||||
owl_tech:set_charge_in_hatch_pos(owl_tech:get_hatch_ofset_X(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Y(meta,1,"energy_hatch_input"),owl_tech:get_hatch_ofset_Z(meta,1,"energy_hatch_input")
|
||||
,input_energy-5)
|
||||
end
|
||||
if owl_tech.get_item_redines(meta)>=100 and meta:get_int("recipt_type")==2 then
|
||||
if not output_stack:is_empty() then-- Add main output
|
||||
output_stack:set_count(output_stack:get_count()+6)
|
||||
owl_tech:set_item_in_input_output_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"item_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"item_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"item_hatch_output"),output_stack
|
||||
)
|
||||
else
|
||||
local item ={name="owl_tech:solid_biofuel", count=6, wear=0, metadata=""}
|
||||
output_stack:add_item(item)
|
||||
owl_tech:set_item_in_input_output_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"item_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"item_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"item_hatch_output"),output_stack
|
||||
)
|
||||
end
|
||||
input_stack:set_count(input_stack:get_count()-4)
|
||||
owl_tech:set_item_in_input_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"item_hatch_input"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"item_hatch_input"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"item_hatch_input"),input_stack
|
||||
)
|
||||
if fluid_output==0 then
|
||||
owl_tech:set_volume_amount_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"),250)
|
||||
owl_tech:set_name_fluid_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"),"owl_tech:tar_source")
|
||||
else
|
||||
owl_tech:set_volume_amount_in_hatch_pos(
|
||||
owl_tech:get_hatch_ofset_X(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Y(meta,1,"fluid_hatch_output"),
|
||||
owl_tech:get_hatch_ofset_Z(meta,1,"fluid_hatch_output"),fluid_output+250)
|
||||
end
|
||||
meta:set_int("recipt_type",0)
|
||||
owl_tech.reset_item_redines(meta)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -820,6 +820,7 @@ end
|
|||
|
||||
local gems_orew_array={
|
||||
{"coal","Coal ",true,1,"#1b1b1b","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",80},
|
||||
{"solid_biofuel","Solid biofuel ",false,1,"#0e3000","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",160},
|
||||
{"sulfur","Sulfur ",true,1,"#c2a800","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",0},
|
||||
{"saltpeter","Saltpeter ",true,1,"#b3e6ee","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",0},
|
||||
{"diamond","Diamond ",true,3,"#77cefb","owl_tech_gem_2.png","owl_tech_gem_block_2.png","owl_tech_dust_block_1.png",0},
|
||||
|
@ -891,6 +892,11 @@ for i, value in ipairs(gems_orew_array) do
|
|||
recipe = "owl_tech:"..gems_orew_array[i][1],
|
||||
burntime = gems_orew_array[i][9],
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "owl_tech:"..gems_orew_array[i][1].."_dust",
|
||||
burntime = gems_orew_array[i][9],
|
||||
})
|
||||
end
|
||||
--Block
|
||||
minetest.register_node("owl_tech:"..gems_orew_array[i][1].."_block", {
|
||||
|
@ -1310,8 +1316,24 @@ minetest.register_craft({
|
|||
--biomassa
|
||||
minetest.register_craftitem("owl_tech:biomassa", {
|
||||
description = S("Biomassa"),
|
||||
_doc_items_longdesc = S("Use for crete bioful ore bigas"),
|
||||
_doc_items_longdesc = S("Get from leavs"),
|
||||
inventory_image = "owl_tech_boimassa.png",
|
||||
stack_max = 64,
|
||||
groups = { craftitem=1 },
|
||||
})
|
||||
--wood dust
|
||||
minetest.register_craftitem("owl_tech:wood_dust", {
|
||||
description = S("Wood dust"),
|
||||
_doc_items_longdesc = S("Get from wood log "),
|
||||
inventory_image = "owl_tech_dust.png^[colorize:#643c0b:128",
|
||||
stack_max = 64,
|
||||
groups = { craftitem=1 },
|
||||
})
|
||||
--wood dust and biomass
|
||||
minetest.register_craftitem("owl_tech:wood_and_biomass", {
|
||||
description = S("Wood dust and biomass"),
|
||||
_doc_items_longdesc = S("Get from wood log use for get biofule"),
|
||||
inventory_image = "owl_tech_dust.png^[colorize:#8d6b00:128",
|
||||
stack_max = 64,
|
||||
groups = { craftitem=1 },
|
||||
})
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Loading…
Reference in New Issue