Fix research_sync echoing synced research back to the controller (#1111)

The on_research_finished handler read ignore_research_finished from the
research_sync global, which is the table of RCON functions and never has that
field. The flag that sync_technologies and research_technology set lives on the
script data, so the check never returned and research that came from the
controller was sent back as newly finished. The handler now reads the flag from
the script data.

Co-authored-by: ILLISIS <jayson.harris01@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-10-17 13:43:09 +03:00
1 parent c4f48b6c12
commit e810020db5
1 file changed
+1 -1
+1 -1
View File
@@ -114,7 +114,7 @@ end
--- @param event EventData.on_research_finished
sync.events[defines.events.on_research_finished] = function(event)
local script_data = get_script_data()
if research_sync.ignore_research_finished then
if script_data.ignore_research_finished then
return
end