Palats / mapshot

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

Made mapshot not crash when there are no players connected yet #42

Closed VictorKoenders closed 4 months ago

VictorKoenders commented 4 months ago

I'm trying to set up mapshot on a server and have it automatically export a mapshot every hour.

As it turns out, when the server is started up with no players connected, mapshot gets very confused trying to build the first player's params.

I've made these changes and it works for my case. I figured it would be useful to merge this upstream.

Thanks for the mod!

image

Palats commented 4 months ago

Thanks a lot! From a quick glance, looks promising - will try to take a proper look in the coming couple of days.

Palats commented 4 months ago

Looks good. Fwiw, the player info used here when creating a mapshot is only used for getting the settings. It would be possible to imagine having something using some default settings or another source of settings if it is needed to be able to trigger the rendering even when no one is connected. That would require changing build_params a bit probably.

Palats commented 4 months ago

Released as version 0.0.22. Thanks for the contribution!