Achiever deprecated

by Gangsir

Adds many more achievements for players that feel there aren't enough, ranging from progression based to difficult. When used with Bob's mods, it adds some achievements for them. See the mod portal page for a full list.

Tweaks
7 years ago
0.15
62

b Game crash during blueprint selection [v0.2.0]

7 years ago
(updated 7 years ago)

Exception at tick 15080235: Error while running event Achiever::on_player_setup_blueprint (ID 68)
An area of zero size is not supported. Either don't define area to search the entire surface or use 'position'.
stack traceback:
Achiever/control.lua:54: in function <Achiever/control.lua:50>

Replication steps: Use a blueprint to select a point area, by not moving the mouse :)

7 years ago

Changing the code in control.lua like this solves the problem (feel free to incorporate the fix if you like)
-- control.lua ~ line 50
function isZeroSizeArea(area)
if (area.left_top.x == area.right_bottom.x) and (area.left_top.y == area.right_bottom.y) then
return true
else
return false
end
end

function onBlueprint(e)
local player = game.players[e.player_index]
if not player then return end
player.unlock_achievement("blueprinted")
if not isZeroSizeArea(e.area) and player.surface.count_entities_filtered{type = "splitter", area = e.area} >= 10 then
player.unlock_achievement("well-balanced")
end
end

7 years ago

Thanks, this will be fixed for 0.2.1

New response