1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2025-10-08 22:52:03 +02:00

Merge pull request #315 from Oarcinae/dev_2.1.24

Dev 2.1.24 - Fix unfriendly forces crash site ship access issue & mod compat issue
This commit is contained in:
Oarcinae
2025-05-16 13:01:53 -04:00
committed by GitHub
5 changed files with 28 additions and 2 deletions

View File

@@ -1,4 +1,12 @@
---------------------------------------------------------------------------------------------------
Version: 2.1.24
Date: 2025-05-16
Bugfixes:
- Fix that player's couldn't access their own crash site ship if friendly forces was disabled. The crashed ship is now on the host's force.
- Fix compatibility issue with EverythingOnNauvis mod. Thank you to zzzz465 for the fix!
Info:
- Added a simple crashed ship was destroyed message (by request) only if the ship dies and friendly forces is disabled.
---------------------------------------------------------------------------------------------------
Version: 2.1.23
Date: 2025-01-19
Bugfixes:

View File

@@ -418,6 +418,14 @@ script.on_event(defines.events.on_entity_damaged, function(event)
end,
{{filter="type", type = "unit-spawner"}})
-- Notify player if their crash-site spaceship is dead, only for PVP
script.on_event(defines.events.on_entity_died, function(event)
if storage.ocfg.gameplay.enable_friendly_teams then return end
local force = event.entity.force ---@type LuaForce
CompatSend(force, "[color=red]Warning:[/color] Your crashed ship was destroyed!")
end,
{{filter = "name", name = "crash-site-spaceship"}})
----------------------------------------
-- Gui Events
----------------------------------------

View File

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

View File

@@ -18,6 +18,9 @@ function CreateHoldingPenSurface()
map_settings.peaceful_mode = true
map_settings.width = 64
map_settings.height = 64
map_settings.autoplace_controls = map_settings.autoplace_controls or {}
map_settings.autoplace_settings = map_settings.autoplace_settings or {}
map_settings.default_enable_all_autoplace_controls = map_settings.default_enable_all_autoplace_controls or false
-- Create a new surface for the holding pen

View File

@@ -680,6 +680,13 @@ function GenerateFinalSpawnPieces(delayed_spawn)
{ x = delayed_spawn.position.x + 15, y = delayed_spawn.position.y - 25 },
ocfg.surfaces_config[delayed_spawn.surface_name].starting_items.crashed_ship_resources,
ocfg.surfaces_config[delayed_spawn.surface_name].starting_items.crashed_ship_wreakage)
-- Need to search for the crash site entities and make them match the player force!
local radius = ocfg.spawn_general.spawn_radius_tiles * spawn_config.radius_modifier
local wreckage = surface.find_entities_filtered{position = delayed_spawn.position, radius = radius, force = "player"}
for _, wreck in pairs(wreckage) do
wreck.force = game.players[delayed_spawn.host_name].force
end
end
end