# -*- coding: utf-8 -*-
#
# Tuxemon
# Copyright (C) 2014, William Edwards <shadowapex@gmail.com>,
#                     Benjamin Bean <superman2k5@gmail.com>
#
# This file is part of Tuxemon.
#
# Tuxemon is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Tuxemon 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Tuxemon.  If not, see <http://www.gnu.org/licenses/>.
#
# Contributor(s):
#
# William Edwards <shadowapex@gmail.com>
# Leif Theden <leif.theden@gmail.com>
#
from __future__ import absolute_import

import logging
from collections import namedtuple

# Create a logger for optional handling of debug messages.
logger = logging.getLogger(__name__)

# Set up map action and condition objects
condition_fields = [
    "type",
    "parameters",
    "x",
    "y",
    "width",
    "height",
    "operator"]

action_fields = [
    "type",
    "parameters"]

event_fields = [
    "id",
    "x",
    "y",
    "conds",
    "acts"]

MapCondition = namedtuple("condition", condition_fields)
MapAction = namedtuple("action", action_fields)
EventObject = namedtuple("eventobject", event_fields)

__all__ = [
    "MapAction",
    "MapCondition"
]
