Added craftable cloud car

This commit is contained in:
David Leal 2020-10-21 20:32:25 -05:00
parent df11ba8013
commit ea7099bb23
No known key found for this signature in database
GPG Key ID: 3C482B03FD220E68
7 changed files with 67 additions and 4 deletions

View File

@ -13,5 +13,5 @@ read_globals = {
"armor", "PseudoRandom", "toolranks",
"stairs", "worldedit", "stairsplus",
"multitools",
"multitools", "vehicle_mash",
}

View File

@ -29,6 +29,11 @@ Copyright and related rights waived via [CC0](https://creativecommons.org/public
- `cloud_items_multitool_cloud.png`
Copyright (C) [Melkor](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=301) ([CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/)):
- `cloud_items_car_cloud.png` - [`car_white.png`](https://github.com/minetest-mods/vehicle_mash/blob/master/textures/car_white.png)
- `cloud_items_car_cloud_inventory.png` - [`inv_car_white.png`](https://github.com/minetest-mods/vehicle_mash/blob/master/textures/inv_car_white.png)
Copyright (C) [davidthecreator](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=11158) 2017-2018 ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)):
- All [`3d_armor`](https://github.com/stujones11/minetest-3d_armor) [textures](https://github.com/stujones11/minetest-3d_armor/tree/master/3d_armor/textures).
@ -36,8 +41,7 @@ Copyright (C) [davidthecreator](https://forum.minetest.net/memberlist.php?mode=v
## License for source code
Copyright (C) 2019-2020 Panquesito7, David Leal (halfpacho@gmail.com)\
Copyright (C) Various other Minetest developers/contributors\
Copyright (C) Various other Minetest developers/contributors
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999

15
car.lua Normal file
View File

@ -0,0 +1,15 @@
-- Code from the Vehicle Mash mod (WTFPL license)
local name = "car_cloud"
local definition = ...
definition.description = "Cloud car"
definition.inventory_image = "cloud_items_car_cloud_inventory.png"
definition.wield_image = "cloud_items_car_cloud_inventory.png"
definition.textures = {"cloud_items_car_cloud.png"}
definition.recipe = {
{"vehicle_mash:tire", "vehicle_mash:windshield", "vehicle_mash:tire"},
{"cloud_items:cloudblock", "vehicle_mash:motor", "cloud_items:cloudblock"},
{"vehicle_mash:tire", "vehicle_mash:battery", "vehicle_mash:tire"},
}
vehicle_mash.register_vehicle("cloud_items:" .. name, definition)

View File

@ -496,6 +496,50 @@ if minetest.get_modpath("multitools") then
)
end
----------------
-- Cloud car --
----------------
-- Code is taken and modified from the Vehicle Mash (https://github.com/minetest-mods/vehicle_mash) mod (WTFPL license).
-- See the mod license (https://github.com/minetest-mods/vehicle_mash/blob/master/LICENSE.md) for more information.
if minetest.get_modpath("vehicle_mash") then
local car_def = {
terrain_type = 1,
max_speed_forward = 13,
max_speed_reverse = 10,
accel = 4,
braking = 6,
turn_speed = 4,
stepheight = 1.3,
visual = "mesh",
mesh = "car.x", -- Model is from the Vehicle Mash mod; licensed under CC BY-NC-SA 3.0
visual_size = {x=1, y=1},
wield_scale = {x=1, y=1, z=1},
collisionbox = {-0.6, -0.05, -0.6, 0.6, 1, 0.6},
onplace_position_adj = -0.45,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=3.5,y=3.7,z=3.5},
driver_eye_offset = {x=-4, y=0, z=0},
number_of_passengers = 3,
passenger_attach_at = {x=3.5,y=3.7,z=-3.5},
passenger_eye_offset = {x=4, y=0, z=0},
passenger2_attach_at = {x=-4,y=3.7,z=3.5},
passenger2_eye_offset = {x=-4, y=3, z=0},
passenger3_attach_at = {x=-4,y=3.7,z=-3.5},
passenger3_eye_offset = {x=4, y=3, z=0},
drop_on_destroy = {"vehicle_mash:tire 2", "vehicle_mash:windshield",
"vehicle_mash:battery", "vehicle_mash:motor"},
}
-- Cloud car (similar from the CAR01 from Vehicle Mash)
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/car.lua")(table.copy(car_def))
end
-------------
-- Crafts --
-------------

View File

@ -1,6 +1,6 @@
name = cloud_items
depends = default, worldedit
optional_depends = 3d_armor, toolranks, stairs, moreblocks, multitools
optional_depends = 3d_armor, toolranks, stairs, moreblocks, multitools, vehicle_mash
description = Adds powerful cloud tools for Minetest.
min_minetest_version = 5.0.0
license = LGPLv2.1

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB