Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
e76b4b13
Commit
e76b4b13
authored
Mar 21, 2022
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added quest progression to mouse click data
parent
91ad8a6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Quests.gd
Quests.gd
+17
-0
No files found.
Quests.gd
View file @
e76b4b13
...
...
@@ -13,6 +13,7 @@ func _ready(): # Called when the node enters the scene tree for the first time.
func add(q): # adds a quest to the list
quests.append(q)
showQuests()
storeData("QUESTS: Added " + q)
func finishQuest(q): # removes a quest from the list
var index = 0
...
...
@@ -31,6 +32,8 @@ func finishQuest(q): # removes a quest from the list
index += 1
if !found:
print("Unable to delete " + q)
else:
storeData("QUESTS: Finished " + q)
if q != "Eat" and q !="Do laundry" :
if quests.size() == 1 and (quests[0] == "Do Lab (Notes: 3/4)" or quests[0] == "Do Lab (Notes: 2/4)"):
get_parent().get_parent().get_parent().get_node("Event Handler").finished2ndRound()
...
...
@@ -73,3 +76,17 @@ func addLabNote():
quests.set(index, newQuest)
showQuests()
func storeData(newString): # specifically for using one item on another, stores mouse click data to data.save
var save_data = File.new()
var curTime = OS.get_time()
var timestamp = "[" + str(curTime.hour) + ":" + str(curTime.minute) + ":" + str(curTime.second) + "]"
if !save_data.file_exists("user://data.save"):
save_data.open("user://data.save",File.WRITE)
save_data.store_string("FILE START\n")
save_data.store_string("\n" + timestamp + " " + newString)
print("Created file")
else:
save_data.open("user://data.save",File.READ_WRITE)
save_data.seek_end()
save_data.store_string("\n" + timestamp + " " + newString)
save_data.close()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment