[Rseding91] [15.25] LuaPlayer.unlock_achievement unexpected behav.

This subforum contains all the issues which we already resolved.
User avatar
Gangsir
Inserter
Inserter
Posts: 20
Joined: Fri Jul 15, 2016 4:50 pm
Contact:

[Rseding91] [15.25] LuaPlayer.unlock_achievement unexpected behav.

Post by Gangsir »

Problem: LuaPlayer.unlock_achievement() doesn't produce the same behaviour as documented on it's page of the API, http://lua-api.factorio.com/latest/LuaP ... chievement.

What I expected: Calling the method repeatedly on the same player with the same achievement would do nothing after the first call, like the API says.

What happened instead: The sound and popup for the achievement repeatedly popped up when the method was called repeatedly. This goes against what the API says should happen,
This has any effect only when this is the local player and the achievement isn't unlocked so far.
Steps to reproduce:

1. Use the mod attached to repeatedly call the method without disabling achievements.
2. Open a new factorio world, and wait a bit.
3. You'll see the achievement unlock, but it will keep unlocking every few seconds, as the mod calls it every few seconds.
4. Observe error.

I'm not sure if the method or the docs are wrong.
Attachments
AchievementObtainer_0.1.0.zip
The mod used to reproduce the behaviour.
(789 Bytes) Downloaded 152 times
I'm an administrator over at the Factorio wiki. If you have any questions about the wiki, or concerns, please do not hesitate to contact me. I'm on the subreddit (/r/factorio, /u/Gangsir) as well.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14249
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [15.25] LuaPlayer.unlock_achievement unexpected behav.

Post by Rseding91 »

Thanks for the report. This is now fixed for the next version of 0.15.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”