Skip to content

Commit 5c623d7

Browse files
committed
Add __eq__ method to MTSTogglePersistentBool to match Ren'Py Action notion of equality.
1 parent 65cd1cf commit 5c623d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mods/core/mts_useful_functions.rpy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ init -100 python:
8888
def __init__(self, name):
8989
self.name = name
9090

91+
def __eq__(self, other):
92+
if not isinstance(other, MTSTogglePersistentBool):
93+
return False
94+
return self.name == other.name
95+
9196
def __call__(self):
9297
#if it's true
9398
if getattr(persistent, self.name):

0 commit comments

Comments
 (0)