From 6859001c172f76ddcf889bd2fb2f9850d5027da4 Mon Sep 17 00:00:00 2001 From: Exodia <67595890+DonRP@users.noreply.github.com> Date: Tue, 26 Jul 2022 18:53:46 +0200 Subject: [PATCH] Update utility.rpy --- game/tool/utility.rpy | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/game/tool/utility.rpy b/game/tool/utility.rpy index f45b13b..91d24fc 100644 --- a/game/tool/utility.rpy +++ b/game/tool/utility.rpy @@ -20,5 +20,17 @@ init -999 python: return Null() config.displayable_prefix['check'] = null_or_image + def compare(a= 0, b= 0) -> int: + if a is None and b is None: + return 0 + elif b is None: + return 1 + elif a is None: + return -1 + return a - b + + def isGreaterThan(a= 0, b= 0) -> bool: + return compare(a, b) > 0 + label set_background(img): scene expression (img) as bg