mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Factorio: Don't send researches completed by editor extensions testing forces. (#894)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user