mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
Restore each imported appearance field on its own
An import with color but no chat_color or tag assigned nil to the missing LuaPlayer properties and failed restoration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41dc294542
commit
feb3253bec
2 files changed
+6
-4
No files matched your search
@@ -1324,10 +1324,11 @@ function serialize.deserialize_player(player, serialized, components, local_cont
|
||||
end
|
||||
end
|
||||
|
||||
if syncs(components, "appearance") and serialized.color then
|
||||
player.color = serialized.color
|
||||
player.chat_color = serialized.chat_color
|
||||
player.tag = serialized.tag
|
||||
if syncs(components, "appearance") then
|
||||
-- Imports may supply any subset of these
|
||||
if serialized.color then player.color = serialized.color end
|
||||
if serialized.chat_color then player.chat_color = serialized.chat_color end
|
||||
if serialized.tag then player.tag = serialized.tag end
|
||||
end
|
||||
if syncs(components, "force") and serialized.force then
|
||||
player.force = serialized.force
|
||||
|
||||
Reference in new issue
Block a user