Add an option to enable/disable cloud vehicles
This commit is contained in:
parent
a505f3fb13
commit
a015934485
12
init.lua
12
init.lua
@ -21,7 +21,7 @@ USA
|
|||||||
|
|
||||||
==========================================================================
|
==========================================================================
|
||||||
|
|
||||||
Dependencies: WorldEdit, default (included in Minetest Game)
|
Dependencies: WorldEdit, Vehicle Mash, default (included in Minetest Game)
|
||||||
Optional dependencies: 3D Armor, Tool Ranks, More Blocks, multitools, stairs (included in Minetest Game)
|
Optional dependencies: 3D Armor, Tool Ranks, More Blocks, multitools, stairs (included in Minetest Game)
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
@ -531,7 +531,10 @@ local ship_def = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Cloud ship (based on the Vehicle Mash boat)
|
-- Cloud ship (based on the Vehicle Mash boat)
|
||||||
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/ship.lua")(table.copy(ship_def))
|
local boat_enabled = minetest.settings:get_bool("cloud_items.enable_cloud_car")
|
||||||
|
if boat_enabled or boat_enabled == nil then
|
||||||
|
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/ship.lua")(table.copy(ship_def))
|
||||||
|
end
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
-- Cloud car --
|
-- Cloud car --
|
||||||
@ -573,7 +576,10 @@ local car_def = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Cloud car (similar from the CAR01 from Vehicle Mash)
|
-- Cloud car (similar from the CAR01 from Vehicle Mash)
|
||||||
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/car.lua")(table.copy(car_def))
|
local car_enabled = minetest.settings:get_bool("cloud_items.enable_cloud_ship")
|
||||||
|
if car_enabled or car_enabled == nil then
|
||||||
|
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/car.lua")(table.copy(car_def))
|
||||||
|
end
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- Crafts --
|
-- Crafts --
|
||||||
|
4
settingtypes.txt
Normal file
4
settingtypes.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Vehicle settings
|
||||||
|
|
||||||
|
cloud_items.enable_cloud_car (Enable/disable cloud car) bool true
|
||||||
|
cloud_items.enable_cloud_ship (Enable/disable cloud ship) bool true
|
Loading…
x
Reference in New Issue
Block a user