Browse Source

Merge remote-tracking branch 'upstream/develop' into develop

Xilmi 1 year ago
parent
commit
6f9309696d
100 changed files with 192 additions and 156 deletions
  1. 1 2
      AI/BattleAI/BattleEvaluator.cpp
  2. 1 1
      AI/Nullkiller/Goals/CompleteQuest.cpp
  3. 1 1
      CCallback.cpp
  4. 1 1
      client/ArtifactsUIController.cpp
  5. 1 1
      client/CMT.cpp
  6. 3 2
      client/CPlayerInterface.cpp
  7. 1 1
      client/CServerHandler.cpp
  8. 1 1
      client/ClientCommandManager.cpp
  9. 2 3
      client/GameChatHandler.cpp
  10. 1 1
      client/NetPacksClient.cpp
  11. 1 1
      client/NetPacksLobbyClient.cpp
  12. 1 1
      client/adventureMap/AdventureMapInterface.cpp
  13. 1 1
      client/adventureMap/AdventureMapShortcuts.cpp
  14. 1 1
      client/adventureMap/AdventureOptions.cpp
  15. 1 2
      client/adventureMap/CInGameConsole.cpp
  16. 1 1
      client/adventureMap/CInfoBar.cpp
  17. 1 1
      client/adventureMap/CList.cpp
  18. 1 1
      client/adventureMap/CMinimap.cpp
  19. 1 1
      client/adventureMap/CResDataBar.cpp
  20. 1 1
      client/battle/BattleActionsController.cpp
  21. 1 1
      client/battle/BattleEffectsController.cpp
  22. 1 1
      client/battle/BattleInterface.cpp
  23. 2 2
      client/battle/BattleInterfaceClasses.cpp
  24. 1 1
      client/battle/BattleInterfaceClasses.h
  25. 1 1
      client/battle/BattleStacksController.cpp
  26. 1 1
      client/battle/BattleWindow.cpp
  27. 3 3
      client/globalLobby/GlobalLobbyClient.cpp
  28. 1 1
      client/globalLobby/GlobalLobbyInviteWindow.cpp
  29. 2 2
      client/globalLobby/GlobalLobbyLoginWindow.cpp
  30. 2 2
      client/globalLobby/GlobalLobbyRoomWindow.cpp
  31. 2 2
      client/globalLobby/GlobalLobbyServerSetup.cpp
  32. 2 2
      client/globalLobby/GlobalLobbyWidget.cpp
  33. 3 3
      client/globalLobby/GlobalLobbyWindow.cpp
  34. 1 1
      client/gui/InterfaceObjectConfigurable.cpp
  35. 1 1
      client/lobby/CBonusSelection.cpp
  36. 1 1
      client/lobby/CCampaignInfoScreen.cpp
  37. 1 1
      client/lobby/CLobbyScreen.cpp
  38. 1 1
      client/lobby/CSavingScreen.cpp
  39. 1 1
      client/lobby/CScenarioInfoScreen.cpp
  40. 1 2
      client/lobby/CSelectionBase.cpp
  41. 1 1
      client/lobby/OptionsTab.cpp
  42. 3 3
      client/lobby/OptionsTabBase.cpp
  43. 1 1
      client/lobby/RandomMapTab.cpp
  44. 2 2
      client/lobby/SelectionTab.cpp
  45. 1 1
      client/mainmenu/CCampaignScreen.cpp
  46. 2 3
      client/mainmenu/CHighScoreScreen.cpp
  47. 51 18
      client/mainmenu/CMainMenu.cpp
  48. 4 2
      client/mainmenu/CMainMenu.h
  49. 1 1
      client/mapView/mapHandler.cpp
  50. 2 2
      client/media/CVideoHandler.cpp
  51. 5 1
      client/render/CAnimation.cpp
  52. 1 1
      client/render/Graphics.cpp
  53. 1 1
      client/render/IFont.cpp
  54. 2 2
      client/renderSDL/CBitmapFont.cpp
  55. 1 1
      client/renderSDL/CBitmapHanFont.cpp
  56. 1 1
      client/renderSDL/CTrueTypeFont.cpp
  57. 1 1
      client/widgets/Buttons.cpp
  58. 1 1
      client/widgets/CArtPlace.cpp
  59. 1 1
      client/widgets/CComponent.cpp
  60. 2 2
      client/widgets/CGarrisonInt.cpp
  61. 1 1
      client/widgets/CTextInput.cpp
  62. 1 1
      client/widgets/Images.cpp
  63. 2 2
      client/widgets/MiscWidgets.cpp
  64. 1 1
      client/widgets/RadialMenu.cpp
  65. 1 1
      client/widgets/TextControls.cpp
  66. 1 1
      client/widgets/markets/CAltarArtifacts.cpp
  67. 1 2
      client/widgets/markets/CAltarCreatures.cpp
  68. 1 1
      client/widgets/markets/CArtifactsBuying.cpp
  69. 1 1
      client/widgets/markets/CArtifactsSelling.cpp
  70. 1 2
      client/widgets/markets/CFreelancerGuild.cpp
  71. 1 1
      client/widgets/markets/CMarketBase.cpp
  72. 1 2
      client/widgets/markets/CMarketResources.cpp
  73. 2 2
      client/widgets/markets/CTransferResources.cpp
  74. 1 1
      client/widgets/markets/TradePanels.cpp
  75. 1 1
      client/windows/CCastleInterface.cpp
  76. 2 2
      client/windows/CCreatureWindow.cpp
  77. 4 4
      client/windows/CExchangeWindow.cpp
  78. 1 1
      client/windows/CHeroOverview.cpp
  79. 1 1
      client/windows/CHeroWindow.cpp
  80. 1 1
      client/windows/CKingdomInterface.cpp
  81. 3 4
      client/windows/CMapOverview.cpp
  82. 1 1
      client/windows/CMarketWindow.cpp
  83. 2 2
      client/windows/CMessage.cpp
  84. 1 1
      client/windows/CPuzzleWindow.cpp
  85. 1 2
      client/windows/CQuestLog.cpp
  86. 1 1
      client/windows/CSpellWindow.cpp
  87. 1 1
      client/windows/CTutorialWindow.cpp
  88. 1 1
      client/windows/CWindowObject.cpp
  89. 1 1
      client/windows/CWindowWithArtifacts.cpp
  90. 1 1
      client/windows/GUIClasses.cpp
  91. 1 1
      client/windows/settings/BattleOptionsTab.cpp
  92. 1 1
      client/windows/settings/GeneralOptionsTab.cpp
  93. 1 1
      client/windows/settings/SettingsMainWindow.cpp
  94. 5 0
      config/schemas/settings.json
  95. 2 2
      launcher/firstLaunch/firstlaunch_moc.cpp
  96. 2 2
      launcher/languages.cpp
  97. 1 1
      launcher/mainwindow_moc.cpp
  98. 1 1
      launcher/modManager/cmodlistview_moc.cpp
  99. 2 1
      lib/CArtHandler.cpp
  100. 1 1
      lib/CBonusTypeHandler.cpp

