mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
Deleting an item now follows its ItemComponent delResIndex row in the DeletionRestrictions table, the way the client's shared inventory code decides it (LWOInventoryComponent_Common::CanRemoveFromInventory @ 0x00ce0d20, CheckDeletionRestrictionIndex @ 0x00c94c20): - missing, unrestricted, unknown-type or empty rows allow it; - LOTS_INCLUDED: another item of any listed LOT must remain; - LOTS_EXCLUDED: other items of every listed LOT must remain; - ANY_RESTRICTION / ALL_RESTRICTIONS: any / all listed rows allow it; - ZONE: only in the listed maps; ALWAYS_RESTRICTED: never. Operators (GM level 9) may delete anything, as in the client. A refused delete is logged and the item stays. ItemComponent.minNumRequired is not used: the client never reads it, so its meaning can't be verified. Issue 960: the rocket (6416, row 8) and the classic rocket parts (rows 1-3) have rows that keep at least one rocket or part, so the last rocket can no longer be deleted and strand the player. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
670 B
CMake
21 lines
670 B
CMake
set(DCOMPONENTS_TESTS
|
|
"DeletionRestrictionTests.cpp"
|
|
"DestroyableComponentTests.cpp"
|
|
"PetComponentTests.cpp"
|
|
"SimplePhysicsComponentTests.cpp"
|
|
"SavingTests.cpp"
|
|
"ReplicaComponentOrderTests.cpp"
|
|
)
|
|
|
|
# Get the folder name and prepend it to the files above
|
|
get_filename_component(thisFolderName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
|
list(TRANSFORM DCOMPONENTS_TESTS PREPEND "${thisFolderName}/")
|
|
|
|
# Export to parent scope
|
|
set(DCOMPONENTS_TESTS ${DCOMPONENTS_TESTS} PARENT_SCOPE)
|
|
|
|
# Copy test files to testing directory
|
|
add_subdirectory(TestData)
|
|
list(TRANSFORM COMPONENT_TEST_DATA PREPEND "${thisFolderName}/")
|
|
set(COMPONENT_TEST_DATA ${COMPONENT_TEST_DATA} PARENT_SCOPE)
|