Code: Select all
local events = {defines.events.on_pre_player_mined_item, defines.events.on_robot_pre_mined}
script.on_event(events, nil)]
What happens: Unregistering multiple events doesn't reset event filters, which triggers a desync error on join.
Code: Select all
66.888 Error ClientMultiplayerManager.cpp:1103: mod-conditional_event_filter_deregister_many had the following event filters when the map was saved: on_pre_player_mined_item (ID 11) (checksum: 153013950) and on_robot_pre_mined (ID 15) (checksum: 153013950)
66.888 Error ClientMultiplayerManager.cpp:1110: mod-conditional_event_filter_deregister_many registered the following event filters when the map was loaded:
66.888 Error ClientMultiplayerManager.cpp:99: MultiplayerManager failed: "" + multiplayer.script-event-mismatch + "
" + "
mod-conditional_event_filter_deregister_many"
1) Host game, place and mine a stone furnace. 2) second player joins.
Only "conditional_event_filter_deregister_many_0.0.1.zip" produces the desync error. As someone was looking over the code in Discord #mod-making, they mentioned multi-event (de-)registration seems to not touch filters. Note: *registering* a function produces an error, that 'filters can't be used with multiple event registration', but registering nil with many does not produce such error.