Wardrobe 2.0 - Animations, Fix exit to character menu, icons, translation strings

This commit is contained in:
LoafyLemon 2024-11-08 18:40:34 +00:00
parent 8def879969
commit dfa36937e5
9 changed files with 46 additions and 19 deletions

View File

@ -38,7 +38,7 @@ label summon_astoria:
# Wardrobe # Wardrobe
"-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.ast.wardrobe_unlocked: "-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.ast.wardrobe_unlocked:
hide astoria_main with d1 hide astoria_main with d1
call wardrobe jump wardrobe
jump astoria_requests jump astoria_requests
"-Wardrobe-" (style="disabled") if not states.ast.wardrobe_unlocked: "-Wardrobe-" (style="disabled") if not states.ast.wardrobe_unlocked:

View File

@ -122,7 +122,7 @@ label summon_cho:
"-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.cho.wardrobe_unlocked: "-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.cho.wardrobe_unlocked:
hide cho_main with d1 hide cho_main with d1
call wardrobe jump wardrobe
jump cho_requests jump cho_requests
"-Wardrobe-" (style="disabled") if not states.cho.wardrobe_unlocked: "-Wardrobe-" (style="disabled") if not states.cho.wardrobe_unlocked:

View File

@ -79,7 +79,7 @@ label summon_hermione:
"-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.her.wardrobe_unlocked: # Unlocks after first summoning her. "-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.her.wardrobe_unlocked: # Unlocks after first summoning her.
hide hermione_main with d1 hide hermione_main with d1
call wardrobe jump wardrobe
jump hermione_requests jump hermione_requests
"-Let's Duel-" (icon="interface/icons/small/cards.webp") if states.sna.ev.cardgame.stage >= 2: "-Let's Duel-" (icon="interface/icons/small/cards.webp") if states.sna.ev.cardgame.stage >= 2:

View File

@ -52,7 +52,7 @@ label summon_luna:
# Wardrobe # Wardrobe
"-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.lun.wardrobe_unlocked: "-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.lun.wardrobe_unlocked:
hide luna_main with d1 hide luna_main with d1
call wardrobe jump wardrobe
jump luna_requests jump luna_requests
"-Wardrobe-" (style="disabled") if not states.lun.wardrobe_unlocked: "-Wardrobe-" (style="disabled") if not states.lun.wardrobe_unlocked:

View File

@ -39,7 +39,7 @@ label summon_susan:
# Wardrobe # Wardrobe
"-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.sus.wardrobe_unlocked: "-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.sus.wardrobe_unlocked:
hide susan_main with d1 hide susan_main with d1
call wardrobe jump wardrobe
jump susan_requests jump susan_requests
"-Wardrobe-" (style="disabled") if not states.sus.wardrobe_unlocked: "-Wardrobe-" (style="disabled") if not states.sus.wardrobe_unlocked:

View File

@ -51,7 +51,7 @@ label summon_tonks:
# Wardrobe # Wardrobe
"-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.ton.wardrobe_unlocked: "-Wardrobe-" (icon="interface/icons/small/wardrobe.webp") if states.ton.wardrobe_unlocked:
hide tonks_main with d1 hide tonks_main with d1
call wardrobe jump wardrobe
# Hair fix # Hair fix
$ tonks_haircolor = [c for c in tonks.get_equipped("hair").color] $ tonks_haircolor = [c for c in tonks.get_equipped("hair").color]

View File

@ -228,7 +228,7 @@ init python:
if is_blacklisted or is_blacklister: if is_blacklisted or is_blacklister:
blacklisted = [x for x in self.blacklist if self.char.is_equipped(x)] # Offender (List currently blacklisted clothing types by this item) blacklisted = [x for x in self.blacklist if self.char.is_equipped(x)] # Offender (List currently blacklisted clothing types by this item)
blacklister = self.char.get_blacklister(self.type) # Victim (List clothing types blacklisting this item ) blacklister = self.char.get_blacklister(self.type) # Victim (List clothing types blacklisting this item )
warnings.append("Incompatible with:{size=-4}\n" + "\n".join(set(blacklisted + blacklister)) + "{/size}") warnings.append(_("Incompatible with:{size=-4}\n") + "\n".join(set(blacklisted + blacklister)) + "{/size}")
child = self.icon child = self.icon
hbox = [] hbox = []
@ -244,25 +244,25 @@ init python:
alternate = [Function(wardrobe.wheelmenu, self), self.build_button] alternate = [Function(wardrobe.wheelmenu, self), self.build_button]
if is_inadequate: if is_inadequate:
warnings.append("Character level too low") warnings.append(_("Character level too low!"))
if is_modded: if is_modded:
warnings.append("Item belongs to a mod:\n{size=-4}{color=#35aae2}" + self.get_modname() + "{/color}{/size}") warnings.append("Item belongs to a mod:\n{size=-4}{color=#35aae2}" + self.get_modname() + "{/color}{/size}")
hbox.append(Text("M", color="#00b200", style="wardrobe_button_text")) hbox.append(Text("🛠️", align=(0.5, 0.5), style="wardrobe_icon_text"))
if is_blacklisted or is_blacklister: if is_blacklisted or is_blacklister:
hbox.append(Text("!", color="#b20000", style="wardrobe_button_text")) hbox.append(Text("❗", align=(0.5, 0.5), style="wardrobe_icon_text"))
for i in self.char.wardrobe_list: for i in self.char.wardrobe_list:
if i.unlocked and i.type == self.type: if i.unlocked and i.type == self.type:
action.append(i.build_button) action.append(i.build_button)
if config.developer and self.level > 0: # if config.developer and self.level > 0:
hbox.append(Text(str(self.level), color="#00ffff", style="wardrobe_button_text")) # hbox.append(Text(str(self.level), color="#00ffff", style="wardrobe_button_text"))
if not is_seen: if not is_seen:
unhovered = [Function(self.mark_as_seen), self.clear_button_cache, self.build_button] unhovered = [Function(self.mark_as_seen), self.clear_button_cache, self.build_button]
overlay.append(Text("NEW", align=(1.0, 1.0), offset=(-6, -6), style="wardrobe_button_text")) overlay.append(Text(_("NEW"), align=(1.0, 1.0), style="wardrobe_indicator_text"))
# if is_equipped: # if is_equipped:
# overlay.append(Transform("interface/topbar/icon_check.webp", align=(1.0, 1.0), offset=(-6, -6), size=(24, 24))) # overlay.append(Transform("interface/topbar/icon_check.webp", align=(1.0, 1.0), offset=(-6, -6), size=(24, 24)))

