Browse Source

Merge branch 'develop' into battleonly

Laserlicht 1 month ago
parent
commit
5a650a8f2f
67 changed files with 4979 additions and 4814 deletions
  1. 11 14
      .github/workflows/github.yml
  2. 4 6
      CI/emit_partial.py
  3. 1 1
      CI/install_conan_dependencies.sh
  4. 23 1
      client/adventureMap/CResDataBar.cpp
  5. 10 8
      client/windows/GUIClasses.cpp
  6. 1 1
      client/windows/GUIClasses.h
  7. 9 0
      client/windows/InfoWindows.cpp
  8. 8 4
      cmake_modules/VCMIUtils.cmake
  9. 1 1
      conanfile.py
  10. 1 1
      dependencies
  11. 2 2
      docs/developers/Building_Windows.md
  12. 2 2
      docs/developers/Conan.md
  13. 8 3
      launcher/translation/belarusian.ts
  14. 8 3
      launcher/translation/bulgarian.ts
  15. 8 3
      launcher/translation/chinese.ts
  16. 8 3
      launcher/translation/czech.ts
  17. 8 3
      launcher/translation/english.ts
  18. 8 3
      launcher/translation/finnish.ts
  19. 8 3
      launcher/translation/french.ts
  20. 8 3
      launcher/translation/german.ts
  21. 8 3
      launcher/translation/greek.ts
  22. 8 3
      launcher/translation/hungarian.ts
  23. 8 3
      launcher/translation/italian.ts
  24. 8 3
      launcher/translation/japanese.ts
  25. 8 3
      launcher/translation/korean.ts
  26. 8 3
      launcher/translation/norwegian.ts
  27. 8 3
      launcher/translation/polish.ts
  28. 8 3
      launcher/translation/portuguese.ts
  29. 8 3
      launcher/translation/romanian.ts
  30. 8 3
      launcher/translation/russian.ts
  31. 8 3
      launcher/translation/spanish.ts
  32. 30 24
      launcher/translation/swedish.ts
  33. 8 3
      launcher/translation/turkish.ts
  34. 8 3
      launcher/translation/ukrainian.ts
  35. 8 3
      launcher/translation/vietnamese.ts
  36. 2 2
      lib/filesystem/CCompressedStream.cpp
  37. 6 0
      lib/mapping/MapFormatJson.cpp
  38. 5 3
      lib/mapping/MapReaderH3M.cpp
  39. 1 1
      lib/modding/IdentifierStorage.cpp
  40. 33 34
      mapeditor/maphandler.cpp
  41. 2 2
      mapeditor/maphandler.h
  42. 4 16
      mapeditor/scenelayer.cpp
  43. 185 184
      mapeditor/translation/belarusian.ts
  44. 185 184
      mapeditor/translation/bulgarian.ts
  45. 217 216
      mapeditor/translation/chinese.ts
  46. 217 216
      mapeditor/translation/czech.ts
  47. 217 216
      mapeditor/translation/english.ts
  48. 185 184
      mapeditor/translation/finnish.ts
  49. 217 216
      mapeditor/translation/french.ts
  50. 217 216
      mapeditor/translation/german.ts
  51. 185 184
      mapeditor/translation/greek.ts
  52. 217 216
      mapeditor/translation/hungarian.ts
  53. 217 216
      mapeditor/translation/italian.ts
  54. 185 184
      mapeditor/translation/japanese.ts
  55. 217 216
      mapeditor/translation/korean.ts
  56. 185 184
      mapeditor/translation/norwegian.ts
  57. 217 216
      mapeditor/translation/polish.ts
  58. 217 216
      mapeditor/translation/portuguese.ts
  59. 185 184
      mapeditor/translation/romanian.ts
  60. 217 216
      mapeditor/translation/russian.ts
  61. 217 216
      mapeditor/translation/spanish.ts
  62. 185 184
      mapeditor/translation/swedish.ts
  63. 185 184
      mapeditor/translation/turkish.ts
  64. 185 184
      mapeditor/translation/ukrainian.ts
  65. 185 184
      mapeditor/translation/vietnamese.ts
  66. 7 8
      server/CVCMIServer.cpp
  67. 1 1
      server/processors/NewTurnProcessor.cpp

+ 11 - 14
.github/workflows/github.yml

@@ -56,6 +56,7 @@ jobs:
 
           - platform: msvc-x64
             arch: x64
+            toolset: '14.29'
             os: windows-2025
             pack: 1
             upload: 0
@@ -66,10 +67,10 @@ jobs:
             conan_prebuilts: dependencies-windows-x64
             conan_options: -s "&:build_type=RelWithDebInfo" -c tools.env.virtualenv:powershell=pwsh -o "&:target_pre_windows10=True"
             artifact_platform: x64
-            cl: Hostx64/x64/cl.exe
 
           - platform: msvc-x86
-            arch: x86
+            arch: amd64_x86
+            toolset: '14.29'
             os: windows-2025
             pack: 1
             upload: 0
@@ -80,7 +81,6 @@ jobs:
             conan_prebuilts: dependencies-windows-x86
             conan_options: -s "&:build_type=RelWithDebInfo" -c tools.env.virtualenv:powershell=pwsh -o "&:target_pre_windows10=True"
             artifact_platform: x86
-            cl: Hostx64/x86/cl.exe
 
           - platform: msvc-arm64
             arch: arm64
@@ -94,7 +94,6 @@ jobs:
             conan_prebuilts: dependencies-windows-arm64
             conan_options: -s "&:build_type=RelWithDebInfo" -c tools.env.virtualenv:powershell=pwsh -o "&:lua_lib=lua"
             artifact_platform: arm64
-            cl: HostARM64/ARM64/cl.exe
 
           - platform: android-32
             os: ubuntu-latest
@@ -178,6 +177,7 @@ jobs:
       uses: ilammy/msvc-dev-cmd@v1
       with:
         arch: ${{ matrix.arch }}
+        toolset: ${{ matrix.toolset }}
 
     # ensure the cache for each PR is separate so they don't interfere with each other
     # fall back to cache of the vcmi/vcmi repo if no PR-specific cache is found
@@ -224,11 +224,13 @@ jobs:
       if: "${{ matrix.conan_profile != '' }}"
       run: |
         conan profile detect
+        outFolder=conan-generated
         conan install . \
