Try to ignore files that end in .*Tests.cpp in case they don't get rearranged to the proper folder. Fix UseLoadoutItem locking an unset loadout slot. Release Build 13501.
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 7m46s
Emscripten Build / UnitTesting (push) Successful in 8m30s

This commit is contained in:
AMay 2026-05-02 00:45:47 -05:00
parent 3f7b45d773
commit d113ef0878
8 changed files with 11 additions and 7 deletions

View File

@ -870,7 +870,6 @@
</SubType>
</ClCompile>
<ClCompile Include="FallEffect.cpp" />
<ClCompile Include="FileTests.cpp" />
<ClCompile Include="FlipCoinEffect.cpp">
<SubType>
</SubType>
@ -1066,7 +1065,6 @@
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="ItemTests.cpp" />
<ClCompile Include="Key.cpp" />
<ClCompile Include="LargeStone.cpp" />
<ClCompile Include="LargeTornado.cpp">
@ -1098,7 +1096,9 @@
<ClCompile Include="tests\EffectTests.cpp" />
<ClCompile Include="tests\EnchantTests.cpp" />
<ClCompile Include="tests\EngineTests.cpp" />
<ClCompile Include="tests\FileTests.cpp" />
<ClCompile Include="tests\GeometryTests.cpp" />
<ClCompile Include="tests\ItemTests.cpp" />
<ClCompile Include="ThunderOrb.cpp" />
<ClCompile Include="TileGroup.cpp" />
<ClCompile Include="Menu.cpp" />

View File

@ -1409,10 +1409,10 @@
<ClCompile Include="tests\GeometryTests.cpp">
<Filter>Source Files\Unit Tests</Filter>
</ClCompile>
<ClCompile Include="FileTests.cpp">
<ClCompile Include="tests\FileTests.cpp">
<Filter>Source Files\Unit Tests</Filter>
</ClCompile>
<ClCompile Include="ItemTests.cpp">
<ClCompile Include="tests\ItemTests.cpp">
<Filter>Source Files\Unit Tests</Filter>
</ClCompile>
</ItemGroup>

View File

@ -3932,7 +3932,7 @@ void AiL::SetLoadoutItem(int slot,std::string itemName){
bool AiL::UseLoadoutItem(int slot,const std::optional<vf2d>targetingPos){
if(slot<0||slot>GetLoadoutSize()-1)ERR("Invalid inventory slot "+std::to_string(slot)+", please choose a slot in range (0-"+std::to_string(GetLoadoutSize()-1)+").");
if(!ISBLANK(GetLoadoutItem(slot).lock())&&GetLoadoutItem(slot).lock()->Amt()>0){
if(!ISBLANK(GetLoadoutItem(slot))&&GetLoadoutItem(slot).lock()->Amt()>0){
Tutorial::GetTask(TutorialTaskName::USE_RECOVERY_ITEMS).I(A::ITEM_USE_COUNT)++;
Inventory::UseItem(GetLoadoutItem(slot).lock()->ActualName(),1U,targetingPos);
if(GameState::GetCurrentState()!=States::GAME_HUB){

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 13499
#define VERSION_BUILD 13501
#define stringify(a) stringify_(a)
#define stringify_(a) #a

View File

@ -7,4 +7,6 @@
}
$_
} |
Out-File $args[0] -encoding ascii -nonewline
Out-File $args[0] -encoding ascii -nonewline
mv *Tests.cpp tests/

View File

@ -106,6 +106,8 @@ if(TEST_ONLY)
"${SOURCE_CXX_SRC_DIR}/tests/*.cpp"
)
list(APPEND SOURCE_CXX_FILES ${SOURCE_CXX_TEST_FILES})
else()
list(FILTER SOURCE_CXX_FILES EXCLUDE REGEX ".*Tests.cpp")
endif()
# Search in the "cmake" directory for additional CMake modules.