From cccac59c8af2e502e21d1848296e9a0ee9d03d01 Mon Sep 17 00:00:00 2001 From: Alex Noir Date: Wed, 3 Jul 2024 04:47:34 +0300 Subject: [PATCH] Update unit texture in the world too --- internal/gm-unit/editor_body.lua | 4 ++++ internal/gm-unit/editor_colors.lua | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/internal/gm-unit/editor_body.lua b/internal/gm-unit/editor_body.lua index a5971f7b6..ab135976b 100644 --- a/internal/gm-unit/editor_body.lua +++ b/internal/gm-unit/editor_body.lua @@ -31,6 +31,8 @@ function Editor_Body_Modifier:setPartModifier(indexList, value) -- Update the unit's portrait self.target_unit.flags4.portrait_must_be_refreshed = true + -- Update the world texture + self.target_unit.flags4.any_texture_must_be_refreshed = true self:updateChoices() end @@ -40,6 +42,8 @@ function Editor_Body_Modifier:setBodyModifier(modifierIndex, value) -- Update the unit's portrait self.target_unit.flags4.portrait_must_be_refreshed = true + -- Update the world texture + self.target_unit.flags4.any_texture_must_be_refreshed = true self:updateChoices() end diff --git a/internal/gm-unit/editor_colors.lua b/internal/gm-unit/editor_colors.lua index 676fa7784..57a7c9fde 100644 --- a/internal/gm-unit/editor_colors.lua +++ b/internal/gm-unit/editor_colors.lua @@ -99,6 +99,8 @@ function Editor_Colors:random() -- Update the unit's portrait self.target_unit.flags4.portrait_must_be_refreshed = true + -- Update the world texture + self.target_unit.flags4.any_texture_must_be_refreshed = true end function Editor_Colors:colorSelected(index, choice) @@ -106,6 +108,8 @@ function Editor_Colors:colorSelected(index, choice) self.target_unit.appearance.colors[self.modIndex] = choice.index -- Update the unit's portrait self.target_unit.flags4.portrait_must_be_refreshed = true + -- Update the world texture + self.target_unit.flags4.any_texture_must_be_refreshed = true end function Editor_Colors:featureSelected(index, choice)