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

Bugs that are actually features.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
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.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
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”