mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-17 10:12:50 +00:00
Staff list contraband items on a new dashboard page (item search, reason, flag or flag and remove; contraband_manage to edit, reports_view to see). World servers check every inventory when a character loads and every item a player receives: each find is an economy flag of the new kind Contraband, shown with the other flags and in the character's related data. Items marked for removal are taken away, with a character snapshot kept first so they can be given back, an audit entry and a mail or chat message telling the player why. Staff are skipped unless contraband_ignore_staff is off. Worlds reload the list when it changes (RELOAD_CONTRABAND, added at the end of ePlayerAction). Fixes #1563 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
set(DGAMETEST_SOURCES
|
|
"GameDependencies.cpp"
|
|
"LUBitStreamTests.cpp"
|
|
"MailIdPinTests.cpp"
|
|
"EconomyLedgerTests.cpp"
|
|
"PlayerReportsLimitTests.cpp"
|
|
"SlashCommandPermissionTests.cpp"
|
|
"StaleSaveGuardTests.cpp"
|
|
"ContrabandTests.cpp"
|
|
)
|
|
|
|
add_subdirectory(dComponentsTests)
|
|
list(APPEND DGAMETEST_SOURCES ${DCOMPONENTS_TESTS})
|
|
|
|
add_subdirectory(dGameMessagesTests)
|
|
list(APPEND DGAMETEST_SOURCES ${DGAMEMESSAGES_TESTS})
|
|
|
|
add_subdirectory(dNetTests)
|
|
list(APPEND DGAMETEST_SOURCES ${DNET_TESTS})
|
|
|
|
file(COPY ${GAMEMESSAGE_TESTBITSTREAMS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
|
file(COPY ${COMPONENT_TEST_DATA} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
# Add the executable. Remember to add all tests above this!
|
|
add_executable(dGameTests ${DGAMETEST_SOURCES})
|
|
target_include_directories(dGameTests PRIVATE "." "${PROJECT_SOURCE_DIR}/dChatServer")
|
|
|
|
if(APPLE)
|
|
add_custom_target(dGameTestsLink
|
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
add_dependencies(dGameTests dGameTestsLink)
|
|
endif()
|
|
|
|
target_link_libraries(dGameTests ${COMMON_LIBRARIES} GTest::gtest_main
|
|
dGame dScripts dPhysics Detour Recast tinyxml2 dWorldServer dZoneManager dChatFilter dNavigation bcrypt MD5)
|
|
|
|
# Discover the tests
|
|
gtest_discover_tests(dGameTests)
|