From baa83c8cc528773d9b3a13b4d6cb0d88c68e4cd1 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Sat, 12 Nov 2022 22:32:33 +0000 Subject: [PATCH] Footwear support * Added footwear support for dolls * Added DollClothDummy subclass dummy controller --- .../fallback/0.webp} | 0 game/scripts/characters/astoria/wardrobe.rpy | 2 ++ game/scripts/characters/cho/wardrobe.rpy | 4 ++- game/scripts/characters/hermione/wardrobe.rpy | 2 ++ game/scripts/characters/hooch/wardrobe.rpy | 2 ++ game/scripts/characters/luna/wardrobe.rpy | 2 ++ game/scripts/characters/susan/wardrobe.rpy | 2 ++ game/scripts/characters/tonks/wardrobe.rpy | 2 ++ game/scripts/doll/clothes.rpy | 27 ++++++++++++++++++- 9 files changed, 41 insertions(+), 2 deletions(-) rename game/characters/cho/chibi/stand/{0_shoes_house.webp => footwear/fallback/0.webp} (100%) diff --git a/game/characters/cho/chibi/stand/0_shoes_house.webp b/game/characters/cho/chibi/stand/footwear/fallback/0.webp similarity index 100% rename from game/characters/cho/chibi/stand/0_shoes_house.webp rename to game/characters/cho/chibi/stand/footwear/fallback/0.webp diff --git a/game/scripts/characters/astoria/wardrobe.rpy b/game/scripts/characters/astoria/wardrobe.rpy index 20fbda84..d3de3601 100644 --- a/game/scripts/characters/astoria/wardrobe.rpy +++ b/game/scripts/characters/astoria/wardrobe.rpy @@ -18,6 +18,7 @@ default astoria = Doll(name="astoria", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -53,6 +54,7 @@ default astoria = Doll(name="astoria", ## Schoolgirl Outfit ## ####################### +default ast_footwear_shoes = DollClothDummy("astoria", type="footwear") default ast_hair_base = DollCloth("astoria", ("head", "hair"), "hair", "base", [[229, 198, 129, 255], [163, 125, 80, 255]], unlocked=True) default ast_hair_short = DollCloth("astoria", ("head", "hair"), "hair", "short", [[229, 198, 129, 255], [163, 125, 80, 255]], unlocked=True) diff --git a/game/scripts/characters/cho/wardrobe.rpy b/game/scripts/characters/cho/wardrobe.rpy index a037b31d..ebf2603b 100644 --- a/game/scripts/characters/cho/wardrobe.rpy +++ b/game/scripts/characters/cho/wardrobe.rpy @@ -18,6 +18,7 @@ default cho = Doll(name="cho", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -53,6 +54,7 @@ default cho = Doll(name="cho", ## Schoolgirl ## ################ +default cho_footwear_shoes = DollClothDummy("cho", type="footwear") default cho_hair_ponytail1 = DollCloth("cho", ("head", "hair"), "hair", "ponytail", [[52, 59, 80, 255], [70, 90, 147, 255]], unlocked=True) default cho_top_school1 = DollCloth("cho", ("upper body", "shirts"), "top", "top_school_1", [[183, 183, 184, 255], [109, 105, 121, 255], [216, 163, 10, 255], [89, 116, 194, 255]], unlocked=True) default cho_top_school2 = DollCloth("cho", ("upper body", "shirts"), "top", "top_school_2", [[183, 183, 184, 255], [109, 105, 121, 255], [216, 163, 10, 255], [89, 116, 194, 255]], level=4, unlocked=True) @@ -73,7 +75,7 @@ default cho_robe_school_3 = DollCloth("cho", ("upper body", "robes"), "robe", "r #default cho_neckwear_tie1 = DollCloth("cho", ("head", "neckwear"), "neckwear", "tie_1", [[216, 163, 10, 255], [89, 116, 194, 255]]) default cho_outfit_last = DollOutfit([cho_hair_ponytail1], hidden=True) -default cho_outfit_default = DollOutfit([cho_hair_ponytail1, cho_top_school1, cho_bottom_school1, cho_bra_basic1, cho_panties_basic1, cho_stockings_house], unlocked=True) +default cho_outfit_default = DollOutfit([cho_hair_ponytail1, cho_top_school1, cho_bottom_school1, cho_bra_basic1, cho_panties_basic1, cho_stockings_house, cho_footwear_shoes], unlocked=True) ######################## ## Cheerleader Outfit ## diff --git a/game/scripts/characters/hermione/wardrobe.rpy b/game/scripts/characters/hermione/wardrobe.rpy index 3432957d..9b424925 100644 --- a/game/scripts/characters/hermione/wardrobe.rpy +++ b/game/scripts/characters/hermione/wardrobe.rpy @@ -18,6 +18,7 @@ default hermione = Doll(name="hermione", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -61,6 +62,7 @@ default her_hair_base = DollCloth("hermione", ("head", "hair"), "hair", "base", ## Schoolgirl ## ################ +default her_footwear_shoes = DollClothDummy("hermione", type="footwear") default her_top_school1 = DollCloth("hermione", ("upper body", "shirts"), "top", "top_school_1", [[183, 183, 184, 255], [109, 105, 121, 255], [167, 77, 42, 255], [237, 179, 14, 255]], unlocked=True) default her_top_school2 = DollCloth("hermione", ("upper body", "shirts"), "top", "top_school_2", [[183, 183, 184, 255], [109, 105, 121, 255], [167, 77, 42, 255], [237, 179, 14, 255]], unlocked=True) default her_top_school3 = DollCloth("hermione", ("upper body", "shirts"), "top", "top_school_3", [[183, 183, 184, 255], [167, 77, 42, 255], [237, 179, 14, 255]], unlocked=True) diff --git a/game/scripts/characters/hooch/wardrobe.rpy b/game/scripts/characters/hooch/wardrobe.rpy index 3795f340..6d8812e7 100644 --- a/game/scripts/characters/hooch/wardrobe.rpy +++ b/game/scripts/characters/hooch/wardrobe.rpy @@ -18,6 +18,7 @@ default hooch = Doll(name="hooch", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -53,6 +54,7 @@ default hooch = Doll(name="hooch", ## Hair ## ############### +default hoo_footwear_shoes = DollClothDummy("hooch", type="footwear") default hoo_hair_base = DollCloth("hooch", ("head", "hair"), "hair", "base", [[125, 72, 42, 255]], unlocked=True) default hoo_panties_sport = DollCloth("hooch", ("lower undergarment", "panties"), "panties", "sport", [[192, 65, 54, 255], [237, 225, 255, 255]], unlocked=True) default hoo_bra_sport = DollCloth("hooch", ("upper undergarment", "bras"), "bra", "sport", [[192, 65, 54, 255], [237, 225, 255, 255]], unlocked=True) diff --git a/game/scripts/characters/luna/wardrobe.rpy b/game/scripts/characters/luna/wardrobe.rpy index 52889fc5..df67c3c5 100644 --- a/game/scripts/characters/luna/wardrobe.rpy +++ b/game/scripts/characters/luna/wardrobe.rpy @@ -18,6 +18,7 @@ default luna = Doll(name="luna", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -60,6 +61,7 @@ default lun_hair_wand = DollCloth("luna", ("head", "hair"), "hair", "wand", [[23 ## Schoolgirl ## ################ +default lun_footwear_shoes = DollClothDummy("luna", type="footwear") default lun_top_school1 = DollCloth("luna", ("upper body", "shirts"), "top", "top_school_1", [[183, 183, 184, 255], [109, 105, 121, 255], [89, 116, 194, 255], [216, 163, 10, 255]], unlocked=True) default lun_top_school2 = DollCloth("luna", ("upper body", "shirts"), "top", "top_school_2", [[183, 183, 184, 255], [109, 105, 121, 255], [89, 116, 194, 255], [216, 163, 10, 255]], unlocked=True) default lun_top_school3 = DollCloth("luna", ("upper body", "shirts"), "top", "top_school_3", [[183, 183, 184, 255], [109, 105, 121, 255], [89, 116, 194, 255], [216, 163, 10, 255]], unlocked=True) diff --git a/game/scripts/characters/susan/wardrobe.rpy b/game/scripts/characters/susan/wardrobe.rpy index 5052a4ac..acada148 100644 --- a/game/scripts/characters/susan/wardrobe.rpy +++ b/game/scripts/characters/susan/wardrobe.rpy @@ -18,6 +18,7 @@ default susan = Doll(name="susan", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -51,6 +52,7 @@ default susan = Doll(name="susan", ## Schoolgirl Outfit ## ####################### +default sus_footwear_shoes = DollClothDummy("susan", type="footwear") default sus_hair_base = DollCloth("susan", ("head", "hair"), "hair", "base", [[213, 85, 35, 255], [231, 109, 61, 255]], unlocked=True) diff --git a/game/scripts/characters/tonks/wardrobe.rpy b/game/scripts/characters/tonks/wardrobe.rpy index 199d826f..bcf01662 100644 --- a/game/scripts/characters/tonks/wardrobe.rpy +++ b/game/scripts/characters/tonks/wardrobe.rpy @@ -18,6 +18,7 @@ default tonks = Doll(name="tonks", "stockings": [None, 5, True], "buttplug": [None, -1, True], "pubes": [None, 3, True], + "footwear": [None, 6, True], "tattoo0": [None, 1, True], "tattoo1": [None, 1, True], "tattoo2": [None, 1, True], @@ -53,6 +54,7 @@ default tonks = Doll(name="tonks", ## Auror Outfit ## ################## +default ton_footwear_shoes = DollClothDummy("tonks", type="footwear") default ton_hair_base = DollCloth("tonks", ("head", "hair"), "hair", "base", [[255, 146, 185, 255], [254, 218, 238, 255]], unlocked=True) default ton_hair_base_new = DollCloth("tonks", ("head", "hair"), "hair", "new", [[255, 146, 185, 255], [254, 218, 238, 255]], unlocked=True) default ton_neckwear_beads = DollCloth("tonks", ("head", "neckwear"), "neckwear", "choker_beads",[[45, 45, 48, 255], [244, 230, 236, 255]], unlocked=True) diff --git a/game/scripts/doll/clothes.rpy b/game/scripts/doll/clothes.rpy index 582f36ba..f21dbef7 100644 --- a/game/scripts/doll/clothes.rpy +++ b/game/scripts/doll/clothes.rpy @@ -44,7 +44,7 @@ init python: if renpy.loadable(path + "0.webp"): self.imagepath = path return - raise IOError("Couldn't find file \"{}/characters/{}/clothes/{}/{}/0.webp\"".format(self.modpath, self.name, subpath, self.id)) + raise IOError("Couldn't find file:\n\"{}0.webp\"".format(path)) def set_layers(self): for x in self.layers_special: @@ -302,3 +302,28 @@ init python: if self.parent: self.parent.unlock() + + class DollClothDummy(DollCloth): + def __init__(self, name, type, *args, **kwargs): + super(DollClothDummy, self).__init__(name=name, categories=("dummy", "dummy"), type=type, id="dummy", color=[[0,0,0,0]], *args, **kwargs) + + self.cached = True + self.cached_icon = True + + def set_imagepath(self): + if any(x in self.type for x in self.multislots): + subpath = self.type[:-1] + else: + subpath = self.type + + virt_path = "{}/characters/{}/clothes/{}/{}/".format(self.modpath, self.name, subpath, self.id) + self.imagepath = virt_path + + def get_icon(self): + return self.ico + + def get_image(self): + return self.sprite + + def clone(self): + return DollClothDummy(self.name, self.type, parent=self)