Allow 99 items (independent of stacks) instead of 5 stacks

IMHO, this allows for a more realistic and practical usage of the jetpack.
master
Thomas--S 2020-10-24 19:31:52 +02:00
parent 94c764da50
commit ca95847f39
7 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@ Instructions:
Important to know:
- 12 units of hydrogen are sufficient for a flight of 6 minutes
- Maximum 5 items stacks in your inventory are allowed including the controller.
- Maximum of 99 items in your inventory are allowed including the controller.
Otherwise you would be too heavy :-)
- The Jetpack also wears out and can be used for approximately 10 flights
- Always hold the controller tight during the flight, otherwise it will switch off :)

View File

@ -19,7 +19,7 @@ local Jetpacks = {}
local MAX_HEIGHT = tonumber(minetest.settings:get("ta4_jetpack_max_height")) or 500
local MAX_VSPEED = tonumber(minetest.settings:get("ta4_jetpack_max_vertical_speed")) or 20
local MAX_HSPEED = (tonumber(minetest.settings:get("ta4_jetpack_max_horizontal_speed")) or 12) / 4
local MAX_NUM_INV_ITEMS = tonumber(minetest.settings:get("ta4_jetpack_max_num_inv_items")) or 5
local MAX_NUM_INV_ITEMS = tonumber(minetest.settings:get("ta4_jetpack_max_num_inv_items")) or 99
-- Flight time maximum 6 min or 360 s or 3600 steps.
-- 12 units hydrogen for 3600 steps means 0.0033 units hydrogen / step.
@ -153,7 +153,7 @@ local function check_player_load(player)
end
local count = 0
for _, stack in ipairs(inv:get_list("main") or {}) do
count = count + (stack:is_empty() and 0 or 1)
count = count + stack:get_count()
if count > MAX_NUM_INV_ITEMS then
return S("check your inventory!")
end

View File

@ -17,7 +17,7 @@ techage.add_to_manual('DE', {
"\n"..
"\n",
" - 12 Einheiten Wasserstoff reichen für einen Flug von 6 Minuten\n"..
" - Maximal 5 Stapel von Gegenständen im Spieler-Inventar sind zulässig\\, einschließlich des Controllers\n(Sonst wärst du zu schwer :-)\n"..
" - Maximal 99 Gegenstände im Spieler-Inventar sind zulässig\\, einschließlich des Controllers\n(Sonst wärst du zu schwer :-)\n"..
" - Das Jetpack nutzt sich ab und kann für ca. 10 Flüge verwendet werden\n"..
" - Halte den Controller während des Fluges immer fest\\, sonst schaltet er sich aus :)\n"..
"\n"..

View File

@ -21,7 +21,7 @@ Das Jetpack ist inspiriert vom Jetpack von spirit689 (https://github.com/spirit6
## Was du wissen solltest
- 12 Einheiten Wasserstoff reichen für einen Flug von 6 Minuten
- Maximal 5 Stapel von Gegenständen im Spieler-Inventar sind zulässig, einschließlich des Controllers
- Maximal 99 Gegenstände im Spieler-Inventar sind zulässig, einschließlich des Controllers
(Sonst wärst du zu schwer :-)
- Das Jetpack nutzt sich ab und kann für ca. 10 Flüge verwendet werden
- Halte den Controller während des Fluges immer fest, sonst schaltet er sich aus :)

View File

@ -18,7 +18,7 @@ techage.add_to_manual('EN', {
"\n"..
"\n",
" - 12 units of hydrogen are sufficient for a flight of 6 minutes\n"..
" - Maximum 5 items stacks in your inventory are allowed including the controller.\nOtherwise you would be too heavy :-)\n"..
" - Maximum 99 items in your inventory are allowed including the controller.\nOtherwise you would be too heavy :-)\n"..
" - The Jetpack also wears out and can be used for approximately 10 flights\n"..
" - Always hold the controller tight during the flight\\, otherwise it will switch off :)\n"..
"\n"..

View File

@ -22,7 +22,7 @@ and by the historical game Lunar Lander.
## Important to know
- 12 units of hydrogen are sufficient for a flight of 6 minutes
- Maximum 5 items stacks in your inventory are allowed including the controller.
- Maximum 99 items in your inventory are allowed including the controller.
Otherwise you would be too heavy :-)
- The Jetpack also wears out and can be used for approximately 10 flights
- Always hold the controller tight during the flight, otherwise it will switch off :)

View File

@ -8,7 +8,7 @@ ta4_jetpack_max_vertical_speed (maximum vertical speed) int 20
ta4_jetpack_max_horizontal_speed (maximum horizontal speed) int 12
# Maximum number of inventory items a player can take
ta4_jetpack_max_num_inv_items (maximum number of inventory items) int 5
ta4_jetpack_max_num_inv_items (maximum number of inventory items) int 99