1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2025-01-18 02:58:37 +02:00

Fixing a crash on player exit.

This commit is contained in:
Oarcinae 2018-01-26 20:41:02 -05:00
parent b5d09f63ba
commit 99a3e1a4c4
2 changed files with 4 additions and 3 deletions

View File

@ -36,7 +36,7 @@ SPAWN_MSG3 = "Resources are spread out far apart but are quite rich."
-- These are my specific welcome messages that get used only if I am the user
-- that creates the game.
SERVER_OWNER_IS_OARC = false -- This should be false for you, it's just a convenience for me.
SERVER_OWNER_IS_OARC = true -- This should be false for you, it's just a convenience for me.
WELCOME_MSG_OARC = "Welcome to Oarc's official server! Join the discord here: discord.gg/TPYxRrS"
WELCOME_MSG_TITLE_OARC = "Welcome to Oarc's Server!"
@ -59,7 +59,7 @@ ENABLE_BUDDY_SPAWN = true
ENABLE_RSO = true
-- Frontier style rocket silo mode
FRONTIER_ROCKET_SILO_MODE = false
FRONTIER_ROCKET_SILO_MODE = true
-- Enable Undecorator
-- Removes decorative items to reduce save file size.

View File

@ -69,6 +69,8 @@ function FindUnusedSpawns(event)
-- If a uniqueSpawn was created for the player, mark it as unused.
if (global.uniqueSpawns[player.name] ~= nil) then
local spawnPos = global.uniqueSpawns[player.name].pos
-- Check if it was near someone else's base.
nearOtherSpawn = false
for _,otherSpawnPos in pairs(global.uniqueSpawns) do
@ -78,7 +80,6 @@ function FindUnusedSpawns(event)
end
if (ENABLE_ABANDONED_BASE_REMOVAL and not nearOtherSpawn) then
local spawnPos = global.uniqueSpawns[player.name].pos
global.uniqueSpawns[player.name] = nil
SendBroadcastMsg(player.name .. "'s base was marked for immediate clean up because they left within "..MIN_ONLINE_TIME_IN_MINUTES.." minutes of joining.")