diff --git a/game/scripts/characters/astoria/common.rpy b/game/scripts/characters/astoria/common.rpy index 81a89753..6e575ae8 100644 --- a/game/scripts/characters/astoria/common.rpy +++ b/game/scripts/characters/astoria/common.rpy @@ -1,44 +1,3 @@ -define ast_face = { - "mouth": { - "neutral": ["annoyed", "base"], - "happy": ["smile", "grin"], - "naughty": ["grin", "horny"], - "horny": ["grin", "horny"], - "annoyed": ["annoyed"], - "disgusted": ["clench", "annoyed"], - "angry": ["clench","angry"] - }, - - "eyes": { - "neutral": ["base"], - "happy": ["base"], - "naughty": ["narrow", "base"], - "horny": ["narrow", "base"], - "annoyed": ["narrow"], - "disgusted": ["narrow"], - "angry": ["narrow", "base"] - }, - - "eyebrows": { - "neutral": ["base"], - "happy": ["base"], - "naughty": ["base"], - "horny": ["base"], - "annoyed": ["worried"], - "disgusted": ["base", "angry"], - "angry": ["angry"] - }, - - "pupils": { - "neutral": ["mid","L","R"], - "happy": ["mid","L","R"], - "naughty": ["mid","L","R","down"], - "horny": ["mid","L","R","down"], - "annoyed": ["mid","R"], - "disgusted": ["down"], - "angry": ["L"] - } -} label update_astoria: @@ -76,21 +35,35 @@ init python: def ast(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): + def show(): + astoria.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = astoria.tag layer = astoria.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = astoria.pos[0] if xpos == None else sprite_pos.get("x").get(xpos, xpos) - ypos = astoria.pos[1] if ypos == None else sprite_pos.get("y").get(ypos, ypos) + if xpos is not None or ypos is not None: + xpos = sprite_pos.get("x").get(xpos, astoria.pos[0]) + ypos = sprite_pos.get("y").get(ypos, astoria.pos[1]) astoria.pos = (xpos, ypos) redraw = True head_only = astoria.pos[1] == sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - astoria.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + astoria.set_face(**face) + redraw = True + + if temp_face: + last_face = astoria.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + astoria.set_face(**d) redraw = True if emote: @@ -106,16 +79,15 @@ init python: redraw = True if redraw: - astoria.show() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(d2) + show() if what: character.astoria_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + astoria.set_face(**last_face) + show() + if head_only: astoria.hide() diff --git a/game/scripts/characters/cho/common.rpy b/game/scripts/characters/cho/common.rpy index 1e949d00..14ab9efd 100644 --- a/game/scripts/characters/cho/common.rpy +++ b/game/scripts/characters/cho/common.rpy @@ -1,44 +1,3 @@ -define cho_face = { - "mouth": { - "neutral": ["base","normal","annoyed"], - "happy": ["base", "smile"], - "naughty": ["base","quiver","horny","soft"], - "horny": ["horny","soft"], - "annoyed": ["annoyed"], - "disgusted": ["disgust","upset"], - "angry": ["angry","clench","mad","upset"] - }, - - "eyes": { - "neutral": ["base","base","closed"], - "happy": ["base","base","happyCl"], - "naughty": ["narrow"], - "horny": ["narrow"], - "annoyed": ["narrow","narrow","closed"], - "disgusted": ["base","narrow"], - "angry": ["narrow"] - }, - - "eyebrows": { - "neutral": ["base"], - "happy": ["base"], - "naughty": ["base","raised","worried"], - "horny": ["base","raised"], - "annoyed": ["angry"], - "disgusted": ["base","raised","worried"], - "angry": ["angry"] - }, - - "pupils": { - "neutral": ["mid","L","R"], - "happy": ["mid","L","R"], - "naughty": ["mid","L","R","down","up"], - "horny": ["mid","L","R","down","up"], - "annoyed": ["mid","L","R","downR"], - "disgusted": ["mid","down"], - "angry": ["mid"] - } -} label update_cho: @@ -75,21 +34,35 @@ init python in character: def cho(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): + def show(): + renpy.store.cho.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or renpy.store.d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = renpy.store.cho.tag layer = renpy.store.cho.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = renpy.store.cho.pos[0] if xpos == None else renpy.store.sprite_pos.get("x").get(xpos, xpos) - ypos = renpy.store.cho.pos[1] if ypos == None else renpy.store.sprite_pos.get("y").get(ypos, ypos) + if xpos is not None or ypos is not None: + xpos = renpy.store.sprite_pos.get("x").get(xpos, renpy.store.cho.pos[0]) + ypos = renpy.store.sprite_pos.get("y").get(ypos, renpy.store.cho.pos[1]) renpy.store.cho.pos = (xpos, ypos) redraw = True head_only = renpy.store.cho.pos[1] == renpy.store.sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - renpy.store.cho.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + renpy.store.cho.set_face(**face) + redraw = True + + if temp_face: + last_face = renpy.store.cho.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + renpy.store.cho.set_face(**d) redraw = True if emote: @@ -105,16 +78,15 @@ init python in character: redraw = True if redraw: - renpy.store.cho.show() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(renpy.store.d2) + show() if what: cho_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + renpy.store.cho.set_face(**last_face) + show() + if head_only: renpy.store.cho.hide() diff --git a/game/scripts/characters/hermione/common.rpy b/game/scripts/characters/hermione/common.rpy index 3b19c210..d99269d9 100644 --- a/game/scripts/characters/hermione/common.rpy +++ b/game/scripts/characters/hermione/common.rpy @@ -1,44 +1,3 @@ -define her_face = { - "mouth": { - "neutral": ["annoyed","base"], - "happy": ["smile","grin"], - "naughty": ["base","soft"], - "horny": ["base","grin","soft"], - "annoyed": ["annoyed"], - "disgusted": ["disgust","clench","annoyed"], - "angry": ["angry","clench","mad"] - }, - - "eyes": { - "neutral": ["base"], - "happy": ["base","base","happyCl"], - "naughty": ["narrow","base"], - "horny": ["narrow"], - "annoyed": ["narrow"], - "disgusted": ["narrow"], - "angry": ["narrow","base"] - }, - - "eyebrows": { - "neutral": ["base"], - "happy": ["base"], - "naughty": ["base"], - "horny": ["base"], - "annoyed": ["worried"], - "disgusted": ["base", "angry"], - "angry": ["angry"] - }, - - "pupils": { - "neutral": ["mid","L","R"], - "happy": ["mid_soft","L_soft","R_soft"], - "naughty": ["mid_soft"], - "horny": ["mid","L","R","down","up"], - "annoyed": ["mid","R"], - "disgusted": ["down"], - "angry": ["mid"] - } -} label update_hermione: @@ -70,21 +29,35 @@ init python: def her(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): + def show(): + hermione.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = hermione.tag layer = hermione.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = hermione.pos[0] if xpos == None else sprite_pos.get("x").get(xpos, xpos) - ypos = hermione.pos[1] if ypos == None else sprite_pos.get("y").get(ypos, ypos) + if xpos is not None or ypos is not None: + xpos = sprite_pos.get("x").get(xpos, hermione.pos[0]) + ypos = sprite_pos.get("y").get(ypos, hermione.pos[1]) hermione.pos = (xpos, ypos) redraw = True head_only = hermione.pos[1] == sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - hermione.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + hermione.set_face(**face) + redraw = True + + if temp_face: + last_face = hermione.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + hermione.set_face(**d) redraw = True if emote: @@ -100,17 +73,16 @@ init python: redraw = True if redraw: - hermione.show() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(d2) + show() if what: character.hermione_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + hermione.set_face(**last_face) + show() + if head_only: hermione.hide() diff --git a/game/scripts/characters/hooch/common.rpy b/game/scripts/characters/hooch/common.rpy index 1e7dedd0..aac75a1a 100644 --- a/game/scripts/characters/hooch/common.rpy +++ b/game/scripts/characters/hooch/common.rpy @@ -20,24 +20,40 @@ init python: def hoo(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): + def show(): + hooch.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = hooch.tag layer = hooch.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = sprite_pos.get("x").get(xpos, xpos) or hooch.pos[0] - ypos = sprite_pos.get("y").get(ypos, ypos) or hooch.pos[1] + if xpos is not None or ypos is not None: + xpos = sprite_pos.get("x").get(xpos, hooch.pos[0]) + ypos = sprite_pos.get("y").get(ypos, hooch.pos[1]) hooch.pos = (xpos, ypos) redraw = True head_only = hooch.pos[1] == sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - hooch.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + hooch.set_face(**face) redraw = True - hooch.set_emote(emote) + if temp_face: + last_face = hooch.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + hooch.set_face(**d) + redraw = True + + if emote: + hooch.set_emote(emote) + redraw = True if animation != False: hooch.animation = animation @@ -48,16 +64,15 @@ init python: redraw = True if redraw: - hooch.show() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(d2) + show() if what: character.hooch_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + hooch.set_face(**last_face) + show() + if head_only: hooch.hide() diff --git a/game/scripts/characters/luna/common.rpy b/game/scripts/characters/luna/common.rpy index a0559a7a..fae969cc 100644 --- a/game/scripts/characters/luna/common.rpy +++ b/game/scripts/characters/luna/common.rpy @@ -1,47 +1,4 @@ -# TODO: Replace values according to Luna's expressions list -define lun_face = { - "mouth": { - "neutral": ["base","open"], - "happy": ["base","grin"], - "naughty": ["soft","base"], - "horny": ["horny","base"], - "annoyed": ["upset","annoyed"], - "disgusted": ["disgust","upset"], - "angry": ["clench","mad","upset"] - }, - - "eyes": { - "neutral": ["base"], - "happy": ["happyCl"], - "naughty": ["narrow"], - "horny": ["narrow"], - "annoyed": ["narrow","base"], - "disgusted": ["base"], - "angry": ["base"] - }, - - "eyebrows": { - "neutral": ["base"], - "happy": ["base","raised"], - "naughty": ["base","raised"], - "horny": ["base","raised"], - "annoyed": ["annoyed"], - "disgusted": ["raised","worried"], - "angry": ["angry"] - }, - - "pupils": { - "neutral": ["mid"], - "happy": ["mid"], - "naughty": ["mid","up","downR"], - "horny": ["mid","stare","down"], - "annoyed": ["mid","downR","R"], - "disgusted": ["mid","down"], - "angry": ["mid"] - } -} - label end_luna_event: call lun_chibi("hide") @@ -74,21 +31,35 @@ init python: def lun(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): + def show(): + luna.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = luna.tag layer = luna.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = luna.pos[0] if xpos == None else sprite_pos.get("x").get(xpos, xpos) - ypos = luna.pos[1] if ypos == None else sprite_pos.get("y").get(ypos, ypos) + if xpos is not None or ypos is not None: + xpos = sprite_pos.get("x").get(xpos, luna.pos[0]) + ypos = sprite_pos.get("y").get(ypos, luna.pos[1]) luna.pos = (xpos, ypos) redraw = True head_only = luna.pos[1] == sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - luna.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + luna.set_face(**face) + redraw = True + + if temp_face: + last_face = luna.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + luna.set_face(**d) redraw = True if emote: @@ -104,16 +75,15 @@ init python: redraw = True if redraw: - luna.show() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(d2) + show() if what: character.luna_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + luna.set_face(**last_face) + show() + if head_only: luna.hide() diff --git a/game/scripts/characters/susan/common.rpy b/game/scripts/characters/susan/common.rpy index b6837a4e..b0d8c3dd 100644 --- a/game/scripts/characters/susan/common.rpy +++ b/game/scripts/characters/susan/common.rpy @@ -1,46 +1,4 @@ -define sus_face = { - "mouth": { - "neutral": ["base"], - "happy": ["base","grin"], - "naughty": ["base"], - "horny": ["base"], - "annoyed": ["upset"], - "disgusted": ["open"], - "angry": ["upset"] - }, - - "eyes": { - "neutral": ["base", "closed"], - "happy": ["base", "eager"], - "naughty": ["base", "suspicious"], - "horny": ["suspicious"], - "annoyed": ["narrow","base", "suspicious"], - "disgusted": ["wide"], - "angry": ["suspicious"] - }, - - "eyebrows": { - "neutral": ["base"], - "happy": ["base"], - "naughty": ["base","worried"], - "horny": ["base","worried"], - "annoyed": ["angry"], - "disgusted": ["worried"], - "angry": ["angry"] - }, - - "pupils": { - "neutral": ["mid"], - "happy": ["mid","L","R"], - "naughty": ["L","R","down"], - "horny": ["L","R","down"], - "annoyed": ["R","down"], - "disgusted": ["R","wide"], - "angry": ["mid"] - } -} - label end_susan_event: call sus_chibi("hide") hide susan_main @@ -72,21 +30,35 @@ init python: def sus(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): + def show(): + susan.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = susan.tag layer = susan.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = susan.pos[0] if xpos == None else sprite_pos.get("x").get(xpos, xpos) - ypos = susan.pos[1] if ypos == None else sprite_pos.get("y").get(ypos, ypos) + if xpos is not None or ypos is not None: + xpos = sprite_pos.get("x").get(xpos, susan.pos[0]) + ypos = sprite_pos.get("y").get(ypos, susan.pos[1]) susan.pos = (xpos, ypos) redraw = True head_only = susan.pos[1] == sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - susan.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + susan.set_face(**face) + redraw = True + + if temp_face: + last_face = susan.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + susan.set_face(**d) redraw = True if emote: @@ -102,16 +74,15 @@ init python: redraw = True if redraw: - susan.show() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(d2) + show() if what: character.susan_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + susan.set_face(**last_face) + show() + if head_only: susan.hide() diff --git a/game/scripts/characters/tonks/common.rpy b/game/scripts/characters/tonks/common.rpy index 2ceacd26..83f3d8b0 100644 --- a/game/scripts/characters/tonks/common.rpy +++ b/game/scripts/characters/tonks/common.rpy @@ -1,43 +1,11 @@ -define ton_face = { - "mouth": { - "neutral": ["base","open"], - "happy": ["base","grin"], - "naughty": ["soft","base"], - "horny": ["horny","base"], - "annoyed": ["upset","annoyed"], - "disgusted": ["disgust","upset"], - "angry": ["clench","mad","upset"] - }, - - "eyes": { - "neutral": ["base"], - "happy": ["happyCl"], - "naughty": ["narrow"], - "horny": ["narrow"], - "annoyed": ["narrow","base"], - "disgusted": ["base"], - "angry": ["base"] - }, - - "eyebrows": { - "neutral": ["base"], - "happy": ["base","raised"], - "naughty": ["base","raised"], - "horny": ["base","raised"], - "annoyed": ["annoyed"], - "disgusted": ["raised","worried"], - "angry": ["angry"] - }, - - "pupils": { - "neutral": ["mid"], - "happy": ["mid"], - "naughty": ["mid","up","downR"], - "horny": ["mid","stare","down"], - "annoyed": ["mid","downR","R"], - "disgusted": ["mid","down"], - "angry": ["mid"] - } +define tonks_haircolor_table = { + "angry": [Color((164, 34, 34, 255)), Color((219, 83, 83, 255))], + "upset": [Color((228, 93, 34, 255)), Color((246, 193, 170, 255))], + "happy": [Color((255, 213, 23, 255)), Color((255, 239, 167, 255))], + "disgusted": [Color((111, 205, 75, 255)), Color((200, 237, 186, 255))], + "scared": [Color((238, 238, 241, 255)), Color((249, 249, 250, 255))], + "horny": [Color((255, 105, 180, 255)), Color((251, 205, 222, 255))], + "sad": [Color((64, 75, 205, 255)), Color((182, 186, 237, 255))], } label update_tonks: @@ -72,56 +40,52 @@ define character.tonks_say = Character("name_tonks_genie", show_icon="tonks", dy init python: def ton(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, - emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, hair=None, **kwargs): + emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, hair=None, **kwargs): + def show(): + tonks.show() + + if not renpy.in_rollback(): + renpy.with_statement(trans or d2) + + face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} + temp_face = renpy.game.context().temporary_attributes redraw = False tag = tonks.tag layer = tonks.layer - #showing = renpy.showing(name=tag, layer=layer) - if xpos != None or ypos != None: - xpos = tonks.pos[0] if xpos == None else sprite_pos.get("x").get(xpos, xpos) - ypos = tonks.pos[1] if ypos == None else sprite_pos.get("y").get(ypos, ypos) + if xpos is not None or ypos is not None: + xpos = sprite_pos.get("x").get(xpos, tonks.pos[0]) + ypos = sprite_pos.get("y").get(ypos, tonks.pos[1]) tonks.pos = (xpos, ypos) redraw = True head_only = tonks.pos[1] == sprite_pos.get("y").get("head") - if any((mouth, eyes, eyebrows, pupils, cheeks, tears)): - tonks.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears) + if any(face.values()): + tonks.set_face(**face) + redraw = True + + if temp_face: + last_face = tonks.get_face() + + d = dict(zip(temp_face[::2], temp_face[1::2])) + tonks.set_face(**d) redraw = True if emote: tonks.set_emote(emote) redraw = True - target_color = tonks_haircolor - if hair: if isinstance(hair, list): target_color = hair - elif hair in ("neutral", "basic", "reset"): - pass - elif hair in ("red", "angry", "furious"): - target_color = [Color((164, 34, 34, 255)), Color((219, 83, 83, 255))] - elif hair in ("orange", "upset", "annoyed"): - target_color = [Color((228, 93, 34, 255)), Color((246, 193, 170, 255))] - elif hair in ("yellow", "happy", "cheerful"): - target_color = [Color((255, 213, 23, 255)), Color((255, 239, 167, 255))] - elif hair in ("green", "disgusted"): - target_color = [Color((111, 205, 75, 255)), Color((200, 237, 186, 255))] - elif hair in ("blue", "sad"): - target_color = [Color((64, 75, 205, 255)), Color((182, 186, 237, 255))] - elif hair == "purple": - target_color = [Color((205, 75, 205, 255)), Color((237, 186, 237, 255))] - elif hair in ("white", "scared"): - target_color = [Color((238, 238, 241, 255)), Color((249, 249, 250, 255))] - elif hair in ("pink", "horny"): - target_color = [Color((255, 105, 180, 255)), Color((251, 205, 222, 255))] + else: + target_color = tonks_haircolor_table.get(hair, tonks_haircolor) - if target_color != tonks.get_equipped("hair").color: - tonks.get_equipped("hair").set_color(target_color) - redraw = True + if target_color != tonks.get_equipped("hair").color: + tonks.get_equipped("hair").set_color(target_color) + redraw = True if animation != False: tonks.animation = animation @@ -132,17 +96,15 @@ init python: redraw = True if redraw: - tonks.show() - # ton_chibi_new.update() - - if not renpy.in_rollback(): - if trans: - renpy.with_statement(trans) - else: - renpy.with_statement(d2) + show() if what: character.tonks_say(what, **kwargs) + # Reshow sprite if any changes have been made + if temp_face: + tonks.set_face(**last_face) + show() + if head_only: tonks.hide() diff --git a/game/scripts/doll/face.rpy b/game/scripts/doll/face.rpy index 7b585121..57e09160 100644 --- a/game/scripts/doll/face.rpy +++ b/game/scripts/doll/face.rpy @@ -37,7 +37,7 @@ init python: layers = {} for part, name in face.items(): - if name is None: + if name in (None, False): continue path = posixpath.join(self.char.modpath, "characters", self.char.name, "poses", self.char.pose, subpath, "face", part, name) diff --git a/game/scripts/doll/init.rpy b/game/scripts/doll/init.rpy index 9b0b40a3..28040f02 100644 --- a/game/scripts/doll/init.rpy +++ b/game/scripts/doll/init.rpy @@ -14,7 +14,7 @@ init python: outfit_last = outfit = get_character_outfit(c, type="last") outfit_last.save() - char.set_face(mouth="base", eyes="base", eyebrows="base", pupils="mid") + char.set_face(mouth="base", eyes="base", eyebrows="base", pupils="mid", cheeks="none", tears="none") def chibi_init(): # TODO: Perhaps it could be automated? diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index c69c82ea..bf708722 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -446,7 +446,7 @@ init python: def get_face(self): """Returns a dictionary containing currently set facial expressions. Used in character studio.""" - return self.face._face + return self.face._face.copy() def set_body_hue(self, arg): """Takes integer between 0 - 359, rotates the character body colour by given amount.""" diff --git a/game/scripts/minigames/mirror/events/blueballing_bad.rpy b/game/scripts/minigames/mirror/events/blueballing_bad.rpy index 6600c9be..a2e2958e 100644 --- a/game/scripts/minigames/mirror/events/blueballing_bad.rpy +++ b/game/scripts/minigames/mirror/events/blueballing_bad.rpy @@ -67,7 +67,7 @@ label blueballing_bad: call her_walk(xpos="418", ypos="430", speed=1.5) her "He--{w=0.2} He's covered his tracks... Or he made that {size=-3}idiot{/size} teacher Snape take them!" ("angry", "base", "annoyed", "R_soft") call her_walk(xpos="600", ypos="410", speed=1.5) - ton "Miss Granger, please, you have to--{w=0.5}{nw}" ("open", "base", "annoyed", "stare", hair="annoyed") + ton "Miss Granger, please, you have to--{w=0.5}{nw}" ("open", "base", "annoyed", "stare", hair="upset") her "You think this is something-{w=0.25} You think this is bad?{w=0.25} This, this chicanery?!" ("angry", "wide", "angry", "L_soft", flip=True) call her_walk(xpos="599", ypos="410", speed=1.5) @@ -95,7 +95,7 @@ label blueballing_bad: her "" ("open", "wide", "base", "down", xpos="mid", ypos="base") pause her "..." ("open", "wide", "base", "shocked") - ton "..." ("annoyed", "base", "annoyed", "stare", hair="annoyed") + ton "..." ("annoyed", "base", "annoyed", "stare", hair="upset") gen "..." ("base", xpos="far_left", ypos="head") her "{w=0.5}{size=+5}-!{/size}" ("disgust", "wide", "worried", "R", cheeks="blush") @@ -104,7 +104,7 @@ label blueballing_bad: call music_block - ton "..." ("annoyed", "base", "annoyed", "stare", hair="annoyed") + ton "..." ("annoyed", "base", "annoyed", "stare", hair="upset") ton "I guess this proves that the greatest prudes are the ones with the biggest stick up their asses." ("soft", "base", "base", "L", hair="neutral") gen "Tonks, what the fuck are you talking about?" ("open", xpos="far_left", ypos="head") ton "I'm saying this girl should really learn how to loosen up." ("annoyed", "base", "annoyed", "L", hair="neutral")