From 2110eeb92a40c04eef9af03be8908021cf460b6d Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:39:33 +0100 Subject: [PATCH] Simpler inline conditional (cherry picked from commit da636e93ab69a9553464a61b60644b820c2f85f2) --- game/scripts/rooms/main_room/objects/cupboard.rpy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/scripts/rooms/main_room/objects/cupboard.rpy b/game/scripts/rooms/main_room/objects/cupboard.rpy index e709c2bd..c7a65c5d 100644 --- a/game/scripts/rooms/main_room/objects/cupboard.rpy +++ b/game/scripts/rooms/main_room/objects/cupboard.rpy @@ -121,7 +121,7 @@ init python: return int(progress_factor * random_gold) else: filtered_list = [x for x in drop_list if x.owned <= 5] - random_item = renpy.random.choice(filtered_list if filtered_list else drop_list) + random_item = renpy.random.choice(filtered_list or drop_list) return random_item elif game.difficulty == 2: @@ -131,7 +131,7 @@ init python: return int(progress_factor * random_gold) else: filtered_list = [x for x in drop_list if x.owned <= 3] - random_item = renpy.random.choice(filtered_list if filtered_list else drop_list) + random_item = renpy.random.choice(filtered_list or drop_list) if int(120 * math.log(game.day)) / 3 < random_item.price: chance = max(6 - (random_item.owned * 5), 1)