mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Move items to whatever controller the player ends up with
Syncing the controller required syncing the inventories, and with the controller off a god or ghost kept its local items while the stored character was left alone. Cooldude pointed out there is no reason the items can't follow the player to a different controller. The controller and inventories components are now independent. The god inventory and the hidden ghost inventory belong to the inventories component. On download the scenario first settles the controller, synced or local, and then places the stored items into whatever that controller holds. An inventory goes slot for slot into the inventory of the same name when it fits, otherwise its items are inserted into the main, guns, ammo and armor inventories, and anything left goes into a corpse below the player. A spectator holds nothing, so everything goes into the corpse. A player without a character gets the crafting queue ingredients as items. This removes the early respawn of a ghost with a stored character and the upload of the respawned character, a ghost now gets and uploads its hidden inventory. Download spectates every synced player when the inventories are synced, as a god or ghost now holds synced items too. The controller keeps the stored logistic requests when the upload came from a player with nowhere to hold them. Slot filters are dropped when the destination does not support them, such as a script inventory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3d67ed7d9
commit
aa06b9afe3
5 files changed
+256
-100
No files matched your search
@@ -57,6 +57,7 @@ Instances can leave parts of the player out of the sync with the `player_sync.sy
|
||||
A part which is not synced is left as it is when the player joins, and the instance's copy of it is not uploaded, so the stored copy from other instances stays as it was.
|
||||
A player online when the options change keeps the old ones until they leave and join again, and a part that was turned on is downloaded when they join.
|
||||
Turning off `player_sync.sync_inventories` leaves the items players have on the instance in place while the stored inventory still holds them too.
|
||||
Items follow the player to whatever controller they end up with, a character, god or ghost, and what does not fit is put into a corpse below them.
|
||||
|
||||
Communication between the server and instance goes over stdout or rcon, depending on the size of the data.
|
||||
Communication between the instance and the controller goes over websockets.
|
||||
@@ -85,8 +86,7 @@ Defaults to `1000`.
|
||||
|
||||
### player_sync.sync_controller
|
||||
|
||||
Sync whether the player is a character, god or spectator, their respawn timer, cheat mode, the god inventory and the inventory filters of a dead player.
|
||||
Switching controller can destroy the character holding the inventory, so this only takes effect while `player_sync.sync_inventories` is also enabled.
|
||||
Sync whether the player is a character, god or spectator, their respawn timer and cheat mode.
|
||||
|
||||
Defaults to `true`.
|
||||
|
||||
@@ -104,9 +104,10 @@ Defaults to `true`.
|
||||
|
||||
### player_sync.sync_inventories
|
||||
|
||||
Sync the character inventories, the character bonuses and the crafting queue.
|
||||
While the controller is not synced a player without a character keeps what they have on the instance and does not change the stored character.
|
||||
A player who died on the instance uploads the character they will respawn with, and a player waiting to respawn when joining is respawned straight away if there is a synced character to give them.
|
||||
Sync the items the player holds, the character bonuses and the crafting queue.
|
||||
This covers the character inventories, the god inventory and the items a dead player will respawn with.
|
||||
A spectator holds no items, so the synced items are put into a corpse when the player is a spectator on the instance.
|
||||
A player without a character gets the ingredients of the crafting queue as items instead.
|
||||
|
||||
Defaults to `true`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user