diff --git a/projects/flixel-desktop-habit-puzzle-game/habits/default.txt b/projects/flixel-desktop-habit-puzzle-game/habits/default.txt new file mode 100644 index 00000000..d9332475 --- /dev/null +++ b/projects/flixel-desktop-habit-puzzle-game/habits/default.txt @@ -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 +----- \ No newline at end of file diff --git a/projects/flixel-desktop-habit-puzzle-game/source/HabitModel.kiss b/projects/flixel-desktop-habit-puzzle-game/source/HabitModel.kiss index b78fb4ae..59881728 100644 --- a/projects/flixel-desktop-habit-puzzle-game/source/HabitModel.kiss +++ b/projects/flixel-desktop-habit-puzzle-game/source/HabitModel.kiss @@ -27,9 +27,11 @@ (continue)) ((Some "") (continue)) // 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 - (let [startingPoints (* rewardFiles.length HabitState.TOTAL_PIECES)] + (let [parts (line.split " ") + startingPoints (Std.parseInt (parts.pop)) + path (parts.join " ")] (objectWith path startingPoints)))) ((Some line) (.push @@ -136,7 +138,7 @@ "${label.label} $(* "|" label.points)") "/")") (function :String stringifyRewardFile [:RewardFile rewardFile] - rewardFile.path) + "${rewardFile.path} ${rewardFile.startingPoints}") (method :Void save [] (localVar &mut content "DAILY\n-----\n")