aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/GlobalClass
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-12-04 01:12:16 +0100
committer hop311 <hop3114@gmail.com>2023-12-04 01:18:15 +0100
commit6e350a3dc0b596b1f76fab3b943b67b7713ea4fa (patch)
treeb963c671239ecd693d4162afe4b1b9d3b064554e /game/src/Game/GlobalClass
parent9165f5980c5cfe75b3bad4303a5822340f6adcfc (diff)
Sim submodule update + extension compatibility
Diffstat (limited to 'game/src/Game/GlobalClass')
-rw-r--r--game/src/Game/GlobalClass/ShaderManager.gd14
1 files changed, 9 insertions, 5 deletions
diff --git a/game/src/Game/GlobalClass/ShaderManager.gd b/game/src/Game/GlobalClass/ShaderManager.gd
index ace3c3a..a6d555f 100644
--- a/game/src/Game/GlobalClass/ShaderManager.gd
+++ b/game/src/Game/GlobalClass/ShaderManager.gd
@@ -38,28 +38,32 @@ func set_up_shader(material : Material, add_cosmetic_textures : bool) -> Error:
if province_shape_texture == null:
push_error("Failed to get province shape texture!")
ret = FAILED
- shader_material.set_shader_parameter(param_province_shape_tex, province_shape_texture)
+ else:
+ shader_material.set_shader_parameter(param_province_shape_tex, province_shape_texture)
var subdivisions := GameSingleton.get_province_shape_image_subdivisions()
if subdivisions.x < 1 or subdivisions.y < 1:
push_error("Invalid province shape image subdivision: ", subdivisions.x, "x", subdivisions.y)
ret = FAILED
- shader_material.set_shader_parameter(param_province_shape_subdivisions, Vector2(subdivisions))
+ else:
+ shader_material.set_shader_parameter(param_province_shape_subdivisions, Vector2(subdivisions))
if add_cosmetic_textures:
# Province colour texture
var map_province_colour_texture := GameSingleton.get_province_colour_texture()
if map_province_colour_texture == null:
- push_error("Failed to get province colour image!")
+ push_error("Failed to get province colour texture!")
ret = FAILED
- shader_material.set_shader_parameter(param_province_colour_tex, map_province_colour_texture)
+ else:
+ shader_material.set_shader_parameter(param_province_colour_tex, map_province_colour_texture)
# Terrain texture
var terrain_texture := GameSingleton.get_terrain_texture()
if terrain_texture == null:
push_error("Failed to get terrain texture!")
ret = FAILED
- shader_material.set_shader_parameter(param_terrain_tex, terrain_texture)
+ else:
+ shader_material.set_shader_parameter(param_terrain_tex, terrain_texture)
# Stripe texture
if _set_shader_texture(shader_material, &"map/terrain/stripes.dds", param_stripe_tex) != OK: