def __handleInventory(self, track, level): if gagIsPaidOnly(track, level) and not base.cr.isPaid(): self._teaserPanel = TeaserPanel('plantGags') return if base.localAvatar.inventory.numItem(track, level) > 0: messenger.send(self.doneEvent, [True, track, level]) else: self.notify.error("An item we don't have: track %s level %s was selected." % (track, level))
def __handleInventory(self, track, level): if gagIsPaidOnly(track, level) and not base.cr.isPaid(): self._teaserPanel = TeaserPanel('plantGags') return if base.localAvatar.inventory.numItem(track, level) > 0: messenger.send(self.doneEvent, [True, track, level]) else: self.notify.error("An item we don't have: track %s level %s was selected." % (track, level))
def __handleInventory(self, track, level): if not base.cr.isPaid() and gagIsPaidOnly(track, level): self._teaserPanel = TeaserPanel(pageName='useGags') return if base.localAvatar.inventory.numItem(track, level) > 0: doneStatus = {} doneStatus['mode'] = 'Inventory' doneStatus['track'] = track doneStatus['level'] = level messenger.send(self.doneEvent, [doneStatus]) else: self.notify.error("An item we don't have: track %s level %s was selected." % [track, level])
def __handleInventory(self, track, level, viaKeyboard = False): if not base.cr.isPaid() and gagIsPaidOnly(track, level): self._teaserPanel = TeaserPanel(pageName='useGags') return if base.localAvatar.inventory.numItem(track, level) > 0: doneStatus = {} doneStatus['mode'] = 'Inventory' doneStatus['track'] = track doneStatus['level'] = level messenger.send(self.doneEvent, [doneStatus]) elif not viaKeyboard: self.notify.warning("An item we don't have: track %(track)s level %(level)s was selected." % {'track': track, 'level': level})
def __handleInventory(self, track, level): if not base.cr.isPaid() and gagIsPaidOnly(track, level): self._teaserPanel = TeaserPanel(pageName='useGags') return if base.localAvatar.inventory.numItem(track, level) > 0: doneStatus = {} doneStatus['mode'] = 'Inventory' doneStatus['track'] = track doneStatus['level'] = level messenger.send(self.doneEvent, [doneStatus]) else: self.notify.error( "An item we don't have: track %s level %s was selected." % [track, level])