Merge branch 'master' into ExtraMercs

This commit is contained in:
Asdow
2023-07-27 18:38:39 +03:00
3 changed files with 25 additions and 1 deletions
+1
View File
@@ -8,3 +8,4 @@
/out/
/CMakeSettings.json
/CMakeUserPresets.json
/lib/
+6
View File
@@ -9,6 +9,12 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(ADDRESS_SANITIZER OFF)
if(ADDRESS_SANITIZER)
message(STATUS "AddressSanitizer ENABLED for non-Release builds")
add_compile_options($<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,-fsanitize=address,>)
endif()
# whether we are using MSBuild as a generator
set(usingMsBuild $<STREQUAL:${CMAKE_VS_PLATFORM_NAME},Win32>)
+18 -1
View File
@@ -539,6 +539,23 @@ BOOLEAN CPostalService::DeliverShipment(UINT16 usShipmentID)
SetFactFalse( FACT_PABLOS_STOLE_FROM_LATEST_SHIPMENT );
}
// set fact according to shipment size (item count, not weight)
if (usNumberOfItems - uiStolenCount <= 5)
{
SetFactFalse(FACT_MEDIUM_SIZED_SHIPMENT_WAITING);
SetFactFalse(FACT_LARGE_SIZED_SHIPMENT_WAITING);
}
else if (usNumberOfItems - uiStolenCount <= 15)
{
SetFactTrue(FACT_MEDIUM_SIZED_SHIPMENT_WAITING);
SetFactFalse(FACT_LARGE_SIZED_SHIPMENT_WAITING);
}
else
{
SetFactFalse(FACT_MEDIUM_SIZED_SHIPMENT_WAITING);
SetFactTrue(FACT_LARGE_SIZED_SHIPMENT_WAITING);
}
SetFactFalse( FACT_PLAYER_FOUND_ITEMS_MISSING );
SetFactFalse( FACT_LARGE_SIZED_OLD_SHIPMENT_WAITING );
@@ -1146,4 +1163,4 @@ RefToDestinationStruct CPostalService::_GetDestination(UINT16 usDestinationID)
}
return DESTINATION(dli);
}
}