fix(devcontainer): auto save failed

This commit is contained in:
LemonNeko
2025-08-25 02:40:34 +08:00
parent 4e0f0280c6
commit ba46a4e47b
2 changed files with 5 additions and 5 deletions

View File

@@ -54,11 +54,11 @@ It's hard to describe the project structure in a few words, but it currently loo
5. Create a game save file, the save file path should be the same as the one in the `.env` file:
```bash
/path/to/factorio/bin/x64/factorio --create /path/to/factorio/saves/save.zip
/path/to/factorio/bin/x64/factorio --create /path/to/factorio/the-save-file.zip
# If you are using DevContainer, you can use the following command:
/opt/factorio/bin/x64/factorio --create /path/to/factorio/saves/save.zip
/opt/factorio/bin/x64/factorio --create /path/to/factorio/the-save-file.zip
# If your machine is not x64, you can use the following command:
box64 /opt/factorio/bin/x64/factorio --create /path/to/factorio/saves/save.zip
box64 /opt/factorio/bin/x64/factorio --create /path/to/factorio/the-save-file.zip
```
6. Run the development script:

View File

@@ -33,10 +33,10 @@ WS_SERVER_HOST='localhost'
console.log('Creating save file...\n\n===== Game output starts =====\n')
if (arch() === 'arm64') {
await execa('box64', ['/opt/factorio/bin/x64/factorio', '--create', '/opt/factorio/save.zip'], { stdio: 'inherit' })
await execa('box64', ['/opt/factorio/bin/x64/factorio', '--create', '/opt/factorio/the-save-file.zip'], { stdio: 'inherit' })
}
else {
await execa('/opt/factorio/bin/x64/factorio', ['--create', '/opt/factorio/save.zip'], { stdio: 'inherit' })
await execa('/opt/factorio/bin/x64/factorio', ['--create', '/opt/factorio/the-save-file.zip'], { stdio: 'inherit' })
}
console.log('\n\n===== Game output ends =====\n\nCreated save file')