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
a437c7bc
Commit
a437c7bc
authored
Jan 17, 2022
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added timestamps to data logs, changed format a little
parent
b884b530
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
Item.gd
Item.gd
+8
-4
Multi.tscn
Multi.tscn
+2
-0
BG.gd
Scripts/BG.gd
+5
-3
Text Animator.gd
Scripts/Text Animator.gd
+1
-1
No files found.
Item.gd
View file @
a437c7bc
...
...
@@ -53,27 +53,31 @@ func _input_event(viewport, event, shape_idx): # executes when clicked on
func storeClick(method): # stores the 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(
method + " " + get_name()
)
save_data.store_string(
": " + method + " " + get_name() + " " + timestamp
)
print("Created file")
else:
save_data.open("user://data.save",File.READ_WRITE)
save_data.seek_end()
save_data.store_string(method + " " + get_name())
save_data.store_string(
": " +
method + " " + get_name())
#print("Writing to file")
save_data.close()
func storeInt(selected): # 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("Used " + inventory.get_item_text(selected) + " -> " + get_name())
save_data.store_string("
:
Used " + inventory.get_item_text(selected) + " -> " + get_name())
print("Created file")
else:
save_data.open("user://data.save",File.READ_WRITE)
save_data.seek_end()
save_data.store_string("Used " + inventory.get_item_text(selected) + " -> " + get_name())
save_data.store_string("
:
Used " + inventory.get_item_text(selected) + " -> " + get_name())
#print("Writing to file")
save_data.close()
...
...
Multi.tscn
View file @
a437c7bc
...
...
@@ -370,6 +370,8 @@ margin_left = 21.0
margin_top = 20.0
margin_right = 518.0
margin_bottom = 74.0
visible_characters = 0
percent_visible = 0.0
scroll_active = false
script = ExtResource( 35 )
__meta__ = {
...
...
Scripts/BG.gd
View file @
a437c7bc
...
...
@@ -10,15 +10,17 @@ func _unhandled_input(event): # for any input that isn't capture by UI or any ot
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
if tracking: # if tracking of coordinates is enabled, turn it off to only track per-item clicks
var save_data = File.new()
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"): # creates a new save file if there is none
save_data.open("user://data.save",File.WRITE)
save_data.store_string(
str(event.position) + ": "
)
save_data.store_string(
timestamp + " " + str(event.position)
)
print("Created file")
else: # appends to existing save file if it does exist
save_data.open("user://data.save",File.READ_WRITE)
save_data.seek_end()
save_data.store_string("\n"+
str(event.position) + ": "
)
save_data.store_string("\n"+
timestamp + " " + str(event.position)
)
print("Writing coordinates to file")
save_data.close()
Scripts/Text Animator.gd
View file @
a437c7bc
...
...
@@ -17,7 +17,7 @@ func playText():
textAnimation.track_insert_key(0, textAnimation.length, 1)
print("text: " + str(textLength) + ", animation length: " + str(textAnimation.length))
animationPlayer.play("Dialogue")
func checkSpeed(spd):
match spd:
...
...
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