Codechange: use GSCompanyMode::IsValid, IsDeity, and the precondition helpers

Direct 1:1 replacements in the code, and comments now refer to either
GSCompanyMode::IsValid or GSCompanyMode::IsDeity instead of several variations
on "company mode active" or "no company mode active".
This commit is contained in:
Rubidium
2023-03-02 19:44:13 +01:00
committed by rubidium42
parent cada2ca310
commit 83946ca31d
46 changed files with 227 additions and 226 deletions

View File

@@ -33,7 +33,7 @@ public:
* Scroll the viewport of all players to the given tile,
* where the tile will be in the center of the screen.
* @param tile The tile to put in the center of the screen.
* @pre ScriptObject::GetCompany() == OWNER_DEITY
* @pre ScriptCompanyMode::IsDeity().
* @pre ScriptMap::IsValidTile(tile)
* @return True iff the command was executed successfully.
*/
@@ -44,7 +44,7 @@ public:
* where the tile will be in the center of the screen.
* @param company The company which players to scroll the viewport of.
* @param tile The tile to put in the center of the screen.
* @pre ScriptObject::GetCompany() == OWNER_DEITY
* @pre ScriptCompanyMode::IsDeity().
* @pre ScriptMap::IsValidTile(tile)
* @pre ResolveCompanyID(company) != COMPANY_INVALID
* @return True iff the command was executed successfully.
@@ -57,7 +57,7 @@ public:
* @param client The client to scroll the viewport of.
* @param tile The tile to put in the center of the screen.
* @pre ScriptGame::IsMultiplayer()
* @pre ScriptObject::GetCompany() == OWNER_DEITY
* @pre ScriptCompanyMode::IsDeity().
* @pre ScriptMap::IsValidTile(tile)
* @pre ResolveClientID(client) != CLIENT_INVALID
* @return True iff the command was executed successfully.