#!/usr/bin/env python
#   -*- encoding: UTF-8 -*-

# This file is part of Addison Arches.
#
# Addison Arches is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Addison Arches is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Addison Arches.  If not, see <http://www.gnu.org/licenses/>.

async def default(folder, ensemble, log=None, loop=None):
    if log is not None:
        log.debug("No activity during interlude")
    return folder

async def stop(folder, ensemble, log=None, loop=None):
    if log is not None:
        log.debug("Interlude stops dialogue")
    return None

@@ -747,16 +747,63 @@
 ses/%3E.%0A%0A
+from turberfield.dialogue.types import Player%0A%0A
 async de
@@ -820,32 +820,37 @@
 folder, ensemble
+:list
 , log=None, loop
@@ -981,16 +981,21 @@
 ensemble
+:list
 , log=No
@@ -1076,24 +1076,134 @@
  dialogue%22)%0A
+    for entity in ensemble%5B:%5D:%0A        if not isinstance(entity, Player):%0A            ensemble.remove(entity)%0A
     return N

Stop interlude removes non-player characters.