From 6e350a3dc0b596b1f76fab3b943b67b7713ea4fa Mon Sep 17 00:00:00 2001 From: hop311 Date: Mon, 4 Dec 2023 00:12:16 +0000 Subject: Sim submodule update + extension compatibility --- game/src/Game/GlobalClass/ShaderManager.gd | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'game/src/Game/GlobalClass') 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: -- cgit v1.2.3-56-ga3b1