From 5411e13261fa7ab2b5907b39c2417dd35b928d6d Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Sun, 19 Nov 2023 20:55:01 +0100 Subject: [PATCH] Rebuild wardrobe (2) set globals in actions --- game/scripts/wardrobe/wardrobe.rpy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/game/scripts/wardrobe/wardrobe.rpy b/game/scripts/wardrobe/wardrobe.rpy index b820cbff..38cee91e 100644 --- a/game/scripts/wardrobe/wardrobe.rpy +++ b/game/scripts/wardrobe/wardrobe.rpy @@ -156,6 +156,8 @@ init python: self.outfit = outfit def __call__(self): + global current_item + outfit_ = char_active.create_outfit(temp=True) if outfit_.exists(): @@ -191,6 +193,8 @@ init python: self.outfit = outfit def __call__(self): + global category_items + if wardrobe_suppress_warnings or renpy.confirm("Delete this outfit?"): self.outfit.delete() category_items = set_wardrobe_categories(current_category) @@ -224,6 +228,8 @@ init python: class __Randomize(Action): def __call__(self): + global current_item + outfit_ = char_active.create_outfit(temp=True) if not outfit_.exists(): @@ -309,7 +315,6 @@ init python: label wardrobe_actions: # TODO: check all variables created in these labels - # also check the ones in the actions above : some of them may need to be global label .category(category): if not current_category == category: if wardrobe_check_category(category):