1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2024-12-12 10:13:58 +02:00

Merge pull request #264 from Oarcinae/253-offline-enemy-protection-log-spam-attack-on-player-char

Remove unnecessary error message
This commit is contained in:
Oarcinae 2024-11-17 14:34:56 -05:00 committed by GitHub
commit 1c680026e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 9 deletions

View File

@ -8,7 +8,7 @@ Date: ????
- Change surface regrowth checkboxes to be enabled/disabled by the global setting to make it obvious that they are dependent on the global setting. - Change surface regrowth checkboxes to be enabled/disabled by the global setting to make it obvious that they are dependent on the global setting.
Bugfixes: Bugfixes:
- Fix regrowth surface setting not respecting previous setting state when surface is first created. - Fix regrowth surface setting not respecting previous setting state when surface is first created.
- Fix offline enemy attack error when attacks target a player character. - Remove offline enemy attack error messages. (Not really a bug, just false error messages.)
Info: Info:
- Add RU translation (thanks KORESHon!) - Add RU translation (thanks KORESHon!)
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------

View File

@ -60,16 +60,14 @@ function OarcModifyEnemyGroup(event)
-- No targets found with a last_user -- No targets found with a last_user
if (target_entity == nil) then if (target_entity == nil) then
-- There are 2 Known cases where this can happen:
-- Either (group.command.type == defines.command.attack_area) in which case it is likely a player attacking bases with nukes.
-- OR
-- The enemy group is just expanding / building bases.
-- This is unexpected, not sure under which conditions this would happen. -- If we really have an edge case, then so be it, let it go through.
if (group.command.type == defines.command.attack_area) then
-- SendBroadcastMsg("OarcModifyEnemyGroup find_nearest_enemy attack_area FAILED!?!? " .. GetGPStext(group.surface.name, group.position) .. " Target: " .. GetGPStext(group.surface.name, group.command.destination))
log("ERROR - OarcModifyEnemyGroup find_nearest_enemy attack_area FAILED!?!?" .. serpent.block(group))
-- This is fine, as the enemy group is just expanding / building bases -- In both cases, we don't want to stop the enemy group.
else
-- log("OarcModifyEnemyGroup find_nearest_enemy did not find anything!")
end
return return
end end