aboutsummaryrefslogtreecommitdiff
path: root/game/src/Autoload
diff options
context:
space:
mode:
author ClarkeCode <clarke.john.robert@gmail.com>2023-04-27 22:13:52 +0200
committer ClarkeCode <clarke.john.robert@gmail.com>2023-04-27 22:13:52 +0200
commit0b273743b480874281a8987c72b2f1b666bc289a (patch)
tree3f5d5a6316ac66407e61c8a56fe732cdf06209e5 /game/src/Autoload
parent98dd680a641a2cbe0f1f93202a5beffdfd35c9f7 (diff)
parent10053cf259c55ee45803268a844edf1011d8a16b (diff)
Merge branch 'main' of github.com:OpenVic2Project/OpenVic2 into goods
Diffstat (limited to 'game/src/Autoload')
-rw-r--r--game/src/Autoload/Events.gd17
1 files changed, 17 insertions, 0 deletions
diff --git a/game/src/Autoload/Events.gd b/game/src/Autoload/Events.gd
index 25a185f..7540d3e 100644
--- a/game/src/Autoload/Events.gd
+++ b/game/src/Autoload/Events.gd
@@ -2,3 +2,20 @@ 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 _water_province_file : String = "res://common/map/water.json"
+const _region_file : String = "res://common/map/regions.json"
+const _province_shape_file : String = "res://common/map/provinces.png"
+
+# REQUIREMENTS
+# * FS-333, FS-334, FS-335, FS-341
+func _ready():
+ if GameSingleton.load_province_identifier_file(_province_identifier_file) != OK:
+ push_error("Failed to load province identifiers")
+ if GameSingleton.load_water_province_file(_water_province_file) != OK:
+ push_error("Failed to load water provinces")
+ if GameSingleton.load_region_file(_region_file) != OK:
+ push_error("Failed to load regions")
+ if GameSingleton.load_province_shape_file(_province_shape_file) != OK:
+ push_error("Failed to load province shapes")