aboutsummaryrefslogtreecommitdiff
path: root/game/src/Autoload/Events.gd
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-04-14 18:31:58 +0200
committer GitHub <noreply@github.com>2023-04-14 18:31:58 +0200
commit436b038c1806e326ff6458f1692e9009d3a54346 (patch)
treeb5a33a733398b511eb0aa7781860c8accbadd2a0 /game/src/Autoload/Events.gd
parent1f04a7827ae377372cb491ff0257a47d0d4c2967 (diff)
parent7241811bd8c9493b7b6c6480e8d63a5fb7f38e4e (diff)
Merge pull request #84 from OpenVic2Project/terrain-map
Diffstat (limited to 'game/src/Autoload/Events.gd')
-rw-r--r--game/src/Autoload/Events.gd14
1 files changed, 14 insertions, 0 deletions
diff --git a/game/src/Autoload/Events.gd b/game/src/Autoload/Events.gd
index 25a185f..f4aac70 100644
--- a/game/src/Autoload/Events.gd
+++ b/game/src/Autoload/Events.gd
@@ -2,3 +2,17 @@ extends Node
var Options = preload("Events/Options.gd").new()
var Localisation = preload("Events/Localisation.gd").new()
+
+const _province_identifier_file : String = "res://common/map/provinces.json"
+const _region_file : String = "res://common/map/regions.json"
+const _province_shape_file : String = "res://common/map/provinces.png"
+
+# REQUIREMENTS
+# * FS-333, FS-335, FS-341
+func _ready():
+ if MapSingleton.load_province_identifier_file(_province_identifier_file) != OK:
+ push_error("Failed to load province identifiers")
+ if MapSingleton.load_region_file(_region_file) != OK:
+ push_error("Failed to load regions")
+ if MapSingleton.load_province_shape_file(_province_shape_file) != OK:
+ push_error("Failed to load province shapes")