Factorio: Don't send researches completed by editor extensions testing forces. (#894)

This commit is contained in:
CaitSith2 2022-08-11 09:11:34 -07:00 committed by GitHub
parent b32d0efe6d
commit adc16fdd3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -286,6 +286,12 @@ end)
-- hook into researches done -- hook into researches done
script.on_event(defines.events.on_research_finished, function(event) script.on_event(defines.events.on_research_finished, function(event)
local technology = event.research local technology = event.research
if string.find(technology.force.name, "EE_TESTFORCE") == 1 then
--Don't acknowledge AP research as an Editor Extensions test force
--Also no need for free samples in the Editor extensions testing surfaces, as these testing surfaces
--are worked on exclusively in editor mode.
return
end
if technology.researched and string.find(technology.name, "ap%-") == 1 then if technology.researched and string.find(technology.name, "ap%-") == 1 then
-- check if it came from the server anyway, then we don't need to double send. -- check if it came from the server anyway, then we don't need to double send.
dumpInfo(technology.force) --is sendable dumpInfo(technology.force) --is sendable