[0.17 NotABug?] get_saved_technology_progress, set_saved_technology_progress don't work for current research

Bugs that are actually features.
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

[0.17 NotABug?] get_saved_technology_progress, set_saved_technology_progress don't work for current research

Post by ownlyme »

I'm currently working on a mod where players can have different damage multipliers and shooting speeds, so my workaround was to give every player it's own force.
But i'm stuck at syncing the technology progress, because get_saved_technology_progress always returns nil, regardless of progress - (my code:

Code: Select all

/c game.player.print(game.player.force.get_saved_technology_progress(game.player.force.current_research.name))
)
and set_saved_technology_progress doesn't work either...:

Code: Select all

/c game.player.force.set_saved_technology_progress(game.player.force.current_research), 0.5)
Thank you.

edit: i see now that this only affects technologies that are not currently researching...
A bit counter-intuitive, because now i have to write a function to automatically switch between research_progress and saved...progress
I guess you have more important stuff to do, but maybe you want to merge those functions at some point.
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
Rseding91
Factorio Staff
Factorio Staff
Posts: 16098
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17 NotABug?] get_saved_technology_progress, set_saved_technology_progress don't work for current research

Post by Rseding91 »

Thanks for the report however that's working correctly: you can't have saved progress for a technology being actively researched.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”