2024-10-15 16:22:38 +00:00
init python in wardrobe:
2022-05-16 23:48:22 +00:00
def wardrobe_check_category(category):
2024-10-15 16:22:38 +00:00
req = renpy.store.get_character_requirement(renpy.store.states.active_girl, f"category {category}")
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
2022-05-16 23:48:22 +00:00
return (flag >= req)
def wardrobe_check_equip(item):
req = item.level
2024-10-15 16:22:38 +00:00
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
2022-05-16 23:48:22 +00:00
return (flag >= req)
def wardrobe_check_unequip(item):
2024-10-15 16:22:38 +00:00
req = renpy.store.get_character_requirement(renpy.store.states.active_girl, f"unequip {item.type}")
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
2022-05-16 23:48:22 +00:00
return (flag >= req)
def wardrobe_check_equip_outfit(item):
req = max((i.level for i in item.group))
2024-10-15 16:22:38 +00:00
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
2022-05-16 23:48:22 +00:00
has_bra = any(i.type == "bra" for i in item.group)
has_panties = any(i.type == "panties" for i in item.group)
if not has_bra:
2024-10-15 16:22:38 +00:00
req = max(req, renpy.store.get_character_requirement(renpy.store.states.active_girl, "unequip bra"))
2022-05-16 23:48:22 +00:00
if not has_panties:
2024-10-15 16:22:38 +00:00
req = max(req, renpy.store.get_character_requirement(renpy.store.states.active_girl, "unequip panties"))
2022-05-16 23:48:22 +00:00
if any(i.type.startswith(("piercing", "tattoo")) for i in item.group):
2024-10-15 16:22:38 +00:00
req = max(req, renpy.store.get_character_requirement(renpy.store.states.active_girl, "category piercings & tattoos"))
2022-05-16 23:48:22 +00:00
return (flag >= req)
def wardrobe_check_blacklist(item):
if not item.blacklist:
return True
2024-10-15 16:22:38 +00:00
req = max((renpy.store.get_character_requirement(renpy.store.states.active_girl, f"unequip {i}") for i in item.blacklist))
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
2022-05-16 23:48:22 +00:00
return (flag >= req)
def wardrobe_fallback_required(item):
fallbacks = {"top", "bottom", "bra", "panties"}
2024-10-15 16:22:38 +00:00
char = renpy.store.get_character_object(renpy.store.states.active_girl)
req = [renpy.store.get_character_requirement(renpy.store.states.active_girl, f"unequip {i}") for i in fallbacks if not char.is_equipped(i) and not i in char.blacklist]
2022-05-16 23:48:22 +00:00
if not req:
return False
req = max(req)
2024-10-15 16:22:38 +00:00
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
2022-05-16 23:48:22 +00:00
return not (flag >= req)
def wardrobe_react(what, arg):
2023-03-24 18:04:49 +00:00
global _skipping
2024-10-15 16:22:38 +00:00
if chitchats:
2023-03-24 18:04:49 +00:00
_skipping = True
renpy.suspend_rollback(False)
renpy.block_rollback()
2024-10-15 16:22:38 +00:00
renpy.call_in_new_context(renpy.store.get_character_response(renpy.store.states.active_girl, what), arg)
2022-05-16 23:48:22 +00:00
return