Patch helicopter mod to add some settings
This commit is contained in:
parent
8b9cff2135
commit
932a5ec9a8
@ -113,7 +113,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
* transport/
|
||||
* [bike][] ([MIT][lic.bike]) -- version: [1.2][ver.bike] *2021-04-12*
|
||||
* [boats][boats2] ([LGPL][lic.lgpl3.0] / [CC BY-SA][lic.ccbysa3.0]) -- version: [b83231e Git][ver.boats2] *2016-10-14* ([patched][patch.boats2]) ***UPSTREAM MOVED***
|
||||
* [helicopter][] ([GPL][lic.gpl2.0] / [CC0][lic.cc0] / CC BY-NC) -- version: [1955cdd Git][ver.helicopter] *2021-03-28*
|
||||
* [helicopter][] ([GPL][lic.gpl2.0] / [CC0][lic.cc0] / CC BY-NC) -- version: [1955cdd Git][ver.helicopter] *2021-03-28* ([patched][patch.helicopter])
|
||||
* [hovercraft][] ([LGPL / CC BY-SA / CC0][lic.hovercraft]) -- version: [4d50e68 Git][ver.hovercraft] *2017-05-14* ([patched][patch.hovercraft])
|
||||
* ui/
|
||||
* [bookmarks_gui][] ([BSD 3-Clause][lic.bookmarks_gui]) -- version: [f7ae10a Git][ver.bookmarks_gui] *2017-08-29*
|
||||
@ -554,6 +554,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
[patch.gems_tools]: https://github.com/AntumMT/mod-gems_tools/tree/7f89843
|
||||
[patch.hbarmor]: https://github.com/AntumMT/mod-hbarmor/tree/12a7dea
|
||||
[patch.hbsprint]: https://github.com/AntumMT/mod-hbsprint/tree/03aef67
|
||||
[patch.helicopter]: https://github.com/AntumMT/mod-helicopter/tree/dc7066b
|
||||
[patch.homedecor]: https://github.com/AntumMT/mp-homedecor/tree/e1ede67
|
||||
[patch.hovercraft]: https://github.com/AntumMT/mod-hovercraft/tree/73a6223
|
||||
[patch.hud]: https://github.com/AntumMT/mod-hud/tree/6846e20
|
||||
|
@ -2261,6 +2261,25 @@ torches_enable_ceiling = false
|
||||
|
||||
|
||||
|
||||
###############
|
||||
## TRANSPORT ##
|
||||
###############
|
||||
|
||||
# *** helicopter ***
|
||||
|
||||
## If enabled, places helicopter in inventory instead of destroying it
|
||||
# when punched.
|
||||
# type: bool
|
||||
# default: false
|
||||
#helicopter.pick_up = true
|
||||
|
||||
## If enabled, helicopter will be controlled via mouse by default.
|
||||
# type: bool
|
||||
# default: false
|
||||
#helicopter.mouse_default = true
|
||||
|
||||
|
||||
|
||||
########
|
||||
## UI ##
|
||||
########
|
||||
|
@ -1,4 +0,0 @@
|
||||
player_api
|
||||
biofuel
|
||||
default?
|
||||
creative?
|
@ -50,7 +50,7 @@ minetest.register_entity("helicopter:heli", {
|
||||
hp_max = 50,
|
||||
color = "#0063b0",
|
||||
_passenger = nil,
|
||||
_by_mouse = true,
|
||||
_by_mouse = helicopter.mouse_default,
|
||||
|
||||
get_staticdata = function(self) -- unloaded/unloads ... is now saved
|
||||
return minetest.serialize({
|
||||
@ -273,8 +273,12 @@ minetest.register_entity("helicopter:heli", {
|
||||
end
|
||||
|
||||
if self.hp_max <= 0 then
|
||||
self.object:remove()
|
||||
puncher:get_inventory():add_item("main", "helicopter:heli")
|
||||
if helicopter.pick_up then
|
||||
self.object:remove()
|
||||
puncher:get_inventory():add_item("main", "helicopter:heli")
|
||||
else
|
||||
helicopter.destroy(self)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -29,6 +29,7 @@ helicopter.colors ={
|
||||
yellow='#ffe400',
|
||||
}
|
||||
|
||||
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "settings.lua")
|
||||
--dofile(minetest.get_modpath(minetest.get_current_modname()) .. DIR_DELIM .. "heli_hud.lua")
|
||||
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_hud.lua")
|
||||
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_utilities.lua")
|
||||
|
12
mods/transport/helicopter/settings.lua
Normal file
12
mods/transport/helicopter/settings.lua
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
--- Determines handling of punched helicopter.
|
||||
--
|
||||
-- If `false`, helicopter is destroyed. Otherwise, it is added to inventory.
|
||||
-- - Default: false
|
||||
helicopter.pick_up = minetest.settings:get_bool("helicopter.pick_up", false)
|
||||
|
||||
--- Determines default control of helicopter.
|
||||
--
|
||||
-- If enabled, helicopter will be controlled via mouse by default.
|
||||
-- - Default: false
|
||||
helicopter.mouse_default = minetest.settings:get_bool("helicopter.mouse_default", false)
|
7
mods/transport/helicopter/settingtypes.txt
Normal file
7
mods/transport/helicopter/settingtypes.txt
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
# If enabled, places helicopter in inventory instead of destroying it
|
||||
# when punched.
|
||||
helicopter.pick_up (Place in inventory) bool false
|
||||
|
||||
# If enabled, helicopter will be controlled via mouse by default.
|
||||
helicopter.mouse_default (Mouse control default) bool false
|
@ -264,6 +264,16 @@ sprint_breath (Breath) bool true
|
||||
sprint_breath_drain (Breath drain) float 1
|
||||
|
||||
|
||||
[*helicopter]
|
||||
|
||||
# If enabled, places helicopter in inventory instead of destroying it
|
||||
# when punched.
|
||||
helicopter.pick_up (Place in inventory) bool false
|
||||
|
||||
# If enabled, helicopter will be controlled via mouse by default.
|
||||
helicopter.mouse_default (Mouse control default) bool false
|
||||
|
||||
|
||||
[*hidename]
|
||||
|
||||
# Use alpha color level to hide nametag instead of clearing text.
|
||||
|
Loading…
x
Reference in New Issue
Block a user