mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
With UGCUSE3DSERVICES=7:0 (the client's default) the client asks its world for a blueprint file's MD5 and size (REQUEST_UGC_MANIFEST_INFO, world 27) and then downloads BrickModels/UserMade/<id % 1000>/<id>.<ext>.sd0. Layouts checked in the 1.10.64 client: the request is a u64 blueprint id and a u8 resource type; the answer (UGC_MANIFEST_RESPONSE, client 60) repeats them and adds a u8 valid, the u32 size and the 16 byte MD5 of the inflated file, 37 bytes after the 0x53 exactly or the client drops it. - dNet: WorldPackets::RequestUgcManifestInfo, ClientPackets::UgcManifestResponse (eUgcResourceType), with byte tests against the client's layouts. - Database: ugc_file_checksums (per model or module combination and file) and ugc_modular_build.combination_id (migrations 89 / 72), GetUgcFileChecksum looks a blueprint up as a model, else as a build through its combination. - UGC server: every download is also written as .sd0 (Sd0::Compress); workers hand the checksums back and the main thread stores them; old items get their sd0 icon and checksum, and builds their combination id, once at start-up, a few per tick; serves <dir>/BrickModels/UserMade/<bucket>/<id>.<ext>.sd0 under client_path, /<folder>/UserBrickModels and the root (.hkx 404). - World: UgcManifest answers on the main thread with one indexed query per request; files not made yet are answered when they are (looked at again every 5 seconds), and a model in its quiet period is made right away. No worker threads, HTTP or file reads in the world. Off by default (ugc_manifest=0): checked in game, the client then downloads from http://127.0.0.1:80/lwoclient/UserBrickModels/ whatever its boot.cfg says and logs the player out when it can't connect, so icons need the UGC server on port 80 of each player's machine. docs/UgcServer.md has the details. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.4 KiB
CMake
46 lines
1.4 KiB
CMake
set(DGAME_DUTILITIES_SOURCES "BrickDatabase.cpp"
|
|
"BrickByBrick.cpp"
|
|
"ChatServerLink.cpp"
|
|
"CheatDetection.cpp"
|
|
"DashboardActions.cpp"
|
|
"EconomyLedger.cpp"
|
|
"DashboardNotify.cpp"
|
|
"GUID.cpp"
|
|
"LiveEvents.cpp"
|
|
"Contraband.cpp"
|
|
"PropertyRent.cpp"
|
|
"PropertyReputation.cpp"
|
|
"Loot.cpp"
|
|
"Mail.cpp"
|
|
"MessageInspector.cpp"
|
|
"ObjectIDManager.cpp"
|
|
"PlayerReports.cpp"
|
|
"Preconditions.cpp"
|
|
"SlashCommandHandler.cpp"
|
|
"UgcManifest.cpp"
|
|
"VanityUtilities.cpp"
|
|
"WorldMigration.cpp")
|
|
|
|
add_subdirectory(SlashCommands)
|
|
|
|
foreach(file ${DGAME_DUTILITIES_SLASHCOMMANDS})
|
|
set(DGAME_DUTILITIES_SOURCES ${DGAME_DUTILITIES_SOURCES} "SlashCommands/${file}")
|
|
endforeach()
|
|
|
|
add_library(dUtilities OBJECT ${DGAME_DUTILITIES_SOURCES})
|
|
target_precompile_headers(dUtilities REUSE_FROM dGameBase)
|
|
target_include_directories(dUtilities PUBLIC "." "SlashCommands"
|
|
PRIVATE
|
|
"${PROJECT_SOURCE_DIR}/dGame/dComponents"
|
|
"${PROJECT_SOURCE_DIR}/dGame/dInventory" # transitive via PossessableComponent.h
|
|
"${PROJECT_SOURCE_DIR}/dGame/dGameMessages"
|
|
"${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # transitive via InventoryComponent.h
|
|
"${PROJECT_SOURCE_DIR}/dGame/dMission" # transitive via MissionComponent.h
|
|
"${PROJECT_SOURCE_DIR}/dGame/dEntity" # transitive via dZoneManager/Spawner.h
|
|
"${PROJECT_SOURCE_DIR}/dZoneManager" # Mail.cpp
|
|
"${PROJECT_SOURCE_DIR}/dChatFilter" # DashboardActions.cpp (messages sent into chat)
|
|
)
|
|
target_link_libraries(dUtilities
|
|
PUBLIC dDatabase dPhysics
|
|
INTERFACE dZoneManager)
|