mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2025-01-20 02:59:53 +02:00
Merge pull request #232 from Oarcinae/231-crash-on-player-left-game-when-loading-game
Fix critical crash in player left event when removing items.
This commit is contained in:
commit
d1ca209d86
@ -1,4 +1,9 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.1.4
|
||||
Date: 2024-10-29
|
||||
Bugfixes:
|
||||
- Fix crash due to invalid player character when attempting to remove items in player left game event.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.1.3
|
||||
Date: 2024-10-27
|
||||
Minor Features:
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "oarc-mod",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"factorio_version": "2.0",
|
||||
"title": "Oarc Multiplayer Spawn",
|
||||
"author": "Oarcinae",
|
||||
|
@ -436,6 +436,7 @@ end
|
||||
---@param player LuaPlayer
|
||||
---@return nil
|
||||
function RemovePlayerStarterItems(player)
|
||||
if player == nil or player.character == nil then return end
|
||||
local surface_name = player.character.surface.name
|
||||
if (storage.ocfg.surfaces_config[surface_name]) ~= nil then
|
||||
local startItems = storage.ocfg.surfaces_config[surface_name].starting_items.player_start_items
|
||||
|
Loading…
x
Reference in New Issue
Block a user