diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56d0628..2dc6a5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push jobs: ci: name: CI - uses: acidicoala/KoalaBox/.github/workflows/build-and-package.yml@807cc1d5ac021c778bd918a2a530d5bc38d1d6b9 + uses: acidicoala/KoalaBox/.github/workflows/build-and-package.yml@4570a195a1222e728b2a643cc53164b49549a371 permissions: contents: write with: diff --git a/.idea/vcs.xml b/.idea/vcs.xml index b8793f3..7bb89a9 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -3,9 +3,5 @@ - - - - \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 7908a2b..a0df3b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ set( ) configure_linker_exports( - UNDECORATE false FORWARDED_DLL "${ORIGINAL_DLL}_o" INPUT_SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/steam_api_exports" INPUT_DLLS "${DLL_INPUT}" diff --git a/KoalaBox b/KoalaBox index 807cc1d..4570a19 160000 --- a/KoalaBox +++ b/KoalaBox @@ -1 +1 @@ -Subproject commit 807cc1d5ac021c778bd918a2a530d5bc38d1d6b9 +Subproject commit 4570a195a1222e728b2a643cc53164b49549a371 diff --git a/README.md b/README.md index 4e3fcb9..eb3e8c9 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ The list of games where inventory emulation has been shown to work is as follows - Hero Siege - Project Winter - Euro Truck Simulator 2 +- Bloons TD 6 diff --git a/src/steam_impl/steam_inventory.cpp b/src/steam_impl/steam_inventory.cpp index 5dd6f53..1ecfe38 100644 --- a/src/steam_impl/steam_inventory.cpp +++ b/src/steam_impl/steam_inventory.cpp @@ -122,18 +122,18 @@ namespace steam_inventory { const uint32_t* punValueBufferSizeOut, const std::function& original_function ) { + const auto common_info = fmt::format( + "{} -> Handle: {}, Index: {}, Name: '{}'", function_name, resultHandle, unItemIndex, pchPropertyName + ); + const auto success = original_function(); if (!success) { - logger->warn("{} -> result is false", function_name); + logger->warn("{}, Result is false", common_info); return false; } - logger->debug( - "{} -> handle: {}, index: {}, propertyName: '{}', buffer: {}", - function_name, resultHandle, unItemIndex, pchPropertyName, - String(pchValueBuffer, *punValueBufferSizeOut - 1) - ); + logger->debug("{}, Buffer: '{}'", common_info, String(pchValueBuffer, *punValueBufferSizeOut - 1)); return success; } @@ -145,7 +145,7 @@ namespace steam_inventory { ) { const auto success = original_function(); - logger->debug("{} -> handle: {}", function_name, fmt::ptr(pResultHandle)); + logger->debug("{} -> Handle: {}", function_name, fmt::ptr(pResultHandle)); return success; } @@ -160,11 +160,11 @@ namespace steam_inventory { ) { const auto success = original_function(); - logger->trace("{} -> handle: {}", function_name, fmt::ptr(pResultHandle)); + logger->debug("{} -> Handle: {}", function_name, fmt::ptr(pResultHandle)); if (success && pInstanceIDs != nullptr) { for (int i = 0; i < unCountInstanceIDs; i++) { - logger->trace(" index: {}, itemId: {}", i, pInstanceIDs[i]); + logger->debug(" Index: {}, ItemId: {}", i, pInstanceIDs[i]); } } @@ -182,9 +182,9 @@ namespace steam_inventory { if (pOutBuffer != nullptr) { String buffer((char*) pOutBuffer, *punOutBufferSize); - logger->debug("{} -> handle: {}, buffer: '{}'", function_name, resultHandle, buffer); + logger->debug("{} -> Handle: {}, Buffer: '{}'", function_name, resultHandle, buffer); } else { - logger->debug("{} -> handle: {}, size: '{}'", function_name, resultHandle, *punOutBufferSize); + logger->debug("{} -> Handle: {}, Size: '{}'", function_name, resultHandle, *punOutBufferSize); } return success; @@ -199,18 +199,18 @@ namespace steam_inventory { const auto success = original_function(); if (!success) { - logger->warn("{} -> result is false", function_name); + logger->warn("{} -> Result is false", function_name); return false; } if (punItemDefIDsArraySize) { - logger->debug("{} -> size: '{}'", function_name, *punItemDefIDsArraySize); + logger->debug("{} -> Size: {}", function_name, *punItemDefIDsArraySize); } if (pItemDefIDs) { // Definitions were copied for (int i = 0; i < *punItemDefIDsArraySize; i++) { const auto& def = pItemDefIDs[i]; - logger->debug(" Definition index: '{}', ID: {}", i, def); + logger->debug(" Index: {}, ID: {}", i, def); } } @@ -225,17 +225,18 @@ namespace steam_inventory { const uint32_t* punValueBufferSizeOut, const std::function& original_function ) { + const auto common_info = fmt::format( + "{} -> Definition ID: {}, Name: '{}'", function_name, iDefinition, pchPropertyName + ); + const auto success = original_function(); if (!success) { - logger->warn("{} -> result is false", function_name); + logger->warn("{}, Result is false", common_info); return false; } - logger->debug( - "{} -> Definition ID: {}, name: '{}', buffer: '{}'", - function_name, iDefinition, pchPropertyName, String(pchValueBuffer, *punValueBufferSizeOut - 1) - ); + logger->debug("{}, Buffer: '{}'", common_info, String(pchValueBuffer, *punValueBufferSizeOut - 1)); return success; }