Browse Source

Add OptionEntry Cow Quest

pull/3594/head
obligaron 4 years ago committed by Anders Jenbo
parent
commit
e6320090ac
  1. 2
      Source/DiabloUI/selgame.cpp
  2. 2
      Source/multi.cpp
  3. 4
      Source/options.cpp
  4. 2
      Source/options.h

2
Source/DiabloUI/selgame.cpp

@ -494,7 +494,7 @@ void selgame_Password_Select(int /*value*/)
m_game_data->nTickRate = nTickRate;
m_game_data->bRunInTown = *sgOptions.Gameplay.runInTown ? 1 : 0;
m_game_data->bTheoQuest = *sgOptions.Gameplay.theoQuest ? 1 : 0;
m_game_data->bCowQuest = sgOptions.Gameplay.bCowQuest ? 1 : 0;
m_game_data->bCowQuest = *sgOptions.Gameplay.cowQuest ? 1 : 0;
if (SNetCreateGame(nullptr, gamePassword, (char *)m_game_data, sizeof(*m_game_data), gdwPlayerId)) {
UiInitList_clear();

2
Source/multi.cpp

@ -693,7 +693,7 @@ bool NetInit(bool bSinglePlayer)
sgGameInitInfo.nTickRate = sgOptions.Gameplay.nTickRate;
sgGameInitInfo.bRunInTown = *sgOptions.Gameplay.runInTown ? 1 : 0;
sgGameInitInfo.bTheoQuest = *sgOptions.Gameplay.theoQuest ? 1 : 0;
sgGameInitInfo.bCowQuest = sgOptions.Gameplay.bCowQuest ? 1 : 0;
sgGameInitInfo.bCowQuest = *sgOptions.Gameplay.cowQuest ? 1 : 0;
sgGameInitInfo.bFriendlyFire = sgOptions.Gameplay.bFriendlyFire ? 1 : 0;
memset(sgbPlayerTurnBitTbl, 0, sizeof(sgbPlayerTurnBitTbl));
gbGameDestroyed = false;

4
Source/options.cpp

@ -275,7 +275,6 @@ void LoadOptions()
sgOptions.Graphics.bShowFPS = (GetIniInt("Graphics", "Show FPS", 0) != 0);
sgOptions.Gameplay.nTickRate = GetIniInt("Game", "Speed", 20);
sgOptions.Gameplay.bCowQuest = GetIniBool("Game", "Cow Quest", false);
sgOptions.Gameplay.bFriendlyFire = GetIniBool("Game", "Friendly Fire", true);
sgOptions.Gameplay.bTestBard = GetIniBool("Game", "Test Bard", false);
sgOptions.Gameplay.bTestBarbarian = GetIniBool("Game", "Test Barbarian", false);
@ -427,7 +426,6 @@ void SaveOptions()
SetIniValue("Graphics", "Show FPS", sgOptions.Graphics.bShowFPS);
SetIniValue("Game", "Speed", sgOptions.Gameplay.nTickRate);
SetIniValue("Game", "Cow Quest", sgOptions.Gameplay.bCowQuest);
SetIniValue("Game", "Friendly Fire", sgOptions.Gameplay.bFriendlyFire);
SetIniValue("Game", "Test Bard", sgOptions.Gameplay.bTestBard);
SetIniValue("Game", "Test Barbarian", sgOptions.Gameplay.bTestBarbarian);
@ -637,6 +635,7 @@ GameplayOptions::GameplayOptions()
, runInTown("Run in Town", OptionEntryFlags::CantChangeInMultiPlayer, N_("Run in Town"), N_("Enable jogging/fast walking in town for Diablo and Hellfire. This option was introduced in the expansion."), AUTO_PICKUP_DEFAULT(false))
, grabInput("Grab Input", OptionEntryFlags::None, N_("Grab Input"), N_("When enabled mouse is locked to the game window."), false)
, theoQuest("Theo Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Theo Quest"), N_("Enable Little Girl quest."), false)
, cowQuest("Cow Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Cow Quest"), N_("Enable Jersey's quest. Lester the farmer is replaced by the Complete Nut."), false)
{
grabInput.SetValueChangedCallback(OptionGrabInputChanged);
}
@ -646,6 +645,7 @@ std::vector<OptionEntryBase *> GameplayOptions::GetEntries()
&runInTown,
&grabInput,
&theoQuest,
&cowQuest,
};
}

2
Source/options.h

@ -278,7 +278,7 @@ struct GameplayOptions : OptionCategoryBase {
/** @brief Enable the Theo quest. */
OptionEntryBoolean theoQuest;
/** @brief Enable the cow quest. */
bool bCowQuest;
OptionEntryBoolean cowQuest;
/** @brief Will players still damage other players in non-PvP mode. */
bool bFriendlyFire;
/** @brief Enable the bard hero class. */

Loading…
Cancel
Save