aboutsummaryrefslogtreecommitdiff
path: root/virus2.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2017-02-14 16:17:55 -0800
committer1029chris <1029chris@gmail.com>2017-02-14 16:17:55 -0800
commit5daf2309272fc3d413f230514534d550c6bd2e33 (patch)
treeb01c942a50a590aa6a4b20c1ad223cd3b6b7ef00 /virus2.lua
parentdcf61eedc3f19af5a98ffd78439306ffe205ad77 (diff)
Made save game better
The game auto saves when you lose as well.
Diffstat (limited to 'virus2.lua')
-rw-r--r--virus2.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/virus2.lua b/virus2.lua
index 317c8e4..18e3e29 100644
--- a/virus2.lua
+++ b/virus2.lua
@@ -322,8 +322,6 @@ function drawVirusFight2()
if v1.explodeEndFrame >= 20 then
v2.start = false
if v2.c.health == -20 then
- local prevSave = love.filesystem.read("savegame.txt")
- love.filesystem.write("savegame.txt", prevSave .. "v2.complete = true;virus2Lose = " .. virus2Lose .. ";")
scene = 1
win[4].w = 200
antivirus.status = "Virus Defeated"
@@ -336,6 +334,7 @@ function drawVirusFight2()
scene = 666
virus2Lose = virus2Lose + 1
end
+ saveGameFile()
end
end
end