mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-05 12:23:44 +00:00
fix(ugc): give old cars and rockets a build id when a character loads
Cars and rockets built before builds were recorded have no subkey and no ugc_modular_build row, so the client has no blueprint id to ask for their icon with. When a character loads, such an item (a ModularBuildComponent createdLOT with assemblyPartLOTs but no subkey) gets what a new build gets: a persistent id as its subkey and a ugc_modular_build row with its modules and owner. The next save keeps the subkey; nothing is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,9 @@ public:
|
||||
// The first build made of this many parts
|
||||
std::optional<CDModularBuildComponent> GetByNumberOfParts(uint32_t numberOfParts) const;
|
||||
|
||||
// Whether a LOT is the item some build becomes (a car or rocket)
|
||||
bool IsCreatedLot(LOT lot) const;
|
||||
|
||||
// Fills numberOfParts and rootPartExampleLOT from a ModularBuildComponent.xml
|
||||
static void ParseXml(std::string_view xml, CDModularBuildComponent& build);
|
||||
static std::optional<CDModularBuildComponent> FindByNumberOfParts(const std::vector<CDModularBuildComponent>& builds, uint32_t numberOfParts);
|
||||
|
||||
Reference in New Issue
Block a user