First commit

This commit is contained in:
blert2112 2015-05-21 19:56:20 -04:00
parent f4d5a5221b
commit c0e5099957
118 changed files with 687 additions and 392 deletions

29
126r.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_126r", {
local name = "car_126r"
local definition = {
description = "126r car",
is_boat = false,
player_attach_at = {x=-2,y=10,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-0.6, -0.25, -0.3, 0.6, 1/2, 0.3},
onplace_position_adj = -0.25,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=-2,y=10,z=0},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "car_126r_inventory.png",
wield_image = "car_126r_wield.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car_126r.x",
visual_size = {x=1, y=1},
textures = {"car_126r.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-0.6, -0.25, -0.3, 0.6, 1/2, 0.3},
-- back, bottom, port, front, top, starboard
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

9
README.md Normal file → Executable file
View File

@ -1,5 +1,5 @@
***Vehicles_mash***
- version: 1.3
- version: 1.4
- by blert2112
A merge of all the vehicles from:
@ -10,6 +10,8 @@ A merge of all the vehicles from:
- "Hovercraft" by Stuart Jones (experimental and disabled by default)
- 26 vehicles currently (27 if you include the experimental hovercraft)
- Certain vehicles can now carry passengers. Currently one passenger max.
- Disable vehicles by commenting out it's 'dofile' line in init.lua
- Adding new vehicles is a simple matter of:
- create/aquire vehicle model and textures
@ -32,6 +34,11 @@ As far as the work I did... It's really just a fork of a fork of a fork of a for
- crafting
***Change Log***
v1.4 5/19/2015
- attach (one) passenger added
- reorganized vehicle definition file code and added some variables pertaining to passengers
- added a vehicle definition file template with comments
- cleaned up to remove code dulplication
v1.3 5/5/2015
- player now sits forward in vehicles
- tweaked player sit positions

31
black.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_black", {
local name = "car_black"
local definition = {
description = "Black car",
inventory_image = "inv_car_black.png",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_black.png",
wield_image = "inv_car_black.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_black.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
blue.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_blue", {
local name = "car_blue"
local definition = {
description = "Blue car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_blue.png",
wield_image = "inv_car_blue.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_blue.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

28
boat.lua Normal file → Executable file
View File

@ -1,21 +1,31 @@
vehicle_mash:register_car("vehicle_mash:boat", {
local name = "boat"
local definition = {
description = "Boat",
attach_player_at = {x=0,y=11,z=-3},
player_rotation = {x=0,y=0,z=0},
collisionbox = {-0.5, -0.4, -0.5, 0.5, 0.3, 0.5},
onplace_position_adj = 0,
is_boat = true,
drop_on_destroy = "default:wood 3",
player_rotation = {x=0,y=0,z=0},
driver_attach_at = {x=0,y=11,z=-3},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "boat_inventory.png",
wield_image = "boat_wield.png",
wield_scale = {x=2, y=2, z=1},
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "boat.x",
visual_size = {x=1, y=1},
textures = {"default_wood.png"},
stepheight = 0, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 0,
max_speed_forward = 10,
max_speed_reverse = 5,
accel = 1,
braking = 1,
turn_speed = 2,
collisionbox = {-0.5, -0.4, -0.5, 0.5, 0.3, 0.5},
})
drop_on_destroy = "default:wood 3",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
brown.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_brown", {
local name = "car_brown"
local definition = {
description = "Brown car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_brown.png",
wield_image = "inv_car_brown.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_brown.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
cyan.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_cyan", {
local name = "car_cyan"
local definition = {
description = "Cyan car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_cyan.png",
wield_image = "inv_car_cyan.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_cyan.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
dark_green.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_dark_green", {
local name = "car_dark_green"
local definition = {
description = "Dark green car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_dark_green.png",
wield_image = "inv_car_dark_green.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_dark_green.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
dark_grey.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_dark_grey", {
local name = "car_dark_grey"
local definition = {
description = "Dark grey car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_dark_grey.png",
wield_image = "inv_car_dark_grey.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_dark_grey.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

0
depends.txt Normal file → Executable file
View File

37
f1.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_f1", {
local name = "car_f1"
local definition = {
description = "F1 car",
is_boat = false,
player_attach_at = {x=-5,y=11,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-0.7, -0.25, -0.4, 0.7, 0.25, 0.4},
onplace_position_adj = -0.25,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=-5,y=11,z=0},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "car_f1_inventory.png",
wield_image = "car_f1_wield.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car_f1.x",
visual_size = {x=1, y=1},
textures = {"car_f1.png"},
stepheight = 0.6, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
visual_size = {x=1, y=1},
stepheight = 0.6,
max_speed_forward = 25,
max_speed_reverse = 15,
accel = 3,
braking = 4,
turn_speed = 2,
collisionbox = {-0.7, -0.25, -0.4, 0.7, 0.25, 0.4},
-- back, bottom, port, front, top, starboard
})
turn_speed = 4,
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

View File

@ -29,47 +29,101 @@ local function is_water(pos)
return minetest.get_item_group(nn, "water") ~= 0
end
function vehicle_mash:register_car(name, def)
local function AttachPlayer(self, clicker, is_driver)
local pname = clicker:get_player_name()
local attach_at
if is_driver then
attach_at = self.driver_attach_at
else
attach_at = self.passenger_attach_at
clicker:set_eye_offset(self.passenger_eye_offset, {x=0, y=0, z=0})
end
clicker:set_attach(self.object, "", attach_at, self.player_rotation)
default.player_attached[pname] = true
minetest.after(0.2, function()
default.player_set_animation(clicker, "sit" , 30)
end)
if self.is_boat then
self.object:setyaw(clicker:get_look_yaw() - math.pi/2)
else
self.object:setyaw(clicker:get_look_yaw())
end
return clicker
end
local function DetachPlayer(self, clicker, is_driver)
local pname = clicker:get_player_name()
clicker:set_detach()
default.player_attached[pname] = false
default.player_set_animation(clicker, "stand" , 30)
if not is_driver then
clicker:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
end
return nil
end
function vehicle_mash:register_vehicle(name, def)
minetest.register_entity(name, {
textures = def.textures,
name = name,
physical = true,
collisionbox = def.collisionbox,
is_boat = def.is_boat,
player_rotation = def.player_rotation,
driver_attach_at = def.driver_attach_at,
driver_detach_pos_offset = def.driver_detach_pos_offset,
number_of_passengers = def.number_of_passengers,
passenger_attach_at = def.passenger_attach_at,
passenger_eye_offset = def.passenger_eye_offset,
passenger_detach_pos_offset = def.passenger_detach_pos_offset,
visual = def.visual,
visual_size = def.visual_size,
mesh = def.mesh,
textures = def.textures,
tiles = def.tiles,
visual_size = def.visual_size,
stepheight = def.stepheight,
driver = nil,
v = 0,
v2 = 0,
mouselook = 1,
max_spd_f = def.max_speed_forward,
max_spd_r = def.max_speed_reverse,
accel = def.accel,
braking = def.braking,
turn_spd = def.turn_speed,
drop_on_destroy = def.drop_on_destroy,
driver = nil,
passenge = nil,
v = 0,
v2 = 0,
mouselook = 1,
physical = true,
removed = false,
on_rightclick = function(self, clicker)
if not clicker or not clicker:is_player() then
return
end
local pname = clicker:get_player_name()
if self.driver and clicker == self.driver then
self.driver = nil
clicker:set_detach()
default.player_attached[pname] = false
default.player_set_animation(clicker, "stand" , 30)
elseif not self.driver then
self.driver = clicker
clicker:set_attach(self.object, "", def.player_attach_at, def.player_rotation)
default.player_attached[pname] = true
minetest.after(0.2, function()
default.player_set_animation(clicker, "sit" , 30)
end)
if def.is_boat then
self.object:setyaw(clicker:get_look_yaw() - math.pi/2)
else
self.object:setyaw(clicker:get_look_yaw())
-- if there is already a driver
if self.driver then
-- if clicker is driver detach passenger and driver
if clicker == self.driver then
-- if passenger detach first
if self.passenger then
self.passenger = DetachPlayer(self, self.passenger, false)
end
-- detach driver
self.driver = DetachPlayer(self, clicker, true)
-- if clicker is not the driver
else
-- if clicker is pasenger
if clicker == self.passenger then
-- detach passenger
self.passenger = DetachPlayer(self, clicker, false)
-- if clicker is not passenger
else
-- attach passenger if possible
if not self.passenger and self.number_of_passengers > 0 then
self.passenger = AttachPlayer(self, clicker, false)
end
end
end
-- if there is no driver
else
-- attach driver
self.driver = AttachPlayer(self, clicker, true)
end
end,
on_activate = function(self, staticdata, dtime_s)
@ -82,25 +136,16 @@ function vehicle_mash:register_car(name, def)
get_staticdata = function(self)
return tostring(self.v)
end,
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, direction)
if not puncher or not puncher:is_player() or self.removed then
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
if not puncher or not puncher:is_player() or self.removed or self.driver then
return
end
if self.driver and puncher == self.driver then
self.driver = nil
puncher:set_detach()
default.player_attached[puncher:get_player_name()] = false
end
if not self.driver then
self.removed = true
-- delay remove to ensure player is detached
minetest.after(0.1, function()
self.object:remove()
end)
if not minetest.setting_getbool("creative_mode") then
puncher:get_inventory():add_item("main", self.name)
end
end
end,
on_step = function(self, dtime)
-- Acelerating, braking, and rotating
@ -160,7 +205,7 @@ function vehicle_mash:register_car(name, def)
local new_velo = {x = 0, y = 0, z = 0}
local new_acce = {x = 0, y = 0, z = 0}
if def.is_boat then
if self.is_boat then
p.y = p.y - 0.5
if not is_water(p) then
local nodedef = minetest.registered_nodes[minetest.get_node(p).name]
@ -206,24 +251,22 @@ function vehicle_mash:register_car(name, def)
end
self.object:setvelocity(new_velo)
self.object:setacceleration(new_acce)
if def.is_boat then
if self.is_boat then
-- if boat comes to sudden stop then it has crashed, destroy boat and drop 3x wood
if self.v2 - self.v >= 3 then
if self.driver then
local name = self.driver:get_player_name()
self.driver:set_detach()
default.player_attached[name] = false
default.player_set_animation(self.driver, "stand" , 30)
self.driver = DetachPlayer(self, self.driver, true)
end
local pos = self.object:getpos()
self.object:remove()
minetest.add_item(pos, def.drop_on_destroy)
minetest.add_item(pos, self.drop_on_destroy)
end
self.v2 = self.v
end
end,
end
})
local onplace_position_adj = def.onplace_position_adj
minetest.register_craftitem(name, {
description = def.description,
inventory_image = def.inventory_image,
@ -235,21 +278,24 @@ function vehicle_mash:register_car(name, def)
return
end
if def.is_boat then
if not is_water(pointed_thing.under) then
return
end
if is_water(pointed_thing.under) then
pointed_thing.under.y = pointed_thing.under.y + 0.5
minetest.add_entity(pointed_thing.under, name)
else
pointed_thing.above.y = pointed_thing.above.y + def.onplace_position_adj
return
end
else
pointed_thing.above.y = pointed_thing.above.y + onplace_position_adj
minetest.env:add_entity(pointed_thing.above, name)
end
itemstack:take_item()
return itemstack
end,
end
})
-- minetest.register_craft({
-- output = name,
-- recipe = def.recipe,
-- recipe = def.recipe
-- })
end

29
green.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_green", {
local name = "car_green"
local definition = {
description = "Green car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_green.png",
wield_image = "inv_car_green.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_green.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
grey.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_grey", {
local name = "car_grey"
local definition = {
description = "Grey car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_grey.png",
wield_image = "inv_car_grey.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_grey.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
hot_rod.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_hot_rod", {
local name = "car_hot_rod"
local definition = {
description = "Hot Rod car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_red.png",
wield_image = "inv_car_red.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"hot_rod.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

28
hover_blue.lua Normal file → Executable file
View File

@ -1,23 +1,31 @@
vehicle_mash:register_car("vehicle_mash:hover_blue", {
local name = "hover_blue"
local definition = {
description = "Blue hovercraft",
is_boat = false,
player_attach_at = {x=-2,y=16.5,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-0.8,0,-0.8, 0.8,1.2,0.8},
onplace_position_adj = 0,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=-2,y=16.5,z=0},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "hovercraft_blue_inv.png",
wield_image = "hovercraft_blue_inv.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "hovercraft.x",
visual_size = {x=1, y=1},
textures = {"hovercraft_blue.png"},
stepheight = 0.6, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 0.6,
max_speed_forward = 12,
max_speed_reverse = 0,
accel = 2.5,
braking = 1,
turn_speed = 2,
collisionbox = {-0.8,0,-0.8, 0.8,1.2,0.8},
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

71
init.lua Normal file → Executable file
View File

@ -1,35 +1,48 @@
-- Cars Api
dofile(minetest.get_modpath("vehicle_mash").."/api.lua")
-- settings
-- end settings
-- get mod path
local mpath = minetest.get_modpath("vehicle_mash")
-- load framework
dofile(mpath.."/framework.lua")
-- ***********************
-- load vehicles down here
-- ***********************
-- Cars
dofile(minetest.get_modpath("vehicle_mash").."/126r.lua")
dofile(minetest.get_modpath("vehicle_mash").."/f1.lua")
dofile(minetest.get_modpath("vehicle_mash").."/black.lua")
dofile(minetest.get_modpath("vehicle_mash").."/blue.lua")
dofile(minetest.get_modpath("vehicle_mash").."/brown.lua")
dofile(minetest.get_modpath("vehicle_mash").."/cyan.lua")
dofile(minetest.get_modpath("vehicle_mash").."/dark_green.lua")
dofile(minetest.get_modpath("vehicle_mash").."/dark_grey.lua")
dofile(minetest.get_modpath("vehicle_mash").."/green.lua")
dofile(minetest.get_modpath("vehicle_mash").."/grey.lua")
dofile(minetest.get_modpath("vehicle_mash").."/magenta.lua")
dofile(minetest.get_modpath("vehicle_mash").."/orange.lua")
dofile(minetest.get_modpath("vehicle_mash").."/pink.lua")
dofile(minetest.get_modpath("vehicle_mash").."/red.lua")
dofile(minetest.get_modpath("vehicle_mash").."/violet.lua")
dofile(minetest.get_modpath("vehicle_mash").."/white.lua")
dofile(minetest.get_modpath("vehicle_mash").."/yellow.lua")
dofile(minetest.get_modpath("vehicle_mash").."/hot_rod.lua")
dofile(minetest.get_modpath("vehicle_mash").."/nyan_ride.lua")
dofile(minetest.get_modpath("vehicle_mash").."/oerkki_bliss.lua")
dofile(minetest.get_modpath("vehicle_mash").."/road_master.lua")
dofile(minetest.get_modpath("vehicle_mash").."/mese_blue.lua")
dofile(minetest.get_modpath("vehicle_mash").."/mese_pink.lua")
dofile(minetest.get_modpath("vehicle_mash").."/mese_purple.lua")
dofile(mpath.."/126r.lua")
dofile(mpath.."/f1.lua")
dofile(mpath.."/black.lua")
dofile(mpath.."/blue.lua")
dofile(mpath.."/brown.lua")
dofile(mpath.."/cyan.lua")
dofile(mpath.."/dark_green.lua")
dofile(mpath.."/dark_grey.lua")
dofile(mpath.."/green.lua")
dofile(mpath.."/grey.lua")
dofile(mpath.."/magenta.lua")
dofile(mpath.."/orange.lua")
dofile(mpath.."/pink.lua")
dofile(mpath.."/red.lua")
dofile(mpath.."/violet.lua")
dofile(mpath.."/white.lua")
dofile(mpath.."/yellow.lua")
dofile(mpath.."/hot_rod.lua")
dofile(mpath.."/nyan_ride.lua")
dofile(mpath.."/oerkki_bliss.lua")
dofile(mpath.."/road_master.lua")
dofile(mpath.."/mese_blue.lua")
dofile(mpath.."/mese_pink.lua")
dofile(mpath.."/mese_purple.lua")
-- Boats
dofile(minetest.get_modpath("vehicle_mash").."/boat.lua")
dofile(minetest.get_modpath("vehicle_mash").."/rowboat.lua")
dofile(mpath.."/boat.lua")
dofile(mpath.."/rowboat.lua")
-- Hovercraft
--dofile(minetest.get_modpath("vehicle_mash").."/hover_blue.lua")
--dofile(mpath.."/hover_blue.lua")

29
magenta.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_magenta", {
local name = "car_magenta"
local definition = {
description = "Magenta car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_magenta.png",
wield_image = "inv_car_magenta.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_magenta.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

32
mese_blue.lua Normal file → Executable file
View File

@ -1,30 +1,38 @@
vehicle_mash:register_car("vehicle_mash:mesecar_blue", {
local name = "mesecar_blue"
local definition = {
description = "Mesecar blue",
is_boat = false,
player_attach_at = {x=-2.1,y=3,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
onplace_position_adj = 0.25,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=-2.1,y=3,z=0},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "mesecar_car1front.png",
wield_image = "mesecar_car1front.png",
wield_scale = {x=1, y=1, z=1},
visual = "cube",
mesh = "",
visual_size = {x=1.5, y=1.5},
textures = { -- top base front back left right
textures = {
"mesecar_car1top.png",
"mesecar_carbase.png",
"mesecar_car1front.png",
"mesecar_car1back.png",
"mesecar_car1leftside.png",
"mesecar_car1rightside.png",
"mesecar_car1rightside.png"
},
stepheight = 0.6, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 0.6,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

32
mese_pink.lua Normal file → Executable file
View File

@ -1,30 +1,38 @@
vehicle_mash:register_car("vehicle_mash:mesecar_pink", {
local name = "mesecar_pink"
local definition = {
description = "Mesecar pink",
is_boat = false,
player_attach_at = {x=-2.1,y=3,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
onplace_position_adj = 0.25,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=-2.1,y=3,z=0},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "mesecar_car3front.png",
wield_image = "mesecar_car3front.png",
wield_scale = {x=1, y=1, z=1},
visual = "cube",
mesh = "",
visual_size = {x=1.5, y=1.5},
textures = { -- top base front back left right
textures = {
"mesecar_car3top.png",
"mesecar_carbase.png",
"mesecar_car3front.png",
"mesecar_car3back.png",
"mesecar_car3leftside.png",
"mesecar_car3rightside.png",
"mesecar_car3rightside.png"
},
stepheight = 0.6, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 0.6,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

32
mese_purple.lua Normal file → Executable file
View File

@ -1,30 +1,38 @@
vehicle_mash:register_car("vehicle_mash:mesecar_purple", {
local name = "mesecar_purple"
local definition = {
description = "Mesecar purple",
is_boat = false,
player_attach_at = {x=-2.1,y=3,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
onplace_position_adj = 0.25,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=-2.1,y=3,z=0},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "mesecar_car2front.png",
wield_image = "mesecar_car2front.png",
wield_scale = {x=1, y=1, z=1},
visual = "cube",
mesh = "",
visual_size = {x=1.5, y=1.5},
textures = { -- top base front back left right
textures = {
"mesecar_car2top.png",
"mesecar_carbase.png",
"mesecar_car2front.png",
"mesecar_car2back.png",
"mesecar_car2leftside.png",
"mesecar_car2rightside.png",
"mesecar_car2rightside.png"
},
stepheight = 0.6, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 0.6,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

0
models/boat.x Normal file → Executable file
View File

0
models/car.x Normal file → Executable file
View File

0
models/car_126r.x Normal file → Executable file
View File

0
models/car_126r_render.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

0
models/car_f1.x Normal file → Executable file
View File

0
models/car_f1_2.x Normal file → Executable file
View File

0
models/car_f1_render.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

0
models/hovercraft.blend Normal file → Executable file
View File

0
models/hovercraft.x Normal file → Executable file
View File

0
models/rowboat.x Normal file → Executable file
View File

29
nyan_ride.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_nyan_ride", {
local name = "car_nyan_ride"
local definition = {
description = "Nyan Ride car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_pink.png",
wield_image = "inv_car_pink.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"nyan_ride.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
oerkki_bliss.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_oerkki_bliss", {
local name = "car_oerkki_bliss"
local definition = {
description = "Oerkki Bliss car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_black.png",
wield_image = "inv_car_black.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"oerkki_bliss.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
orange.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_orange", {
local name = "car_orange"
local definition = {
description = "Orange car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_orange.png",
wield_image = "inv_car_orange.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_orange.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
pink.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_pink", {
local name = "car_pink"
local definition = {
description = "Pink car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_pink.png",
wield_image = "inv_car_pink.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_pink.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
red.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_red", {
local name = "car_red"
local definition = {
description = "Red car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_red.png",
wield_image = "inv_car_red.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"car_red.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

29
road_master.lua Normal file → Executable file
View File

@ -1,24 +1,31 @@
vehicle_mash:register_car("vehicle_mash:car_road_master", {
local name = "car_road_master"
local definition = {
description = "Road Master car",
is_boat = false,
player_attach_at = {x=0,y=12,z=0},
player_rotation = {x=0,y=90,z=0},
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
onplace_position_adj = -0.45,
drop_on_destroy = "",
recipe = {},
is_boat = false,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=0,y=12,z=0},
number_of_passengers = 1,
passenger_attach_at = {x=0,y=12,z=-8},
passenger_eye_offset = {x=8, y=0, z=0},
inventory_image = "inv_car_brown.png",
wield_image = "inv_car_brown.png",
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "car.x",
visual_size = {x=1, y=1},
textures = {"road_master.png"},
stepheight = 1.1, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 1.1,
max_speed_forward = 20,
max_speed_reverse = 10,
accel = 2,
braking = 4,
turn_speed = 2,
collisionbox = {-1.6, -0.05, -1.3, 1.0, 1, 0.5},
-- back, bottom, starboard, front, top, port
})
drop_on_destroy = "",
recipe = {}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

37
rowboat.lua Normal file → Executable file
View File

@ -1,26 +1,35 @@
vehicle_mash:register_car("vehicle_mash:rowboat", {
local name = "rowboat"
local definition = {
description = "Rowboat",
attach_player_at = {x=0,y=11,z=-3},
player_rotation = {x=0,y=0,z=0},
collisionbox = {-0.5, -0.4, -0.5, 0.5, 0.3, 0.5},
onplace_position_adj = 0,
is_boat = true,
drop_on_destroy = "default:wood 3",
recipe = {
{"", "", "" },
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
},
player_rotation = {x=0,y=0,z=0},
driver_attach_at = {x=0,y=11,z=-3},
number_of_passengers = 0,
passenger_attach_at = {x=0,y=0,z=0},
passenger_eye_offset = {x=0, y=0, z=0},
inventory_image = "rowboat_inventory.png",
wield_image = "rowboat_wield.png",
wield_scale = {x=2, y=2, z=1},
wield_scale = {x=1, y=1, z=1},
visual = "mesh",
mesh = "rowboat.x",
visual_size = {x=1, y=1},
textures = {"default_wood.png"},
stepheight = 0, -- Stepheight, 0.6 = climb slabs, 1.1 = climb nodes
visual_size = {x=1, y=1},
stepheight = 0,
max_speed_forward = 10,
max_speed_reverse = 5,
accel = 1,
braking = 1,
turn_speed = 2,
collisionbox = {-0.5, -0.4, -0.5, 0.5, 0.3, 0.5},
})
drop_on_destroy = "default:wood 3",
recipe = {
{"", "", "" },
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
}
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

0
sounds/hovercraft_bounce.ogg Normal file → Executable file
View File

0
sounds/hovercraft_jump.ogg Normal file → Executable file
View File

0
sounds/hovercraft_thrust_fade.ogg Normal file → Executable file
View File

0
sounds/hovercraft_thrust_loop.ogg Normal file → Executable file
View File

31
template.lua Normal file
View File

@ -0,0 +1,31 @@
local name = "car_template" -- mod name of vehicle
local definition = {
description = "Template car", -- name as seen in inventory
collisionbox = {0, 0, 0, 0, 0, 0}, -- back, bottom, starboard, front, top, port
onplace_position_adj = 0, -- adjust placement position up/down
is_boat = false, -- does vehicle travel on water?
player_rotation = {x=0,y=0,z=0}, -- rotate player so they sit facing the correct direction
driver_attach_at = {x=0,y=0,z=0}, -- attach the driver at
number_of_passengers = 0, -- testing: 0 for none, do not increase at this time!
passenger_attach_at = {x=0,y=0,z=0}, -- attach the passenger, if applicable, at
passenger_eye_offset = {x=0, y=0, z=0}, -- offset for first person passenger view
inventory_image = "filename.png", -- image to use in inventory
wield_image = "filename.png", -- image to use in hand
wield_scale = {x=1, y=1, z=1}, --
visual = "mesh", -- what type of object (mesh, cube, etc...)
mesh = "filename.ext", -- mesh model to use
textures = {"filename.png"}, -- mesh texture(s)
visual_size = {x=1, y=1}, -- adjust vehicle size
stepheight = 0, -- what can the vehicle climb over?, 0.6 = climb slabs, 1.1 = climb nodes
max_speed_forward = 10, -- vehicle maximum forward speed
max_speed_reverse = 5, -- vehicle maximum reverse speed
accel = 1, -- how fast vehicle accelerates
braking = 2, -- how fast can the vehicle stop
turn_speed = 2, -- how quick can the vehicle turn
drop_on_destroy = "", -- what gets dropped when vehicle is destroyed
recipe = {} -- crafting recipe
}
-- nothing to change down here
vehicle_mash:register_vehicle("vehicle_mash:"..name, definition)

0
textures/boat_inventory.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
textures/boat_wield.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 847 B

0
textures/car_126r.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

0
textures/car_126r_inventory.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
textures/car_126r_wield.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
textures/car_black.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

0
textures/car_blue.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

0
textures/car_brown.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

0
textures/car_cyan.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

0
textures/car_dark_green.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

0
textures/car_dark_grey.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

0
textures/car_f1.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

0
textures/car_f1_inventory.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
textures/car_f1_wield.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
textures/car_green.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

0
textures/car_grey.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

0
textures/car_magenta.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

0
textures/car_orange.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

0
textures/car_pink.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

0
textures/car_red.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

0
textures/car_violet.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

0
textures/car_white.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

0
textures/car_yellow.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

0
textures/hot_rod.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

0
textures/hovercraft_blue.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

0
textures/hovercraft_blue_inv.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

0
textures/hovercraft_green.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 874 B

After

Width:  |  Height:  |  Size: 874 B

0
textures/hovercraft_green_inv.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

0
textures/hovercraft_red.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 889 B

After

Width:  |  Height:  |  Size: 889 B

0
textures/hovercraft_red_inv.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

0
textures/hovercraft_yellow.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 909 B

0
textures/hovercraft_yellow_inv.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

0
textures/inv_car_black.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
textures/inv_car_blue.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_brown.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_cyan.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
textures/inv_car_dark_green.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_dark_grey.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_green.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_grey.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_magenta.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
textures/inv_car_orange.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_pink.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
textures/inv_car_red.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
textures/inv_car_violet.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
textures/inv_car_white.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

0
textures/inv_car_yellow.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
textures/mesecar_car1back.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

0
textures/mesecar_car1front.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

0
textures/mesecar_car1leftside.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

0
textures/mesecar_car1rightside.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 267 B

0
textures/mesecar_car1top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 145 B

0
textures/mesecar_car2back.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

0
textures/mesecar_car2front.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 193 B

0
textures/mesecar_car2leftside.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 268 B

0
textures/mesecar_car2rightside.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

0
textures/mesecar_car2top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

Some files were not shown because too many files have changed in this diff Show More