def unlock(self, funcExit, forced, callback = None): state = self.getFunctionalState() result = True if state.hasModalEntity and (not state.isIntroMode or forced) and not (funcExit == FUNCTIONAL_EXIT.FALLOUT and state.isInFallout()): factory = self.__factories.get(state.ctrlTypeID) result = False if factory: ctx = factory.createLeaveCtx(funcExit) if ctx: meta = self.__collection.getItem(state.ctrlTypeID).getConfirmDialogMeta(funcExit) if meta: result = yield DialogsInterface.showDialog(meta) else: result = True if result: result = yield self.leave(ctx) else: LOG_ERROR('Can not create leave ctx', state) else: LOG_ERROR('Factory is not found', state) if getFalloutCtrl().isEnabled() and not funcExit == FUNCTIONAL_EXIT.SQUAD: g_eventDispatcher.unloadFallout() if callback: callback(result) yield lambda callback = None: callback return
def unlock(self, funcExit, forced, callback=None): state = self.getFunctionalState() result = True if state.hasModalEntity and (not state.isIntroMode or forced) and not ( funcExit == FUNCTIONAL_EXIT.FALLOUT and state.isInFallout()): factory = self.__factories.get(state.ctrlTypeID) result = False if factory: ctx = factory.createLeaveCtx(funcExit) if ctx: meta = self.__collection.getItem( state.ctrlTypeID).getConfirmDialogMeta(funcExit) if meta: result = yield DialogsInterface.showDialog(meta) else: result = True if result: result = yield self.leave(ctx) else: LOG_ERROR('Can not create leave ctx', state) else: LOG_ERROR('Factory is not found', state) if getFalloutCtrl().isEnabled( ) and not funcExit == FUNCTIONAL_EXIT.SQUAD: g_eventDispatcher.unloadFallout() if callback: callback(result) yield lambda callback=None: callback
def clear(self): g_eventDispatcher.unloadFallout() super(FalloutSquadActionsHandler, self).clear()
def fini(self, woEvents=False): if not woEvents and self._flags & FUNCTIONAL_FLAG.SWITCH == 0: g_eventDispatcher.unloadFallout() return super(_FalloutQueueFunctional, self).fini(woEvents)
def fini(self, woEvents = False): if not woEvents and self._flags & FUNCTIONAL_FLAG.SWITCH == 0: if self._flags & FUNCTIONAL_FLAG.EVENT_SQUAD == 0: self.storage.suspend() g_eventDispatcher.unloadFallout() return super(FalloutQueueFunctional, self).fini(woEvents)
def fini(self, woEvents = False): if not woEvents and self._flags & FUNCTIONAL_FLAG.SWITCH == 0: g_eventDispatcher.unloadFallout() return super(_FalloutQueueFunctional, self).fini(woEvents)