DEADSOFTWARE

game: rename "rulez-random" commands
authorTerminalHash <lyashuk.voxx@gmail.com>
Thu, 31 Aug 2023 21:50:24 +0000 (00:50 +0300)
committerTerminalHash <lyashuk.voxx@gmail.com>
Thu, 31 Aug 2023 21:50:54 +0000 (00:50 +0300)
src/game/g_console.pas
src/game/g_game.pas
src/game/g_menu.pas

index 6ff8ec3fc1be9fe084b6c965abd7dd32d4b2a874..febe7e96b6fd155dcaafbb58a23ba882606248b0 100644 (file)
@@ -1117,8 +1117,8 @@ begin
   AddCommand('g_warmup_time', GameCVars);
   AddCommand('g_spawn_invul', GameCVars);
   AddCommand('g_item_respawn_time', GameCVars);
-  AddCommand('g_rulez_randomize_respawn', GameCVars);
-  AddCommand('g_rulez_time_multiplier', GameCVars);
+  AddCommand('g_powerup_randomize_respawn', GameCVars);
+  AddCommand('g_powerup_time_multiplier', GameCVars);
   AddCommand('sv_intertime', GameCVars);
 
   AddCommand('sv_name', NetServerCVars);
@@ -1248,8 +1248,8 @@ begin
   WhitelistCommand('g_warmup_time');
   WhitelistCommand('g_spawn_invul');
   WhitelistCommand('g_item_respawn_time');
-  WhitelistCommand('g_rulez_randomize_respawn');
-  WhitelistCommand('g_rulez_time_multiplier');
+  WhitelistCommand('g_powerup_randomize_respawn');
+  WhitelistCommand('g_powerup_time_multiplier');
 
   g_Console_ResetBinds;
   g_Console_ReadConfig(gConfigScript);
@@ -2238,14 +2238,14 @@ begin
   WriteLn(f, 'g_timelimit ', gsTimeLimit);
   WriteLn(f, 'g_maxlives ', gsMaxLives);
   WriteLn(f, 'g_item_respawn_time ', gsItemRespawnTime);
-  WriteLn(f, 'g_rulez_time_multiplier ', gsRulezTimeMultiplier);
+  WriteLn(f, 'g_powerup_time_multiplier ', gsRulezTimeMultiplier);
   WriteLn(f, 'g_spawn_invul ', gsSpawnInvul);
   WriteLn(f, 'g_warmup_time ', gsWarmupTime);
 
   WriteFlag('g_friendlyfire ', GAME_OPTION_TEAMDAMAGE);
   WriteFlag('g_friendly_hit_trace ', GAME_OPTION_TEAMHITTRACE);
   WriteFlag('g_friendly_hit_projectile ', GAME_OPTION_TEAMHITPROJECTILE);
-  WriteFlag('g_rulez_randomize_respawn ', GAME_OPTION_RULEZRANDOM);
+  WriteFlag('g_powerup_randomize_respawn ', GAME_OPTION_RULEZRANDOM);
   WriteFlag('g_allow_exit ', GAME_OPTION_ALLOWEXIT);
   WriteFlag('g_allow_monsters ', GAME_OPTION_MONSTERS);
   WriteFlag('g_allow_dropflag ', GAME_OPTION_ALLOWDROPFLAG);
index 303d036f53c62ee319e56b1d862929065dce0614..87a928f962588bcd69f470206a0399d85155f175 100644 (file)
@@ -5614,9 +5614,9 @@ begin
   begin
     ParseGameFlag(GAME_OPTION_TEAMHITPROJECTILE, I_MSG_FRIENDLY_PROJECT_TRACE_OFF, I_MSG_FRIENDLY_PROJECT_TRACE_ON);
   end
-  else if cmd = 'g_rulez_randomize_respawn' then
+  else if cmd = 'g_powerup_randomize_respawn' then
   begin
-    ParseGameFlag(GAME_OPTION_RULEZRANDOM, I_MSG_RULEZ_RANDOM_ON, I_MSG_RULEZ_RANDOM_OFF);
+    ParseGameFlag(GAME_OPTION_RULEZRANDOM, I_MSG_RULEZ_RANDOM_OFF, I_MSG_RULEZ_RANDOM_ON);
   end
   else if cmd = 'g_weaponstay' then
   begin
@@ -5714,7 +5714,7 @@ begin
     g_Console_Add(Format('%s %d', [cmd, Integer(gsItemRespawnTime)]));
     if g_Game_IsServer then g_Console_Add(_lc[I_MSG_ONMAPCHANGE]);
   end
-  else if cmd = 'g_rulez_time_multiplier' then
+  else if cmd = 'g_powerup_time_multiplier' then
   begin
     if Length(P) > 1 then
     begin
index ed4e25dc7b89ab84452ae47b199b02164aa80384..39da0203a5cd3b4ee9eaa5ba59a9e61086a117ea 100644 (file)
@@ -2415,12 +2415,12 @@ begin
     with AddSwitch(_lc[I_MENU_ENABLE_RULEZ_RANDOM]) do
     begin
       Name := 'swRulezRandom';
-      AddItem(_lc[I_MENU_NO]);
       AddItem(_lc[I_MENU_YES]);
+      AddItem(_lc[I_MENU_NO]);
       if LongBool(gsGameFlags and GAME_OPTION_RULEZRANDOM) then
-        ItemIndex := 0
+        ItemIndex := 1
       else
-        ItemIndex := 1;
+        ItemIndex := 0;
     end;
     with AddSwitch(_lc[I_MENU_BOTS_VS]) do
     begin
@@ -2682,8 +2682,8 @@ begin
     with AddSwitch(_lc[I_MENU_ENABLE_RULEZ_RANDOM]) do
     begin
       Name := 'swRulezRandom';
-      AddItem(_lc[I_MENU_NO]);
       AddItem(_lc[I_MENU_YES]);
+      AddItem(_lc[I_MENU_NO]);
       if LongBool(gsGameFlags and GAME_OPTION_RULEZRANDOM) then
         ItemIndex := 0
       else