18 lines
377 B
GDScript
18 lines
377 B
GDScript
extends Node
|
|
|
|
var table = null
|
|
|
|
func _get_data(datas, index):
|
|
return datas[index].get_data()
|
|
|
|
func _set_data(value, id, type):
|
|
table.edit_data(id, type, String(value))
|
|
Global.database.save_db()
|
|
return value
|
|
|
|
func _get_data_id(prop_name, index):
|
|
if table.get_prop_at(index).get_prop_name() == prop_name:
|
|
return table.get_prop_at(index).get_prop_id()
|
|
else:
|
|
return null
|