Add connection texture in node
This commit is contained in:
parent
7f846b2016
commit
048ff796c4
|
@ -0,0 +1,62 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
local name = minetest.get_current_modname()
|
||||
local path = minetest.get_modpath(name)
|
||||
|
||||
minetest.register_node("owl_tech:base_battery", {
|
||||
description = S("Base baattery"),
|
||||
_doc_items_longdesc = S("Contains electricity"), -- owl_tech_base_battary_side.png
|
||||
tiles = {
|
||||
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_steam_input.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_steam_output.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
},
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {pickaxey=2, owl_tech_electro_battery=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.set_mashine_tire(meta,2)
|
||||
owl_tech:add_electro(pos,32,64000)
|
||||
local timer =minetest.get_node_timer(pos)
|
||||
meta:set_string("infotext",owl_tech.get_pull_volume(meta,1))
|
||||
timer:start(0.2)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
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
|
||||
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_voltage(meta)>=0 then --Send to 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)+owl_tech:get_voltage(meta_up)<=owl_tech:get_charge_max(meta_up) and owl_tech:get_voltage(meta)==owl_tech:get_voltage(meta_up) then
|
||||
owl_tech.send_electro_from_wire_in_pos(meta,{x=pos.x,y=pos.y-1,z=pos.z})
|
||||
end
|
||||
end
|
||||
meta:set_string("infotext",owl_tech:get_charge(meta))
|
||||
timer:start(0.2)
|
||||
end
|
||||
})
|
||||
--Crafte iron fluid pipe
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "owl_tech:bronze_tank",
|
||||
recipe = {
|
||||
{"owl_tech:bronze_plate","owl_tech:bronze_plate","owl_tech:bronze_plate"},
|
||||
{"owl_tech:bronze_plate","mcl_core:glass","owl_tech:bronze_plate"},
|
||||
{"owl_tech:bronze_plate","owl_tech:bronze_fluid_pipe","owl_tech:bronze_plate"}
|
||||
}
|
||||
})
|
|
@ -2,66 +2,4 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
|||
local name = minetest.get_current_modname()
|
||||
local path = minetest.get_modpath(name)
|
||||
|
||||
minetest.register_node("owl_tech:base_battery", {
|
||||
description = S("Base baattery"),
|
||||
_doc_items_longdesc = S("Contains electricity"), -- owl_tech_base_battary_side.png
|
||||
tiles = {
|
||||
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_base_battary_side.png",
|
||||
},
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {pickaxey=2, owl_tech_machine=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.set_mashine_tire(meta,2)
|
||||
owl_tech:add_electro(pos,32,64000)
|
||||
local timer =minetest.get_node_timer(pos)
|
||||
meta:set_string("infotext",owl_tech.get_pull_volume(meta,1))
|
||||
timer:start(0.2)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
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
|
||||
--[[if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})).name,"fluid_pipe") then --sand in pipe
|
||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y-1,z=pos.z})
|
||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,1)
|
||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||
if can_do and can_do2 then
|
||||
owl_tech.add_fluid_in_node_pull(meta_up,fluid_name_to_send,remove_amount,inde_pull)
|
||||
local pull_curent_volume = owl_tech.get_pull_volume(meta,1)
|
||||
local difer = pull_curent_volume-remove_amount
|
||||
owl_tech.set_pull_volume(meta,2,difer)
|
||||
end
|
||||
end]]
|
||||
meta:set_string("infotext",owl_tech:get_charge(meta))
|
||||
timer:start(0.2)
|
||||
end
|
||||
})
|
||||
--Crafte iron fluid pipe
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "owl_tech:bronze_tank",
|
||||
recipe = {
|
||||
{"owl_tech:bronze_plate","owl_tech:bronze_plate","owl_tech:bronze_plate"},
|
||||
{"owl_tech:bronze_plate","mcl_core:glass","owl_tech:bronze_plate"},
|
||||
{"owl_tech:bronze_plate","owl_tech:bronze_fluid_pipe","owl_tech:bronze_plate"}
|
||||
}
|
||||
})
|
||||
dofile(path .. "/battery/battery.lua")
|
|
@ -40,7 +40,7 @@ minetest.register_node("owl_tech:base_steam_turbin", {
|
|||
},
|
||||
is_ground_content = false,
|
||||
stack_max = 64,
|
||||
groups = {pickaxey=2, owl_tech_generator=1 ,fluid_in=1,fuel=1,dst=1 },
|
||||
groups = {pickaxey=2,owl_tech_electro_gen=1 ,fluid_in=1,fuel=1,dst=1 ,owl_tech_generator=1},
|
||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
_mcl_blast_resistance = 6,
|
||||
|
|
|
@ -24,7 +24,7 @@ minetest.register_node("owl_tech:copper_electro_wire",{
|
|||
connect_back = {-0.125,-0.125,-0.125,0.125,0.125,0.5} ,
|
||||
connect_right = {-0.125,-0.125,-0.125,0.5,0.125,0.125} ,
|
||||
},
|
||||
connects_to = {"group:owl_tech_electro_wire","group:owl_tech_electro_mashine","group:owl_tech_electro_gen"},
|
||||
connects_to = {"group:owl_tech_electro_wire","group:owl_tech_electro_mashine","group:owl_tech_electro_gen","group:owl_tech_electro_battery"},
|
||||
sounds = mcl_sounds.node_sound_wool_defaults(),
|
||||
_mcl_hardness = 0.1,
|
||||
_mcl_blast_resistance = 0.1,
|
||||
|
|
|
@ -48,7 +48,7 @@ minetest.register_node("owl_tech:steam_quarry", {
|
|||
description = S("Steam quarry"),
|
||||
_doc_items_longdesc = S("Dig the Hole"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_quary.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_quary.png",
|
||||
|
|
|
@ -36,7 +36,7 @@ minetest.register_node("owl_tech:bronze_macerator", {
|
|||
_doc_items_longdesc = S("Macerate dust"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
@ -178,7 +178,7 @@ minetest.register_node("owl_tech:bronze_alloy_smelter", {
|
|||
_doc_items_longdesc = S("Smelt alll"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
@ -321,7 +321,7 @@ minetest.register_node("owl_tech:bronze_sieve", {
|
|||
_doc_items_longdesc = S("sieve alls"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
@ -462,7 +462,7 @@ minetest.register_node("owl_tech:bronze_forge_hammer", {
|
|||
_doc_items_longdesc = S("Automative forge"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
@ -605,7 +605,7 @@ minetest.register_node("owl_tech:bronze_furnance", {
|
|||
_doc_items_longdesc = S("Just a furnance - but use steam energy"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
@ -730,7 +730,7 @@ minetest.register_node("owl_tech:steel_macerator", {
|
|||
_doc_items_longdesc = S("Macerate dust"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
|
@ -872,7 +872,7 @@ minetest.register_node("owl_tech:steel_alloy_smelter", {
|
|||
_doc_items_longdesc = S("Smelt alll"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
|
@ -1013,7 +1013,7 @@ minetest.register_node("owl_tech:steel_forge_hammer", {
|
|||
_doc_items_longdesc = S("Automative forge"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
|
@ -1126,7 +1126,7 @@ minetest.register_node("owl_tech:steel_furnance", {
|
|||
_doc_items_longdesc = S("Just a furnance - but use steam energy"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
|
|
@ -27,7 +27,7 @@ minetest.register_node("owl_tech:steam_vertical_miner", {
|
|||
description = S("Vertical miner"),
|
||||
_doc_items_longdesc = S("Dig the hole"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_vertical_miner_face.png",
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_vertical_miner_face.png",
|
||||
|
|
|
@ -42,7 +42,7 @@ minetest.register_node("owl_tech:bronze_boiler", {
|
|||
_doc_items_longdesc = S("First wey generate steam"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#a35900:128)^owl_tech_steam_output.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#a35900:128",
|
||||
|
@ -144,7 +144,7 @@ minetest.register_node("owl_tech:steel_boiler", {
|
|||
_doc_items_longdesc = S("Single node to get generate steam"),
|
||||
tiles = {
|
||||
"(owl_tech_base_meshanism_side.png^[colorize:#575757:128)^owl_tech_steam_output.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128^owl_tech_steam_input.png",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
"owl_tech_base_meshanism_side.png^[colorize:#575757:128",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Loading…
Reference in New Issue