+ 1 - 2
AI/BattleAI/BattleEvaluator.cpp

@@ -291,10 +291,9 @@ BattleAction BattleEvaluator::goTowardsNearest(const CStack * stack, std::vector
 		std::vector<BattleHex> copy = targetHexes;
 
 		for(auto hex : copy)
-		{
 			vstd::concatenate(targetHexes, hex.allNeighbouringTiles());
-		}
 
+		vstd::erase_if(targetHexes, [](const BattleHex & hex) {return !hex.isValid();});
 		vstd::removeDuplicates(targetHexes);
 	}
 

+ 1 - 1
AI/Nullkiller/Goals/CompleteQuest.cpp

@@ -12,7 +12,7 @@
 #include "../Behaviors/CaptureObjectsBehavior.h"
 #include "../AIGateway.h"
 #include "../../../lib/VCMI_Lib.h"
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 
 namespace NKAI
 {

+ 1 - 1
CCallback.cpp

@@ -18,7 +18,7 @@
 #include "lib/mapObjects/CGHeroInstance.h"
 #include "lib/mapObjects/CGTownInstance.h"
 #include "lib/CBuildingHandler.h"
-#include "lib/CGeneralTextHandler.h"
+#include "lib/texts/CGeneralTextHandler.h"
 #include "lib/CHeroHandler.h"
 #include "lib/CArtHandler.h"
 #include "lib/GameConstants.h"

+ 1 - 1
client/ArtifactsUIController.cpp

@@ -15,7 +15,7 @@
 
 #include "../CCallback.h"
 #include "../lib/ArtifactUtils.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/mapObjects/CGHeroInstance.h"
 
 #include "gui/CGuiHandler.h"

+ 1 - 1
client/CMT.cpp

@@ -32,7 +32,7 @@
 #include "render/Graphics.h"
 
 #include "../lib/CConfigHandler.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/CThreadHelper.h"
 #include "../lib/ExceptionsCommon.h"
 #include "../lib/VCMIDirs.h"

+ 3 - 2
client/CPlayerInterface.cpp

@@ -67,7 +67,7 @@
 #include "../CCallback.h"
 
 #include "../lib/CConfigHandler.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/CHeroHandler.h"
 #include "../lib/CPlayerState.h"
 #include "../lib/CRandomGenerator.h"
@@ -79,7 +79,6 @@
 #include "../lib/RoadHandler.h"
 #include "../lib/StartInfo.h"
 #include "../lib/TerrainHandler.h"
-#include "../lib/TextOperations.h"
 #include "../lib/UnlockGuard.h"
 #include "../lib/VCMIDirs.h"
 
@@ -108,6 +107,8 @@
 
 #include "../lib/spells/CSpellHandler.h"
 
+#include "../lib/texts/TextOperations.h"
+
 // The macro below is used to mark functions that are called by client when game state changes.
 // They all assume that interface mutex is locked.
 #define EVENT_HANDLER_CALLED_BY_CLIENT

+ 1 - 1
client/CServerHandler.cpp

@@ -28,7 +28,7 @@
 #include "mainmenu/CHighScoreScreen.h"
 
 #include "../lib/CConfigHandler.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "ConditionalWait.h"
 #include "../lib/CThreadHelper.h"
 #include "../lib/StartInfo.h"

+ 1 - 1
client/ClientCommandManager.cpp

@@ -30,7 +30,7 @@
 #include "../lib/mapObjects/CGHeroInstance.h"
 #include "render/CAnimation.h"
 #include "../CCallback.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/filesystem/Filesystem.h"
 #include "../lib/modding/CModHandler.h"
 #include "../lib/modding/ContentTypeHandler.h"

+ 2 - 3
client/GameChatHandler.cpp

@@ -21,12 +21,11 @@
 #include "../CCallback.h"
 
 #include "../lib/networkPacks/PacksForLobby.h"
-#include "../lib/TextOperations.h"
 #include "../lib/mapObjects/CArmedInstance.h"
 #include "../lib/CConfigHandler.h"
-#include "../lib/MetaString.h"
 #include "../lib/VCMI_Lib.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
+#include "../lib/texts/TextOperations.h"
 
 const std::vector<GameChatMessage> & GameChatHandler::getChatHistory() const
 {

+ 1 - 1
client/NetPacksClient.cpp

@@ -31,7 +31,7 @@
 #include "../lib/filesystem/FileInfo.h"
 #include "../lib/serializer/BinarySerializer.h"
 #include "../lib/serializer/Connection.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/CHeroHandler.h"
 #include "../lib/VCMI_Lib.h"
 #include "../lib/mapping/CMap.h"

+ 1 - 1
client/NetPacksLobbyClient.cpp

@@ -33,7 +33,7 @@
 #include "widgets/TextControls.h"
 
 #include "../lib/CConfigHandler.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/serializer/Connection.h"
 
 void ApplyOnLobbyHandlerNetPackVisitor::visitLobbyClientConnected(LobbyClientConnected & pack)

+ 1 - 1
client/adventureMap/AdventureMapInterface.cpp

@@ -40,7 +40,7 @@
 #include "../../CCallback.h"
 #include "../../lib/GameSettings.h"
 #include "../../lib/StartInfo.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/spells/CSpellHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/mapObjects/CGTownInstance.h"

+ 1 - 1
client/adventureMap/AdventureMapShortcuts.cpp

@@ -31,7 +31,7 @@
 
 #include "../../CCallback.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/mapObjects/CGTownInstance.h"
 #include "../../lib/mapping/CMap.h"

+ 1 - 1
client/adventureMap/AdventureOptions.cpp

@@ -23,7 +23,7 @@
 
 #include "../../CCallback.h"
 #include "../../lib/StartInfo.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 
 AdventureOptions::AdventureOptions()
 	: CWindowObject(PLAYER_COLORED, ImagePath::builtin("ADVOPTS"))

+ 1 - 2
client/adventureMap/CInGameConsole.cpp

@@ -30,9 +30,8 @@
 #include "../../CCallback.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CThreadHelper.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/mapObjects/CArmedInstance.h"
-#include "../../lib/MetaString.h"
+#include "../../lib/texts/TextOperations.h"
 
 CInGameConsole::CInGameConsole()
 	: CIntObject(KEYBOARD | TIME | TEXTINPUT)

+ 1 - 1
client/adventureMap/CInfoBar.cpp

@@ -29,7 +29,7 @@
 
 #include "../../CCallback.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/mapObjects/CGTownInstance.h"
 

+ 1 - 1
client/adventureMap/CList.cpp

@@ -26,7 +26,7 @@
 #include "../render/Canvas.h"
 #include "../render/Colors.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/GameSettings.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"

+ 1 - 1
client/adventureMap/CMinimap.cpp

@@ -26,7 +26,7 @@
 #include "../windows/InfoWindows.h"
 
 #include "../../CCallback.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/TerrainHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/mapping/CMapDefines.h"

+ 1 - 1
client/adventureMap/CResDataBar.cpp

@@ -21,7 +21,7 @@
 
 #include "../../CCallback.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/ResourceSet.h"
 
 CResDataBar::CResDataBar(const ImagePath & imageName, const Point & position)

+ 1 - 1
client/battle/BattleActionsController.cpp

@@ -28,7 +28,7 @@
 
 #include "../../CCallback.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CRandomGenerator.h"
 #include "../../lib/CStack.h"
 #include "../../lib/battle/BattleAction.h"

+ 1 - 1
client/battle/BattleEffectsController.cpp

@@ -31,7 +31,7 @@
 #include "../../lib/networkPacks/PacksForClientBattle.h"
 #include "../../lib/CStack.h"
 #include "../../lib/IGameEventsReceiver.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 
 BattleEffectsController::BattleEffectsController(BattleInterface & owner):
 	owner(owner)

+ 1 - 1
client/battle/BattleInterface.cpp

@@ -38,7 +38,7 @@
 #include "../../lib/BattleFieldHandler.h"
 #include "../../lib/CStack.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/gameState/InfoAboutArmy.h"
 #include "../../lib/mapObjects/CGTownInstance.h"

+ 2 - 2
client/battle/BattleInterfaceClasses.cpp

@@ -51,13 +51,13 @@
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CCreatureHandler.h"
 #include "../../lib/gameState/InfoAboutArmy.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 #include "../../lib/CTownHandler.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/StartInfo.h"
 #include "../../lib/mapObjects/CGTownInstance.h"
 #include "../../lib/networkPacks/PacksForClientBattle.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/json/JsonUtils.h"
 
 

+ 1 - 1
client/battle/BattleInterfaceClasses.h

@@ -13,8 +13,8 @@
 #include "../gui/CIntObject.h"
 #include "../../lib/FunctionList.h"
 #include "../../lib/battle/BattleHex.h"
+#include "../../lib/texts/MetaString.h"
 #include "../windows/CWindowObject.h"
-#include "../../lib/MetaString.h"
 
 VCMI_LIB_NAMESPACE_BEGIN
 

+ 1 - 1
client/battle/BattleStacksController.cpp

@@ -37,9 +37,9 @@
 #include "../../lib/spells/ISpellMechanics.h"
 #include "../../lib/battle/BattleAction.h"
 #include "../../lib/battle/BattleHex.h"
+#include "../../lib/texts/TextOperations.h"
 #include "../../lib/CRandomGenerator.h"
 #include "../../lib/CStack.h"
-#include "../../lib/TextOperations.h"
 
 static void onAnimationFinished(const CStack *stack, std::weak_ptr<CreatureAnimation> anim)
 {

+ 1 - 1
client/battle/BattleWindow.cpp

@@ -34,7 +34,7 @@
 #include "../adventureMap/TurnTimerWidget.h"
 
 #include "../../CCallback.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/gameState/InfoAboutArmy.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/CStack.h"

+ 3 - 3
client/globalLobby/GlobalLobbyClient.cpp

@@ -25,10 +25,10 @@
 #include "../windows/InfoWindows.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/MetaString.h"
 #include "../../lib/json/JsonUtils.h"
-#include "../../lib/TextOperations.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/MetaString.h"
+#include "../../lib/texts/TextOperations.h"
 
 GlobalLobbyClient::GlobalLobbyClient()
 {

+ 1 - 1
client/globalLobby/GlobalLobbyInviteWindow.cpp

@@ -22,8 +22,8 @@
 #include "../widgets/ObjectLists.h"
 #include "../widgets/TextControls.h"
 
-#include "../../lib/MetaString.h"
 #include "../../lib/json/JsonNode.h"
+#include "../../lib/texts/MetaString.h"
 
 GlobalLobbyInviteAccountCard::GlobalLobbyInviteAccountCard(const GlobalLobbyAccount & accountDescription)
 	: accountID(accountDescription.accountID)

+ 2 - 2
client/globalLobby/GlobalLobbyLoginWindow.cpp

@@ -25,8 +25,8 @@
 #include "../widgets/TextControls.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/MetaString.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/MetaString.h"
 
 GlobalLobbyLoginWindow::GlobalLobbyLoginWindow()
 	: CWindowObject(BORDERED)

+ 2 - 2
client/globalLobby/GlobalLobbyRoomWindow.cpp

@@ -26,10 +26,10 @@
 #include "../widgets/GraphicalPrimitiveCanvas.h"
 #include "../widgets/ObjectLists.h"
 
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/MetaString.h"
 #include "../../lib/modding/CModHandler.h"
 #include "../../lib/modding/CModInfo.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/MetaString.h"
 
 GlobalLobbyRoomAccountCard::GlobalLobbyRoomAccountCard(const GlobalLobbyAccount & accountDescription)
 {

+ 2 - 2
client/globalLobby/GlobalLobbyServerSetup.cpp

@@ -23,8 +23,8 @@
 #include "../widgets/TextControls.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/MetaString.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/MetaString.h"
 
 GlobalLobbyServerSetup::GlobalLobbyServerSetup()
 	: CWindowObject(BORDERED)

+ 2 - 2
client/globalLobby/GlobalLobbyWidget.cpp

@@ -30,8 +30,8 @@
 #include "../widgets/TextControls.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/Languages.h"
-#include "../../lib/MetaString.h"
+#include "../../lib/texts/Languages.h"
+#include "../../lib/texts/MetaString.h"
 
 GlobalLobbyWidget::GlobalLobbyWidget(GlobalLobbyWindow * window)
 	: window(window)

+ 3 - 3
client/globalLobby/GlobalLobbyWindow.cpp

@@ -23,9 +23,9 @@
 #include "../widgets/ObjectLists.h"
 #include "../widgets/TextControls.h"
 
-#include "../../lib/Languages.h"
-#include "../../lib/MetaString.h"
-#include "../../lib/TextOperations.h"
+#include "../../lib/texts/Languages.h"
+#include "../../lib/texts/MetaString.h"
+#include "../../lib/texts/TextOperations.h"
 
 GlobalLobbyWindow::GlobalLobbyWindow()
 	: CWindowObject(BORDERED)

+ 1 - 1
client/gui/InterfaceObjectConfigurable.cpp

@@ -32,7 +32,7 @@
 
 #include "../../lib/constants/StringConstants.h"
 #include "../../lib/json/JsonUtils.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/filesystem/ResourcePath.h"
 
 InterfaceObjectConfigurable::InterfaceObjectConfigurable(const JsonNode & config, int used, Point offset):

+ 1 - 1
client/lobby/CBonusSelection.cpp

@@ -39,7 +39,7 @@
 #include "../gui/WindowHandler.h"
 
 #include "../../lib/filesystem/Filesystem.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CBuildingHandler.h"
 #include "../../lib/CConfigHandler.h"

+ 1 - 1
client/lobby/CCampaignInfoScreen.cpp

@@ -12,7 +12,7 @@
 #include "CCampaignInfoScreen.h"
 
 #include "../../CCallback.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/StartInfo.h"
 #include "../../lib/mapping/CMapInfo.h"
 #include "../../lib/mapping/CMapHeader.h"

+ 1 - 1
client/lobby/CLobbyScreen.cpp

@@ -28,7 +28,7 @@
 #include "../../CCallback.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/campaign/CampaignHandler.h"
 #include "../../lib/mapping/CMapInfo.h"
 #include "../../lib/networkPacks/PacksForLobby.h"

+ 1 - 1
client/lobby/CSavingScreen.cpp

@@ -21,7 +21,7 @@
 
 #include "../../CCallback.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/StartInfo.h"
 #include "../../lib/filesystem/Filesystem.h"
 #include "../../lib/mapping/CMapInfo.h"

+ 1 - 1
client/lobby/CScenarioInfoScreen.cpp

@@ -20,7 +20,7 @@
 
 #include "../../CCallback.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/StartInfo.h"
 #include "../../lib/mapping/CMapInfo.h"
 #include "../../lib/mapping/CMapHeader.h"

+ 1 - 2
client/lobby/CSelectionBase.cpp

@@ -43,12 +43,11 @@
 #include "../render/IFont.h"
 #include "../render/IRenderHandler.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/CTownHandler.h"
 #include "../../lib/CRandomGenerator.h"
 #include "../../lib/CThreadHelper.h"
-#include "../../lib/MetaString.h"
 #include "../../lib/filesystem/Filesystem.h"
 #include "../../lib/mapping/CMapHeader.h"
 #include "../../lib/mapping/CMapInfo.h"

+ 1 - 1
client/lobby/OptionsTab.cpp

@@ -36,7 +36,7 @@
 
 #include "../../lib/filesystem/Filesystem.h"
 #include "../../lib/networkPacks/PacksForLobby.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CArtHandler.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CTownHandler.h"

+ 3 - 3
client/lobby/OptionsTabBase.cpp

@@ -20,9 +20,9 @@
 #include "../CGameInfo.h"
 
 #include "../../lib/StartInfo.h"
-#include "../../lib/Languages.h"
-#include "../../lib/MetaString.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/Languages.h"
+#include "../../lib/texts/MetaString.h"
 #include "../../lib/CConfigHandler.h"
 
 static std::string timeToString(int time)

+ 1 - 1
client/lobby/RandomMapTab.cpp

@@ -29,7 +29,7 @@
 #include "../windows/GUIClasses.h"
 #include "../windows/InfoWindows.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/mapping/CMapInfo.h"
 #include "../../lib/mapping/CMapHeader.h"
 #include "../../lib/mapping/MapFormat.h"

+ 2 - 2
client/lobby/SelectionTab.cpp

@@ -35,7 +35,6 @@
 
 #include "../../CCallback.h"
 
-#include "../../lib/CGeneralTextHandler.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/GameSettings.h"
 #include "../../lib/filesystem/Filesystem.h"
@@ -43,8 +42,9 @@
 #include "../../lib/mapping/CMapInfo.h"
 #include "../../lib/mapping/CMapHeader.h"
 #include "../../lib/mapping/MapFormat.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 #include "../../lib/TerrainHandler.h"
-#include "../../lib/TextOperations.h"
 
 bool mapSorter::operator()(const std::shared_ptr<ElementInfo> aaa, const std::shared_ptr<ElementInfo> bbb)
 {

+ 1 - 1
client/mainmenu/CCampaignScreen.cpp

@@ -31,7 +31,7 @@
 #include "../windows/CWindowObject.h"
 
 #include "../../lib/filesystem/Filesystem.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 
 #include "../../lib/CArtHandler.h"
 #include "../../lib/CBuildingHandler.h"

+ 2 - 3
client/mainmenu/CHighScoreScreen.cpp

@@ -27,12 +27,11 @@
 #include "../render/IRenderHandler.h"
 
 #include "../CGameInfo.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CCreatureHandler.h"
 #include "../../lib/constants/EntityIdentifiers.h"
-#include "../../lib/TextOperations.h"
-#include "../../lib/Languages.h"
 
 auto HighScoreCalculation::calculate()
 {

+ 51 - 18
client/mainmenu/CMainMenu.cpp

@@ -45,7 +45,7 @@
 
 #include "../../CCallback.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/campaign/CampaignHandler.h"
 #include "../../lib/serializer/CTypeList.h"
 #include "../../lib/filesystem/Filesystem.h"
@@ -444,7 +444,7 @@ CMultiMode::CMultiMode(ESelectionScreen ScreenType)
 
 	statusBar = CGStatusBar::create(std::make_shared<CPicture>(background->getSurface(), Rect(7, 465, 440, 18), 7, 465));
 	playerName = std::make_shared<CTextInput>(Rect(19, 436, 334, 16), background->getSurface());
-	playerName->setText(getPlayerName());
+	playerName->setText(getPlayersNames()[0]);
 	playerName->setCallback(std::bind(&CMultiMode::onNameChange, this, _1));
 
 	buttonHotseat = std::make_shared<CButton>(Point(373, 78 + 57 * 0), AnimationPath::builtin("MUBHOT.DEF"), CGI->generaltexth->zelp[266], std::bind(&CMultiMode::hostTCP, this), EShortcut::MAIN_MENU_HOTSEAT);
@@ -466,22 +466,35 @@ void CMultiMode::hostTCP()
 {
 	auto savedScreenType = screenType;
 	close();
-	GH.windows().createAndPushWindow<CMultiPlayers>(getPlayerName(), savedScreenType, true, ELoadMode::MULTI);
+	GH.windows().createAndPushWindow<CMultiPlayers>(getPlayersNames(), savedScreenType, true, ELoadMode::MULTI);
 }
 
 void CMultiMode::joinTCP()
 {
 	auto savedScreenType = screenType;
 	close();
-	GH.windows().createAndPushWindow<CMultiPlayers>(getPlayerName(), savedScreenType, false, ELoadMode::MULTI);
+	GH.windows().createAndPushWindow<CMultiPlayers>(getPlayersNames(), savedScreenType, false, ELoadMode::MULTI);
 }
 
-std::string CMultiMode::getPlayerName()
+const std::vector<std::string> CMultiMode::getPlayersNames()
 {
-	std::string name = settings["general"]["playerName"].String();
-	if(name == "Player")
-		name = CGI->generaltexth->translate("core.genrltxt.434");
-	return name;
+	std::vector<std::string> playerNames;
+
+	std::string playerNameStr = settings["general"]["playerName"].String();
+	if (playerNameStr == "Player")
+		playerNameStr = CGI->generaltexth->translate("core.genrltxt.434");
+	playerNames.push_back(playerNameStr);
+
+	for (const auto & playerName : settings["general"]["multiPlayerNames"].Vector())
+	{
+		const std::string &nameStr = playerName.String();
+		if (!nameStr.empty())
+		{
+			playerNames.push_back(nameStr);
+		}
+	}
+
+	return playerNames;
 }
 
 void CMultiMode::onNameChange(std::string newText)
@@ -490,7 +503,7 @@ void CMultiMode::onNameChange(std::string newText)
 	name->String() = newText;
 }
 
-CMultiPlayers::CMultiPlayers(const std::string & firstPlayer, ESelectionScreen ScreenType, bool Host, ELoadMode LoadMode)
+CMultiPlayers::CMultiPlayers(const std::vector<std::string> & playerNames, ESelectionScreen ScreenType, bool Host, ELoadMode LoadMode)
 	: loadMode(LoadMode), screenType(ScreenType), host(Host)
 {
 	OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
@@ -511,7 +524,10 @@ CMultiPlayers::CMultiPlayers(const std::string & firstPlayer, ESelectionScreen S
 	buttonCancel = std::make_shared<CButton>(Point(205, 338), AnimationPath::builtin("MUBCANC.DEF"), CGI->generaltexth->zelp[561], [=](){ close();}, EShortcut::GLOBAL_CANCEL);
 	statusBar = CGStatusBar::create(std::make_shared<CPicture>(background->getSurface(), Rect(7, 381, 348, 18), 7, 381));
 
-	inputNames[0]->setText(firstPlayer);
+	for(int i = 0; i < playerNames.size(); i++)
+	{
+		inputNames[i]->setText(playerNames[i]);
+	}
 #ifndef VCMI_MOBILE
 	inputNames[0]->giveFocus();
 #endif
@@ -523,17 +539,34 @@ void CMultiPlayers::onChange(std::string newText)
 
 void CMultiPlayers::enterSelectionScreen()
 {
-	std::vector<std::string> names;
-	for(auto name : inputNames)
+	std::vector<std::string> playerNames;
+	for(auto playerName : inputNames)
 	{
-		if(name->getText().length())
-			names.push_back(name->getText());
+		if (playerName->getText().length())
+			playerNames.push_back(playerName->getText());
 	}
 
-	Settings name = settings.write["general"]["playerName"];
-	name->String() = names[0];
+	Settings playerName = settings.write["general"]["playerName"];
+	Settings multiPlayerNames = settings.write["general"]["multiPlayerNames"];
+	multiPlayerNames->Vector().clear();
+	if (!playerNames.empty())
+	{
+		playerName->String() = playerNames.front();
+		for (auto playerNameIt = playerNames.begin()+1; playerNameIt != playerNames.end(); playerNameIt++)
+		{
+			multiPlayerNames->Vector().push_back(JsonNode(*playerNameIt));
+		}
+	}
+	else
+	{
+		// Without the check the saving crashes directly.
+		// When empty reset the player's name. This would translate to it being
+		// the default for the next run. But enables deleting players, by just
+		// deleting the names, otherwise some UI element should have been added.
+		playerName->clear();
+	}
 
-	CMainMenu::openLobby(screenType, host, names, loadMode);
+	CMainMenu::openLobby(screenType, host, playerNames, loadMode);
 }
 
 CSimpleJoinScreen::CSimpleJoinScreen(bool host)

+ 4 - 2
client/mainmenu/CMainMenu.h

@@ -95,7 +95,9 @@ public:
 	void openLobby();
 	void hostTCP();
 	void joinTCP();
-	std::string getPlayerName();
+
+	/// Get all configured player names. The first name would always be present and initialized to its default value.
+	const std::vector<std::string> getPlayersNames();
 
 	void onNameChange(std::string newText);
 };
@@ -117,7 +119,7 @@ class CMultiPlayers : public WindowBase
 	void enterSelectionScreen();
 
 public:
-	CMultiPlayers(const std::string & firstPlayer, ESelectionScreen ScreenType, bool Host, ELoadMode LoadMode);
+	CMultiPlayers(const std::vector<std::string> & playerNames, ESelectionScreen ScreenType, bool Host, ELoadMode LoadMode);
 };
 
 /// Manages the configuration of pregame GUI elements like campaign screen, main menu, loading screen,...

+ 1 - 1
client/mapView/mapHandler.cpp

@@ -17,7 +17,7 @@
 #include "../CPlayerInterface.h"
 #include "../gui/CGuiHandler.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/TerrainHandler.h"
 #include "../../lib/mapObjectConstructors/CObjectClassesHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"

+ 2 - 2
client/media/CVideoHandler.cpp

@@ -23,8 +23,8 @@
 
 #include "../../lib/filesystem/CInputStream.h"
 #include "../../lib/filesystem/Filesystem.h"
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/Languages.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/Languages.h"
 
 #include <SDL_render.h>
 

+ 5 - 1
client/render/CAnimation.cpp

@@ -33,6 +33,9 @@ bool CAnimation::loadFrame(size_t frame, size_t group)
 	if(image)
 	{
 		images[group][frame] = image;
+
+		if (player.isValidPlayer())
+			image->playerColored(player);
 		return true;
 	}
 	else
@@ -188,8 +191,9 @@ void CAnimation::verticalFlip(size_t frame, size_t group)
 	source[group][frame] = locator;
 }
 
-void CAnimation::playerColored(PlayerColor player)
+void CAnimation::playerColored(PlayerColor targetPlayer)
 {
+	player = targetPlayer;
 	for(auto & group : images)
 		for(auto & image : group.second)
 			image.second->playerColored(player);

+ 1 - 1
client/render/Graphics.cpp

@@ -35,7 +35,7 @@
 #include "CGameInfo.h"
 #include "../lib/VCMI_Lib.h"
 #include "../CCallback.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/vcmi_endian.h"
 #include "../lib/CStopWatch.h"
 #include "../lib/CHeroHandler.h"

+ 1 - 1
client/render/IFont.cpp

@@ -12,7 +12,7 @@
 #include "IFont.h"
 
 #include "../../lib/Point.h"
-#include "../../lib/TextOperations.h"
+#include "../../lib/texts/TextOperations.h"
 
 size_t IFont::getStringWidth(const std::string & data) const
 {

+ 2 - 2
client/renderSDL/CBitmapFont.cpp

@@ -14,11 +14,11 @@
 #include "../CGameInfo.h"
 #include "../render/Colors.h"
 
-#include "../../lib/Languages.h"
 #include "../../lib/Rect.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/filesystem/Filesystem.h"
 #include "../../lib/modding/CModHandler.h"
+#include "../../lib/texts/Languages.h"
+#include "../../lib/texts/TextOperations.h"
 #include "../../lib/vcmi_endian.h"
 #include "../../lib/VCMI_Lib.h"
 

+ 1 - 1
client/renderSDL/CBitmapHanFont.cpp

@@ -15,8 +15,8 @@
 
 #include "../../lib/filesystem/Filesystem.h"
 #include "../../lib/json/JsonNode.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/Rect.h"
+#include "../../lib/texts/TextOperations.h"
 
 #include <SDL_surface.h>
 

+ 1 - 1
client/renderSDL/CTrueTypeFont.cpp

@@ -15,9 +15,9 @@
 #include "../render/Colors.h"
 #include "../renderSDL/SDL_Extensions.h"
 
-#include "../../lib/TextOperations.h"
 #include "../../lib/json/JsonNode.h"
 #include "../../lib/filesystem/Filesystem.h"
+#include "../../lib/texts/TextOperations.h"
 
 #include <SDL_ttf.h>
 

+ 1 - 1
client/widgets/Buttons.cpp

@@ -28,7 +28,7 @@
 #include "../render/IRenderHandler.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/filesystem/Filesystem.h"
 
 void ButtonBase::update()

+ 1 - 1
client/widgets/CArtPlace.cpp

@@ -23,7 +23,7 @@
 #include "../CGameInfo.h"
 
 #include "../../CCallback.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/ArtifactUtils.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/networkPacks/ArtifactLocation.h"

+ 1 - 1
client/widgets/CComponent.cpp

@@ -34,7 +34,7 @@
 #include "../../lib/spells/CSpellHandler.h"
 #include "../../lib/CCreatureHandler.h"
 #include "../../lib/CSkillHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CArtHandler.h"
 #include "../../lib/CArtifactInstance.h"
 

+ 2 - 2
client/widgets/CGarrisonInt.cpp

@@ -26,12 +26,12 @@
 #include "../../CCallback.h"
 
 #include "../../lib/ArtifactUtils.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 #include "../../lib/CCreatureHandler.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/networkPacks/ArtifactLocation.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/gameState/CGameState.h"
 
 void CGarrisonSlot::setHighlight(bool on)

+ 1 - 1
client/widgets/CTextInput.cpp

@@ -18,7 +18,7 @@
 #include "../render/Graphics.h"
 #include "../render/IFont.h"
 
-#include "../../lib/TextOperations.h"
+#include "../../lib/texts/TextOperations.h"
 
 std::list<CFocusable *> CFocusable::focusables;
 CFocusable * CFocusable::inputWithFocus;

+ 1 - 1
client/widgets/Images.cpp

@@ -29,7 +29,7 @@
 #include "../../CCallback.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h" //for Unicode related stuff
+#include "../../lib/texts/CGeneralTextHandler.h" //for Unicode related stuff
 #include "../../lib/CRandomGenerator.h"
 
 CPicture::CPicture(std::shared_ptr<IImage> image, const Point & position)

+ 2 - 2
client/widgets/MiscWidgets.cpp

@@ -33,12 +33,12 @@
 
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/gameState/InfoAboutArmy.h"
-#include "../../lib/CGeneralTextHandler.h"
 #include "../../lib/GameSettings.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/mapObjects/CGCreature.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/mapObjects/CGTownInstance.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 
 void CHoverableArea::hover (bool on)
 {

+ 1 - 1
client/widgets/RadialMenu.cpp

@@ -19,7 +19,7 @@
 #include "../render/IImage.h"
 #include "../CGameInfo.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 
 RadialMenuItem::RadialMenuItem(const std::string & imageName, const std::string & hoverText, const std::function<void()> & callback, bool alternativeLayout)
 	: callback(callback)

+ 1 - 1
client/widgets/TextControls.cpp

@@ -23,7 +23,7 @@
 #include "../render/Graphics.h"
 #include "../render/IFont.h"
 
-#include "../../lib/TextOperations.h"
+#include "../../lib/texts/TextOperations.h"
 
 #ifdef VCMI_ANDROID
 #include "lib/CAndroidVMHelper.h"

+ 1 - 1
client/widgets/markets/CAltarArtifacts.cpp

@@ -22,7 +22,7 @@
 #include "../../../CCallback.h"
 
 #include "../../../lib/networkPacks/ArtifactLocation.h"
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 #include "../../../lib/mapObjects/CGMarket.h"
 

+ 1 - 2
client/widgets/markets/CAltarCreatures.cpp

@@ -21,10 +21,9 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 #include "../../../lib/mapObjects/CGMarket.h"
-#include "../../../lib/MetaString.h"
 
 CAltarCreatures::CAltarCreatures(const IMarket * market, const CGHeroInstance * hero)
 	: CMarketBase(market, hero)

+ 1 - 1
client/widgets/markets/CArtifactsBuying.cpp

@@ -21,7 +21,7 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 #include "../../../lib/mapObjects/CGMarket.h"
 #include "../../../lib/mapObjects/CGTownInstance.h"

+ 1 - 1
client/widgets/markets/CArtifactsSelling.cpp

@@ -22,7 +22,7 @@
 #include "../../../CCallback.h"
 
 #include "../../../lib/CArtifactInstance.h"
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 #include "../../../lib/mapObjects/CGMarket.h"
 #include "../../../lib/mapObjects/CGTownInstance.h"

+ 1 - 2
client/widgets/markets/CFreelancerGuild.cpp

@@ -21,8 +21,7 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
-#include "../../../lib/MetaString.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 #include "../../../lib/mapObjects/CGMarket.h"
 

+ 1 - 1
client/widgets/markets/CMarketBase.cpp

@@ -23,7 +23,7 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 #include "../../../lib/CHeroHandler.h"
 #include "../../../lib/mapObjects/CGMarket.h"

+ 1 - 2
client/widgets/markets/CMarketResources.cpp

@@ -21,8 +21,7 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
-#include "../../../lib/MetaString.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGMarket.h"
 
 CMarketResources::CMarketResources(const IMarket * market, const CGHeroInstance * hero)

+ 2 - 2
client/widgets/markets/CTransferResources.cpp

@@ -21,8 +21,8 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
-#include "../../../lib/MetaString.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
+#include "../../../lib/texts/MetaString.h"
 
 CTransferResources::CTransferResources(const IMarket * market, const CGHeroInstance * hero)
 	: CMarketBase(market, hero)

+ 1 - 1
client/widgets/markets/TradePanels.cpp

@@ -20,7 +20,7 @@
 
 #include "../../../CCallback.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
 
 CTradeableItem::CTradeableItem(const Rect & area, EType Type, int ID, int Serial)

+ 1 - 1
client/windows/CCastleInterface.cpp

@@ -46,7 +46,7 @@
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CSoundBase.h"
 #include "../../lib/CCreatureHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/GameSettings.h"
 #include "../../lib/spells/CSpellHandler.h"
 #include "../../lib/CTownHandler.h"

+ 2 - 2
client/windows/CCreatureWindow.cpp

@@ -30,12 +30,12 @@
 #include "../../lib/ArtifactUtils.h"
 #include "../../lib/CStack.h"
 #include "../../lib/CBonusTypeHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
 #include "../../lib/GameSettings.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/gameState/CGameState.h"
 #include "../../lib/networkPacks/ArtifactLocation.h"
-#include "../../lib/TextOperations.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 
 class CCreatureArtifactInstance;
 class CSelectableSkill;

+ 4 - 4
client/windows/CExchangeWindow.cpp

@@ -29,12 +29,12 @@
 
 #include "../../CCallback.h"
 
-#include "../lib/mapObjects/CGHeroInstance.h"
-#include "../lib/CGeneralTextHandler.h"
 #include "../lib/CHeroHandler.h"
-#include "../lib/filesystem/Filesystem.h"
 #include "../lib/CSkillHandler.h"
-#include "../lib/TextOperations.h"
+#include "../lib/filesystem/Filesystem.h"
+#include "../lib/mapObjects/CGHeroInstance.h"
+#include "../lib/texts/CGeneralTextHandler.h"
+#include "../lib/texts/TextOperations.h"
 
 static const std::string QUICK_EXCHANGE_BG = "quick-exchange/TRADEQE";
 

+ 1 - 1
client/windows/CHeroOverview.cpp

@@ -22,7 +22,7 @@
 #include "../widgets/GraphicalPrimitiveCanvas.h"
 
 #include "../../lib/GameSettings.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CCreatureHandler.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/CSkillHandler.h"

+ 1 - 1
client/windows/CHeroWindow.cpp

@@ -35,7 +35,7 @@
 #include "../lib/ArtifactUtils.h"
 #include "../lib/CArtHandler.h"
 #include "../lib/CConfigHandler.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/CHeroHandler.h"
 #include "../lib/CSkillHandler.h"
 #include "../lib/mapObjects/CGHeroInstance.h"

+ 1 - 1
client/windows/CKingdomInterface.cpp

@@ -33,7 +33,7 @@
 
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/CCreatureHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CHeroHandler.h"
 #include "../../lib/GameSettings.h"
 #include "../../lib/CSkillHandler.h"

+ 3 - 4
client/windows/CMapOverview.cpp

@@ -25,8 +25,6 @@
 #include "../render/IRenderHandler.h"
 #include "../render/Graphics.h"
 
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/TextOperations.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/campaign/CampaignState.h"
 #include "../../lib/mapping/CMap.h"
@@ -37,10 +35,11 @@
 #include "../../lib/TerrainHandler.h"
 #include "../../lib/filesystem/Filesystem.h"
 
-#include "../../lib/serializer/CLoadFile.h"
 #include "../../lib/StartInfo.h"
 #include "../../lib/rmg/CMapGenOptions.h"
-#include "../../lib/Languages.h"
+#include "../../lib/serializer/CLoadFile.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/TextOperations.h"
 
 CMapOverview::CMapOverview(std::string mapName, std::string fileName, std::string date, std::string author, std::string version, ResourcePath resource, ESelectionScreen tabType)
 	: CWindowObject(BORDERED | RCLICK_POPUP), resource(resource), mapName(mapName), fileName(fileName), date(date), author(author), version(version), tabType(tabType)

+ 1 - 1
client/windows/CMarketWindow.cpp

@@ -27,7 +27,7 @@
 #include "../CGameInfo.h"
 #include "../CPlayerInterface.h"
 
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/mapObjects/CGTownInstance.h"
 #include "../../lib/mapObjects/CGMarket.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"

+ 2 - 2
client/windows/CMessage.cpp

@@ -11,8 +11,6 @@
 #include "StdInc.h"
 #include "CMessage.h"
 
-#include "../../lib/TextOperations.h"
-
 #include "../gui/CGuiHandler.h"
 #include "../render/CAnimation.h"
 #include "../render/Canvas.h"
@@ -27,6 +25,8 @@
 #include "../widgets/TextControls.h"
 #include "../windows/InfoWindows.h"
 
+#include "../../lib/texts/TextOperations.h"
+
 constexpr int RIGHT_CLICK_POPUP_MIN_SIZE = 100;
 constexpr int SIDE_MARGIN = 11;
 constexpr int TOP_MARGIN = 20;

+ 1 - 1
client/windows/CPuzzleWindow.cpp

@@ -23,7 +23,7 @@
 #include "../widgets/TextControls.h"
 
 #include "../../CCallback.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/CTownHandler.h"
 #include "../../lib/StartInfo.h"
 

+ 1 - 2
client/windows/CQuestLog.cpp

@@ -27,8 +27,7 @@
 #include "../../lib/CArtHandler.h"
 #include "../../lib/CConfigHandler.h"
 #include "../../lib/gameState/QuestInfo.h"
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/MetaString.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/mapObjects/CQuest.h"
 
 VCMI_LIB_NAMESPACE_BEGIN

+ 1 - 1
client/windows/CSpellWindow.cpp

@@ -38,7 +38,7 @@
 #include "../../CCallback.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/spells/CSpellHandler.h"
 #include "../../lib/spells/ISpellMechanics.h"
 #include "../../lib/spells/Problem.h"

+ 1 - 1
client/windows/CTutorialWindow.cpp

@@ -13,7 +13,7 @@
 #include "../eventsSDL/InputHandler.h"
 #include "../../lib/CConfigHandler.h"
 #include "../ConditionalWait.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../CPlayerInterface.h"
 #include "../CGameInfo.h"
 

+ 1 - 1
client/windows/CWindowObject.cpp

@@ -29,7 +29,7 @@
 #include "../../CCallback.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h" //for Unicode related stuff
+#include "../../lib/texts/CGeneralTextHandler.h" //for Unicode related stuff
 
 #include <SDL_surface.h>
 

+ 1 - 1
client/windows/CWindowWithArtifacts.cpp

@@ -29,7 +29,7 @@
 #include "../CGameInfo.h"
 
 #include "../../lib/ArtifactUtils.h"
-#include "../../lib/CGeneralTextHandler.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/mapObjects/CGHeroInstance.h"
 #include "../../lib/networkPacks/ArtifactLocation.h"
 #include "../../lib/CConfigHandler.h"

+ 1 - 1
client/windows/GUIClasses.cpp

@@ -49,7 +49,7 @@
 #include "../lib/gameState/CGameState.h"
 #include "../lib/gameState/SThievesGuildInfo.h"
 #include "../lib/gameState/TavernHeroesPool.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 #include "../lib/CHeroHandler.h"
 #include "../lib/GameSettings.h"
 #include "ConditionalWait.h"

+ 1 - 1
client/windows/settings/BattleOptionsTab.cpp

@@ -14,7 +14,7 @@
 #include "../../gui/CGuiHandler.h"
 #include "../../../lib/CConfigHandler.h"
 #include "../../../lib/filesystem/ResourcePath.h"
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../widgets/Buttons.h"
 #include "../../widgets/TextControls.h"
 

+ 1 - 1
client/windows/settings/GeneralOptionsTab.cpp

@@ -26,7 +26,7 @@
 #include "../../widgets/Slider.h"
 #include "../../widgets/TextControls.h"
 
-#include "../../../lib/CGeneralTextHandler.h"
+#include "../../../lib/texts/CGeneralTextHandler.h"
 #include "../../../lib/filesystem/ResourcePath.h"
 
 static void setIntSetting(std::string group, std::string field, int value)

+ 1 - 1
client/windows/settings/SettingsMainWindow.cpp

@@ -18,7 +18,7 @@
 
 #include "CMT.h"
 #include "CGameInfo.h"
-#include "CGeneralTextHandler.h"
+#include "texts/CGeneralTextHandler.h"
 #include "CPlayerInterface.h"
 #include "CServerHandler.h"
 #include "filesystem/ResourcePath.h"

+ 5 - 0
config/schemas/settings.json

@@ -19,6 +19,7 @@
 			"additionalProperties" : false,
 			"required" : [
 				"playerName",
+				"multiPlayerNames",
 				"music",
 				"sound",
 				"saveRandomMaps",
@@ -48,6 +49,10 @@
 					"type" : "string",
 					"default" : "Player"
 				},
+				"multiPlayerNames" : {
+					"type" : "array",
+					"default" : []
+				},
 				"music" : {
 					"type" : "number",
 					"default" : 88

+ 2 - 2
launcher/firstLaunch/firstlaunch_moc.cpp

@@ -15,8 +15,8 @@
 #include "modManager/cmodlistview_moc.h"
 
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/CGeneralTextHandler.h"
-#include "../../lib/Languages.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
+#include "../../lib/texts/Languages.h"
 #include "../../lib/VCMIDirs.h"
 #include "../../lib/filesystem/Filesystem.h"
 #include "../helper.h"

+ 2 - 2
launcher/languages.cpp

@@ -11,8 +11,8 @@
 #include "languages.h"
 
 #include "../lib/CConfigHandler.h"
-#include "../lib/Languages.h"
-#include "../lib/CGeneralTextHandler.h"
+#include "../lib/texts/Languages.h"
+#include "../lib/texts/CGeneralTextHandler.h"
 
 #include <QComboBox>
 #include <QListWidget>

+ 1 - 1
launcher/mainwindow_moc.cpp

@@ -15,9 +15,9 @@
 
 #include "../lib/CConfigHandler.h"
 #include "../lib/VCMIDirs.h"
-#include "../lib/Languages.h"
 #include "../lib/filesystem/Filesystem.h"
 #include "../lib/logging/CBasicLogConfigurator.h"
+#include "../lib/texts/Languages.h"
 
 #include "updatedialog_moc.h"
 #include "main.h"

+ 1 - 1
launcher/modManager/cmodlistview_moc.cpp

@@ -27,7 +27,7 @@
 
 #include "../../lib/VCMIDirs.h"
 #include "../../lib/CConfigHandler.h"
-#include "../../lib/Languages.h"
+#include "../../lib/texts/Languages.h"
 #include "../../lib/modding/CModVersion.h"
 
 static double mbToBytes(double mb)

+ 2 - 1
lib/CArtHandler.cpp

@@ -11,7 +11,6 @@
 #include "StdInc.h"
 
 #include "ArtifactUtils.h"
-#include "CGeneralTextHandler.h"
 #include "ExceptionsCommon.h"
 #include "GameSettings.h"
 #include "mapObjects/MapObjects.h"
@@ -20,6 +19,8 @@
 #include "mapObjectConstructors/AObjectTypeHandler.h"
 #include "mapObjectConstructors/CObjectClassesHandler.h"
 #include "serializer/JsonSerializeFormat.h"
+#include "texts/CGeneralTextHandler.h"
+#include "texts/CLegacyConfigParser.h"
 
 // Note: list must match entries in ArtTraits.txt
 #define ART_POS_LIST    \

+ 1 - 1
lib/CBonusTypeHandler.cpp

@@ -17,7 +17,7 @@
 
 #include "GameConstants.h"
 #include "CCreatureHandler.h"
-#include "CGeneralTextHandler.h"
+#include "texts/CGeneralTextHandler.h"
 #include "json/JsonUtils.h"
 #include "spells/CSpellHandler.h"
 #include "VCMI_Lib.h"

Some files were not shown because too many files changed in this diff