Bug fixes

* Fixed temporarily hidden clothes being excluded from staleness checks during pose changes
* Fixed Luna's lion outfit
* Replaced list method call with a for loop, to avoid large list memory allocation
* Fixed big booba an dumpy cheats
* Fixed body controller submodule hash generator
* Fixed cho panties throw crashing the game
* Fixed Outfit/Clothing unlock referenced methods
* Excluded body submodule from doll and icon image generation (superseded by bodyparts)
This commit is contained in:
LoafyLemon 2023-03-03 00:50:50 +00:00
parent e0e9d23d2a
commit 52b9c50c7b
9 changed files with 50 additions and 32 deletions

Binary file not shown.

View File

@ -1632,7 +1632,7 @@ label gryffindor_match:
# Cho panties appear on Hermione's head as Cho throws them at her
$ renpy.sound.play("sounds/woosh.ogg")
$ cho.unequip("accessory2") # Panties
$ cho.unequip(choq_panties_in_hand) # Panties
pause .8
$ renpy.sound.play("sounds/squelch.ogg")
$ hermione.equip(herq_panties_on_head)

View File

@ -205,7 +205,7 @@ default lun_outfit_harley_quinn = DollOutfit([lun_hair_harley_quinn, lun_pantyho
default lun_bottom_casual_jeans = DollCloth("luna", ("lower body", "skirts"), "bottom", "casual_jeans", ["#8027bfff"])
default lun_top_casual_sweater = DollCloth("luna", ("upper body", "shirts"), "top", "casual_sweater", ["#382088ff", "#382088ff"])
default lun_accessory_lionhead = DollCloth("luna", ("misc", "accessory"), "accessory", "lionhead", ["#000000ff"], zorder=300)
default lun_accessory_lionhead = DollCloth("luna", ("misc", "accessory"), "accessory", "lionhead", None)
default lun_outfit_casual= DollOutfit([lun_hair_base, lun_panties_base1, lun_bra_base1, lun_bottom_casual_jeans, lun_top_casual_sweater], unlocked=True)
default lun_outfit_lion_event = DollOutfit([lun_panties_base1, lun_bra_base1, lun_accessory_lionhead, lun_bottom_casual_jeans, lun_top_casual_sweater], hidden=True)

View File

@ -20,7 +20,7 @@ init python:
def generate_hash(self):
bodyparts_hash = str([x[0]._hash for x in self.char.states.values() if istype(x[0], DollBodypart) and x[2]])
salt = str( [self.char.name + self.char.pose, str(self.hue.__hash__()), bodyparts_hash])
salt = str( [self.char.name, self.char.pose, str(self.hue.__hash__()), bodyparts_hash])
return hash(salt)
@functools.cache

View File

@ -169,7 +169,6 @@ init python:
print(f"Missing textures:\n{self.__repr__()}")
return Text(f"TexErr\n{{color=#00ffff}}{{size=-6}}ID:{self.id}{{/size}}{{/color}}", color="#ff0000")
sprites.extend(self.char.body.build_image(self.char.body._hash, matrix=matrix))
sprites.sort(key=itemgetter(2))
wmax, hmax = self.sizes

View File

@ -100,9 +100,10 @@ init python:
def build_image(self, hash):
from itertools import chain
# Note: Bodyparts are a part of 'self.states' now.
sprites = list(chain.from_iterable(
(self.body.build_image(self.body._hash),
self.face.build_image(self.face._hash),
(self.face.build_image(self.face._hash),
self.cum.build_image(self.cum._hash),
*(x[0].build_image(x[0]._hash) for x in self.states.values() if x[0] and x[2]))
))
@ -430,7 +431,10 @@ init python:
def set_face(self, *args, **kwargs):
self.face.set_face(*args, **kwargs)
[x[0].is_stale() for x in self.states.values() if istype(x[0], DollMakeup) and x[2]]
for i in self.states.values():
if istype(i[0], DollMakeup):
i[0].is_stale()
self.cum.is_stale()
def get_face(self):
@ -447,7 +451,10 @@ init python:
"""Takes integer between 0 - 359, rotates the character body colour by given amount."""
self.body.set_hue(arg)
[x[0].is_stale() for x in self.states.values() if x[0] and x[2]]
for i in self.states.values():
if i[0]:
i[0].is_stale()
self.is_stale()
if renpy.showing(get_character_tag(self.name), layer=self.layer):
@ -472,7 +479,10 @@ init python:
self.body.is_stale()
self.face.is_stale()
self.cum.is_stale()
[x[0].is_stale() for x in self.states.values() if x[0] and x[2]]
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()

View File

@ -361,34 +361,46 @@ label cheats:
"-Permanent body alteration-":
label .alteration:
$ _curr_breast_type = hermione.body.body["breasts"][0]
$ _curr_ass_type = hermione.body.body["backside"][0] or "normal"
# Note: itertools.cycle breaks Ren'py so we have to rely on a good 'ol if statement
# *Sigh* I wish we had match statement in python 2 :(
#
# Years later: Python 3 switch cases are finally here, but are not usable in renpy. :(
default _curr_breast_type = 0
default _curr_ass_type = 0
menu:
"Hermione Breasts ([_curr_breast_type])" (icon="interface/icons/small/hermione.webp"):
if _curr_breast_type == "normal":
$ hermione.set_body(breasts="big1")
elif _curr_breast_type == "big1":
$ hermione.set_body(breasts="big2")
elif _curr_breast_type == "big2":
$ hermione.set_body(breasts="big3")
else:
$ hermione.set_body(breasts="normal")
python:
if _curr_breast_type == 0:
hermione.equip(her_chest_breasts1)
_curr_breast_type = 1
elif _curr_breast_type == 1:
hermione.equip(her_chest_breasts2)
_curr_breast_type = 2
elif _curr_breast_type == 2:
hermione.equip(her_chest_breasts3)
_curr_breast_type = 3
elif _curr_breast_type == 3:
hermione.unequip("chest")
_curr_breast_type = 0
jump cheats.alteration
"Hermione Ass ([_curr_ass_type])" (icon="interface/icons/small/hermione.webp"):
if _curr_ass_type == "normal":
$ hermione.set_body(backside="big1")
elif _curr_ass_type == "big1":
$ hermione.set_body(backside="big2")
elif _curr_ass_type == "big2":
$ hermione.set_body(backside="big3")
else:
$ hermione.set_body(backside=None) # This is intended.
python:
if _curr_ass_type == 0:
hermione.equip(her_hips_ass1)
_curr_ass_type = 1
elif _curr_ass_type == 1:
hermione.equip(her_hips_ass2)
_curr_ass_type = 2
elif _curr_ass_type == 2:
hermione.equip(her_hips_ass3)
_curr_ass_type = 3
elif _curr_ass_type == 3:
hermione.unequip("hips")
_curr_ass_type = 0
jump cheats.alteration

View File

@ -41,7 +41,7 @@ screen clothing_unlock(item):
if isinstance(item, DollCloth):
add item.icon align (0.5, 0.5) zoom 0.5
elif isinstance(item, DollOutfit):
add item.get_image() align (0.5, 0.0) yoffset -50 zoom 0.4
add item.image align (0.5, 0.0) yoffset -50 zoom 0.4
screen invisible_button(action=NullAction(), keysym=None, alternate=None):