factoriotools / factorio-docker

Factorio headless server in a Docker container
https://hub.docker.com/r/factoriotools/factorio/
MIT License
918 stars 218 forks source link

Remove/deprecate scenario handling entrypoints and move new scenario handling into default entry point #379

Closed bplein closed 2 years ago

bplein commented 3 years ago

The goal of this PR is to replace/deprecate the separate entrypoints scenario.sh and scenario2map.sh from the project due to the improper handling of map settings by this now unsupported factorio command line flag. https://forums.factorio.com/viewtopic.php?f=23&t=69377&p=422321&hilit=scenario2map#p422321

I have updated the default entry point to look for the environment variable SERVER_SCENARIO and use that as a trigger to launch that scenario without loading an existing map.

The one weakness of this is that there is no initial game save created. If the container fails without a save, progress would be lost. This is the way launching a scenario works, and there seems to be no way to have it create a save that is analogous to vanilla map creation.

bplein commented 3 years ago

I have tested this with 1.1.25 only.

bplein commented 3 years ago

my apologies for abandoning this PR... life got in front of me.

bplein commented 3 years ago

And not sure why I used my old Will Haynes account, must have logged into GH with the wrong account at some point. :)

bplein commented 3 years ago

I rebased upstream/master but I'm so rusty and novice with git that I am not 100% sure everything was done correctly.