bring back startingPoints in the habit save file
This commit is contained in:
29
projects/flixel-desktop-habit-puzzle-game/habits/default.txt
Normal file
29
projects/flixel-desktop-habit-puzzle-game/habits/default.txt
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
DAILY
|
||||||
|
-----
|
||||||
|
MTWThF: [w]eekday chores
|
||||||
|
SSu: [w]eekend chores
|
||||||
|
healthy [b]reakfast
|
||||||
|
|
||||||
|
MONTHLY
|
||||||
|
--------
|
||||||
|
1: [p]ay rent
|
||||||
|
|
||||||
|
INTERVAL
|
||||||
|
--------
|
||||||
|
7: buy [g]roceries
|
||||||
|
|
||||||
|
BONUS
|
||||||
|
-----
|
||||||
|
[j]ournal
|
||||||
|
[c]all someone you love
|
||||||
|
[r]eading session
|
||||||
|
[R]ead a book for fun /[R]ead a book to grow/[R]ead a book for fun /[R]ead a book to learn
|
||||||
|
play [H]abit Puzzles |
|
||||||
|
[d]o chores
|
||||||
|
|
||||||
|
TODO
|
||||||
|
----
|
||||||
|
[C]ustomize my Habit Puzzles file
|
||||||
|
|
||||||
|
FILES
|
||||||
|
-----
|
@@ -27,9 +27,11 @@
|
|||||||
(continue))
|
(continue))
|
||||||
((Some "") (continue))
|
((Some "") (continue))
|
||||||
// Types won't unify with the next case, so this is its own:
|
// Types won't unify with the next case, so this is its own:
|
||||||
((when (= lastHeader "FILES") (Some path))
|
((when (= lastHeader "FILES") (Some line))
|
||||||
(rewardFiles.push
|
(rewardFiles.push
|
||||||
(let [startingPoints (* rewardFiles.length HabitState.TOTAL_PIECES)]
|
(let [parts (line.split " ")
|
||||||
|
startingPoints (Std.parseInt (parts.pop))
|
||||||
|
path (parts.join " ")]
|
||||||
(objectWith path startingPoints))))
|
(objectWith path startingPoints))))
|
||||||
((Some line)
|
((Some line)
|
||||||
(.push
|
(.push
|
||||||
@@ -136,7 +138,7 @@
|
|||||||
"${label.label} $(* "|" label.points)") "/")")
|
"${label.label} $(* "|" label.points)") "/")")
|
||||||
|
|
||||||
(function :String stringifyRewardFile [:RewardFile rewardFile]
|
(function :String stringifyRewardFile [:RewardFile rewardFile]
|
||||||
rewardFile.path)
|
"${rewardFile.path} ${rewardFile.startingPoints}")
|
||||||
|
|
||||||
(method :Void save []
|
(method :Void save []
|
||||||
(localVar &mut content "DAILY\n-----\n")
|
(localVar &mut content "DAILY\n-----\n")
|
||||||
|
Reference in New Issue
Block a user