Additional events around connect_to_server

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Godmave
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Nov 15, 2016 3:52 pm
Contact:

Additional events around connect_to_server

Post by Godmave »

New events "on_connect_to_server_accept" and "on_connect_to_server_decline":

Called when the user accepts or declines the request to change servers.
Use-case:
In a future version people will be able to ride trains to other servers. For that a request to change servers will be issued after the train gets teleported away.
If the user declines the server change he will get spawned next to where the train was removed.
If the user accepts the server change the target node will be informed that it is supposed to teleport the user into that train on spawn.

Bonus objective:
Add an optional information to on_player_left_game and on_pre_player_left_game:
changed_server::bool
and/or
changed_to_server::table of connect_to_server parameters

Post Reply

Return to “Modding interface requests”