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

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

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

Post by Gangsir » Fri Jun 30, 2017 6:25 pm

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.
The mod used to reproduce the behaviour.
(789 Bytes) Downloaded 27 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.

Factorio Staff
Factorio Staff
Posts: 9844
Joined: Wed Jun 11, 2014 5:23 am

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

Post by Rseding91 » Sun Jul 02, 2017 1:27 pm

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”

Who is online

Users browsing this forum: Google [Bot]