mirror of
https://github.com/APercy/automobiles_pck
synced 2025-08-11 07:45:48 +02:00
recipes added
This commit is contained in:
parent
005bb306e2
commit
e05049f863
@ -21,6 +21,7 @@ dofile(minetest.get_modpath("automobiles") .. DIR_DELIM .. "ground_detection.lua
|
||||
dofile(minetest.get_modpath("automobiles_roadster") .. DIR_DELIM .. "roadster_utilities.lua")
|
||||
dofile(minetest.get_modpath("automobiles_roadster") .. DIR_DELIM .. "roadster_entities.lua")
|
||||
dofile(minetest.get_modpath("automobiles_roadster") .. DIR_DELIM .. "roadster_forms.lua")
|
||||
dofile(minetest.get_modpath("automobiles_roadster") .. DIR_DELIM .. "roadster_crafts.lua")
|
||||
|
||||
|
||||
-- --minetest.add_entity(e_pos, "automobiles_roadster:target")
|
||||
|
123
automobiles_roadster/roadster_crafts.lua
Normal file
123
automobiles_roadster/roadster_crafts.lua
Normal file
@ -0,0 +1,123 @@
|
||||
--
|
||||
-- items
|
||||
--
|
||||
|
||||
-- body
|
||||
minetest.register_craftitem("automobiles_roadster:roadster_body",{
|
||||
description = "Roadster body",
|
||||
inventory_image = "roadster_body.png",
|
||||
})
|
||||
-- engine
|
||||
minetest.register_craftitem("automobiles_roadster:engine",{
|
||||
description = "Roadster engine",
|
||||
inventory_image = "roadster_engine.png",
|
||||
})
|
||||
-- wheel
|
||||
minetest.register_craftitem("automobiles_roadster:wheel",{
|
||||
description = "Roadster wheel",
|
||||
inventory_image = "roadster_wheel.png",
|
||||
})
|
||||
|
||||
-- roadster
|
||||
minetest.register_craftitem("automobiles_roadster:roadster", {
|
||||
description = "Roadster",
|
||||
inventory_image = "automobiles_roadster.png",
|
||||
liquids_pointable = false,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pointed_pos = pointed_thing.above
|
||||
--pointed_pos.y=pointed_pos.y+0.2
|
||||
local car = minetest.add_entity(pointed_pos, "automobiles_roadster:roadster")
|
||||
if car and placer then
|
||||
local ent = car:get_luaentity()
|
||||
local owner = placer:get_player_name()
|
||||
if ent then
|
||||
ent.owner = owner
|
||||
car:set_yaw(placer:get_look_horizontal())
|
||||
itemstack:take_item()
|
||||
ent.object:set_acceleration({x=0,y=-automobiles.gravity,z=0})
|
||||
end
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
--
|
||||
-- crafting
|
||||
--
|
||||
if minetest.get_modpath("default") then
|
||||
minetest.register_craft({
|
||||
output = "automobiles_roadster:roadster",
|
||||
recipe = {
|
||||
{"automobiles_roadster:wheel", "automobiles_roadster:engine", "automobiles_roadster:wheel"},
|
||||
{"automobiles_roadster:wheel","automobiles_roadster:roadster_body", "automobiles_roadster:wheel"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "automobiles_roadster:roadster_body",
|
||||
recipe = {
|
||||
{"default:glass" ,"","default:steel_ingot"},
|
||||
{"default:steel_ingot","default:steelblock","default:steel_ingot"},
|
||||
{"group:wood","group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "automobiles_roadster:engine",
|
||||
recipe = {
|
||||
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
|
||||
{"default:steelblock","default:mese_block", "default:steelblock"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "automobiles_roadster:wheel",
|
||||
recipe = {
|
||||
{"group:wood", "default:stick", "group:wood"},
|
||||
{"default:stick","group:wood", "default:stick"},
|
||||
{"group:wood", "default:stick", "group:wood"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
--[[if minetest.get_modpath("default") then
|
||||
if not minetest.registered_items["hidroplane:wings"] then
|
||||
minetest.register_craft({
|
||||
output = "supercub:wings",
|
||||
recipe = {
|
||||
{"wool:white", "farming:string", "wool:white"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"wool:white", "default:steel_ingot", "wool:white"},
|
||||
}
|
||||
})
|
||||
end
|
||||
if not minetest.registered_items["hidroplane:fuselage"] then
|
||||
minetest.register_craft({
|
||||
output = "supercub:fuselage",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:diamondblock", "default:steel_ingot"},
|
||||
{"wool:white", "default:steel_ingot", "wool:white"},
|
||||
{"default:steel_ingot", "default:mese_block", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
end
|
||||
minetest.register_craft({
|
||||
output = "supercub:supercub",
|
||||
recipe = {
|
||||
{"supercub:wings",},
|
||||
{"supercub:fuselage",},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "supercub:supercub",
|
||||
recipe = {
|
||||
{"hidroplane:wings",},
|
||||
{"hidroplane:fuselage",},
|
||||
}
|
||||
})
|
||||
end]]--
|
@ -677,50 +677,4 @@ minetest.register_entity("automobiles_roadster:roadster", {
|
||||
end,
|
||||
})
|
||||
|
||||
--
|
||||
-- items
|
||||
--
|
||||
|
||||
-- roadster
|
||||
minetest.register_craftitem("automobiles_roadster:roadster", {
|
||||
description = "Roadster",
|
||||
inventory_image = "automobiles_roadster.png",
|
||||
liquids_pointable = false,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pointed_pos = pointed_thing.above
|
||||
--pointed_pos.y=pointed_pos.y+0.2
|
||||
local car = minetest.add_entity(pointed_pos, "automobiles_roadster:roadster")
|
||||
if car and placer then
|
||||
local ent = car:get_luaentity()
|
||||
local owner = placer:get_player_name()
|
||||
if ent then
|
||||
ent.owner = owner
|
||||
car:set_yaw(placer:get_look_horizontal())
|
||||
itemstack:take_item()
|
||||
ent.object:set_acceleration({x=0,y=-automobiles.gravity,z=0})
|
||||
end
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
--
|
||||
-- crafting
|
||||
--
|
||||
--[[
|
||||
if minetest.get_modpath("default") then
|
||||
minetest.register_craft({
|
||||
output = "automobiles_roadster:roadster",
|
||||
recipe = {
|
||||
{"default:obsidian_block", "default:steel_ingot", "default:obsidian_block"},
|
||||
{"default:steel_ingot", "default:mese_block", "default:steel_ingot"},
|
||||
{"default:obsidian_block", "default:steel_ingot", "default:obsidian_block"},
|
||||
}
|
||||
})
|
||||
end]]--
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.2 KiB |
BIN
automobiles_roadster/textures/roadster_body.png
Executable file
BIN
automobiles_roadster/textures/roadster_body.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
automobiles_roadster/textures/roadster_engine.png
Executable file
BIN
automobiles_roadster/textures/roadster_engine.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
automobiles_roadster/textures/roadster_wheel.png
Executable file
BIN
automobiles_roadster/textures/roadster_wheel.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user