View File

@ -599,7 +599,7 @@ init python:
for i, x in enumerate(imported): for i, x in enumerate(imported):
if i == 0 and not x == self.name: if i == 0 and not x == self.name:
renpy.notify("Import failed: Wrong character.") # renpy.notify("Import failed: Wrong character.")
return None return None
for o in self.wardrobe_list: for o in self.wardrobe_list:

View File

@ -227,7 +227,8 @@ init python in wardrobe:
# Handle exit animation # Handle exit animation
scope["navigation_last_frame_atl"] = renpy.store.navigation_last_frame_hide scope["navigation_last_frame_atl"] = renpy.store.navigation_last_frame_hide
scope["navigation_atl"] = renpy.store.navigation_hide scope["navigation_atl"] = renpy.store.wardrobe_hide
scope["character_atl"] = renpy.store.wardrobe_character_hide
scope["navigation_exit"] = True scope["navigation_exit"] = True
# Save the outfit # Save the outfit
@ -414,7 +415,8 @@ label wardrobe(inter_pause=True):
with Pause(0.2) with Pause(0.2)
call screen wardrobe call screen wardrobe
$ enable_game_menu() $ enable_game_menu()
jump main_room_menu
jump expression f"{states.active_girl}_requests"
# Interface # Interface
screen wardrobe(): screen wardrobe():
@ -422,13 +424,14 @@ screen wardrobe():
zorder 0 zorder 0
style_prefix "wardrobe" style_prefix "wardrobe"
default navigation_atl = navigation_show default navigation_atl = wardrobe_show
default character_atl = wardrobe_character_show
default last_frame = (screenshot.capture() or screenshot.image) default last_frame = (screenshot.capture() or screenshot.image)
default navigation_last_frame_atl = navigation_last_frame_show default navigation_last_frame_atl = navigation_last_frame_show
default navigation_exit = False default navigation_exit = False
default character = get_character_object(states.active_girl) default character = get_character_object(states.active_girl)
default selected_section = None default selected_section = "outfits"
default selected_category = None default selected_category = None
default selected_subcategory = None default selected_subcategory = None
default selected_item = None default selected_item = None
@ -680,7 +683,7 @@ screen wardrobe():
textbutton _("Global Colours") action Function(wardrobe.toggle_setting, "global_color") selected wardrobe.global_color style "wardrobe_checkbox_button" textbutton _("Global Colours") action Function(wardrobe.toggle_setting, "global_color") selected wardrobe.global_color style "wardrobe_checkbox_button"
textbutton _("Allow Opacity Slider") action Function(wardrobe.toggle_setting, "allow_opacity") selected wardrobe.allow_opacity style "wardrobe_checkbox_button" textbutton _("Allow Opacity Slider") action Function(wardrobe.toggle_setting, "allow_opacity") selected wardrobe.allow_opacity style "wardrobe_checkbox_button"
add character.image align (1.0, 1.0) zoom 0.6 add character.image align (1.0, 1.0) zoom 0.6 at character_atl
vbox: vbox:
align (0.5, 1.0) align (0.5, 1.0)
@ -732,6 +735,9 @@ style wardrobe_button_text is frame_button_text:
size 18 size 18
style wardrobe_icon_text: style wardrobe_icon_text:
size 16 size 16
style wardrobe_indicator_text is what:
size 16
offset (0, 0)
style wardrobe_label: style wardrobe_label:
xpadding 5 xpadding 5
ypadding 2 ypadding 2
@ -756,3 +762,24 @@ style wardrobe_checkbox_button_text is wardrobe_button_text:
style wardrobe_secret: style wardrobe_secret:
#background "#ff000025" #background "#ff000025"
background None background None
transform wardrobe_show:
subpixel True
xpos -1080
alpha 0.0
easein 0.4 xpos 0 alpha 1.0
transform wardrobe_hide:
subpixel True
events False
xpos 0
alpha 1.0
easeout 0.4 xpos -1080 alpha 0.0
transform wardrobe_character_show:
xoffset 1080
easein 0.4 xoffset 0
transform wardrobe_character_hide:
xoffset 0
easeout 0.4 xoffset 1080