63 lines
2.4 KiB
Plaintext
63 lines
2.4 KiB
Plaintext
init python in wardrobe:
|
|
|
|
def wardrobe_check_equip(item):
|
|
req = item.level
|
|
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
|
|
|
|
return (flag >= req)
|
|
|
|
def wardrobe_check_unequip(item):
|
|
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)
|
|
|
|
return (flag >= req)
|
|
|
|
def wardrobe_check_equip_outfit(item):
|
|
req = max((i.level for i in item.group))
|
|
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
|
|
|
|
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:
|
|
req = max(req, renpy.store.get_character_requirement(renpy.store.states.active_girl, "unequip bra"))
|
|
|
|
if not has_panties:
|
|
req = max(req, renpy.store.get_character_requirement(renpy.store.states.active_girl, "unequip panties"))
|
|
|
|
if any(i.type.startswith(("piercing", "tattoo")) for i in item.group):
|
|
req = max(req, renpy.store.get_character_requirement(renpy.store.states.active_girl, "category piercings & tattoos"))
|
|
|
|
return (flag >= req)
|
|
|
|
def wardrobe_check_blacklist(item):
|
|
if not item.blacklist:
|
|
return True
|
|
|
|
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)
|
|
|
|
return (flag >= req)
|
|
|
|
def wardrobe_fallback_required(item):
|
|
fallbacks = {"top", "bottom", "bra", "panties"}
|
|
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]
|
|
|
|
if not req:
|
|
return False
|
|
|
|
req = max(req)
|
|
flag = renpy.store.get_character_progression(renpy.store.states.active_girl)
|
|
|
|
return not (flag >= req)
|
|
|
|
def wardrobe_react(what, arg):
|
|
global _skipping
|
|
if chitchats:
|
|
_skipping = True
|
|
renpy.suspend_rollback(False)
|
|
renpy.block_rollback()
|
|
renpy.call_in_new_context(renpy.store.get_character_response(renpy.store.states.active_girl, what), arg)
|
|
return
|