Sync Prebuild.itemRequired change event that the item is taken from the player package in ConstructionModuleComponent.PlaceItems. When the server receives and the prebuild item is satisfied, refund the item.
Manage drone and craft data from other players in a separate pool from the vanilla pool to avoid interfering with the vanilla save data. The remote drones will use the mimic function of ConstructionSystem.UpdateDrones to update position and state. Its only real interaction is repairing the damaged Entity. The rest is just for updating the animation model.
Since the drones now go to the nearest target first, the build plan coordination can be ignored without losing too much efficiency. BuildFinally has already been guarded to prevent duplicate build calls.
Using a simpler implementation for drone syncing.
Sync
Prebuild.itemRequired
change event that the item is taken from the player package inConstructionModuleComponent.PlaceItems
. When the server receives and the prebuild item is satisfied, refund the item.Manage drone and craft data from other players in a separate pool from the vanilla pool to avoid interfering with the vanilla save data. The remote drones will use the mimic function of
ConstructionSystem.UpdateDrones
to update position and state. Its only real interaction is repairing the damaged Entity. The rest is just for updating the animation model.Since the drones now go to the nearest target first, the build plan coordination can be ignored without losing too much efficiency.
BuildFinally
has already been guarded to prevent duplicate build calls.