diary/system/data/topic_data/topic_data_singleton.gd
mono 7d285bd607 - reworked Chat Panel system
- added user switching
- added Topic Panel functionality (features are missing)
- some basic refactoring
2022-05-14 20:51:48 +02:00

32 lines
537 B
GDScript

extends Node
class_name TopicData
signal topic_added(topic)
var dirty_flag = false
var loaded_topics = []
func add_topic(position: int):
var topic = Topic.new()
topic.type = position # Delete this line later.
loaded_topics.append(topic)
# TODO: Make it possible to vary in position in the array!!
emit_signal("topic_added", topic)
func load_data():
# TODO: Load data.
pass
func save_data():
if dirty_flag:
# TODO: Save data.
pass
# dirty_flag needs to be set to false after successful save!
dirty_flag = false