Achievement fix
parent
21266e3a9d
commit
316cb14e3b
30
arena.lua
30
arena.lua
|
@ -611,6 +611,36 @@ function Arena:quit()
|
||||||
steam.userStats.setAchievement('VOIDERS_WIN')
|
steam.userStats.setAchievement('VOIDERS_WIN')
|
||||||
steam.userStats.storeStats()
|
steam.userStats.storeStats()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local units = self.player:get_all_units()
|
||||||
|
local all_units_level_2 = true
|
||||||
|
for _, unit in ipairs(units) do
|
||||||
|
if unit.level ~= 2 then
|
||||||
|
all_units_level_2 = false
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if all_units_level_2 then
|
||||||
|
state.achievement_level_2_win = true
|
||||||
|
system.save_state()
|
||||||
|
steam.userStats.setAchievement('LEVEL_2_WIN')
|
||||||
|
steam.userStats.storeStats()
|
||||||
|
end
|
||||||
|
|
||||||
|
local units = self.player:get_all_units()
|
||||||
|
local all_units_level_3 = true
|
||||||
|
for _, unit in ipairs(units) do
|
||||||
|
if unit.level ~= 3 then
|
||||||
|
all_units_level_3 = false
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if all_units_level_3 then
|
||||||
|
state.achievement_level_3_win = true
|
||||||
|
system.save_state()
|
||||||
|
steam.userStats.setAchievement('LEVEL_3_WIN')
|
||||||
|
steam.userStats.storeStats()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
4
main.lua
4
main.lua
|
@ -1241,11 +1241,13 @@ function update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
if input.k.pressed then
|
if input.k.pressed then
|
||||||
|
if sx > 1 and sy > 1 then
|
||||||
sx, sy = sx - 1, sy - 1
|
sx, sy = sx - 1, sy - 1
|
||||||
love.window.setMode(480*sx, 270*sy)
|
love.window.setMode(480*sx, 270*sy)
|
||||||
state.sx, state.sy = sx, sy
|
state.sx, state.sy = sx, sy
|
||||||
state.fullscreen = false
|
state.fullscreen = false
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if input.l.pressed then
|
if input.l.pressed then
|
||||||
sx, sy = sx + 1, sy + 1
|
sx, sy = sx + 1, sy + 1
|
||||||
|
@ -1254,10 +1256,12 @@ function update(dt)
|
||||||
state.fullscreen = false
|
state.fullscreen = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
if input.f12.pressed then
|
if input.f12.pressed then
|
||||||
steam.userStats.resetAllStats(true)
|
steam.userStats.resetAllStats(true)
|
||||||
steam.userStats.storeStats()
|
steam.userStats.storeStats()
|
||||||
end
|
end
|
||||||
|
]]--
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue