From b60c87e9f84440d42a9e37dfaae3c755aa05608a Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:55:53 +0100 Subject: [PATCH] Sirt in-place to save time not the first time, so that we can still pass it iterators (cherry picked from commit 21cb97b2e20c3f4cae346682b13e3bd208f57b6e) --- game/scripts/shops/dress/menu.rpy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/game/scripts/shops/dress/menu.rpy b/game/scripts/shops/dress/menu.rpy index 38744a65..1eed28df 100644 --- a/game/scripts/shops/dress/menu.rpy +++ b/game/scripts/shops/dress/menu.rpy @@ -5,13 +5,13 @@ init python: item = sorted(item, key=lambda x: natsort_key(x.name)) if sortby == "Price (Asc)": - item = sorted(item, key=lambda x: x.price, reverse=False) + item.sort(key=lambda x: x.price, reverse=False) elif current_sorting == "Price (Desc)": - item = sorted(item, key=lambda x: x.price, reverse=True) + item.sort(key=lambda x: x.price, reverse=True) if sortby == "Lewdness (Asc)": - item = sorted(item, key=get_outfit_score, reverse=False) + item.sort(key=get_outfit_score, reverse=False) elif current_sorting == "Lewdness (Desc)": - item = sorted(item, key=get_outfit_score, reverse=True) + item.sort(key=get_outfit_score, reverse=True) return item label shop_dress: