41 lines
1.1 KiB
GDScript3
41 lines
1.1 KiB
GDScript3
|
extends Object
|
||
|
class_name MiscellaneousData
|
||
|
|
||
|
const FILE_NAME = "miscellaneous.dat"
|
||
|
|
||
|
var close_time_stamp
|
||
|
|
||
|
|
||
|
func load_data():
|
||
|
pass
|
||
|
# var file = File.new()
|
||
|
# file.open("user://" + FILE_NAME, File.READ)
|
||
|
# var json_string = file.get_as_text()
|
||
|
# if validate_json(json_string):
|
||
|
# printerr("\"" + FILE_NAME + "\" was found, but is corrupted.")
|
||
|
# return
|
||
|
# var message_data_list = parse_json(json_string)
|
||
|
# for message_data in message_data_list:
|
||
|
# var user = Users.get_primary() if message_data["user"] else Users.get_helper()
|
||
|
|
||
|
|
||
|
func save_data():
|
||
|
# We do not apply a dirty flag here, because close_time_stamp needs to be
|
||
|
# saved anyway.
|
||
|
pass
|
||
|
# var message_data_list = []
|
||
|
# for message_group in loaded_message_groups:
|
||
|
# var user = message_group.associated_user.is_primary()
|
||
|
# for message in message_group.messages:
|
||
|
# var message_data = {
|
||
|
# "user" : user,
|
||
|
# "time_stamp" : message.time_stamp,
|
||
|
# "content" : message.content
|
||
|
# }
|
||
|
# message_data_list.append(message_data)
|
||
|
# var json_string = to_json(message_data_list)
|
||
|
# var file = File.new()
|
||
|
# file.open("user://" + FILE_NAME, File.WRITE)
|
||
|
# file.store_string(json_string)
|
||
|
# file.close()
|