Rebuild wardrobe (2) set globals in actions

This commit is contained in:
Gouvernathor 2023-11-19 20:55:01 +01:00
parent 8d297a7bd9
commit 5411e13261
1 changed files with 6 additions and 1 deletions

View File

@ -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):