From a2e53fd8eeb56e6308b1362f4a20070bdb3c983a Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 19 Apr 2023 22:17:01 +0100 Subject: [PATCH] Bug fixes * Fixed Hermione 'suck it' repeat fail variant on tier 4 not working. * Fixed character emotes --- game/scripts/characters/astoria/common.rpy | 4 +++- game/scripts/characters/cho/common.rpy | 4 +++- game/scripts/characters/hermione/common.rpy | 4 +++- .../hermione/events/favors/suck_it.rpy | 4 ++-- game/scripts/characters/luna/common.rpy | 4 +++- game/scripts/characters/susan/common.rpy | 4 +++- game/scripts/characters/tonks/common.rpy | 5 ++++- game/scripts/doll/main.rpy | 21 ++++++++++++------- 8 files changed, 34 insertions(+), 16 deletions(-) diff --git a/game/scripts/characters/astoria/common.rpy b/game/scripts/characters/astoria/common.rpy index ea093af0..81a89753 100644 --- a/game/scripts/characters/astoria/common.rpy +++ b/game/scripts/characters/astoria/common.rpy @@ -93,7 +93,9 @@ init python: astoria.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) redraw = True - astoria.set_emote(emote) + if emote: + astoria.set_emote(emote) + redraw = True if animation != False: astoria.animation = animation diff --git a/game/scripts/characters/cho/common.rpy b/game/scripts/characters/cho/common.rpy index e4694167..1e949d00 100644 --- a/game/scripts/characters/cho/common.rpy +++ b/game/scripts/characters/cho/common.rpy @@ -92,7 +92,9 @@ init python in character: renpy.store.cho.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) redraw = True - renpy.store.cho.set_emote(emote) + if emote: + renpy.store.cho.set_emote(emote) + redraw = True if animation != False: renpy.store.cho.animation = animation diff --git a/game/scripts/characters/hermione/common.rpy b/game/scripts/characters/hermione/common.rpy index e478045f..3b19c210 100644 --- a/game/scripts/characters/hermione/common.rpy +++ b/game/scripts/characters/hermione/common.rpy @@ -87,7 +87,9 @@ init python: hermione.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) redraw = True - hermione.set_emote(emote) + if emote: + hermione.set_emote(emote) + redraw = True if animation != False: hermione.animation = animation diff --git a/game/scripts/characters/hermione/events/favors/suck_it.rpy b/game/scripts/characters/hermione/events/favors/suck_it.rpy index 10ee7ef4..90899b71 100644 --- a/game/scripts/characters/hermione/events/favors/suck_it.rpy +++ b/game/scripts/characters/hermione/events/favors/suck_it.rpy @@ -128,7 +128,7 @@ label hg_pf_blowjob_T4_fail_intro: gen "(Tough luck...)" ("base", xpos="far_left", ypos="head") $ states.her.mood += 6 - $ hg_pf_blowjob.fail() + $ hg_pf_blowjob.fail_intentional() jump end_hermione_event @@ -160,7 +160,7 @@ label hg_pf_blowjob_T4_fail_repeat: call her_walk(action="leave") $ states.her.mood += 6 - $ hg_pf_blowjob.fail() + $ hg_pf_blowjob.fail_intentional() jump end_hermione_event diff --git a/game/scripts/characters/luna/common.rpy b/game/scripts/characters/luna/common.rpy index ee8a3420..a0559a7a 100644 --- a/game/scripts/characters/luna/common.rpy +++ b/game/scripts/characters/luna/common.rpy @@ -91,7 +91,9 @@ init python: luna.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) redraw = True - luna.set_emote(emote) + if emote: + luna.set_emote(emote) + redraw = True if animation != False: luna.animation = animation diff --git a/game/scripts/characters/susan/common.rpy b/game/scripts/characters/susan/common.rpy index 72b85180..b6837a4e 100644 --- a/game/scripts/characters/susan/common.rpy +++ b/game/scripts/characters/susan/common.rpy @@ -89,7 +89,9 @@ init python: susan.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) redraw = True - susan.set_emote(emote) + if emote: + susan.set_emote(emote) + redraw = True if animation != False: susan.animation = animation diff --git a/game/scripts/characters/tonks/common.rpy b/game/scripts/characters/tonks/common.rpy index 6bc45b1d..2ceacd26 100644 --- a/game/scripts/characters/tonks/common.rpy +++ b/game/scripts/characters/tonks/common.rpy @@ -91,7 +91,10 @@ init python: tonks.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) redraw = True - tonks.set_emote(emote) + if emote: + tonks.set_emote(emote) + redraw = True + target_color = tonks_haircolor if hair: diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 8512f483..114245b3 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -136,7 +136,7 @@ init python: sprites = back_sprites + [x[1] for x in sprites] - return Fixed(*sprites, fit_first=True) + return Fixed(*sprites, self.emote, fit_first=True) @property def image(self): @@ -573,15 +573,20 @@ init python: self.equip(renpy.random.choice(schedule)) def set_emote(self, emote): + if isinstance(emote, str): + path = posixpath.join(self.modpath, "characters", self.name, "poses", self.pose, "emote", emote) + extensions = self.extensions - if not emote and not isinstance(emote, Null): - self.emote = Null() - return + for f in renpy.list_files(): + fp, fn = os.path.split(f) + fn, ext = os.path.splitext(fn) - if self.pose: - path = "characters/{}/poses/{}/emote/{}.webp".format(self.name, self.pose, emote) + if not fp == path or not ext in extensions: + continue + + self.emote = Image(f) + break else: - path = "characters/{}/emote/{}.webp".format(self.name, emote) + self.emote = emote - self.emote = Image(path) self.is_stale()