Files
puzzle-quest/scripts/Database.gd
T
darknight 0debe0d2d3 feature/update-main-ui (#66)
Co-authored-by: stilobique-i7 <aurelienvlt@free.fr>
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#66
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-03 22:18:50 +02:00

16 lines
509 B
GDScript

extends Node
func initialize():
var database_manager = load(gddb_constants.c_addon_main_path + "core/db_man.gd").new()
var db_id = database_manager.load_database("res://db/ahog.json")
if db_id == gddb_types.e_db_invalid_file:
print("[global#_initialize_database] Error invalid database file !")
OS.set_exit_code(1)
if db_id == gddb_types.e_db_invalid_ver:
print("[global#_initialize_database] Error invalid database version !")
OS.set_exit_code(1)
return database_manager.get_db_by_id(db_id)