Include save_state and restore as shortcut methods during an embed

This commit is contained in:
Grant Sanderson 2021-01-30 17:51:40 -08:00
parent b353c4f21c
commit 375bc2073d

View file

@ -123,7 +123,7 @@ class Scene(object):
# once embeded, and add a few custom shortcuts
local_ns = inspect.currentframe().f_back.f_locals
local_ns["touch"] = self.interact
for term in ("play", "add", "remove", "clear"):
for term in ("play", "add", "remove", "clear", "save_state", "restore"):
local_ns[term] = getattr(self, term)
shell(local_ns=local_ns, stack_depth=2)
# End scene when exiting an embed.