Пример #1
0
def setup_system():
    """ Creates system triggers """

    sage_group = triggers.get_group('sage')

    sage_group.create(
        'connect',
        'exact',
        'Password correct. Welcome to Achaea.',
        [connect])
Пример #2
0
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from sage import ansi
import sage.player as player
from sage.signals import prompt_stats
from sage.signals.player import blackout as blackout_signal
from sage import triggers

blackout_triggers = triggers.get_group('sage').create_group('blackout', enabled=False)


@blackout_triggers.exact('You have recovered equilibrium.')
def blackout_eq_on(trigger):
    player.equilibrium.on()


@blackout_triggers.exact('You have recovered balance on all limbs.')
def blackout_bal_on(trigger):
    player.balance.on()


class PromptRenderer(object):

    def __init__(self):
        self.stats = None
        self.raw = None

    def receive(self, raw, stats):
        self.raw = raw
        self.stats = stats