mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-09 06:13:43 +00:00
feat: /reprocessproperty, make a property's models again and reload it
A GM 8 command: every brick built model on the property you are on goes back to the UGC server's queue. Once all are made (at most 15 minutes), everyone on the property is sent the new mesh checksums and transferred back into the same zone and clone, so their game loads the property again and downloads the new meshes. Swapping a model's mesh in place doesn't work in the client, so the whole property is loaded again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#include "DEVGMCommands.h"
|
||||
|
||||
#include "UgcManifest.h"
|
||||
#include "PropertyManagementComponent.h"
|
||||
#include "MasterPackets.h"
|
||||
|
||||
#include <ranges>
|
||||
@@ -1979,4 +1982,19 @@ namespace DEVGMCommands {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ReprocessProperty(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
||||
auto* const property = PropertyManagementComponent::Instance();
|
||||
if (!property || property->GetId() == LWOOBJID_EMPTY) {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"You aren't on a property.");
|
||||
return;
|
||||
}
|
||||
const auto queued = UgcManifest::ReprocessProperty(property->GetId());
|
||||
if (queued == 0) {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"This property has no brick built models.");
|
||||
return;
|
||||
}
|
||||
ChatPackets::SendSystemMessage(sysAddr, GeneralUtils::UTF8ToUTF16("Making " + std::to_string(queued) +
|
||||
" model(s) again. Everyone on the property is reloaded when they're made."));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user