forked from SilverStudioGames/WTS
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):
|
emote=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
astoria.show()
|
astoria.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or d2)
|
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):
|
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
renpy.store.cho.show()
|
renpy.store.cho.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or renpy.store.d2)
|
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):
|
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
hermione.show()
|
hermione.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or d2)
|
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):
|
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
hooch.show()
|
hooch.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or d2)
|
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):
|
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
luna.show()
|
luna.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or d2)
|
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):
|
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
susan.show()
|
susan.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or d2)
|
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):
|
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
||||||
|
|
||||||
def show():
|
def show():
|
||||||
tonks.show()
|
tonks.show(force=True)
|
||||||
|
|
||||||
if not renpy.in_rollback():
|
if not renpy.in_rollback():
|
||||||
renpy.with_statement(trans or d2)
|
renpy.with_statement(trans or d2)
|
||||||
|
@ -78,8 +78,11 @@ init -1 python:
|
|||||||
def DollRebuild():
|
def DollRebuild():
|
||||||
for i in states.dolls:
|
for i in states.dolls:
|
||||||
doll = getattr(store, i)
|
doll = getattr(store, i)
|
||||||
doll.build_image()
|
|
||||||
|
if doll.is_stale() and not settings.get("multithreading"):
|
||||||
|
doll.show(ignore_skipping=True)
|
||||||
|
|
||||||
renpy.restart_interaction()
|
renpy.restart_interaction()
|
||||||
|
|
||||||
config.after_load_callbacks.append(DollRebuild)
|
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] )
|
salt = str( [self.name, self.pose, str(self.body._hash), str(self.face._hash), str(self.cum._hash), clothes_hash] )
|
||||||
return hash(salt)
|
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"):
|
if renpy.get_screen(("wardrobe", "animatedCG", "studio")) or renpy.showing("cg"):
|
||||||
return
|
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)
|
base_transform = doll_transform(self.pos, self.zoom, self.xzoom)
|
||||||
animation = self.animation
|
animation = self.animation
|
||||||
|
|
||||||
@ -167,8 +173,6 @@ init python:
|
|||||||
@property
|
@property
|
||||||
def image(self):
|
def image(self):
|
||||||
if not renpy.is_skipping() and self.is_stale():
|
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"):
|
if settings.get("multithreading"):
|
||||||
@ -226,8 +230,6 @@ init python:
|
|||||||
update_chibi(self.name)
|
update_chibi(self.name)
|
||||||
self.cum.is_stale()
|
self.cum.is_stale()
|
||||||
self.is_stale()
|
self.is_stale()
|
||||||
|
|
||||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def unequip(self, *args):
|
def unequip(self, *args):
|
||||||
@ -285,8 +287,6 @@ init python:
|
|||||||
update_chibi(self.name)
|
update_chibi(self.name)
|
||||||
self.cum.is_stale()
|
self.cum.is_stale()
|
||||||
self.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):
|
def get_equipped(self, slot):
|
||||||
@ -338,8 +338,6 @@ init python:
|
|||||||
|
|
||||||
update_chibi(self.name)
|
update_chibi(self.name)
|
||||||
self.is_stale()
|
self.is_stale()
|
||||||
|
|
||||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def wear(self, *args):
|
def wear(self, *args):
|
||||||
@ -376,8 +374,6 @@ init python:
|
|||||||
|
|
||||||
update_chibi(self.name)
|
update_chibi(self.name)
|
||||||
self.is_stale()
|
self.is_stale()
|
||||||
|
|
||||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def is_equipped(self, *args):
|
def is_equipped(self, *args):
|
||||||
@ -491,15 +487,11 @@ init python:
|
|||||||
i[0].is_stale()
|
i[0].is_stale()
|
||||||
|
|
||||||
self.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):
|
def set_cum(self, *args, **kwargs):
|
||||||
"""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()
|
self.show()
|
||||||
|
|
||||||
def set_pose(self, pose):
|
def set_pose(self, pose):
|
||||||
@ -512,8 +504,7 @@ init python:
|
|||||||
for i in self.states.values():
|
for i in self.states.values():
|
||||||
if i[0]:
|
if i[0]:
|
||||||
i[0].is_stale()
|
i[0].is_stale()
|
||||||
|
self.is_stale()
|
||||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def rebuild_blacklist(self):
|
def rebuild_blacklist(self):
|
||||||
|
@ -9,6 +9,9 @@ init -5 python:
|
|||||||
self.was_skipping = False
|
self.was_skipping = False
|
||||||
|
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
|
if renpy.in_rollback():
|
||||||
|
return
|
||||||
|
|
||||||
is_skipping = renpy.is_skipping()
|
is_skipping = renpy.is_skipping()
|
||||||
was_skipping = self.was_skipping
|
was_skipping = self.was_skipping
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user