Fix issing textures and recipes. Small optimalizations.

This commit is contained in:
SFENCE 2022-04-30 19:38:46 +02:00
parent 26c5208ee7
commit e527f5c1c5
12 changed files with 110 additions and 10 deletions

View File

@ -44,7 +44,7 @@ power_generators.combustion_engine_6c = appliances.appliance:new(
node_name_active = "power_generators:combustion_engine_6c_active", node_name_active = "power_generators:combustion_engine_6c_active",
node_description = S("Combustion engine"), node_description = S("Combustion engine"),
node_help = S("Fill it with liquid fuel.").."\n"..S("Use this for generate 150 unit of energy.").."\n"..S("Startup and Shutdown by punch."), node_help = S("Can be greased.").."\n"..S("Use this for generate shaft power up to @1.", "283k").."\n"..S("Fuel supply open and close by punch.").."\n"..S("Place fuel tank on top."),
input_stack_size = 0, input_stack_size = 0,
have_input = false, have_input = false,
@ -57,7 +57,7 @@ power_generators.combustion_engine_6c = appliances.appliance:new(
have_control = true, have_control = true,
_shaft_sides = _shaft_sides, _shaft_sides = _shaft_sides,
_friction = 10, _friction = 30,
_I = 150, _I = 150,
-- maxP per step is (maxT/I)*I -- maxP per step is (maxT/I)*I
_coef0 = -1768.3608*2.5, _coef0 = -1768.3608*2.5,
@ -117,7 +117,8 @@ function combustion_engine_6c:get_formspec(meta, production_percent, consumption
"background[-1.25,-1.25;8,10;appliances_appliance_formspec.png]" .. "background[-1.25,-1.25;8,10;appliances_appliance_formspec.png]" ..
"scrollbaroptions[min=200;max=1200;smallstep=1;largestep=20]" .. "scrollbaroptions[min=200;max=1200;smallstep=1;largestep=20]" ..
bar .. bar ..
"label[1.5,8;"..minetest.formspec_escape(S("Throttle @1", throttle)).."]"; "style_type[label;textcolor=black]" ..
"label[2,8;"..minetest.formspec_escape(S("Throttle @1%", math.round(throttle*100))).."]";
return formspec; return formspec;
end end

View File

@ -0,0 +1,8 @@
local S = power_generators.translator
minetest.register_craftitem("power_generators:fuel_hosepipe", {
description = S("Fuel housepipe"),
inventory_image = "power_generators_fuel_hosepipe.png",
})

View File

@ -131,3 +131,6 @@ minetest.register_node("power_generators:fuel_tank", {
update_info(pos, {name="power_generators:fuel_tank"}, meta) update_info(pos, {name="power_generators:fuel_tank"}, meta)
end, end,
}) })
appliances.add_item_help("power_generators:fuel_tank", S("Fill it with liquid fuel by puncing."))

View File

@ -11,11 +11,11 @@ local _shaft_sides = {"front", "back", "top"}
power_generators.ce_gearbox = appliances.appliance:new( power_generators.ce_gearbox = appliances.appliance:new(
{ {
node_name_inactive = "power_generators:ce_gearbox", node_name_inactive = "power_generators:gearbox",
node_name_active = "power_generators:ce_gearbox_active", node_name_active = "power_generators:gearbox_active",
node_description = S("Combustion engine gear box"), node_description = S("Gearbox for Combustion Engine with External Starter"),
node_help = S("Fill it with liquid fuel.").."\n"..S("Use this for generate 150 unit of energy.").."\n"..S("Startup and Shutdown by punch."), node_help = S("Can be greased.").."\n"..S("Change gear by punch (neutral/shaft/starter).").."\n"..S("Place starter on top."),
input_stack_size = 0, input_stack_size = 0,
have_input = false, have_input = false,

View File

@ -14,3 +14,5 @@ dofile(modpath.."/starter_manual.lua")
dofile(modpath.."/adaptation.lua") dofile(modpath.."/adaptation.lua")
dofile(modpath.."/craftitems.lua")

View File

@ -31,7 +31,7 @@ power_generators.starter_manual = appliances.appliance:new(
node_name_active = "power_generators:starter_manual_active", node_name_active = "power_generators:starter_manual_active",
node_description = S("Combustion Engine Manual Starter"), node_description = S("Combustion Engine Manual Starter"),
node_help = S("Fill it with liquid fuel.").."\n"..S("Use this for generate 150 unit of energy.").."\n"..S("Startup and Shutdown by punch."), node_help = S("Can be greased.").."\n"..S("Crank up starter by punching."),
input_stack_size = 0, input_stack_size = 0,
have_input = false, have_input = false,

View File

@ -23,6 +23,9 @@ local items = {
glow_crystal = "default:mese_crystal_fragment", glow_crystal = "default:mese_crystal_fragment",
dye_yellow = "dye:yellow", dye_yellow = "dye:yellow",
valve = "pipeworks:valve_off_empty",
rubber = "technic:rubber",
} }
if minetest.get_modpath("hades_core") then if minetest.get_modpath("hades_core") then
@ -56,6 +59,8 @@ if minetest.get_modpath("technic") then
items.controller = "technic:control_logic_unit" items.controller = "technic:control_logic_unit"
items.transformer = "technic:lv_transformer" items.transformer = "technic:lv_transformer"
items.rubber = "technic:rubber"
end end
if minetest.get_modpath("hades_technic") then if minetest.get_modpath("hades_technic") then
@ -65,6 +70,8 @@ if minetest.get_modpath("hades_technic") then
items.controller = "hades_technic:control_logic_unit" items.controller = "hades_technic:control_logic_unit"
items.transformer = "hades_technic:lv_transformer" items.transformer = "hades_technic:lv_transformer"
items.rubber = "hades_technic:rubber"
end end
minetest.register_craft({ minetest.register_craft({
@ -141,11 +148,10 @@ minetest.register_craft({
} }
}) })
--[[
minetest.register_craft({ minetest.register_craft({
output = "power_generators:combustion_engine_body_4", output = "power_generators:combustion_engine_body_4",
recipe = { recipe = {
{items.metal_ingot, items.metal_ingot, items.metal_ingot}, {items.metal_ingot, items.metal_ingot},
{"power_generators:combustion_engine_body_2","power_generators:combustion_engine_body_2"}, {"power_generators:combustion_engine_body_2","power_generators:combustion_engine_body_2"},
{"power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft"}, {"power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft"},
} }
@ -159,6 +165,17 @@ minetest.register_craft({
{"power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft"}, {"power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft"},
} }
}) })
--[[
minetest.register_craft({
output = "power_generators:combustion_engine_body_8",
recipe = {
{items.metal_ingot, items.metal_ingot},
{"power_generators:combustion_engine_body_4","power_generators:combustion_engine_body_4"},
{"power_generators:combustion_engine_crankshaft","power_generators:combustion_engine_crankshaft"},
}
})
--]] --]]
minetest.register_craft({ minetest.register_craft({
@ -179,6 +196,15 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "power_generators:combustion_engine_six_cylinders",
recipe = {
{items.metal_ingot, "", items.metal_ingot},
{items.copper_wire, "power_generators:combustion_engine_body_6", items.copper_wire},
{items.metal_ingot, "power_generators:shaft", items.metal_ingot},
}
})
minetest.register_craft({ minetest.register_craft({
output = "power_generators:combustion_engine_gearbox", output = "power_generators:combustion_engine_gearbox",
recipe = { recipe = {
@ -233,6 +259,62 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "power_generators:fuel_hosepipe",
recipe = {
{"",items.rubber,""},
{items.rubber,"",items.rubber},
{"",items.rubber,""},
}
})
minetest.register_craft({
output = "power_generators:fuel_tank",
recipe = {
{"","power_generators:combustion_engine_fuel_tank",items.rubber},
{"power_generators:combustion_engine_fuel_tank","power_generators:framework","power_generators:combustion_engine_fuel_tank"},
{"","power_generators:combustion_engine_fuel_tank","power_generators:fuel_hosepipe"},
}
})
minetest.register_craft({
output = "power_generators:gearbox",
recipe = {
{items.steel_strip,items.steel_strip,"power_generators:combustion_engine_gearbox"},
{items.steel_strip,"power_generators:framework","power_generators:shaft"},
{"power_generators:combustion_engine_gearbox","power_generators:shaft","power_generators:combustion_engine_gearbox"},
}
})
minetest.register_craft({
output = "power_generators:starter_manual",
recipe = {
{"power_generators:carbon_steel_bar",items.steel_strip,"power_generators:carbon_steel_bar"},
{items.steel_strip,"power_generators:framework","power_generators:shaft"},
{"power_generators:combustion_engine_gearbox","power_generators:shaft","power_generators:combustion_engine_gearbox"},
}
})
minetest.register_craft({
output = "power_generators:combustion_engine_6c",
recipe = {
{"power_generators:framework","power_generators:fuel_hosepipe"},
{items.steel_strip,items.valve},
{"power_generators:shaft","power_generators:combustion_engine_six_cylinders"},
}
})
--[[
minetest.register_craft({
output = "power_generators:combustion_engine_8c",
recipe = {
{"power_generators:framework","power_generators:fuel_hosepipe"},
{items.steel_strip,items.steel_strip},
{"power_generators:shaft","power_generators:combustion_engine_eight_cylinders"},
}
})
--]]
minetest.register_craft({ minetest.register_craft({
output = "power_generators:shaft 3", output = "power_generators:shaft 3",
recipe = { recipe = {

View File

@ -48,6 +48,10 @@ minetest.register_craftitem("power_generators:combustion_engine_two_cylinders_co
description = S("Combustion Engine Two Cylinders"), description = S("Combustion Engine Two Cylinders"),
inventory_image = "power_generators_combustion_engine_two_cylinders.png", inventory_image = "power_generators_combustion_engine_two_cylinders.png",
}) })
minetest.register_craftitem("power_generators:combustion_engine_six_cylinders", {
description = S("Combustion Engine Six Cylinders Without Controller"),
inventory_image = "power_generators_combustion_engine_six_cylinders.png",
})
minetest.register_craftitem("power_generators:combustion_engine_gearbox", { minetest.register_craftitem("power_generators:combustion_engine_gearbox", {
description = S("Combustion Engine Gearbox"), description = S("Combustion Engine Gearbox"),

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B