From: TerminalHash Date: Thu, 7 Sep 2023 23:47:40 +0000 (+0300) Subject: game: added console variables for random item respawn X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=555f5293fc0e11c8965e6d13c639e545b0228eb9;p=d2df-sdl.git game: added console variables for random item respawn --- diff --git a/src/game/g_console.pas b/src/game/g_console.pas index aece4fe..5315b35 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -1118,6 +1118,10 @@ begin AddCommand('g_spawn_invul', GameCVars); AddCommand('g_item_respawn_time', GameCVars); AddCommand('g_item_time_random', GameCVars); + AddCommand('g_items_all_respawn_random', GameCVars); + AddCommand('g_items_help_respawn_random', GameCVars); + AddCommand('g_items_ammo_respawn_random', GameCVars); + AddCommand('g_items_weapon_respawn_random', GameCVars); AddCommand('g_powerup_randomize_respawn', GameCVars); AddCommand('g_powerup_respawn_time', GameCVars); AddCommand('g_powerup_time_random', GameCVars); @@ -1251,6 +1255,10 @@ begin WhitelistCommand('g_spawn_invul'); WhitelistCommand('g_item_respawn_time'); WhitelistCommand('g_item_time_random'); + WhitelistCommand('g_items_all_respawn_random'); + WhitelistCommand('g_items_help_respawn_random'); + WhitelistCommand('g_items_ammo_respawn_random'); + WhitelistCommand('g_items_weapon_respawn_random'); WhitelistCommand('g_powerup_randomize_respawn'); WhitelistCommand('g_powerup_respawn_time'); WhitelistCommand('g_powerup_time_random'); @@ -2252,6 +2260,10 @@ begin WriteFlag('g_friendly_hit_trace ', GAME_OPTION_TEAMHITTRACE); WriteFlag('g_friendly_hit_projectile ', GAME_OPTION_TEAMHITPROJECTILE); WriteFlag('g_powerup_randomize_respawn ', GAME_OPTION_RULEZRANDOM); + WriteFlag('g_items_all_respawn_random ', GAME_OPTION_ITEMALLRANDOM); + WriteFlag('g_items_help_respawn_random ', GAME_OPTION_ITEMHELPRANDOM); + WriteFlag('g_items_ammo_respawn_random ', GAME_OPTION_ITEMAMMORANDOM); + WriteFlag('g_items_weapon_respawn_random ', GAME_OPTION_ITEMWEAPONRANDOM); WriteFlag('g_allow_exit ', GAME_OPTION_ALLOWEXIT); WriteFlag('g_allow_monsters ', GAME_OPTION_MONSTERS); WriteFlag('g_allow_dropflag ', GAME_OPTION_ALLOWDROPFLAG); diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 2d80b3a..a35e2cb 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -5624,6 +5624,22 @@ begin begin ParseGameFlag(GAME_OPTION_TEAMHITPROJECTILE, I_MSG_FRIENDLY_PROJECT_TRACE_OFF, I_MSG_FRIENDLY_PROJECT_TRACE_ON); end + else if cmd = 'g_items_all_respawn_random' then + begin + ParseGameFlag(GAME_OPTION_ITEMALLRANDOM, I_MSG_ITEM_ALL_RANDOM_OFF, I_MSG_ITEM_ALL_RANDOM_ON, False); + end + else if cmd = 'g_items_help_respawn_random' then + begin + ParseGameFlag(GAME_OPTION_ITEMHELPRANDOM, I_MSG_ITEM_HELP_RANDOM_OFF, I_MSG_ITEM_HELP_RANDOM_ON, False); + end + else if cmd = 'g_items_ammo_respawn_random' then + begin + ParseGameFlag(GAME_OPTION_ITEMAMMORANDOM, I_MSG_ITEM_AMMO_RANDOM_OFF, I_MSG_ITEM_AMMO_RANDOM_ON, False); + end + else if cmd = 'g_items_weapon_respawn_random' then + begin + ParseGameFlag(GAME_OPTION_ITEMWEAPONRANDOM, I_MSG_ITEM_WEAPON_RANDOM_OFF, I_MSG_ITEM_WEAPON_RANDOM_ON); + end else if cmd = 'g_powerup_randomize_respawn' then begin ParseGameFlag(GAME_OPTION_RULEZRANDOM, I_MSG_RULEZ_RANDOM_OFF, I_MSG_RULEZ_RANDOM_ON, False); diff --git a/src/game/g_language.pas b/src/game/g_language.pas index 778d436..72098b4 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -642,6 +642,14 @@ type I_MSG_PING_OFF, I_MSG_RULEZ_RANDOM_ON, I_MSG_RULEZ_RANDOM_OFF, + I_MSG_ITEM_ALL_RANDOM_ON, + I_MSG_ITEM_ALL_RANDOM_OFF, + I_MSG_ITEM_HELP_RANDOM_ON, + I_MSG_ITEM_HELP_RANDOM_OFF, + I_MSG_ITEM_AMMO_RANDOM_ON, + I_MSG_ITEM_AMMO_RANDOM_OFF, + I_MSG_ITEM_WEAPON_RANDOM_ON, + I_MSG_ITEM_WEAPON_RANDOM_OFF, I_MSG_NO_WAD, I_MSG_NO_MAPS, I_MSG_NO_MAP, @@ -1892,6 +1900,22 @@ const 'Ðàíäîìíûé ðåñïàóí äëÿ ïîâåðàïîâ âêëþ÷¸í'), ('MSG RULEZ RANDOM OFF', 'Random respawn for powerups off', 'Ðàíäîìíûé ðåñïàóí äëÿ ïîâåðàïîâ âûêëþ÷åí'), + ('MSG ITEM ALL RANDOM ON', 'Random respawn for all items on', + 'Ðàíäîìíûé ðåñïàóí äëÿ âñåõ ïðåäìåòîâ âêëþ÷¸í'), + ('MSG ITEM ALL RANDOM OFF', 'Random respawn for all items off', + 'Ðàíäîìíûé ðåñïàóí äëÿ âñåõ ïðåäìåòîâ âûêëþ÷åí'), + ('MSG ITEM HELP RANDOM ON', 'Random respawn for help items on', + 'Ðàíäîìíûé ðåñïàóí äëÿ âñïîìîãàòåëüíûõ ïðåäìåòîâ âêëþ÷¸í'), + ('MSG ITEM HELP RANDOM OFF', 'Random respawn for help items off', + 'Ðàíäîìíûé ðåñïàóí äëÿ âñïîìîãàòåëüíûõ ïðåäìåòîâ âûêëþ÷åí'), + ('MSG ITEM AMMO RANDOM ON', 'Random respawn for ammo on', + 'Ðàíäîìíûé ðåñïàóí äëÿ áîåïðèïàñîâ âêëþ÷¸í'), + ('MSG ITEM AMMO RANDOM OFF', 'Random respawn for ammo off', + 'Ðàíäîìíûé ðåñïàóí äëÿ áîåïðèïàñîâ âûêëþ÷åí'), + ('MSG ITEM WEAPON RANDOM ON', 'Random respawn for weapons on', + 'Ðàíäîìíûé ðåñïàóí äëÿ îðóæèÿ âêëþ÷¸í'), + ('MSG ITEM WEAPON RANDOM OFF', 'Random respawn for weapons off', + 'Ðàíäîìíûé ðåñïàóí äëÿ îðóæèÿ âûêëþ÷åí'), ('MSG NO WAD', 'WAD "%s" doesn''t exist!', 'WAD ôàéë "%s" íå íàéäåí!'), ('MSG NO MAPS', 'WAD "%s" doesn''t contain any maps!',