Add number version (#79)

Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#79
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
This commit is contained in:
darknight
2021-06-06 19:11:21 +02:00
parent fcff613a93
commit 34612f83a8
4 changed files with 14 additions and 3 deletions
+6
View File
@@ -5,6 +5,7 @@ var m_gyroscope = null
var m_ambient_sound = null
var m_resolution = null
var m_fullscreen = null
var m_version = null
const ROW_ID = 0
const LANGUE_ID = 0
@@ -12,6 +13,7 @@ const GYRSOCPE_ID = 1
const AMBIENT_SOUND = 2
const RESOLUTION = 3
const FULLSCREEN = 4
const VERSION = 5
func _init():
table = Global.database.get_table_by_name("settings")
@@ -22,6 +24,7 @@ func _init():
m_ambient_sound = _get_data(datas, AMBIENT_SOUND)
m_resolution = _get_data(datas, RESOLUTION)
m_fullscreen = _get_data(datas, FULLSCREEN)
m_version = _get_data(datas, VERSION)
func get_langue():
return m_langue as int
@@ -38,6 +41,9 @@ func get_resolution():
func get_fullscreen():
return int(m_fullscreen) as bool
func get_version():
return "v"+String(m_version)
func set_langue(value):
m_langue = _set_data(LANGUE_ID, ROW_ID, value)