Bug Fixes
* Refresh image if showing on specific function calls
This commit is contained in:
parent
99f174cfbb
commit
2946efbd2b
@ -23,6 +23,7 @@ init python:
|
|||||||
self._cum = {k: args[0] for k in self._cum}
|
self._cum = {k: args[0] for k in self._cum}
|
||||||
|
|
||||||
self._cum.update(kwargs)
|
self._cum.update(kwargs)
|
||||||
|
self.is_stale()
|
||||||
|
|
||||||
@functools.cache
|
@functools.cache
|
||||||
def get_layers(self, hash):
|
def get_layers(self, hash):
|
||||||
|
@ -131,6 +131,10 @@ init python:
|
|||||||
|
|
||||||
self.rebuild_blacklist()
|
self.rebuild_blacklist()
|
||||||
update_chibi(self.name)
|
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):
|
def _equip_cloth(self, cloth, color=None):
|
||||||
if cloth.type in self.multislots:
|
if cloth.type in self.multislots:
|
||||||
@ -187,6 +191,10 @@ init python:
|
|||||||
|
|
||||||
self.rebuild_blacklist()
|
self.rebuild_blacklist()
|
||||||
update_chibi(self.name)
|
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):
|
def get_equipped(self, type):
|
||||||
"""Takes argument containing string cloth type. Returns equipped object for cloth type."""
|
"""Takes argument containing string cloth type. Returns equipped object for cloth type."""
|
||||||
@ -215,6 +223,10 @@ init python:
|
|||||||
self.clothes[arg][2] = False
|
self.clothes[arg][2] = False
|
||||||
|
|
||||||
update_chibi(self.name)
|
update_chibi(self.name)
|
||||||
|
self.is_stale()
|
||||||
|
|
||||||
|
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||||
|
self.show()
|
||||||
|
|
||||||
def wear(self, *args):
|
def wear(self, *args):
|
||||||
"""Takes argument(s) containing string cloth type(s) to put on (unhide)."""
|
"""Takes argument(s) containing string cloth type(s) to put on (unhide)."""
|
||||||
@ -234,6 +246,10 @@ init python:
|
|||||||
self.clothes[arg][2] = True
|
self.clothes[arg][2] = True
|
||||||
|
|
||||||
update_chibi(self.name)
|
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):
|
def is_equipped(self, *args):
|
||||||
"""Takes argument containing string cloth type. Returns True if slot is occupied, False otherwise."""
|
"""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."""
|
"""Takes integer between 0 - 359, rotates the character body colour by given amount."""
|
||||||
self.body.set_hue(arg)
|
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):
|
# def set_body_zorder(self, **kwargs):
|
||||||
# OBSOLETE! the code in scripts needs to be changed
|
# 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)"""
|
# """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."""
|
"""Takes keyword argument(s) containing string name(s) of cum layers to apply or None."""
|
||||||
self.cum.set_cum(*args, **kwargs)
|
self.cum.set_cum(*args, **kwargs)
|
||||||
|
|
||||||
|
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||||
|
self.show()
|
||||||
|
|
||||||
def set_pose(self, pose):
|
def set_pose(self, pose):
|
||||||
pose = "" if pose is None else os.path.join("poses", pose)
|
pose = "" if pose is None else os.path.join("poses", pose)
|
||||||
self.pose = 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):
|
def rebuild_blacklist(self):
|
||||||
blacklist = []
|
blacklist = []
|
||||||
@ -430,3 +462,4 @@ init python:
|
|||||||
path = "characters/{}/emote/{}.webp".format(self.name, emote)
|
path = "characters/{}/emote/{}.webp".format(self.name, emote)
|
||||||
|
|
||||||
self.emote = Image(path)
|
self.emote = Image(path)
|
||||||
|
self.is_stale()
|
||||||
|
Loading…
Reference in New Issue
Block a user