From 36d3a5d1a79827a2c0f718fdf4124f61109a346c Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:34:14 +0100 Subject: [PATCH] Sort in-place to save time --- game/scripts/shops/item/menu.rpy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/scripts/shops/item/menu.rpy b/game/scripts/shops/item/menu.rpy index 6e20ad0a..707091f2 100644 --- a/game/scripts/shops/item/menu.rpy +++ b/game/scripts/shops/item/menu.rpy @@ -4,9 +4,9 @@ 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) return item label shop_item: