LuaGameScript or LuaBootstrap is_headless_server [boolean]
Posted: Mon May 31, 2021 4:28 pm
What?
A method to know if the game is hosted on a dedicated server.
Why?
I'm currently working with LuaPlayer.request_translation(). To not cause network congestion I have to limit the amount of requests I send each tick. If I could know that a game is not hosted on a dedicated server then I could send all requests at once if the hosting player is the only player. (Presuming that no network traffic is generated if there's no other players to send it to.) This would allow me to finish translation much faster and before any other players join.
A method to know if the game is hosted on a dedicated server.
Why?
I'm currently working with LuaPlayer.request_translation(). To not cause network congestion I have to limit the amount of requests I send each tick. If I could know that a game is not hosted on a dedicated server then I could send all requests at once if the hosting player is the only player. (Presuming that no network traffic is generated if there's no other players to send it to.) This would allow me to finish translation much faster and before any other players join.