1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2024-12-04 09:43:00 +02:00

Add clear error message for someone trying to re-init the mod on a save.

This commit is contained in:
Oarcinae 2024-11-01 13:24:32 -04:00
parent d1ca209d86
commit f9ae63f229
3 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.1.5
Date: 2024-11-01
Changes:
- Provide a clear error message that it is NOT supported if the mod is removed and re-added.
---------------------------------------------------------------------------------------------------
Version: 2.1.4
Date: 2024-10-29
Bugfixes:

View File

@ -42,6 +42,14 @@ require("lib/oarc_tests")
-- On Init - Only runs once the first time the game starts
--------------------------------------------------------------------------------
script.on_init(function(event)
-- If init has already been run, we immediately hard error.
-- This is NOT supported. Checking for this force is just an easy dumb way to do it.
if (game.forces[ABANDONED_FORCE_NAME] ~= nil) then
error("It appears as though this mod is trying to re-run on_init. If you removed the mod and re-added it again, this is NOT supported. You have to rollback to a previous save where the mod was enabled.")
return
end
ValidateAndLoadConfig()
RegrowthInit()

View File

@ -1,6 +1,6 @@
{
"name": "oarc-mod",
"version": "2.1.4",
"version": "2.1.5",
"factorio_version": "2.0",
"title": "Oarc Multiplayer Spawn",
"author": "Oarcinae",