1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-01 12:26:35 +02:00
parent fdc046e4af
commit a82f87f961
2 changed files with 48 additions and 34 deletions

View file

@ -72,32 +72,46 @@ local function SelectBait()
return availableBaits[1]
end
-- Create a menu for bait selection
-- Create a menu for bait selection using lib.registerMenu instead
local options = {}
for _, bait in pairs(availableBaits) do
table.insert(options, {
title = bait.label,
description = 'Use as fishing bait',
metadata = {
{label = 'Catch Bonus', value = '+' .. bait.catchBonus .. '%'},
{label = 'Loss Chance', value = bait.loseChance .. '%'}
}
description = 'Catch Bonus: +' .. bait.catchBonus .. '% | Loss Chance: ' .. bait.loseChance .. '%'
})
end
local selectedIndex = lib.showContext('bait_selection_menu', {
local selectedBait = nil
lib.registerMenu({
id = 'bait_selection_menu',
title = 'Select Fishing Bait',
options = options
position = 'top-right',
options = options,
onSelect = function(selected)
selectedBait = availableBaits[selected]
end,
onClose = function()
-- Do nothing, selectedBait will remain nil
end
})
if selectedIndex then
return availableBaits[selectedIndex]
else
return nil
lib.showMenu('bait_selection_menu')
-- Wait for selection with a timeout
local startTime = GetGameTimer()
while selectedBait == nil do
Wait(100)
-- Timeout after 15 seconds
if GetGameTimer() - startTime > 15000 then
return availableBaits[1] -- Default to first bait if no selection
end
end
return selectedBait
end
-- Function to handle the fishing process
local function StartFishingProcess(selectedBait, waterLoc)
fishing = true

View file

@ -9,29 +9,29 @@ Strings = {
cannot_perform_desc = 'You cannot do this right now.',
failed = 'Failed',
failed_fish = 'You failed to catch fish!',
no_water = 'No Water',
no_water_desc = 'You are not facing any water.',
no_bait = 'Missing Bait',
no_bait_desc = 'You don\'t have fishing bait.',
bait_lost = 'Bait Lost',
bait_lost_desc = 'Fishing bait was lost.',
fish_success = 'Caught Fish',
no_water = 'Error 404: Wasser nicht gefunden.',
no_water_desc = 'Deine Angel verheddert sich im trockenen Gras. Bravo.',
no_bait = 'Vielleicht versuchst Du es mal mit Köder.',
no_bait_desc = 'Ohne Köder bist du nur ein sehr geduldiger Spaziergänger am Wasser.',
bait_lost = 'Köder abgehauen Fisch hat gewonnen.',
bait_lost_desc = 'Der Köder hat sich selbstständig gemacht..',
fish_success = 'Fisch im Kasten das Abendessen ist gesichert.',
fish_success_desc = 'You caught a %s!',
sell_shop_blip = 'Fish Market',
sell_fish = '[E] - Sell Fish',
kicked = 'Nice try, please do not attempt to exploit!',
sold_for = 'Sold Fish',
sold_for_desc = 'You sold %sx %s for $%s',
got_bite = 'Bite Detected',
got_bite_desc = 'Your pole has a fish on the line, get ready!',
waiting_bite = 'Awaiting Bite',
waiting_bite_desc = 'Please wait for a fish to bite your hook.',
cannot_carry = 'Cannot Carry',
cannot_carry_desc = 'You cannot carry reward!',
no_knife = 'No Knife',
sell_fish = '[E] - Fisch verkaufen.',
kicked = 'Du kannsts versuchen, aber das klappt hier nicht.',
sold_for = 'Fisch verkauft.',
sold_for_desc = 'Du hast %sx %s für $%s verkauft.',
got_bite = 'Achtung, da zappelt was!',
got_bite_desc = 'Der Fisch ist am Haken, gleich wirds sportlich!',
waiting_bite = 'Geduld, der Fisch überlegt noch.',
waiting_bite_desc = 'Ein bisschen Geduld der Fisch ist gleich da.',
cannot_carry = 'Du schleppst schon genug mehr passt nicht rein!',
cannot_carry_desc = 'Oops, zu viel Fisch auf einmal kannst du nicht tragen!',
no_knife = 'Ohne Messer ist der Fisch nur Deko.',
no_knife_desc = 'You need a knife to process this fish.',
processing_success = 'Fish Processed',
processing_success_desc = 'You obtained %d %s from processing the fish.',
caviar_found = 'Caviar Found!',
caviar_found_desc = 'You found some valuable caviar while processing the fish!'
processing_success = 'Fang verarbeitet nächster Schritt: Grill an!',
processing_success_desc = '%d %s frisch aus der Fischverarbeitung!',
caviar_found = 'Kaviar entdeckt Fisch deluxe!',
caviar_found_desc = 'Wow, wertvoller Kaviar im Fisch das hat sich gelohnt!
}