Fixed the bus texture display and added a mod screenshot
parent
b13fcb8b01
commit
d61f449a3b
6
api.lua
6
api.lua
|
@ -455,6 +455,12 @@ adv_vehicles.register_vehicle = function (vehname, veh_properties, veh_item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.debug(dump(veh_item.craft_recipe))
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "adv_vehicles:"..vehname,
|
||||||
|
recipe = veh_item.craft_recipe
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local died_cars = {}
|
local died_cars = {}
|
||||||
|
|
67
init.lua
67
init.lua
|
@ -1,6 +1,44 @@
|
||||||
local modpath = minetest.get_modpath("adv_vehicles")
|
local modpath = minetest.get_modpath("adv_vehicles")
|
||||||
dofile(modpath.."/api.lua")
|
dofile(modpath.."/api.lua")
|
||||||
|
|
||||||
|
minetest.register_craftitem("adv_vehicles:car_frame", {
|
||||||
|
description = "Car Frame (raw)",
|
||||||
|
inventory_image = "car_frame.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("adv_vehicles:wheel", {
|
||||||
|
description = "Wheel",
|
||||||
|
inventory_image = "wheel.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
local plastic_itemstring
|
||||||
|
if minetest.get_modpath("basic_materials") then
|
||||||
|
plastic_itemstring = "basic_materials:plastic_sheet"
|
||||||
|
elseif minetest.get_modpath("luxury_decor") then
|
||||||
|
plastic_itemstring = "luxury_decor:plastic_sheet"
|
||||||
|
else
|
||||||
|
error("'plastic_sheet' crafting element is required to be registered!")
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "adv_vehicles:car_frame",
|
||||||
|
recipe = {
|
||||||
|
{plastic_itemstring, plastic_itemstring, plastic_itemstring},
|
||||||
|
{plastic_itemstring, plastic_itemstring, plastic_itemstring},
|
||||||
|
{plastic_itemstring, "", ""}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "adv_vehicles:wheel",
|
||||||
|
recipe = {
|
||||||
|
{plastic_itemstring, plastic_itemstring, "dye:dark_grey"},
|
||||||
|
{"default:steel_ingot", plastic_itemstring, ""},
|
||||||
|
{"", "", ""}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
adv_vehicles.register_vehicle("bmw_118_two_seats", {
|
adv_vehicles.register_vehicle("bmw_118_two_seats", {
|
||||||
hp_max = 60,
|
hp_max = 60,
|
||||||
mass = 1.3,
|
mass = 1.3,
|
||||||
|
@ -14,8 +52,12 @@ adv_vehicles.register_vehicle("bmw_118_two_seats", {
|
||||||
}, {
|
}, {
|
||||||
|
|
||||||
description = "BMW 118 two-seater",
|
description = "BMW 118 two-seater",
|
||||||
inv_image = "bmw_two_seats_inv.png"
|
inv_image = "bmw_two_seats_inv.png",
|
||||||
})
|
craft_recipe = {
|
||||||
|
{"adv_vehicles:car_frame", "dye:blue", ""},
|
||||||
|
{"adv_vehicles:wheel", "adv_vehicles:wheel", "adv_vehicles:wheel"},
|
||||||
|
{"adv_vehicles:wheel", plastic_itemstring, ""}
|
||||||
|
}})
|
||||||
|
|
||||||
--[[minetest.register_craftitem("adv_vehicles:bmw_two_seats_inv", {
|
--[[minetest.register_craftitem("adv_vehicles:bmw_two_seats_inv", {
|
||||||
description = "BMW 118 two-seater",
|
description = "BMW 118 two-seater",
|
||||||
|
@ -51,8 +93,12 @@ adv_vehicles.register_vehicle("volvo", {
|
||||||
}, {
|
}, {
|
||||||
|
|
||||||
description = "Volvo Bus",
|
description = "Volvo Bus",
|
||||||
inv_image = "volvo_inv.png"
|
inv_image = "volvo_inv.png",
|
||||||
})
|
craft_recipe = {
|
||||||
|
{"adv_vehicles:car_frame", "dye:yellow", "dye:yellow"},
|
||||||
|
{"adv_vehicles:wheel", "adv_vehicles:wheel", "adv_vehicles:wheel"},
|
||||||
|
{"adv_vehicles:wheel", plastic_itemstring, "default:steel_ingot"}
|
||||||
|
}})
|
||||||
|
|
||||||
|
|
||||||
adv_vehicles.register_vehicle("kamaz", {
|
adv_vehicles.register_vehicle("kamaz", {
|
||||||
|
@ -62,11 +108,18 @@ adv_vehicles.register_vehicle("kamaz", {
|
||||||
cbox = {-1.5, -0.5, -3.5, 1.5, 2.5, 3.5},
|
cbox = {-1.5, -0.5, -3.5, 1.5, 2.5, 3.5},
|
||||||
model = "kamaz.b3d",
|
model = "kamaz.b3d",
|
||||||
textures = {"kamaz.png"},
|
textures = {"kamaz.png"},
|
||||||
seats = {["driver"]={busy_by=nil, pos={x=0, z=-11.0}},
|
seats = {["driver"]={busy_by=nil, pos={x=0, z=-18.0}},
|
||||||
},
|
},
|
||||||
player_eye_offset = {x=0, y=0, z=-3.5}
|
player_eye_offset = {x=0, y=0, z=-18.0}
|
||||||
}, {
|
}, {
|
||||||
|
|
||||||
description = "Kamaz Truck",
|
description = "Kamaz Truck",
|
||||||
inv_image = "kamaz_inv.png"
|
inv_image = "kamaz_inv.png",
|
||||||
|
craft_recipe = {
|
||||||
|
{"adv_vehicles:car_frame", "dye:grey", "dye:white"},
|
||||||
|
{"adv_vehicles:wheel", "adv_vehicles:wheel", "adv_vehicles:wheel"},
|
||||||
|
{"adv_vehicles:wheel", plastic_itemstring, "default:steel_ingot"}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
5
mod.conf
5
mod.conf
|
@ -1 +1,4 @@
|
||||||
depends = default
|
name = adv_vehicles
|
||||||
|
description = Adds different well-looked vehicles (cars, trucks, buses)
|
||||||
|
depends = default
|
||||||
|
optional_depends = basic_materials, luxury_decor
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
models/kamaz.b3d
BIN
models/kamaz.b3d
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
models/volvo.b3d
BIN
models/volvo.b3d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 874 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Loading…
Reference in New Issue