Compare commits

...

2 Commits

Author SHA1 Message Date
77e40301c9 Use statements instead of equivalents 2023-11-15 23:47:24 +01:00
42f690f966 Avoid circular reference
it clogs pickling and garbage-collecting
2023-11-15 23:46:46 +01:00

View File

@ -1,4 +1,3 @@
init python: init python:
class Parcel(object): class Parcel(object):
""" """
@ -18,7 +17,10 @@ init python:
self.wait = wait self.wait = wait
self.label = label self.label = label
self.func = func self.func = func
self.queue = mailbox.parcels
@property
def queue(self):
return mailbox.parcels
def send(self): def send(self):
self.mailed = True self.mailed = True
@ -70,20 +72,20 @@ init python:
return (text, icon) return (text, icon)
label parcel(parcel, label): label parcel(parcel, lbl):
show screen bld1 show screen bld1
show screen blktone show screen blktone
$ renpy.checkpoint() $ renpy.checkpoint()
$ renpy.call("give_reward", *parcel.get_caption()) call give_reward(*parcel.get_caption())
hide screen blktone hide screen blktone
hide screen bld1 hide screen bld1
with d3 with d3
if label: if lbl:
$ renpy.call(label) call expression lbl
return return