From: TerminalHash Date: Fri, 8 Sep 2023 10:28:53 +0000 (+0300) Subject: game: added more variants for random customization in menu X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=4bbb1dced3434adcd1fdd0168c9de9ce64e42ce4;p=d2df-sdl.git game: added more variants for random customization in menu --- diff --git a/src/game/g_language.pas b/src/game/g_language.pas index 72098b4..5183211 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -177,6 +177,9 @@ type I_MENU_ITEM_RANDOM_HELP_ONLY, I_MENU_ITEM_RANDOM_AMMO_ONLY, I_MENU_ITEM_RANDOM_WEAPON_ONLY, + I_MENU_ITEM_RANDOM_HELP_AMMO, + I_MENU_ITEM_RANDOM_HELP_WEAPON, + I_MENU_ITEM_RANDOM_WEAPON_AMMO, I_MENU_ITEM_RANDOM_NOTHING, I_MENU_DEATHMATCH_KEYS, I_MENU_ENABLE_EXITS, @@ -1010,6 +1013,12 @@ const 'Òîëüêî áîåïðèïàñû'), ('MENU ITEM RESPAWN WEAPON ONLY', 'For weapons only', 'Òîëüêî îðóæèå'), + ('MENU ITEM RESPAWN HELP AMMO', 'For help items and ammo', + 'Âñïîìîãàòåëüíîå è áîåïðèïàñû'), + ('MENU ITEM RESPAWN HELP WEAPON', 'For help items and weapons', + 'Âñïîìîãàòåëüíîå è îðóæèå'), + ('MENU ITEM RESPAWN WEAPON AMMO', 'For weapons and ammo', + 'Îðóæèå è áîåïðèïàñû'), ('MENU ITEM RESPAWN NOTHING', 'Nothing', 'Íè÷åãî'), ('MENU DEATHMATCH KEYS', 'Give all keys in DM:', diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 8cd9363..80989a8 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -790,6 +790,9 @@ begin 1: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMHELPRANDOM; 2: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMAMMORANDOM; 3: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMWEAPONRANDOM; + 4: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMHELPRANDOM or GAME_OPTION_ITEMAMMORANDOM; + 5: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMHELPRANDOM or GAME_OPTION_ITEMWEAPONRANDOM; + 6: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMAMMORANDOM or GAME_OPTION_ITEMWEAPONRANDOM; 0: gsGameFlags := gsGameFlags or GAME_OPTION_ITEMALLRANDOM; end; @@ -2884,6 +2887,9 @@ begin AddItem(_lc[I_MENU_ITEM_RANDOM_HELP_ONLY]); AddItem(_lc[I_MENU_ITEM_RANDOM_AMMO_ONLY]); AddItem(_lc[I_MENU_ITEM_RANDOM_WEAPON_ONLY]); + AddItem(_lc[I_MENU_ITEM_RANDOM_HELP_AMMO]); + AddItem(_lc[I_MENU_ITEM_RANDOM_HELP_WEAPON]); + AddItem(_lc[I_MENU_ITEM_RANDOM_WEAPON_AMMO]); AddItem(_lc[I_MENU_ITEM_RANDOM_NOTHING]); if LongBool(gsGameFlags and GAME_OPTION_ITEMALLRANDOM) then ItemIndex := 0 @@ -2893,8 +2899,14 @@ begin ItemIndex := 2 else if LongBool(gsGameFlags and GAME_OPTION_ITEMWEAPONRANDOM) then ItemIndex := 3 + else if (gsGameFlags and (GAME_OPTION_ITEMHELPRANDOM or GAME_OPTION_ITEMAMMORANDOM)) = (GAME_OPTION_ITEMHELPRANDOM or GAME_OPTION_ITEMAMMORANDOM) then + ItemIndex := 4 + else if (gsGameFlags and (GAME_OPTION_ITEMHELPRANDOM or GAME_OPTION_ITEMWEAPONRANDOM)) = (GAME_OPTION_ITEMHELPRANDOM or GAME_OPTION_ITEMWEAPONRANDOM) then + ItemIndex := 5 + else if (gsGameFlags and (GAME_OPTION_ITEMAMMORANDOM or GAME_OPTION_ITEMWEAPONRANDOM)) = (GAME_OPTION_ITEMAMMORANDOM or GAME_OPTION_ITEMWEAPONRANDOM) then + ItemIndex := 6 else - ItemIndex := 4; + ItemIndex := 7; end; AddSpace();// Items Respawn block with AddEdit(_lc[I_MENU_ITEM_RESPAWN_TIME]) do