From 2946efbd2b63e8eb4416791f86f2f32a5ce7c641 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Thu, 19 Jan 2023 18:07:10 +0000 Subject: [PATCH] Bug Fixes * Refresh image if showing on specific function calls --- game/scripts/doll/cum.rpy | 1 + game/scripts/doll/main.rpy | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/game/scripts/doll/cum.rpy b/game/scripts/doll/cum.rpy index e7849670..adacd1d5 100644 --- a/game/scripts/doll/cum.rpy +++ b/game/scripts/doll/cum.rpy @@ -23,6 +23,7 @@ init python: self._cum = {k: args[0] for k in self._cum} self._cum.update(kwargs) + self.is_stale() @functools.cache def get_layers(self, hash): diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 099743d9..9714c38f 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -131,6 +131,10 @@ init python: self.rebuild_blacklist() update_chibi(self.name) + self.is_stale() + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() def _equip_cloth(self, cloth, color=None): if cloth.type in self.multislots: @@ -187,6 +191,10 @@ init python: self.rebuild_blacklist() update_chibi(self.name) + self.is_stale() + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() def get_equipped(self, type): """Takes argument containing string cloth type. Returns equipped object for cloth type.""" @@ -215,6 +223,10 @@ init python: self.clothes[arg][2] = False update_chibi(self.name) + self.is_stale() + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() def wear(self, *args): """Takes argument(s) containing string cloth type(s) to put on (unhide).""" @@ -234,6 +246,10 @@ init python: self.clothes[arg][2] = True update_chibi(self.name) + self.is_stale() + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() def is_equipped(self, *args): """Takes argument containing string cloth type. Returns True if slot is occupied, False otherwise.""" @@ -312,6 +328,12 @@ init python: """Takes integer between 0 - 359, rotates the character body colour by given amount.""" self.body.set_hue(arg) + [x[0].is_stale() for x in self.clothes.values() if x[0] and x[2]] + self.is_stale() + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() + # def set_body_zorder(self, **kwargs): # OBSOLETE! the code in scripts needs to be changed # """Takes keyword argument(s) with the name(s) of body part(s) and integer value(s)""" @@ -322,9 +344,19 @@ init python: """Takes keyword argument(s) containing string name(s) of cum layers to apply or None.""" self.cum.set_cum(*args, **kwargs) + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() + def set_pose(self, pose): pose = "" if pose is None else os.path.join("poses", pose) self.pose = pose + self.body.is_stale() + self.face.is_stale() + self.cum.is_stale() + [x[0].is_stale() for x in self.clothes.values() if x[0] and x[2]] + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() def rebuild_blacklist(self): blacklist = [] @@ -430,3 +462,4 @@ init python: path = "characters/{}/emote/{}.webp".format(self.name, emote) self.emote = Image(path) + self.is_stale()