Rebuild wardrobe (6) show the wardrobe screen under confirm
This commit is contained in:
parent
0712f0e251
commit
8092c3bbad
@ -311,8 +311,21 @@ init python:
|
|||||||
|
|
||||||
# renpy.restart_interaction()
|
# renpy.restart_interaction()
|
||||||
|
|
||||||
|
class __Return(Action):
|
||||||
|
def __call__(self):
|
||||||
|
if not wardrobe_autosave:
|
||||||
|
if not char_active.create_outfit(temp=True).exists():
|
||||||
|
renpy.notify("Advice: if you want to keep an outfit, save it.")
|
||||||
|
|
||||||
|
if wardrobe_suppress_warnings:
|
||||||
|
return True
|
||||||
|
|
||||||
|
layout.yesno_screen("Exit without saving?\n{size=-6}Unsaved changes will be lost.{/size}", yes=Return(True), no=NullAction())
|
||||||
|
return
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
label wardrobe_actions:
|
label wardrobe_actions:
|
||||||
# TODO: check all variables created in these labels
|
|
||||||
label .category(category):
|
label .category(category):
|
||||||
if not current_category == category:
|
if not current_category == category:
|
||||||
if wardrobe_check_category(category):
|
if wardrobe_check_category(category):
|
||||||
@ -545,8 +558,8 @@ screen wardrobe(xx, yy):
|
|||||||
add "gui_fade"
|
add "gui_fade"
|
||||||
|
|
||||||
if renpy.mobile:
|
if renpy.mobile:
|
||||||
use close_button_background
|
use close_button_background(action=__Return())
|
||||||
use close_button
|
use close_button(action=__Return())
|
||||||
|
|
||||||
fixed:
|
fixed:
|
||||||
use wardrobe_menu(xx, yy)
|
use wardrobe_menu(xx, yy)
|
||||||
@ -596,31 +609,26 @@ label wardrobe_menu():
|
|||||||
|
|
||||||
call screen wardrobe(662, 50)
|
call screen wardrobe(662, 50)
|
||||||
|
|
||||||
if not wardrobe_autosave:
|
if _return:
|
||||||
if not char_active.create_outfit(temp=True).exists():
|
|
||||||
$ renpy.notify("Advice: If you want to keep an outfit, save it.")
|
|
||||||
|
|
||||||
if not (wardrobe_suppress_warnings or renpy.confirm("Exit without saving?\n{size=-6}Unsaved changes will be lost.{/size}")):
|
$ char_active.equip(char_outfit)
|
||||||
jump .cancel_close
|
|
||||||
|
|
||||||
$ char_active.equip(char_outfit)
|
if wardrobe_global_color:
|
||||||
|
python hide:
|
||||||
|
for cloth in char_outfit.group:
|
||||||
|
for outfit in char_active.outfits:
|
||||||
|
rebuild = False
|
||||||
|
|
||||||
if wardrobe_global_color:
|
for i in outfit.group:
|
||||||
python hide:
|
if (i.id, i.type) != (cloth.id, cloth.type):
|
||||||
for cloth in char_outfit.group:
|
continue
|
||||||
for outfit in char_active.outfits:
|
|
||||||
rebuild = False
|
|
||||||
|
|
||||||
for i in outfit.group:
|
i.set_color(cloth.color)
|
||||||
if (i.id, i.type) != (cloth.id, cloth.type):
|
i.is_stale()
|
||||||
continue
|
rebuild = True
|
||||||
|
|
||||||
i.set_color(cloth.color)
|
if rebuild:
|
||||||
i.is_stale()
|
outfit.is_stale()
|
||||||
rebuild = True
|
|
||||||
|
|
||||||
if rebuild:
|
|
||||||
outfit.is_stale()
|
|
||||||
|
|
||||||
$ char_active.wear("all")
|
$ char_active.wear("all")
|
||||||
play audio "sounds/door2.ogg"
|
play audio "sounds/door2.ogg"
|
||||||
@ -907,12 +915,12 @@ screen wardrobe_schedule_menuitem(item):
|
|||||||
|
|
||||||
default mpos = renpy.get_mouse_pos()
|
default mpos = renpy.get_mouse_pos()
|
||||||
|
|
||||||
use invisible_button(action=Return(), alternate=Show("wardrobe_schedule_menuitem", item=item))
|
use invisible_button(action=__Return(), alternate=Show("wardrobe_schedule_menuitem", item=item))
|
||||||
|
|
||||||
window:
|
window:
|
||||||
style "empty"
|
style "empty"
|
||||||
pos mpos
|
pos mpos
|
||||||
#use invisible_button(action=NullAction(), alternate=Return())
|
#use invisible_button(action=NullAction(), alternate=__Return())
|
||||||
|
|
||||||
frame:
|
frame:
|
||||||
style "empty"
|
style "empty"
|
||||||
|
Loading…
Reference in New Issue
Block a user