X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=b4a4dfd4095fa077ebe7f4ef9b6e80d183abaa48;hb=6af04febaefa3715e0dd42083a781df9b7f5e54e;hp=ff6757f659ffcb5a4484f2d45588370a6591fcb1;hpb=0f4c0818f5491fc65dd95aae33bfc3c603506305;p=d2df-sdl.git diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index ff6757f..b4a4dfd 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -736,12 +736,15 @@ begin gsScoreLimit := StrToIntDef(TGUIEdit(GetControl('edScoreLimit')).Text, 0); gsMaxLives := StrToIntDef(TGUIEdit(GetControl('edMaxLives')).Text, 0); gsItemRespawnTime := StrToIntDef(TGUIEdit(GetControl('edItemRespawnTime')).Text, 0); + gsRulezTimeMultiplier := StrToIntDef(TGUIEdit(GetControl('edRulezTimeMultiplier')).Text, 0); gsPlayers := TGUISwitch(GetControl('swPlayers')).ItemIndex; gsMap := Map; gsGameFlags := 0; if TGUISwitch(GetControl('swTeamDamage')).ItemIndex = 0 then gsGameFlags := gsGameFlags or GAME_OPTION_TEAMDAMAGE; + if TGUISwitch(GetControl('swTeamAbsorbDamage')).ItemIndex = 0 then + gsGameFlags := gsGameFlags or GAME_OPTION_TEAMABSORBDAMAGE; if TGUISwitch(GetControl('swDeathmatchKeys')).ItemIndex = 0 then gsGameFlags := gsGameFlags or GAME_OPTION_DMKEYS; if TGUISwitch(GetControl('swEnableExits')).ItemIndex = 0 then @@ -750,6 +753,8 @@ begin gsGameFlags := gsGameFlags or GAME_OPTION_WEAPONSTAY; if TGUISwitch(GetControl('swMonsters')).ItemIndex = 0 then gsGameFlags := gsGameFlags or GAME_OPTION_MONSTERS; + if TGUISwitch(GetControl('swRulezRandom')).ItemIndex = 0 then + gsGameFlags := gsGameFlags or GAME_OPTION_RULEZRANDOM; case TGUISwitch(GetControl('swTeamHit')).ItemIndex of 1: gsGameFlags := gsGameFlags or GAME_OPTION_TEAMHITTRACE; @@ -771,6 +776,7 @@ begin // TODO: get this crap out of here gGameSettings.ItemRespawnTime := gsItemRespawnTime; + gGameSettings.RulezTimeMultiplier := gsRulezTimeMultiplier; gGameSettings.WarmupTime := gsWarmupTime; gGameSettings.SpawnInvul := gsSpawnInvul; end; @@ -2325,6 +2331,15 @@ begin if gsItemRespawnTime > 0 then Text := IntToStr(gsItemRespawnTime); end; + with AddEdit(_lc[I_MENU_RULEZ_RESPAWN_MULTIPLIER]) do + begin + Name := 'edRulezTimeMultiplier'; + OnlyDigits := True; + Width := 4; + MaxLength := 5; + if gsRulezTimeMultiplier > 0 then + Text := IntToStr(gsRulezTimeMultiplier); + end; with AddSwitch(_lc[I_MENU_PLAYERS]) do begin Name := 'swPlayers'; @@ -2359,6 +2374,16 @@ begin else ItemIndex := 3; end; + with AddSwitch(_lc[I_MENU_ENABLE_TEAM_DAMAGE_ABSOBR]) do + begin + Name := 'swTeamAbsorbDamage'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + if LongBool(gsGameFlags and GAME_OPTION_TEAMABSORBDAMAGE) then + ItemIndex := 0 + else + ItemIndex := 1; + end; with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do begin Name := 'swDeathmatchKeys'; @@ -2399,6 +2424,16 @@ begin else ItemIndex := 1; end; + with AddSwitch(_lc[I_MENU_ENABLE_RULEZ_RANDOM]) do + begin + Name := 'swRulezRandom'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + if LongBool(gsGameFlags and GAME_OPTION_RULEZRANDOM) then + ItemIndex := 0 + else + ItemIndex := 1; + end; with AddSwitch(_lc[I_MENU_BOTS_VS]) do begin Name := 'swBotsVS'; @@ -2573,6 +2608,15 @@ begin if gsItemRespawnTime > 0 then Text := IntToStr(gsItemRespawnTime); end; + with AddEdit(_lc[I_MENU_RULEZ_RESPAWN_MULTIPLIER]) do + begin + Name := 'edRulezTimeMultiplier'; + OnlyDigits := True; + Width := 4; + MaxLength := 5; + if gsRulezTimeMultiplier > 0 then + Text := IntToStr(gsRulezTimeMultiplier); + end; with AddSwitch(_lc[I_MENU_PLAYERS]) do begin Name := 'swPlayers'; @@ -2607,6 +2651,16 @@ begin else ItemIndex := 3; end; + with AddSwitch(_lc[I_MENU_ENABLE_TEAM_DAMAGE_ABSOBR]) do + begin + Name := 'swTeamAbsorbDamage'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + if LongBool(gsGameFlags and GAME_OPTION_TEAMABSORBDAMAGE) then + ItemIndex := 0 + else + ItemIndex := 1; + end; with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do begin Name := 'swDeathmatchKeys'; @@ -2647,6 +2701,16 @@ begin else ItemIndex := 1; end; + with AddSwitch(_lc[I_MENU_ENABLE_RULEZ_RANDOM]) do + begin + Name := 'swRulezRandom'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + if LongBool(gsGameFlags and GAME_OPTION_RULEZRANDOM) then + ItemIndex := 0 + else + ItemIndex := 1; + end; with AddSwitch(_lc[I_MENU_BOTS_VS]) do begin Name := 'swBotsVS';