def __init__(self): # Load all the available conditions and actions as plugins. condition_plugins = plugin.load_directory(prepare.BASEDIR + "core/components/event/conditions") self.conditions = plugin.get_available_methods(condition_plugins) action_plugins = plugin.load_directory(prepare.BASEDIR + "core/components/event/actions") self.actions = plugin.get_available_methods(action_plugins) self.name = "Event" self.current_map = None self.state = "running" self.timer = 0.0 self.wait = 0.0 self.button = None
import random import re import pprint from core.components import map from core.components import player from core.components import pyganim from core.components import item from core.components import db from core.components import monster from core.components import ai from core.components import plugin # Load all the available conditions and actions as plugins. condition_plugins = plugin.load_directory("core/components/event/conditions") condition_methods = plugin.get_available_methods(condition_plugins) action_plugins = plugin.load_directory("core/components/event/actions") action_methods = plugin.get_available_methods(action_plugins) # Create a logger for optional handling of debug messages. logger = logging.getLogger(__name__) logger.debug("components.event successfully imported") class EventEngine(object): """A class for the event engine. The event engine checks to see if a group of conditions have been met and then executes a set of actions. """ def __init__(self):
import random import re import pprint from core.components import map from core.components import player from core.components import pyganim from core.components import item from core.components import db from core.components import monster from core.components import ai from core.components import plugin # Load all the available conditions and actions as plugins. condition_plugins = plugin.load_directory("core/components/event/conditions") condition_methods = plugin.get_available_methods(condition_plugins) action_plugins = plugin.load_directory("core/components/event/actions") action_methods = plugin.get_available_methods(action_plugins) # Create a logger for optional handling of debug messages. logger = logging.getLogger(__name__) logger.debug("components.event successfully imported") class EventEngine(object): """A class for the event engine. The event engine checks to see if a group of conditions have been met and then executes a set of actions. """ def __init__(self): self.name = "Event"