Bug fixes and improvements
* Improved skipping performance by delaying the call to render functions until after skipping ends * Fixed skipping not refreshing the doll image * Fixed skipping callback handler being affected by rollback * Refactored doll show method
This commit is contained in:
parent
148d2fcac5
commit
4658a97b4a
@ -38,7 +38,7 @@ init python:
|
||||
emote=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
astoria.show()
|
||||
astoria.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or d2)
|
||||
|
@ -36,7 +36,7 @@ init python in character:
|
||||
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
renpy.store.cho.show()
|
||||
renpy.store.cho.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or renpy.store.d2)
|
||||
|
@ -31,7 +31,7 @@ init python:
|
||||
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
hermione.show()
|
||||
hermione.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or d2)
|
||||
|
@ -22,7 +22,7 @@ init python:
|
||||
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
hooch.show()
|
||||
hooch.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or d2)
|
||||
|
@ -34,7 +34,7 @@ init python:
|
||||
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
luna.show()
|
||||
luna.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or d2)
|
||||
|
@ -33,7 +33,7 @@ init python:
|
||||
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
susan.show()
|
||||
susan.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or d2)
|
||||
|
@ -44,7 +44,7 @@ init python:
|
||||
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||
|
||||
def show():
|
||||
tonks.show()
|
||||
tonks.show(force=True)
|
||||
|
||||
if not renpy.in_rollback():
|
||||
renpy.with_statement(trans or d2)
|
||||
|
@ -78,8 +78,11 @@ init -1 python:
|
||||
def DollRebuild():
|
||||
for i in states.dolls:
|
||||
doll = getattr(store, i)
|
||||
doll.build_image()
|
||||
|
||||
if doll.is_stale() and not settings.get("multithreading"):
|
||||
doll.show(ignore_skipping=True)
|
||||
|
||||
renpy.restart_interaction()
|
||||
|
||||
config.after_load_callbacks.append(DollRebuild)
|
||||
# end_skip_callbacks.append(DollRebuild)
|
||||
end_skip_callbacks.append(DollRebuild)
|
||||
|
@ -88,10 +88,16 @@ init python:
|
||||
salt = str( [self.name, self.pose, str(self.body._hash), str(self.face._hash), str(self.cum._hash), clothes_hash] )
|
||||
return hash(salt)
|
||||
|
||||
def show(self):
|
||||
def show(self, force=False, ignore_skipping=False):
|
||||
if renpy.get_screen(("wardrobe", "animatedCG", "studio")) or renpy.showing("cg"):
|
||||
return
|
||||
|
||||
if renpy.is_skipping() and not ignore_skipping:
|
||||
return
|
||||
|
||||
if not force and not renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
return
|
||||
|
||||
base_transform = doll_transform(self.pos, self.zoom, self.xzoom)
|
||||
animation = self.animation
|
||||
|
||||
@ -167,9 +173,7 @@ init python:
|
||||
@property
|
||||
def image(self):
|
||||
if not renpy.is_skipping() and self.is_stale():
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.show()
|
||||
|
||||
if settings.get("multithreading"):
|
||||
return DynamicDisplayable(self._image)
|
||||
@ -226,9 +230,7 @@ init python:
|
||||
update_chibi(self.name)
|
||||
self.cum.is_stale()
|
||||
self.is_stale()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.show()
|
||||
|
||||
def unequip(self, *args):
|
||||
"""Takes argument(s) containing string cloth type(s) to unequip."""
|
||||
@ -285,9 +287,7 @@ init python:
|
||||
update_chibi(self.name)
|
||||
self.cum.is_stale()
|
||||
self.is_stale()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.show()
|
||||
|
||||
def get_equipped(self, slot):
|
||||
"""Takes argument containing string cloth type. Returns equipped object for cloth type."""
|
||||
@ -338,9 +338,7 @@ init python:
|
||||
|
||||
update_chibi(self.name)
|
||||
self.is_stale()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.show()
|
||||
|
||||
def wear(self, *args):
|
||||
"""Takes argument(s) containing string cloth type(s) to temporarily displace (hide)."""
|
||||
@ -376,9 +374,7 @@ init python:
|
||||
|
||||
update_chibi(self.name)
|
||||
self.is_stale()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.show()
|
||||
|
||||
def is_equipped(self, *args):
|
||||
"""Takes argument containing string cloth type. Returns True if slot is occupied, False otherwise."""
|
||||
@ -491,16 +487,12 @@ init python:
|
||||
i[0].is_stale()
|
||||
|
||||
self.is_stale()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.show()
|
||||
|
||||
def set_cum(self, *args, **kwargs):
|
||||
"""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()
|
||||
self.show()
|
||||
|
||||
def set_pose(self, pose):
|
||||
pose = "default" if pose is None else pose
|
||||
@ -512,9 +504,8 @@ init python:
|
||||
for i in self.states.values():
|
||||
if i[0]:
|
||||
i[0].is_stale()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
self.is_stale()
|
||||
self.show()
|
||||
|
||||
def rebuild_blacklist(self):
|
||||
blacklist = []
|
||||
|
@ -9,6 +9,9 @@ init -5 python:
|
||||
self.was_skipping = False
|
||||
|
||||
def __call__(self):
|
||||
if renpy.in_rollback():
|
||||
return
|
||||
|
||||
is_skipping = renpy.is_skipping()
|
||||
was_skipping = self.was_skipping
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user