aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession/MapView.gd
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/GameSession/MapView.gd')
-rw-r--r--game/src/GameSession/MapView.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/game/src/GameSession/MapView.gd b/game/src/GameSession/MapView.gd
index e74ea59..1b04097 100644
--- a/game/src/GameSession/MapView.gd
+++ b/game/src/GameSession/MapView.gd
@@ -13,6 +13,7 @@ const _action_drag : StringName = &"map_drag"
const _action_click : StringName = &"map_click"
const _shader_param_province_index : StringName = &"province_index_tex"
+const _shader_param_province_index_subdivisions : StringName = &"province_index_subdivisions"
const _shader_param_province_colour : StringName = &"province_colour_tex"
const _shader_param_hover_index : StringName = &"hover_index"
const _shader_param_selected_index : StringName = &"selected_index"
@@ -86,6 +87,10 @@ func _ready():
push_error("Failed to generate province index texture array!")
return
_map_shader_material.set_shader_parameter(_shader_param_province_index, province_index_texture)
+ var subdivisions := GameSingleton.get_province_index_image_subdivisions()
+ if subdivisions.x < 1 or subdivisions.y < 1:
+ push_error("Invalid province index image subdivision: ", subdivisions.x, "x", subdivisions.y)
+ _map_shader_material.set_shader_parameter(_shader_param_province_index_subdivisions, Vector2(subdivisions))
# Province colour texture
_map_province_colour_image = GameSingleton.get_province_colour_image()