Page 1 of 1

Desync on showing sprite button with tooltip (locale)

Posted: Thu Sep 29, 2016 11:26 pm
by judos
I found a desync which occurs when a mod overrides with a locale file some item-name. Basically after the locale overrides the item-name for an item in one language showing a gui-sprite button in the game will instantly lead to a desync.

I attached a minimal example of a mod which does override the locale for the item "pipe".
Afterwards my mod (BeltSorter) would show a item selection gui where the tooltip uses this item-name and leads to instant desyncs in multiplayer games.
To reduce the example I just used one command to reproduce the error:

Code: Select all

/c game.player.gui.left.add({type="sprite-button",name="test", style="slot_button_style", sprite="item/pipe"}) game.player.gui.left.test.tooltip = game.item_prototypes["pipe"].localised_name
Thanks for having a look at it!
Cheers,
judos

Re: Desync on showing sprite button with tooltip (locale)

Posted: Thu Sep 29, 2016 11:44 pm
by Loewchen

Re: Desync on showing sprite button with tooltip (locale)

Posted: Fri Sep 30, 2016 5:00 pm
by Rseding91
Fixed for 0.14.12.

Re: Desync on showing sprite button with tooltip (locale)

Posted: Fri Sep 30, 2016 6:36 pm
by judos
You guys are simply awesome! Thanks for fixing so fast :)
Also the changelog that desync reports are now much bigger sounds lovely for eventual future issues.

Cheers, judos

Re: Desync on showing sprite button with tooltip (locale)

Posted: Fri Sep 30, 2016 6:41 pm
by Rseding91
judos wrote:You guys are simply awesome! Thanks for fixing so fast :)
Also the changelog that desync reports are now much bigger sounds lovely for eventual future issues.

Cheers, judos
The fix didn't actually make it into 0.14.12 :) It will be in 0.14.13.

Re: Desync on showing sprite button with tooltip (locale)

Posted: Fri Sep 30, 2016 6:44 pm
by judos
Oh ok, thanks for the info. :) (still 101% awesome hehe)