-          --output-folder=conan-generated \
+          --output-folder="$outFolder" \
           --build=never \
           --profile=dependencies/conan_profiles/${{ matrix.conan_profile }} \
           ${{ matrix.conan_options }}
+        ${{ startsWith(matrix.platform, 'msvc') && 'echo CONANRUN_PWSH_SCRIPT="$outFolder/conanrun.ps1" >> $GITHUB_ENV' || '' }}
 
     # Can't be set in Gradle project
     - name: Configure enableUncompressedNativeLibs
@@ -290,18 +292,14 @@ jobs:
     - name: Configure (MSVC)
       if: ${{ startsWith(matrix.platform, 'msvc') }}
       run: |
-        & conan-generated\conanrun.ps1
+        & $env:CONANRUN_PWSH_SCRIPT
 
-        $CL = "$($env:VCToolsInstallDir)/bin/${{ matrix.cl }}"
-        cmake `
-          -D "CMAKE_C_COMPILER:FILEPATH=$CL" `
-          -D "CMAKE_CXX_COMPILER:FILEPATH=$CL" `
-          --preset ${{ matrix.preset }}
+        cmake --preset ${{ matrix.preset }}
       shell: pwsh
 
     - name: Build
       run: |
-        ${{ startsWith(matrix.platform, 'msvc') && '& conan-generated\conanrun.ps1' }}
+        ${{ startsWith(matrix.platform, 'msvc') && '& $env:CONANRUN_PWSH_SCRIPT' }}
         cmake --build --preset ${{matrix.preset}}
       shell: pwsh
       env:
@@ -320,7 +318,7 @@ jobs:
       id: cpack
       if: ${{ matrix.pack == 1 }}
       run: |
-        ${{ startsWith(matrix.platform, 'msvc') && '& conan-generated\conanrun.ps1' }}
+        ${{ startsWith(matrix.platform, 'msvc') && '& $env:CONANRUN_PWSH_SCRIPT' }}
         cd "${{github.workspace}}/out/build/${{matrix.preset}}"
         cpack -C ${{matrix.pack_type}}
       shell: pwsh
@@ -376,7 +374,6 @@ jobs:
       id: make_partial_json
       env:
         PLATFORM: ${{ matrix.platform }}
-        ARCH: ${{ matrix.arch }}
         ARTIFACT_URL: ${{ steps.upload_artifact.outputs.artifact-url }}
         DEBUG_SYMBOLS_URL: ${{ steps.upload_symbols.outputs.artifact-url }}
         AAB_URL: ${{ steps.upload_aab.outputs.artifact-url }}

+ 4 - 6
CI/emit_partial.py

@@ -77,10 +77,8 @@ def parse_sccache(text: str) -> Tuple[int, int]:
     return hits, misses
 
 
-def arch_label(platform: str, arch_env: Optional[str]) -> str:
-    """Produce a nice arch label; prefer ARCH env when present."""
-    if arch_env:
-        return arch_env
+def arch_label(platform: str) -> str:
+    """Produce a nice arch label."""
     mapping = {
         "mac-intel": "Intel",
         "mac-arm": "Apple Silicon",
@@ -100,7 +98,7 @@ def arch_label(platform: str, arch_env: Optional[str]) -> str:
 def main() -> int:
     # Prefer our explicit PLATFORM env; fall back to VS's "Platform" on Windows if needed.
     platform = os.getenv("PLATFORM") or os.getenv("Platform") or "unknown"
-    arch = arch_label(platform, os.getenv("ARCH"))
+    arch = arch_label(platform)
     tool, cmd, family = detect(platform)
 
     stats_raw = run(cmd)
@@ -137,4 +135,4 @@ def main() -> int:
 
 
 if __name__ == "__main__":
-    sys.exit(main())
+    sys.exit(main())

+ 1 - 1
CI/install_conan_dependencies.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-RELEASE_TAG="2025-08-24"
+RELEASE_TAG="2025-10-12"
 FILENAME="$1.tgz"
 DOWNLOAD_URL="https://github.com/vcmi/vcmi-dependencies/releases/download/$RELEASE_TAG/$FILENAME"
 

+ 23 - 1
client/adventureMap/CResDataBar.cpp

@@ -22,11 +22,14 @@
 #include "../windows/InfoWindows.h"
 
 #include "../../lib/CConfigHandler.h"
+#include "../../lib/CPlayerState.h"
 #include "../../lib/callback/CCallback.h"
 #include "../../lib/texts/CGeneralTextHandler.h"
 #include "../../lib/ResourceSet.h"
+#include "../../lib/StartInfo.h"
 #include "../../lib/GameLibrary.h"
 #include "../../lib/entities/ResourceTypeHandler.h"
+#include "../../lib/mapObjects/IOwnableObject.h"
 #include "../../lib/networkPacks/Component.h"
 
 CResDataBar::CResDataBar(const ImagePath & imageName, const Point & position)
@@ -101,9 +104,28 @@ void CResDataBar::showPopupWindow(const Point & cursorPosition)
 	if((cursorPosition.x - pos.x) > 600)
 		return;
 
+	// only daily income
+	ResourceSet income;
+	auto playerState = GAME->interface()->cb->getPlayerState(GAME->interface()->playerID);
+	auto playerSettings = GAME->interface()->cb->getPlayerSettings(GAME->interface()->playerID);
+	for(auto & k : LIBRARY->resourceTypeHandler->getAllObjects())
+	{
+		income += playerState->valOfBonuses(BonusType::RESOURCES_CONSTANT_BOOST, BonusSubtypeID(k));
+		income += playerState->valOfBonuses(BonusType::RESOURCES_TOWN_MULTIPLYING_BOOST, BonusSubtypeID(k)) * playerState->getTowns().size();
+	}
+	TResources incomeHandicapped = income;
+	incomeHandicapped.applyHandicap(playerSettings->handicap.percentIncome);
+	for(auto & mapObject : playerState->getOwnedObjects())
+		incomeHandicapped += mapObject->asOwnable()->dailyIncome();
+
 	std::vector<std::shared_ptr<CComponent>> comp;
 	for (auto & i : LIBRARY->resourceTypeHandler->getAllObjects())
-		comp.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, GameResID(i), GAME->interface()->cb->getResourceAmount(i)));
+	{
+		std::string text = std::to_string(GAME->interface()->cb->getResourceAmount(i));
+		if(incomeHandicapped[i])
+			text += "\n{lightgreen|(+" + std::to_string(incomeHandicapped[i]) + ")}";
+		comp.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, i, text));
+	}
 
 	CRClickPopup::createAndPush(LIBRARY->generaltexth->translate("core.genrltxt.270"), comp);
 }

+ 10 - 8
client/windows/GUIClasses.cpp

@@ -1598,7 +1598,7 @@ CObjectListWindow::CObjectListWindow(const std::vector<int> & _items, std::share
 	for(int id : _items)
 	{
 		std::string objectName = GAME->interface()->cb->getObjInstance(ObjectInstanceID(id))->getObjectName();
-		trimTextIfTooWide(objectName, id);
+		trimTextIfTooWide(objectName);
 		items.emplace_back(id, objectName);
 	}
 	itemsVisible = items;
@@ -1622,7 +1622,7 @@ CObjectListWindow::CObjectListWindow(const std::vector<std::string> & _items, st
 	for(size_t i = 0; i < _items.size(); i++)
 	{
 		std::string objectName = _items[i];
-		trimTextIfTooWide(objectName, static_cast<int>(i));
+		trimTextIfTooWide(objectName);
 		items.emplace_back(static_cast<int>(i), objectName);
 	}
 	itemsVisible = items;
@@ -1666,19 +1666,21 @@ void CObjectListWindow::init(std::shared_ptr<CIntObject> titleWidget_, std::stri
 	searchBox->setCallback(std::bind(&CObjectListWindow::itemsSearchCallback, this, std::placeholders::_1));
 }
 
-void CObjectListWindow::trimTextIfTooWide(std::string & text, int id) const
+void CObjectListWindow::trimTextIfTooWide(std::string & text) const
 {
 	int maxWidth = pos.w - 60;	// 60 px for scrollbar and borders
-	std::string idStr = '(' + std::to_string(id) + ')';
+	auto posBrace = text.find('(');
+	auto posClosing = text.find(')');
+	std::string objCount = text.substr(posBrace, posClosing - posBrace) + ')';
 	if(text[0] == '{')
-		idStr = '}' + idStr;
+		objCount = '}' + objCount;
 	const auto & font = ENGINE->renderHandler().loadFont(FONT_SMALL);
-	std::string suffix = " ... " + idStr;
+	std::string suffix = "... " + objCount;
 
 	if(font->getStringWidth(text) >= maxWidth)
 	{
-		logGlobal->warn("Mapobject name '%s' is too long and probably needs to be fixed! Trimming...", 
-			text.substr(0, text.size() - idStr.size() + 1));
+		logGlobal->trace("Mapobject name '%s' is too long and probably needs to be fixed! "
+						 "Trimming it to fit into CObjectListWindow...", text);
 
 		// Trim text until it fits
 		while(!text.empty())

+ 1 - 1
client/windows/GUIClasses.h

@@ -206,7 +206,7 @@ class CObjectListWindow : public CWindowObject
 	std::vector< std::pair<int, std::string> > itemsVisible; //visible items present in list
 
 	void init(std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr, bool searchBoxEnabled, bool blue);
-	void trimTextIfTooWide(std::string & text, int id) const; // trim item's text to fit within window's width
+	void trimTextIfTooWide(std::string & text) const; // trim item's text to fit within window's width
 	void itemsSearchCallback(const std::string & text);
 	void exitPressed();
 public:

+ 9 - 0
client/windows/InfoWindows.cpp

@@ -296,6 +296,9 @@ CInfoBoxPopup::CInfoBoxPopup(Point position, const CGTownInstance * town)
 	OBJECT_CONSTRUCTION;
 	tooltip = std::make_shared<CTownTooltip>(Point(9, 10), iah);
 
+	if(settings["general"]["enableUiEnhancements"].Bool())
+		background->setPlayerColor(town->getOwner());
+
 	addUsedEvents(DRAG_POPUP);
 
 	fitToScreen(10);
@@ -309,6 +312,9 @@ CInfoBoxPopup::CInfoBoxPopup(Point position, const CGHeroInstance * hero)
 
 	OBJECT_CONSTRUCTION;
 	tooltip = std::make_shared<CHeroTooltip>(Point(9, 10), iah);
+
+	if(settings["general"]["enableUiEnhancements"].Bool())
+		background->setPlayerColor(hero->getOwner());
 	
 	addUsedEvents(DRAG_POPUP);
 
@@ -332,6 +338,9 @@ CInfoBoxPopup::CInfoBoxPopup(Point position, const CGGarrison * garr)
         tooltip = std::make_shared<CArmyTooltip>(Point(9, 10), iah);
 	}
 
+	if(settings["general"]["enableUiEnhancements"].Bool())
+		background->setPlayerColor(garr->getOwner());
+
 	addUsedEvents(DRAG_POPUP);
 
 	fitToScreen(10);

+ 8 - 4
cmake_modules/VCMIUtils.cmake

@@ -164,8 +164,12 @@ function(vcmi_create_exe_shim tgt)
 	if(NOT CONAN_RUNENV_SCRIPT)
 		return()
 	endif()
-	file(GENERATE OUTPUT "$<TARGET_FILE_DIR:${tgt}>/$<TARGET_FILE_BASE_NAME:${tgt}>.bat" CONTENT
-"call ${CONAN_RUNENV_SCRIPT}
-@start $<TARGET_FILE_NAME:${tgt}>"
-	)
+
+	set(exe "%~dp0$<TARGET_FILE_NAME:${tgt}>")
+	if(EXISTS "${CONAN_RUNENV_SCRIPT}.bat")
+		set(batContent "call \"${CONAN_RUNENV_SCRIPT}.bat\" & start \"\" \"${exe}\"")
+	else()
+		set(batContent "powershell -ExecutionPolicy Bypass -Command \"& '${CONAN_RUNENV_SCRIPT}.ps1' ; & '${exe}'\"")
+	endif()
+	file(GENERATE OUTPUT "$<TARGET_FILE_DIR:${tgt}>/$<TARGET_FILE_BASE_NAME:${tgt}>.bat" CONTENT "${batContent}")
 endfunction()

+ 1 - 1
conanfile.py

@@ -50,5 +50,5 @@ class VCMIApp(VCMI):
             tc.variables["CMAKE_ANDROID_API"] = str(self.settings.os.api_level)
             tc.variables["SDL_JAVA_SRC_DIR"] = os.path.join(self.dependencies.host["sdl"].package_folder, "share", "java", "SDL2")
         elif self.settings.os == "Windows":
-            tc.variables["CONAN_RUNENV_SCRIPT"] = self._pathForCmake(os.path.join(self.build_folder, "conanrun.bat"))
+            tc.variables["CONAN_RUNENV_SCRIPT"] = self._pathForCmake(os.path.join(self.build_folder, "conanrun"))
         tc.generate()

+ 1 - 1
dependencies

@@ -1 +1 @@
-Subproject commit b6f03bd541f19ad441ffb930a2cbd000222a50bf
+Subproject commit c0e4b540e926c732621a0938e31cf3c181247c6c

+ 2 - 2
docs/developers/Building_Windows.md

@@ -43,7 +43,7 @@ On the step where you need to replace **PROFILE**, choose:
 - `msvc-arm64` to build for ARM 64-bit (arm64)
 - `msvc-x86` to build for Intel 32-bit (x86)
 
-*Note*: we recommend using CMD (`cmd.exe`) for the next steps. If you absolutely want to use Powershell, then run `conan install` twice appending `-c tools.env.virtualenv:powershell=powershell.exe` on the second run.
+*Note*: we recommend using CMD (`cmd.exe`) for the next steps. If you absolutely want to use Powershell, then append `-c tools.env.virtualenv:powershell=powershell.exe` to the `conan install` command.
 
 ## Install CCache
 
@@ -98,7 +98,7 @@ call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv
     - Specify the following CMake variable: `ENABLE_CCACHE=ON`
     - See the [Visual Studio documentation](https://learn.microsoft.com/en-us/cpp/build/customize-cmake-settings?view=msvc-170#cmake-variables-and-cache) for details
 4. Right click on `BUILD_ALL` project. This `BUILD_ALL` project should be in `CMakePredefinedTargets` tree in Solution Explorer. You can also build individual targets if you want.
-5. VCMI will be built in `%VCMI_DIR%/build/bin/<config>` folder where `<config>` is e.g. `RelWithDebInfo`. Use `bat` files to launch executables, e.g. `VCMI_launcher.bat`.
+5. VCMI will be built in `%VCMI_DIR%/build/bin/<config>` folder where `<config>` is e.g. `RelWithDebInfo`. To launch the built executables from a file manager, use respective `bat` files, e.g. `VCMI_launcher.bat`.
 
 ### Compile VCMI with MinGW via MSYS2
 

+ 2 - 2
docs/developers/Conan.md

@@ -31,7 +31,7 @@ The following platforms are supported and known to work, others might require ch
 1. Check if your build environment can use the prebuilt binaries: basically, that your compiler version (or Xcode major version) matches the information below. If you're unsure, simply advance to the next step.
     - *macOS*: libraries are built with Apple clang 16 (Xcode 16.2), should be consumable by Xcode / Xcode CLT 16.x and later
     - *iOS*: libraries are built with Apple clang 16 (Xcode 16.2), should be consumable by Xcode 16.x and later
-    - *Windows*: libraries are built with MSVC 19.4x (v143 toolset)
+    - *Windows*: libraries are built with MSVC 19.29 (v142 toolset, but can be consumed by v143) for Intel and with MSVC 19.4x (v143 toolset) for ARM64
     - *Android*: libraries are built with NDK r25c (25.2.9519653)
 
 2. Download the binaries archive from <https://github.com/vcmi/vcmi-dependencies/releases> (pre-release is for development version and the latest release is for respective VCMI release) and use `conan cache restore <path to archive>` command to unpack them.
@@ -115,7 +115,7 @@ Make sure that you've cloned VCMI repository with submodules! (or initialized th
 
 In terminal `cd` to the VCMI source directory and run the following command (it's written in Bash syntax, for other shells like Cmd or Powershell use appropriate line continuation character instead of `\` or type everything on a single line). Also check subsections for additional requirements on consuming prebuilt binaries.
 
-*Note*: if you're going to build for Windows MSVC, it's recommended to use Cmd shell. If you absolutely want to use Powershell, then run the below command twice appending `-c tools.env.virtualenv:powershell=powershell.exe` on the second run.
+*Note*: if you're going to build for Windows MSVC, it's recommended to use Cmd shell. If you absolutely want to use Powershell, then append `-c tools.env.virtualenv:powershell=powershell.exe` to the below command.
 
 <pre>
 conan install . \

+ 8 - 3
launcher/translation/belarusian.ts

@@ -1483,12 +1483,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1622,7 +1622,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1681,6 +1681,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/bulgarian.ts

@@ -1481,12 +1481,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1620,7 +1620,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1679,6 +1679,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/chinese.ts

@@ -1529,12 +1529,12 @@ Bin (%n字节):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>名称</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>类型</translation>
     </message>
@@ -1669,7 +1669,7 @@ Bin (%n字节):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>其他</translation>
     </message>
@@ -1728,6 +1728,11 @@ Bin (%n字节):
         <source>AI</source>
         <translation>AI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/czech.ts

@@ -1528,12 +1528,12 @@ Bin (%n bajtů):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Název</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Druh</translation>
     </message>
@@ -1668,7 +1668,7 @@ Bin (%n bajtů):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Ostatní</translation>
     </message>
@@ -1727,6 +1727,11 @@ Bin (%n bajtů):
         <source>AI</source>
         <translation>AI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/english.ts

@@ -1481,12 +1481,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1620,7 +1620,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1679,6 +1679,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/finnish.ts

@@ -1481,12 +1481,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1620,7 +1620,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1679,6 +1679,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/french.ts

@@ -1524,12 +1524,12 @@ Bin (%n octets):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Nom</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Type</translation>
     </message>
@@ -1663,7 +1663,7 @@ Bin (%n octets):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Autre</translation>
     </message>
@@ -1722,6 +1722,11 @@ Bin (%n octets):
         <source>AI</source>
         <translation>IA</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/german.ts

@@ -1523,12 +1523,12 @@ Bin (%n Bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Name</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
@@ -1663,7 +1663,7 @@ Bin (%n Bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Andere</translation>
     </message>
@@ -1722,6 +1722,11 @@ Bin (%n Bytes):
         <source>AI</source>
         <translation>KI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/greek.ts

@@ -1481,12 +1481,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1620,7 +1620,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1679,6 +1679,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/hungarian.ts

@@ -1521,12 +1521,12 @@ Bin (%n bájt):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Név</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Típus</translation>
     </message>
@@ -1661,7 +1661,7 @@ Bin (%n bájt):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Egyéb</translation>
     </message>
@@ -1720,6 +1720,11 @@ Bin (%n bájt):
         <source>AI</source>
         <translation>Mesterséges Intelligencia</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/italian.ts

@@ -1523,12 +1523,12 @@ Bin (%n byte):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Nome</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
@@ -1662,7 +1662,7 @@ Bin (%n byte):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Altro</translation>
     </message>
@@ -1721,6 +1721,11 @@ Bin (%n byte):
         <source>AI</source>
         <translation>IA</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/japanese.ts

@@ -1505,12 +1505,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished">名前</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished">タイプ</translation>
     </message>
@@ -1644,7 +1644,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished">その他</translation>
     </message>
@@ -1703,6 +1703,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished">AI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/korean.ts

@@ -1479,12 +1479,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1618,7 +1618,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1677,6 +1677,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/norwegian.ts

@@ -1481,12 +1481,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1620,7 +1620,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1679,6 +1679,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/polish.ts

@@ -1527,12 +1527,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Nazwa</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
@@ -1666,7 +1666,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Inne</translation>
     </message>
@@ -1725,6 +1725,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation>AI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/portuguese.ts

@@ -1523,12 +1523,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Nome</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
@@ -1663,7 +1663,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Outros</translation>
     </message>
@@ -1722,6 +1722,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation>IA</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/romanian.ts

@@ -1483,12 +1483,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1622,7 +1622,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1681,6 +1681,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/russian.ts

@@ -1521,12 +1521,12 @@ Bin (%n байт):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Название</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Тип</translation>
     </message>
@@ -1661,7 +1661,7 @@ Bin (%n байт):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Иное</translation>
     </message>
@@ -1720,6 +1720,11 @@ Bin (%n байт):
         <source>AI</source>
         <translation>ИИ</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/spanish.ts

@@ -1527,12 +1527,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Nombre</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
@@ -1666,7 +1666,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Otros</translation>
     </message>
@@ -1725,6 +1725,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation>IA</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 30 - 24
launcher/translation/swedish.ts

@@ -26,7 +26,7 @@
     <message>
         <location filename="../aboutProject/aboutproject_moc.ui" line="220"/>
         <source>Build Information</source>
-        <translation>Versionsinformation</translation>
+        <translation>Kompilationsinformation</translation>
     </message>
     <message>
         <location filename="../aboutProject/aboutproject_moc.ui" line="182"/>
@@ -354,7 +354,7 @@ Installation framgångsrikt nedladdad?</translation>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="979"/>
         <source>Installing Heroes Chronicles</source>
-        <translation>Installerar Hjältarnas krönikor (Heroes Chronicles)</translation>
+        <translation>Installerar Heroes Chronicles</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1062"/>
@@ -364,43 +364,44 @@ Installation framgångsrikt nedladdad?</translation>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1128"/>
         <source>Map exists</source>
-        <translation type="unfinished"></translation>
+        <translation>Kartan existerar</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1129"/>
         <source>Map &apos;%1&apos; already exists. Do you want to overwrite it?</source>
-        <translation type="unfinished"></translation>
+        <translation>Kartan ’%1’ finns redan. Vill du skriva över den?</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1138"/>
         <source>Yes to All</source>
-        <translation type="unfinished"></translation>
+        <translation>Ja till alla</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1139"/>
         <source>No to All</source>
-        <translation type="unfinished"></translation>
+        <translation>Nej till alla</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1226"/>
         <source>Import complete</source>
-        <translation type="unfinished"></translation>
+        <translation>Importen är klar</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1226"/>
         <source>%1 map(s) successfully imported.</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 karta/kartor importerades utan problem.</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1229"/>
         <source>Import failed</source>
-        <translation type="unfinished"></translation>
+        <translation>Importen misslyckades</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1229"/>
         <source>Failed to import the following maps:
 %1</source>
-        <translation type="unfinished"></translation>
+        <translation>Det gick inte att importera följande kartor:
+%1</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1255"/>
@@ -417,7 +418,7 @@ Installation framgångsrikt nedladdad?</translation>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1292"/>
         <source>screenshots</source>
-        <translation>skärmdumpar/skärmbilder</translation>
+        <translation>skärmbilder</translation>
     </message>
     <message>
         <location filename="../modManager/cmodlistview_moc.cpp" line="1298"/>
@@ -883,7 +884,7 @@ Exklusivt helskärmsläge - spelet täcker hela skärmen och använder den valda
     <message>
         <location filename="../modManager/chroniclesextractor.cpp" line="65"/>
         <source>You have to select a Heroes Chronicles installer file!</source>
-        <translation>Du måste välja en installationsfil för Hjältarnas krönikor (Heroes Chronicles)!</translation>
+        <translation>Du måste välja en installationsfil för Hjältarnas Krönikor (Heroes Chronicles)!</translation>
     </message>
     <message>
         <location filename="../modManager/chroniclesextractor.cpp" line="82"/>
@@ -899,12 +900,12 @@ Exklusivt helskärmsläge - spelet täcker hela skärmen och använder den valda
         <location filename="../modManager/chroniclesextractor.cpp" line="104"/>
         <location filename="../modManager/chroniclesextractor.cpp" line="105"/>
         <source>Heroes Chronicles</source>
-        <translation>Hjältarnas krönikor (Heroes Chronicles)</translation>
+        <translation>Heroes Chronicles</translation>
     </message>
     <message>
         <location filename="../modManager/chroniclesextractor.cpp" line="153"/>
         <source>Heroes Chronicles %1 - %2</source>
-        <translation>Hjältarnas krönikor (Heroes Chronicles) %1 - %2</translation>
+        <translation>Heroes Chronicles %1 - %2</translation>
     </message>
 </context>
 <context>
@@ -1130,7 +1131,7 @@ När dessa två filer finns på din enhet kan VCMI börja importera nödvändiga
     <message>
         <location filename="../firstLaunch/firstlaunch_moc.ui" line="710"/>
         <source>Horn of the Abyss</source>
-        <translation>Avgrundens horn (Horn of the Abyss)</translation>
+        <translation>Avgrundens Horn (Horn of the Abyss)</translation>
     </message>
     <message>
         <location filename="../firstLaunch/firstlaunch_moc.ui" line="643"/>
@@ -1140,7 +1141,7 @@ När dessa två filer finns på din enhet kan VCMI börja importera nödvändiga
     <message>
         <location filename="../firstLaunch/firstlaunch_moc.ui" line="809"/>
         <source>In The Wake of Gods</source>
-        <translation>I gudars kölvatten (In The Wake of Gods)</translation>
+        <translation>I Gudars Kölvatten (In The Wake of Gods)</translation>
     </message>
     <message>
         <location filename="../firstLaunch/firstlaunch_moc.cpp" line="177"/>
@@ -1523,12 +1524,12 @@ Bin (%n byte):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Namn</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
@@ -1663,7 +1664,7 @@ Bin (%n byte):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Övrigt</translation>
     </message>
@@ -1722,6 +1723,11 @@ Bin (%n byte):
         <source>AI</source>
         <translation>AI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>
@@ -1871,9 +1877,9 @@ Orsak: %2</translation>
         <source>Heroes Chronicles:
 %n/%1 installed</source>
         <translation>
-            <numerusform>Hjältarnas krönikor (Heroes Chronicles):
+            <numerusform>Heroes Chronicles:
 %n/%1 installerad</numerusform>
-            <numerusform>Hjältarnas krönikor (Heroes Chronicles):
+            <numerusform>Heroes Chronicles:
 %n/%1 installerade</numerusform>
         </translation>
     </message>
@@ -1936,7 +1942,7 @@ Orsak: %2</translation>
 
  - Heroes III kartor (.h3m eller .vmap).
  - Heroes III kampanjer (.h3c eller .vcmp).
- - Heroes III Hjältarnas krönikor (Heroes Chronicles) använder offline backup installerare från GOG.com (.exe).
+ - Heroes III Hjältarnas Krönikor (Heroes Chronicles) använder offline backup installerare från GOG.com (.exe).
  - VCMI-moddar i zip-format (.zip)
  - VCMI-konfigurationsfiler (.json)
 </translation>
@@ -1964,8 +1970,8 @@ VARNING: I vissa fall kanske uppdaterade versioner av moddar inte är kompatibla
         <location filename="../startGame/StartGameTab.cpp" line="337"/>
         <source>If you own Heroes Chronicles on gog.com, you can use offline backup installers provided by gog to import Heroes Chronicles data into VCMI as custom campaigns.
 To import Heroes Chronicles, download offline backup installer of each chronicle that you wish to install, select &apos;Import files&apos; option and select downloaded file. This will generate and install mod for VCMI that contains imported chronicles</source>
-        <translation>Om du äger Hjältarnas krönikor (Heroes Chronicles) på gog.com kan du använda &quot;offline backup game installers&quot; som tillhandahålls av GOG för att importera Heroes Chronicles data till VCMI så att man kan spela dem i VCMI.
-För att importera Hjältarnas krönikor (Heroes Chronicles) ska du först ladda ner &quot;offline backup game installers&quot; av varje krönika som du vill installera. Välj alternativet &apos;Importera filer&apos; och välj nedladdad fil. Detta kommer att generera och installera modden för VCMI som innehåller importerade krönikor</translation>
+        <translation>Om du äger Hjältarnas Krönikor (Heroes Chronicles) på gog.com kan du använda &quot;offline backup game installers&quot; som tillhandahålls av GOG för att importera Heroes Chronicles data till VCMI så att man kan spela dem i VCMI.
+För att importera Hjältarnas Krönikor (Heroes Chronicles) ska du först ladda ner &quot;offline backup game installers&quot; av varje krönika som du vill installera. Välj alternativet &apos;Importera filer&apos; och välj nedladdad fil. Detta kommer att generera och installera modden för VCMI som innehåller importerade krönikor</translation>
     </message>
     <message>
         <location filename="../startGame/StartGameTab.cpp" line="350"/>

+ 8 - 3
launcher/translation/turkish.ts

@@ -1479,12 +1479,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1618,7 +1618,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1677,6 +1677,11 @@ Bin (%n bytes):
         <source>AI</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/ukrainian.ts

@@ -1529,12 +1529,12 @@ Bin (%n байтів):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Назва</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Тип</translation>
     </message>
@@ -1669,7 +1669,7 @@ Bin (%n байтів):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Інше</translation>
     </message>
@@ -1728,6 +1728,11 @@ Bin (%n байтів):
         <source>AI</source>
         <translation>ШІ</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 8 - 3
launcher/translation/vietnamese.ts

@@ -1540,12 +1540,12 @@ Bin (%n bytes):
 <context>
     <name>ModFields</name>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="188"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="189"/>
         <source>Name</source>
         <translation>Tên</translation>
     </message>
     <message>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="191"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="192"/>
         <source>Type</source>
         <translation>Loại</translation>
     </message>
@@ -1680,7 +1680,7 @@ Bin (%n bytes):
     </message>
     <message>
         <location filename="../modManager/modstateitemmodel_moc.cpp" line="45"/>
-        <location filename="../modManager/modstateitemmodel_moc.cpp" line="61"/>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="62"/>
         <source>Other</source>
         <translation>Khác</translation>
     </message>
@@ -1740,6 +1740,11 @@ Bin (%n bytes):
         <translatorcomment>AI-generated, needs review by native speaker; delete this comment afterwards</translatorcomment>
         <translation type="unfinished">AI</translation>
     </message>
+    <message>
+        <location filename="../modManager/modstateitemmodel_moc.cpp" line="57"/>
+        <source>Resources</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QObject</name>

+ 2 - 2
lib/filesystem/CCompressedStream.cpp

@@ -65,10 +65,10 @@ void CBufferedStream::ensureSize(si64 size)
 	while(static_cast<si64>(buffer.size()) < size && !endOfFileReached)
 	{
 		si64 initialSize = buffer.size();
-		si64 currentStep = std::min<si64>(size, buffer.size());
+		si64 need = size - buffer.size();
 		// to avoid large number of calls at start
 		// this is often used to load h3m map headers, most of which are ~300 bytes in size
-		vstd::amax(currentStep, 512);
+		si64 currentStep = std::min<si64>(need, std::max<si64>(initialSize, si64{512}));
 
 		buffer.resize(initialSize + currentStep);
 

+ 6 - 0
lib/mapping/MapFormatJson.cpp

@@ -1046,6 +1046,8 @@ void CMapLoaderJson::MapObjectLoader::construct()
 		return;
 	}
 
+	configuration.setModScope(ModScope::scopeGame());
+
 	auto handler = LIBRARY->objtypeh->getHandlerFor( ModScope::scopeMap(), typeName, subtypeName);
 
 	auto appearance = std::make_shared<ObjectTemplate>();
@@ -1297,6 +1299,8 @@ void CMapSaverJson::writeObjects()
 		auto temp = handler.enterStruct(obj->instanceName);
 
 		obj->serializeJson(handler);
+
+		data[obj->instanceName].setModScope(ModScope::scopeGame());
 	}
 
 	if(map->grailPos.isValid())
@@ -1310,6 +1314,8 @@ void CMapSaverJson::writeObjects()
 
 		grail["options"]["radius"].Float() = map->grailRadius;
 
+		grail.setModScope(ModScope::scopeGame());
+
 		data["grail"] = grail;
 	}
 

+ 5 - 3
lib/mapping/MapReaderH3M.cpp

@@ -199,9 +199,11 @@ RoadId MapReaderH3M::readRoad()
 
 RiverId MapReaderH3M::readRiver()
 {
-	RiverId result(readInt8());
-	assert(result.getNum() <= features.riversCount);
-	return result;
+	const uint8_t raw = readInt8();
+	// Keep low 3 bits as river type (0..4); discard high-bit flags set by some editors (HotA ?)
+	const uint8_t type = raw & 0x07;
+	assert(type <= features.riversCount);
+	return RiverId(type);
 }
 
 PrimarySkill MapReaderH3M::readPrimary()

+ 1 - 1
lib/modding/IdentifierStorage.cpp

@@ -246,7 +246,7 @@ std::optional<si32> CIdentifierStorage::getIdentifierImpl(const ObjectCallback &
 
 	if (idList.size() == 1)
 		return idList.front().id;
-	if (!silent)
+	if (!silent && options.localScope != ModScope::scopeGame())
 		showIdentifierResolutionErrorDetails(options);
 	return std::optional<si32>();
 }

+ 33 - 34
mapeditor/maphandler.cpp

@@ -365,49 +365,39 @@ std::vector<ObjectRect> & MapHandler::getObjects(int x, int y, int z)
 	return tileObjects[index(x, y, z)];
 }
 
-void MapHandler::drawObjects(QPainter & painter, int x, int y, int z, QPointF offset, const std::set<const CGObjectInstance *> & locked)
+
+
+void MapHandler::drawObjects(QPainter & painter, const QRectF & section, int z, std::set<const CGObjectInstance *> & locked)
 {
 	painter.setRenderHint(QPainter::Antialiasing, false);
 	painter.setRenderHint(QPainter::SmoothPixmapTransform, false);
+	std::map<int3, std::set<const CGObjectInstance *>> objectMap;	//following the natural order of int3 we draw from north-west to south-east, in accordance with H3's perspective
 
-	for(auto & object : getObjects(x, y, z))
-	{
-		const CGObjectInstance * obj = object.obj;
-		if(!obj)
-		{
-			logGlobal->error("Stray map object that isn't fading");
-			return;
-		}
 
-		uint8_t animationFrame = 0;
+	int left = static_cast<int>(std::round(section.left()))/tileSize;
+	int right = static_cast<int>(std::round(section.right()))/tileSize;
+	int top = static_cast<int>(std::round(section.top()))/tileSize;
+	int bottom = static_cast<int>(std::round(section.bottom()))/tileSize;
 
-		auto objData = findObjectBitmap(obj, animationFrame, obj->ID == Obj::HERO ? 2 : 0);
-		if(obj->ID == Obj::HERO && obj->tempOwner.isValidPlayer())
-			objData.flagBitmap = findFlagBitmap(dynamic_cast<const CGHeroInstance*>(obj), 0, obj->tempOwner, 4);
-
-		if(objData.objBitmap)
+	for(int x = left; x < right; ++x)
+	{
+		for(int y = top; y < bottom; ++y)
 		{
-			auto pos = obj->anchorPos();
-
-			painter.drawImage(QPoint(x * tileSize - offset.x(), y * tileSize - offset.y()), *objData.objBitmap, object.rect, Qt::AutoColor | Qt::NoOpaqueDetection);
-
-			if(locked.count(obj))
-			{
-				painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
-				painter.fillRect(x * tileSize, y * tileSize, object.rect.width(), object.rect.height(), Qt::Dense4Pattern);
-				painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
-			}
-
-			if(objData.flagBitmap)
-			{
-				if(x == pos.x && y == pos.y)
-					painter.drawImage(QPoint((x - 2) * tileSize - offset.x(), (y - 1) * tileSize - offset.y()), *objData.flagBitmap);
-			}
+			for(auto & object : getObjects(x, y, z))
+				objectMap[object.obj->pos].insert(object.obj);
 		}
 	}
+
+	for (auto const& objectsOnTile : objectMap)
+	{
+		auto tile = objectsOnTile.first;
+		auto objects = objectsOnTile.second;
+		for (const CGObjectInstance * object : objects)
+			drawObjectAt(painter, object, tile.x, tile.y, section.topLeft(), locked.count(object));
+	}
 }
 
-void MapHandler::drawObjectAt(QPainter & painter, const CGObjectInstance * obj, int x, int y, QPointF offset)
+void MapHandler::drawObjectAt(QPainter & painter, const CGObjectInstance * obj, int x, int y, QPointF offset, bool locked)
 {
 	if (!obj)
 	{
@@ -423,10 +413,19 @@ void MapHandler::drawObjectAt(QPainter & painter, const CGObjectInstance * obj,
 
 	if (objData.objBitmap)
 	{
-		painter.drawImage(QPoint((x + 1) * tileSize - objData.objBitmap->width() - offset.x(), (y + 1) * tileSize - objData.objBitmap->height() - offset.y()), *objData.objBitmap);
+		QPoint point((x + 1) * tileSize - (objData.objBitmap->width() + offset.x()), (y + 1) * tileSize - (objData.objBitmap->height() + offset.y()));
+		QRect rect(point, QSize(objData.objBitmap->width(), objData.objBitmap->height()));
+		painter.drawImage(rect, *objData.objBitmap);
+
+		if (locked)
+		{
+			painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+			painter.fillRect(rect, Qt::Dense4Pattern);
+			painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
+		}
 
 		if (objData.flagBitmap)
-			painter.drawImage(QPoint((x + 1) * tileSize - objData.objBitmap->width() - offset.x(), (y + 1) * tileSize - objData.objBitmap->height() - offset.y()), *objData.flagBitmap);
+			painter.drawImage(point, *objData.flagBitmap);
 	}
 }
 

+ 2 - 2
mapeditor/maphandler.h

@@ -111,8 +111,8 @@ public:
 	std::set<int3> addObject(const CGObjectInstance * object);
 	
 	/// draws all objects on current tile (higher-level logic, unlike other draw*** methods)
-	void drawObjects(QPainter & painter, int x, int y, int z, QPointF offset, const std::set<const CGObjectInstance *> & locked);
-	void drawObjectAt(QPainter & painter, const CGObjectInstance * object, int x, int y, QPointF offset);
+	void drawObjects(QPainter & painter, const QRectF & section, int z, std::set<const CGObjectInstance *> & locked);
+	void drawObjectAt(QPainter & painter, const CGObjectInstance * object, int x, int y, QPointF offset, bool locked = false);
 	
 	void drawMinimapTile(QPainter & painter, int x, int y, int z);
 

+ 4 - 16
mapeditor/scenelayer.cpp

@@ -545,28 +545,13 @@ ObjectsLayer::ObjectsLayer(MapSceneBase * s): AbstractViewportLayer(s)
 
 QGraphicsItem * ObjectsLayer::draw(const QRectF & section)
 {
-	int left = toInt(section.left());
-	int right = toInt(section.right());
-	int top = toInt(section.top());
-	int bottom = toInt(section.bottom());
 	QPixmap pixmap(toInt(section.width()), toInt(section.height()));
 	pixmap.fill(Qt::transparent);
 
 	if (isShown)
 	{
 		QPainter painter(&pixmap);
-
-		QPointF offset = section.topLeft();
-
-		int margin = 2;		// margin is necessary to properly display flags on heroes on a border between two sections
-
-		for(int x = (left - margin)/tileSize; x < (right + margin)/tileSize; ++x)
-		{
-			for(int y = (top - margin)/tileSize; y < (bottom + margin)/tileSize; ++y)
-			{
-				handler->drawObjects(painter, x, y, scene->level, offset, lockedObjects);
-			}
-		}
+		handler->drawObjects(painter, section, scene->level, lockedObjects);
 	}
 
 	QGraphicsPixmapItem * result = scene->addPixmap(pixmap);
@@ -586,11 +571,14 @@ void ObjectsLayer::setLockObject(const CGObjectInstance * object, bool lock)
 		lockedObjects.insert(object);
 	else
 		lockedObjects.erase(object);
+	QRectF area = getObjectArea(object);
+	redraw({area});
 }
 
 void ObjectsLayer::unlockAll()
 {
 	lockedObjects.clear();
+	redraw();
 }
 
 SelectionObjectsLayer::SelectionObjectsLayer(MapSceneBase * s): AbstractViewportLayer(s), newObject(nullptr)

File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/belarusian.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/bulgarian.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/chinese.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/czech.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/english.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/finnish.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/french.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/german.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/greek.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/hungarian.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/italian.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/japanese.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/korean.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/norwegian.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/polish.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/portuguese.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/romanian.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/russian.ts


File diff suppressed because it is too large
+ 217 - 216
mapeditor/translation/spanish.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/swedish.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/turkish.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/ukrainian.ts


File diff suppressed because it is too large
+ 185 - 184
mapeditor/translation/vietnamese.ts


+ 7 - 8
server/CVCMIServer.cpp

@@ -437,7 +437,8 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
 {
 	assert(getState() == EServerState::LOBBY);
 
-	c->connectionID = vstd::next(currentClientId, 1);
+	c->connectionID = currentClientId;
+	currentClientId = vstd::next(currentClientId, 1);
 	c->uuid = uuid;
 
 	if(hostClientId == GameConnectionID::INVALID)
@@ -446,20 +447,19 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
 		si->mode = mode;
 	}
 
-	auto connID = static_cast<int>(c->connectionID);
+	logNetwork->info("Connection with client %d established. UUID: %s", static_cast<int>(c->connectionID), c->uuid);
 
-	logNetwork->info("Connection with client %d established. UUID: %s", connID, c->uuid);
-
-	PlayerConnectionID id = currentPlayerId;
 	for(auto & name : names)
 	{
-		logNetwork->info("Client %d player: %s", connID, name);
+		logNetwork->info("Client %d player: %s", static_cast<int>(c->connectionID), name);
+		PlayerConnectionID id = currentPlayerId;
+		currentPlayerId = vstd::next(currentPlayerId, 1);
 
 		ClientPlayer cp;
 		cp.connection = c->connectionID;
 		cp.name = name;
 		playerNames.try_emplace(id, cp);
-		announceTxt(boost::str(boost::format("%s (pid %d cid %d) joins the game") % name % static_cast<int>(id) % connID));
+		announceTxt(boost::str(boost::format("%s (pid %d cid %d) joins the game") % name % static_cast<int>(id) % static_cast<int>(c->connectionID)));
 
 		//put new player in first slot with AI
 		for(auto & elem : si->playerInfos)
@@ -470,7 +470,6 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
 				break;
 			}
 		}
-		id = vstd::next(id, 1);
 	}
 }
 

+ 1 - 1
server/processors/NewTurnProcessor.cpp

@@ -219,7 +219,7 @@ ResourceSet NewTurnProcessor::generatePlayerIncome(PlayerColor playerID, bool ne
 		}
 	}
 
-	for (GameResID k = GameResID::WOOD; k < GameResID::COUNT; k++)
+	for(auto & k : LIBRARY->resourceTypeHandler->getAllObjects())
 	{
 		income += state.valOfBonuses(BonusType::RESOURCES_CONSTANT_BOOST, BonusSubtypeID(k));
 		income += state.valOfBonuses(BonusType::RESOURCES_TOWN_MULTIPLYING_BOOST, BonusSubtypeID(k)) * state.getTowns().size();

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