1 ////////////////////////////////////////////////////////////////////////////////
2 //    Scorched3D (c) 2000-2011
3 //
4 //    This file is part of Scorched3D.
5 //
6 //    Scorched3D is free software; you can redistribute it and/or modify
7 //    it under the terms of the GNU General Public License as published by
8 //    the Free Software Foundation; either version 2 of the License, or
9 //    (at your option) any later version.
10 //
11 //    Scorched3D is distributed in the hope that it will be useful,
12 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //    GNU General Public License for more details.
15 //
16 //    You should have received a copy of the GNU General Public License along
17 //    with this program; if not, write to the Free Software Foundation, Inc.,
18 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ////////////////////////////////////////////////////////////////////////////////
20 
21 #if !defined(__INCLUDE_OptionsGameh_INCLUDE__)
22 #define __INCLUDE_OptionsGameh_INCLUDE__
23 
24 #include <common/OptionEntry.h>
25 
26 class OptionsGame
27 {
28 public:
29 	OptionsGame();
30 	virtual ~OptionsGame();
31 
32 	enum ScoreType
33 	{
34 		ScoreWins = 0,
35 		ScoreKills = 1,
36 		ScoreMoney = 2
37 	};
38 	enum TurnType
39 	{
40 		TurnSimultaneous = 0,
41 		TurnSequentialLoserFirst = 1,
42 		TurnSequentialRandom = 2,
43 		TurnSimultaneousNoWait = 3,
44 		TurnFree = 4,
45 		TurnFreeTimed = 5
46 	};
47 	enum WindForce
48 	{
49 		WindRandom = 0,
50 		WindNone = 1,
51 		Wind1 = 2,
52 		Wind2 = 3,
53 		Wind3 = 4,
54 		Wind4 = 5,
55 		Wind5 = 6,
56 		WindBreezy = 7,
57 		WindGale = 8
58 	};
59 	enum WindType
60 	{
61 		WindChangeNever = 0,
62 		WindChangeSomeTimes = 1,
63 		WindChangeFrequently = 2,
64 		WindChangeConstantly = 3,
65 		WindChangeAlways = 4
66 	};
67 	enum WallType
68 	{
69 		WallRandom = 0,
70 		WallConcrete = 1,
71 		WallBouncy = 2,
72 		WallWrapAround = 3,
73 		WallNone = 4,
74 		WallActive = 5,
75 		WallInactive = 6
76 	};
77 	enum WeapScale
78 	{
79 		ScaleSmall = 0,
80 		ScaleMedium = 1,
81 		ScaleLarge = 2
82 	};
83 	enum ResignType
84 	{
85 		ResignStart = 0,
86 		ResignTimed = 1,
87 		ResignNone = 2
88 	};
89 	enum MovementRestrictionType
90 	{
91 		MovementRestrictionNone = 0,
92 		MovementRestrictionLand = 1,
93 		MovementRestrictionLandOrAbove = 2
94 	};
95 	enum TeamBallanceType
96 	{
97 		TeamBallanceNone = 0,
98 		TeamBallanceAuto = 1,
99 		TeamBallanceBotsVs = 2,
100 		TeamBallanceAutoByScore = 3,
101 		TeamBallanceAutoByBots = 4
102 	};
103 
getTutorial()104 	const char *getTutorial() { return tutorial_; }
getTutorialEntry()105 	OptionEntryString &getTutorialEntry() { return tutorial_; }
106 
getScorePerMoney()107 	int getScorePerMoney() { return scorePerMoney_; }
getScorePerMoneyEntry()108 	OptionEntryInt &getScorePerMoneyEntry() { return scorePerMoney_; }
109 
getScorePerAssist()110 	int getScorePerAssist() { return scorePerAssist_; }
getScorePerAssistEntry()111 	OptionEntryInt &getScorePerAssistEntry() { return scorePerAssist_; }
112 
getScorePerKill()113 	int getScorePerKill() { return scorePerKill_; }
getScorePerKillEntry()114 	OptionEntryInt &getScorePerKillEntry() { return scorePerKill_; }
115 
getScorePerResign()116 	int getScorePerResign() { return scorePerResign_; }
getScorePerResignEntry()117 	OptionEntryInt &getScorePerResignEntry() { return scorePerResign_; }
118 
getScorePerSpectate()119 	int getScorePerSpectate() { return scorePerSpectate_; }
getScorePerSpectateEntry()120 	OptionEntryInt &getScorePerSpectateEntry() { return scorePerSpectate_; }
121 
getScoreWonForRound()122 	int getScoreWonForRound() { return scoreWonForRound_; }
getScoreWonForRoundEntry()123 	OptionEntryInt &getScoreWonForRoundEntry() { return scoreWonForRound_; }
124 
getScoreWonForLives()125 	int getScoreWonForLives() { return scoreWonForLives_; }
getScoreWonForLivesEntry()126 	OptionEntryInt &getScoreWonForLivesEntry() { return scoreWonForLives_; }
127 
getSkillForRound()128 	int getSkillForRound() { return skillForRound_; }
getSkillForRoundEntry()129 	OptionEntryInt &getSkillForRoundEntry() { return skillForRound_; }
130 
getSkillForMatch()131 	int getSkillForMatch() { return skillForMatch_; }
getSkillForMatchEntry()132 	OptionEntryInt &getSkillForMatchEntry() { return skillForMatch_; }
133 
getSkillForResign()134 	int getSkillForResign() { return skillForResign_; }
getSkillForResignEntry()135 	OptionEntryInt &getSkillForResignEntry() { return skillForResign_; }
136 
getMaxSkillLost()137 	int getMaxSkillLost() { return maxSkillLost_; }
getMaxSkillLostEntry()138 	OptionEntryInt &getMaxSkillLostEntry() { return maxSkillLost_; }
139 
getMaxSkillGained()140 	int getMaxSkillGained() { return maxSkillGained_; }
getMaxSkillGainedEntry()141 	OptionEntryInt &getMaxSkillGainedEntry() { return maxSkillGained_; }
142 
getSkillForSelfKill()143 	int getSkillForSelfKill() { return skillForSelfKill_; }
getSkillForSelfKillEntry()144 	OptionEntryInt &getSkillForSelfKillEntry() { return skillForSelfKill_; }
145 
getSkillForTeamKill()146 	int getSkillForTeamKill() { return skillForTeamKill_; }
getSkillForTeamKillEntry()147 	OptionEntryInt &getSkillForTeamKillEntry() { return skillForTeamKill_; }
148 
getTeams()149 	int getTeams() { return teams_; }
getTeamsEntry()150 	OptionEntryInt &getTeamsEntry() { return teams_; }
151 
getMinimumLandHeight()152 	int getMinimumLandHeight() { return minimumLandHeight_; }
getMinimumLandHeightEntry()153 	OptionEntryInt &getMinimumLandHeightEntry() { return minimumLandHeight_; }
154 
getWeaponSpeed()155 	int getWeaponSpeed() { return weaponSpeed_; }
getWeaponSpeedEntry()156 	OptionEntryInt &getWeaponSpeedEntry() { return weaponSpeed_; }
157 
getStartArmsLevel()158 	int getStartArmsLevel() { return startArmsLevel_; }
getStartArmsLevelEntry()159 	OptionEntryInt &getStartArmsLevelEntry() { return startArmsLevel_; }
160 
getEndArmsLevel()161 	int getEndArmsLevel() { return endArmsLevel_; }
getEndArmsLevelEntry()162 	OptionEntryInt &getEndArmsLevelEntry() { return endArmsLevel_; }
163 
getMaxNumberWeapons()164 	int getMaxNumberWeapons() { return maxNumberWeapons_; }
getMaxNumberWeaponsEntry()165 	OptionEntryInt &getMaxNumberWeaponsEntry() { return maxNumberWeapons_; }
166 
getNoMaxPlayers()167 	int getNoMaxPlayers() { return numberOfPlayers_; }
getNoMaxPlayersEntry()168 	OptionEntryInt &getNoMaxPlayersEntry() { return numberOfPlayers_; }
169 
getNoMinPlayers()170 	int getNoMinPlayers() { return numberOfMinPlayers_; }
getNoMinPlayersEntry()171 	OptionEntryInt &getNoMinPlayersEntry() { return numberOfMinPlayers_; }
172 
getNoRounds()173 	int getNoRounds() { return numberOfRounds_; }
getNoRoundsEntry()174 	OptionEntryInt &getNoRoundsEntry() { return numberOfRounds_; }
175 
getNoTurns()176 	int getNoTurns() { return maxRoundTurns_; }
getNoTurnsEntry()177 	OptionEntryInt &getNoTurnsEntry() { return maxRoundTurns_; }
178 
getRemoveBotsAtPlayers()179 	int getRemoveBotsAtPlayers() { return removeBotsAtPlayers_; }
getRemoveBotsAtPlayersEntry()180 	OptionEntryInt &getRemoveBotsAtPlayersEntry() { return removeBotsAtPlayers_; }
181 
getStartMoney()182 	int getStartMoney() { return moneyStarting_; }
getStartMoneyEntry()183 	OptionEntryInt &getStartMoneyEntry() { return moneyStarting_; }
184 
getInterest()185 	int getInterest() { return moneyInterest_; }
getInterestEntry()186 	OptionEntryInt &getInterestEntry() { return moneyInterest_; }
187 
getFreeMarketAdjustment()188 	int getFreeMarketAdjustment() { return freeMarketAdjustment_; }
getFreeMarketAdjustmentEntry()189 	OptionEntryInt &getFreeMarketAdjustmentEntry() { return freeMarketAdjustment_; }
190 
getFreeMarketLimits()191 	int getFreeMarketLimits() { return freeMarketLimits_; }
getFreeMarketLimitsEntry()192 	OptionEntryInt &getFreeMarketLimitsEntry() { return freeMarketLimits_; }
193 
getMaxLandscapeSize()194 	int getMaxLandscapeSize() { return maxLandscapeSize_; }
getMaxLandscapeSizeEntry()195 	OptionEntryInt &getMaxLandscapeSizeEntry() { return maxLandscapeSize_; }
196 
getStartTime()197 	int getStartTime() { return startTime_; }
getStartTimeEntry()198 	OptionEntryInt &getStartTimeEntry() { return startTime_; }
199 
getShotTime()200 	int getShotTime() { return shotTime_; }
getShotTimeEntry()201 	OptionEntryInt &getShotTimeEntry() { return shotTime_; }
202 
getAIShotTime()203 	int getAIShotTime() { return aiShotTime_; }
getAIShotTimeEntry()204 	OptionEntryInt &getAIShotTimeEntry() { return aiShotTime_; }
205 
getBuyingTime()206 	int getBuyingTime() { return buyingTime_; }
getBuyingTimeEntry()207 	OptionEntryInt &getBuyingTimeEntry() { return buyingTime_; }
208 
getRemoveTime()209 	int getRemoveTime() { return removeTime_; }
getRemoveTimeEntry()210 	OptionEntryInt &getRemoveTimeEntry() { return removeTime_; }
211 
getRoundTime()212 	int getRoundTime() { return roundTime_; }
getRoundTimeEntry()213 	OptionEntryInt &getRoundTimeEntry() { return roundTime_; }
214 
getRoundScoreTime()215 	int getRoundScoreTime() { return roundScoreTime_; }
getRoundScoreTimeEntry()216 	OptionEntryInt &getRoundScoreTimeEntry() { return roundScoreTime_; }
217 
getScoreTime()218 	int getScoreTime() { return scoreTime_; }
getScoreTimeEntry()219 	OptionEntryInt &getScoreTimeEntry() { return scoreTime_; }
220 
getIdleCycleTime()221 	int getIdleCycleTime() { return idleCycleTime_; }
getIdleCycleTimeEntry()222 	OptionEntryInt &getIdleCycleTimeEntry() { return idleCycleTime_; }
223 
getAllowedMissedMoves()224 	int getAllowedMissedMoves() { return allowedMissedMoves_; }
getAllowedMissedMovesEntry()225 	OptionEntryInt &getAllowedMissedMovesEntry() { return allowedMissedMoves_; }
226 
getMinFallingDistance()227 	int getMinFallingDistance() { return minFallingDistance_; }
getMinFallingDistanceEntry()228 	OptionEntryInt &getMinFallingDistanceEntry() { return minFallingDistance_; }
229 
getTankFallingDamage()230 	bool getTankFallingDamage() { return tankFallingDamage_; }
getTankFallingDamageEntry()231 	OptionEntryBool &getTankFallingDamageEntry() { return tankFallingDamage_; }
232 
getMaxClimbingDistance()233 	int getMaxClimbingDistance() { return maxClimbingDistance_; }
getMaxClimbingDistanceEntry()234 	OptionEntryInt &getMaxClimbingDistanceEntry() { return maxClimbingDistance_; }
235 
getPlayerLives()236 	int getPlayerLives() { return playerLives_; }
getPlayerLivesEntry()237 	OptionEntryInt &getPlayerLivesEntry() { return playerLives_; }
238 
getGravity()239 	int getGravity() { return gravity_; }
getGravityEntry()240 	OptionEntryInt &getGravityEntry() { return gravity_; }
241 
getWindForce()242 	OptionEntryEnum getWindForce() { return windForce_; } // WindForce
getWindForceEntry()243 	OptionEntryEnum &getWindForceEntry() { return windForce_; } // WindForce
244 
getWindType()245 	OptionEntryEnum getWindType() { return windType_; } // WindType
getWindTypeEntry()246 	OptionEntryEnum &getWindTypeEntry() { return windType_; } // WindType
247 
getWallType()248 	OptionEntryEnum getWallType() { return wallType_; } // WallType
getWallTypeEntry()249 	OptionEntryEnum &getWallTypeEntry() { return wallType_; } // WallType
250 
getWeapScale()251 	OptionEntryEnum getWeapScale() { return weapScale_; } // WeapScale
getWeapScaleEntry()252 	OptionEntryEnum &getWeapScaleEntry() { return weapScale_; } // WeapScale
253 
getTurnType()254 	OptionEntryEnum getTurnType() { return turnType_; } // TurnType
getTurnTypeEntry()255 	OptionEntryEnum &getTurnTypeEntry() { return turnType_; } // TurnType
256 
getBuyOnRound()257 	int getBuyOnRound() { return moneyBuyOnRound_; }
getBuyOnRoundEntry()258 	OptionEntryInt &getBuyOnRoundEntry() { return moneyBuyOnRound_; }
259 
getMoneyPerRound()260 	int getMoneyPerRound() { return moneyPerRound_; }
getMoneyPerRoundEntry()261 	OptionEntryInt &getMoneyPerRoundEntry() { return moneyPerRound_; }
262 
getMoneyWonForRound()263 	int getMoneyWonForRound() { return moneyWonForRound_; }
getMoneyWonForRoundEntry()264 	OptionEntryInt &getMoneyWonForRoundEntry() { return moneyWonForRound_; }
265 
getMoneyWonForLives()266 	int getMoneyWonForLives() { return moneyWonForLives_; }
getMoneyWonForLivesEntry()267 	OptionEntryInt &getMoneyWonForLivesEntry() { return moneyWonForLives_; }
268 
getMoneyWonPerKillPoint()269 	int getMoneyWonPerKillPoint() { return moneyPerKillPoint_; }
getMoneyWonPerKillPointEntry()270 	OptionEntryInt &getMoneyWonPerKillPointEntry() { return moneyPerKillPoint_; }
271 
getMoneyWonPerMultiKillPoint()272 	int getMoneyWonPerMultiKillPoint() { return moneyPerMultiKillPoint_; }
getMoneyWonPerMultiKillPointEntry()273 	OptionEntryInt &getMoneyWonPerMultiKillPointEntry() { return moneyPerMultiKillPoint_; }
274 
getMoneyWonPerAssistPoint()275 	int getMoneyWonPerAssistPoint() { return moneyPerAssistPoint_; }
getMoneyWonPerAssistPointEntry()276 	OptionEntryInt &getMoneyWonPerAssistPointEntry() { return moneyPerAssistPoint_; }
277 
getMoneyWonPerHitPoint()278 	int getMoneyWonPerHitPoint() { return moneyPerHitPoint_; }
getMoneyWonPerHitPointEntry()279 	OptionEntryInt &getMoneyWonPerHitPointEntry() { return moneyPerHitPoint_; }
280 
getMoneyPerHealthPoint()281 	bool getMoneyPerHealthPoint() { return moneyPerHealthPoint_; }
getMoneyPerHealthPointEntry()282 	OptionEntryBool &getMoneyPerHealthPointEntry() { return moneyPerHealthPoint_; }
283 
getLimitPowerByHealth()284 	bool getLimitPowerByHealth() { return limitPowerByHealth_; }
getLimitPowerByHealthEntry()285 	OptionEntryBool &getLimitPowerByHealthEntry() { return limitPowerByHealth_; }
286 
getTeamBallance()287 	OptionEntryEnum getTeamBallance() { return teamBallance_; } // TeamBallanceType
getTeamBallanceEntry()288 	OptionEntryEnum &getTeamBallanceEntry() { return teamBallance_; } // TeamBallanceType
289 
getComputersDeathTalk()290 	int getComputersDeathTalk() { return computersDeathTalk_; }
getComputersDeathTalkEntry()291 	OptionEntryInt &getComputersDeathTalkEntry() { return computersDeathTalk_; }
292 
getComputersAttackTalk()293 	int getComputersAttackTalk() { return computersAttackTalk_; }
getComputersAttackTalkEntry()294 	OptionEntryInt &getComputersAttackTalkEntry() { return computersAttackTalk_; }
295 
getEconomy()296 	const char * getEconomy() { return economy_; }
getEconomyEntry()297 	OptionEntryStringEnum &getEconomyEntry() { return economy_; }
298 
getLandscapes()299 	const char * getLandscapes() { return landscapes_; }
getLandscapesEntry()300 	OptionEntryString &getLandscapesEntry() { return landscapes_; }
301 
getStatsLogger()302 	const char * getStatsLogger() { return statsLogger_; }
getStatsLoggerEntry()303 	OptionEntryStringEnum &getStatsLoggerEntry() { return statsLogger_; }
304 
getServerFileLogger()305 	const char * getServerFileLogger() { return serverFileLogger_; }
getServerFileLoggerEntry()306 	OptionEntryStringEnum &getServerFileLoggerEntry() { return serverFileLogger_; }
307 
getBotNamePrefix()308 	const char * getBotNamePrefix() { return botNamePrefix_; }
getBotNamePrefixEntry()309 	OptionEntryString &getBotNamePrefixEntry() { return botNamePrefix_; }
310 
getGiveAllWeapons()311 	bool getGiveAllWeapons() { return giveAllWeapons_; }
getGiveAllWeaponsEntry()312 	OptionEntryBool &getGiveAllWeaponsEntry() { return giveAllWeapons_; }
313 
getCycleMaps()314 	bool getCycleMaps() { return cycleMaps_; }
getCycleMapsEntry()315 	OptionEntryBool &getCycleMapsEntry() { return cycleMaps_; }
316 
getResignMode()317 	int getResignMode() { return resignMode_; }
getResignModeEntry()318 	OptionEntryInt &getResignModeEntry() { return resignMode_; }
319 
getMovementRestriction()320 	OptionEntryEnum getMovementRestriction() { return movementRestriction_; } // MovementRestrictionType
getMovementRestrictionEntry()321 	OptionEntryEnum &getMovementRestrictionEntry() { return movementRestriction_; } // MovementRestrictionType
322 
getRandomizeBotNames()323 	bool getRandomizeBotNames() { return randomizeBotNames_; }
getRandomizeBotNamesEntry()324 	OptionEntryBool &getRandomizeBotNamesEntry() { return randomizeBotNames_; }
325 
getPortNo()326 	int getPortNo() { return portNo_; }
getPortNoEntry()327 	OptionEntryInt &getPortNoEntry() { return portNo_; }
328 
getManagementPortNo()329 	int getManagementPortNo() { return managementPortNo_; }
getManagementPortNoEntry()330 	OptionEntryInt &getManagementPortNoEntry() { return managementPortNo_; }
331 
getMod()332 	const char * getMod() { return mod_; }
getModEntry()333 	OptionEntryString &getModEntry() { return mod_; }
334 
getMOTD()335 	const char * getMOTD() { return motd_; }
getMOTDEntry()336 	OptionEntryString &getMOTDEntry() { return motd_; }
337 
getModDownloadSpeed()338 	int getModDownloadSpeed() { return modDownloadSpeed_; }
getModDownloadSpeedEntry()339 	OptionEntryInt &getModDownloadSpeedEntry() { return modDownloadSpeed_; }
340 
getMaxAvatarSize()341 	int getMaxAvatarSize() { return maxAvatarSize_; }
getMaxAvatarSizeEntry()342 	OptionEntryInt &getMaxAvatarSizeEntry() { return maxAvatarSize_; }
343 
getServerName()344 	const char * getServerName() { return serverName_; }
getServerNameEntry()345 	OptionEntryString &getServerNameEntry() { return serverName_; }
346 
getServerPassword()347 	const char * getServerPassword() { return serverPassword_; }
getServerPasswordEntry()348 	OptionEntryString &getServerPasswordEntry() { return serverPassword_; }
349 
getPlayerType(int no)350 	OptionEntryString &getPlayerType(int no) { DIALOG_ASSERT(no<24); return *playerType_[no]; }
351 
getPublishAddress()352 	const char * getPublishAddress() { return publishAddress_; }
getPublishAddressEntry()353 	OptionEntryString &getPublishAddressEntry() { return publishAddress_; }
354 
getAllowSameIP()355 	bool getAllowSameIP() { return allowSameIP_; }
getAllowSameIPEntry()356 	OptionEntryBool &getAllowSameIPEntry() { return allowSameIP_; }
357 
getAllowSameUniqueId()358 	bool getAllowSameUniqueId() { return allowSameUniqueId_; }
getAllowSameUniqueIdEntry()359 	OptionEntryBool &getAllowSameUniqueIdEntry() { return allowSameUniqueId_; }
360 
getPublishServer()361 	bool getPublishServer() { return publishServer_; }
getPublishServerEntry()362 	OptionEntryBool &getPublishServerEntry() { return publishServer_; }
363 
getUseUPnP()364 	bool getUseUPnP() { return useUPnP_; }
getUseUPnPEntry()365 	OptionEntryBool &getUseUPnPEntry() { return useUPnP_; }
366 
getUseUPnPLogging()367 	bool getUseUPnPLogging() { return useUPnPLogging_; }
getUseUPnPLoggingEntry()368 	OptionEntryBool &getUseUPnPLoggingEntry() { return useUPnPLogging_; }
369 
getResidualPlayers()370 	bool getResidualPlayers() { return residualPlayers_; }
getResidualPlayersEntry()371 	OptionEntryBool &getResidualPlayersEntry() { return residualPlayers_; }
372 
getDelayedDefenseActivation()373 	bool getDelayedDefenseActivation() { return delayedDefenseActivation_; }
getDelayedDefenseActivationEntry()374 	OptionEntryBool &getDelayedDefenseActivationEntry() { return delayedDefenseActivation_; }
375 
getAutoSendSyncCheck()376 	bool getAutoSendSyncCheck() { return autoSendSyncCheck_; }
getAutoSendSyncCheckEntry()377 	OptionEntryBool &getAutoSendSyncCheckEntry() { return autoSendSyncCheck_; }
378 
getWaitForShotsBeforeShowingScore()379 	bool getWaitForShotsBeforeShowingScore() { return waitForShotsBeforeShowingScore_; }
getWaitForShotsBeforeShowingScoreEntry()380 	OptionEntryBool &getWaitForShotsBeforeShowingScoreEntry() { return waitForShotsBeforeShowingScore_; }
381 
getActionSyncCheck()382 	bool getActionSyncCheck() { return actionSyncCheck_; }
getActionSyncCheckEntry()383 	OptionEntryBool &getActionSyncCheckEntry() { return actionSyncCheck_; }
384 
getActionRandomSyncCheck()385 	bool getActionRandomSyncCheck() { return actionRandomSyncCheck_; }
getActionRandomSyncCheckEntry()386 	OptionEntryBool &getActionRandomSyncCheckEntry() { return actionRandomSyncCheck_; }
387 
getActionMovementSyncCheck()388 	bool getActionMovementSyncCheck() { return actionMovementSyncCheck_; }
getActionMovementSyncCheckEntry()389 	OptionEntryBool &getActionMovementSyncCheckEntry() { return actionMovementSyncCheck_; }
390 
getActionCollisionSyncCheck()391 	bool getActionCollisionSyncCheck() { return actionCollisionSyncCheck_; }
getActionCollisionSyncCheckEntry()392 	OptionEntryBool &getActionCollisionSyncCheckEntry() { return actionCollisionSyncCheck_; }
393 
getTargetPlacementSyncCheck()394 	bool getTargetPlacementSyncCheck() { return targetPlacementSyncCheck_; }
getTargetPlacementSyncCheckEntry()395 	OptionEntryBool &getTargetPlacementSyncCheckEntry() { return targetPlacementSyncCheck_; }
396 
getWeaponSyncCheck()397 	bool getWeaponSyncCheck() { return weaponSyncCheck_; }
getWeaponSyncCheckEntry()398 	OptionEntryBool &getWeaponSyncCheckEntry() { return weaponSyncCheck_; }
399 
getAuthHandler()400 	const char *getAuthHandler() { return authHandler_; }
getAuthHandlerEntry()401 	OptionEntryStringEnum &getAuthHandlerEntry() { return authHandler_; }
402 
getAuthHandlerParam1()403 	const char *getAuthHandlerParam1() { return authHandlerParam1_; }
getAuthHandlerParam1Entry()404 	OptionEntryString &getAuthHandlerParam1Entry() { return authHandlerParam1_; }
405 
getAuthHandlerParam2()406 	const char *getAuthHandlerParam2() { return authHandlerParam2_; }
getAuthHandlerParam2Entry()407 	OptionEntryString &getAuthHandlerParam2Entry() { return authHandlerParam2_; }
408 
getRegisteredUserNames()409 	bool getRegisteredUserNames() { return registeredUserNames_; }
getRegisteredUserNamesEntry()410 	OptionEntryBool &getRegisteredUserNamesEntry() { return registeredUserNames_; }
411 
getAllowMultiLingualChat()412 	bool getAllowMultiLingualChat() { return allowMultiLingualChat_; }
getAllowMultiLingualChatEntry()413 	OptionEntryBool &getAllowMultiLingualChatEntry() { return allowMultiLingualChat_; }
414 
getAllowMultiLingualNames()415 	bool getAllowMultiLingualNames() { return allowMultiLingualNames_; }
getAllowMultiLingualNamesEntry()416 	OptionEntryBool &getAllowMultiLingualNamesEntry() { return allowMultiLingualNames_; }
417 
getDebugFeatures()418 	bool getDebugFeatures() { return debugFeatures_; }
getDebugFeaturesEntry()419 	OptionEntryBool &getDebugFeaturesEntry() { return debugFeatures_; }
420 
421 	// Fns used to save or restore the state of the options
422 	std::list<OptionEntry *> &getOptions();
423 	std::list<OptionEntry *> &getPlayerTypeOptions();
424 	virtual bool writeOptionsToFile(const std::string &filePath, bool allOptions);
425 	virtual bool readOptionsFromFile(const std::string &filePath);
426 	virtual bool writeToBuffer(NetBuffer &buffer, bool useProtected, bool usePlayerTypes);
427 	virtual bool readFromBuffer(NetBufferReader &reader, bool useProtected, bool usePlayerTypes);
428 
429 protected:
430 	std::list<OptionEntry *> options_;
431 	std::list<OptionEntry *> playerTypeOptions_;
432 
433 	OptionEntryBoundedInt weaponSpeed_;
434 	OptionEntryBoundedInt startArmsLevel_;
435 	OptionEntryBoundedInt endArmsLevel_;
436 	OptionEntryBoundedInt shotTime_;
437 	OptionEntryBoundedInt aiShotTime_;
438 	OptionEntryBoundedInt startTime_;
439 	OptionEntryBoundedInt buyingTime_;
440 	OptionEntryBoundedInt removeTime_;
441 	OptionEntryBoundedInt roundTime_;
442 	OptionEntryBoundedInt roundScoreTime_;
443 	OptionEntryBoundedInt scoreTime_;
444 	OptionEntryBoundedInt idleCycleTime_;
445 	OptionEntryBoundedInt allowedMissedMoves_;
446 	OptionEntryBoundedInt numberOfRounds_;
447 	OptionEntryBoundedInt maxRoundTurns_;
448 	OptionEntryBoundedInt maxNumberWeapons_;
449 	OptionEntryBoundedInt gravity_;
450 	OptionEntryBoundedInt minFallingDistance_;
451 	OptionEntryBool tankFallingDamage_;
452 	OptionEntryBoundedInt maxClimbingDistance_;
453 	OptionEntryBoundedInt playerLives_;
454 	OptionEntryBoundedInt teams_;
455 	OptionEntryBoundedInt numberOfPlayers_;
456 	OptionEntryBoundedInt numberOfMinPlayers_;
457 	OptionEntryBoundedInt removeBotsAtPlayers_;
458 	OptionEntryBoundedInt computersDeathTalk_;
459 	OptionEntryBoundedInt computersAttackTalk_;
460 	OptionEntryBoundedInt moneyBuyOnRound_;
461 	OptionEntryBoundedInt moneyWonForRound_;
462 	OptionEntryBoundedInt moneyWonForLives_;
463 	OptionEntryBoundedInt moneyPerKillPoint_;
464 	OptionEntryBoundedInt moneyPerMultiKillPoint_;
465 	OptionEntryBoundedInt moneyPerAssistPoint_;
466 	OptionEntryBoundedInt moneyPerHitPoint_;
467 	OptionEntryBoundedInt moneyPerRound_;
468 	OptionEntryBool moneyPerHealthPoint_;
469 	OptionEntryBoundedInt scorePerMoney_;
470 	OptionEntryBoundedInt scorePerAssist_;
471 	OptionEntryBoundedInt scorePerKill_;
472 	OptionEntryBoundedInt scorePerResign_;
473 	OptionEntryBoundedInt scorePerSpectate_;
474 	OptionEntryBoundedInt scoreWonForRound_;
475 	OptionEntryBoundedInt scoreWonForLives_;
476 	OptionEntryInt maxLandscapeSize_;
477 	OptionEntryInt freeMarketAdjustment_;
478 	OptionEntryInt freeMarketLimits_;
479 	OptionEntryInt minimumLandHeight_;
480 	OptionEntryBoundedInt skillForRound_;
481 	OptionEntryBoundedInt skillForMatch_;
482 	OptionEntryBoundedInt skillForResign_;
483 	OptionEntryBoundedInt maxSkillLost_;
484 	OptionEntryBoundedInt maxSkillGained_;
485 	OptionEntryBoundedInt skillForSelfKill_;
486 	OptionEntryBoundedInt skillForTeamKill_;
487 	OptionEntryBoundedInt moneyStarting_;
488 	OptionEntryEnum teamBallance_;
489 	OptionEntryBoundedInt moneyInterest_;
490 	OptionEntryBool limitPowerByHealth_;
491 	OptionEntryString tutorial_;
492 	OptionEntryBool cycleMaps_;
493 	OptionEntryEnum resignMode_;
494 	OptionEntryEnum movementRestriction_;
495 	OptionEntryEnum turnType_;
496 	OptionEntryEnum windForce_;
497 	OptionEntryEnum windType_;
498 	OptionEntryEnum wallType_;
499 	OptionEntryEnum weapScale_;
500 	OptionEntryBoundedInt modDownloadSpeed_;
501 	OptionEntryInt maxAvatarSize_;
502 	OptionEntryString mod_;
503 	OptionEntryString motd_;
504 	OptionEntryStringEnum economy_;
505 	OptionEntryString landscapes_;
506 	OptionEntryStringEnum statsLogger_;
507 	OptionEntryStringEnum serverFileLogger_;
508 	OptionEntryBool waitForShotsBeforeShowingScore_;
509 
510 	// Server only options
511 	OptionEntryString botNamePrefix_;
512 	OptionEntryBool actionSyncCheck_;
513 	OptionEntryBool actionMovementSyncCheck_;
514 	OptionEntryBool actionRandomSyncCheck_;
515 	OptionEntryBool actionCollisionSyncCheck_;
516 	OptionEntryBool targetPlacementSyncCheck_;
517 	OptionEntryBool weaponSyncCheck_;
518 	OptionEntryBool autoSendSyncCheck_;
519 	OptionEntryBool residualPlayers_;
520 	OptionEntryBool delayedDefenseActivation_;
521 	OptionEntryBool randomizeBotNames_;
522 	OptionEntryBool giveAllWeapons_;
523 	OptionEntryBool registeredUserNames_;
524 	OptionEntryBool allowMultiLingualChat_;
525 	OptionEntryBool allowMultiLingualNames_;
526 	OptionEntryStringEnum authHandler_;
527 	OptionEntryString authHandlerParam1_;
528 	OptionEntryString authHandlerParam2_;
529 	OptionEntryString serverName_;
530 	OptionEntryString *playerType_[24];
531 	OptionEntryString serverPassword_;
532 	OptionEntryInt portNo_;
533 	OptionEntryInt managementPortNo_;
534 	OptionEntryString publishAddress_;
535 	OptionEntryBool publishServer_;
536 	OptionEntryBool useUPnP_;
537 	OptionEntryBool useUPnPLogging_;
538 	OptionEntryBool allowSameIP_;
539 	OptionEntryBool allowSameUniqueId_;
540 	OptionEntryBool debugFeatures_;
541 
542 	// Depricated (old)
543 	OptionEntryBoundedInt depricatedIdleKickTime_;
544 	OptionEntryBoundedInt depricatedIdleShotKickTime_;
545 	OptionEntryBoundedInt depricatedKeepAliveTime_;
546 	OptionEntryBoundedInt depricatedKeepAliveTimeoutTime_;
547 	OptionEntryEnum depricatedScoreType_;
548 	OptionEntryBool depricatedAutoBallanceTeams_;
549 	OptionEntryBoundedInt depricatedMaxArmsLevel_;
550 	OptionEntryString depricatedServerAdminPassword_;
551 	OptionEntryString depricatedMasterListServer_;
552 	OptionEntryString depricatedMasterListServerURI_;
553 
554 };
555 
556 #endif
557