Palats / mapshot

Factorio mod to export maps as zoomable html
Apache License 2.0
77 stars 12 forks source link

Use game.print instead of player.print #10

Closed daniels1989 closed 3 years ago

daniels1989 commented 3 years ago

Using game.print cleans up the file a lot, it is no longer needed to pass the player instance to every function that prints to chat.

In single player this won't make any difference, as the player is by themselves anyway. On a multiplayer server it would probably be best to use the CLI, which spawns a separate Factorio instance, and thus it would not make a difference there either. And if someone does use the command from within the game on a server, then it's probably best to notify the other players why the game was frozen. At least I assume the game will freeze for a bit, I have not had the opportunity to test taking mapshots from within the game, while playing on a server.