# Path: schedules/char/actions.py
# ACTION_NORMAL = 0
# ACTION_COMBAT = 1
# ACTION_SNEAK  = 2
# def perform_action (chr, action):
# def face_character (myself, other):
# def get_objects (chr, radius, arc, type):


from adonthell import input, event, gui, gfx
from schedules.char import actions
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Adonthell 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 Adonthell; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#


class action_talk (object):
    """
     Implementation for a conversation between two characters
    """
    def __init__ (self, initiator, other):
        self.factory = event.factory()
        self.initiator = initiator
        self.other = other

    def perform (self):
        # -- stop character schedules during conversation
        self.initiator.get_schedule().set_active(0)
        self.other.get_schedule().set_active(0)
        # -- stop initiator, in case he has been walking
        self.initiator.set_direction(0)
        # -- look in the direction of the character that adressed us

# Path: schedules/char/actions.py
# ACTION_NORMAL = 0
# ACTION_COMBAT = 1
# ACTION_SNEAK  = 2
# def perform_action (chr, action):
# def face_character (myself, other):
# def get_objects (chr, radius, arc, type):


# Path: characters/character.py
from adonthell import input, event, gui, gfx
from schedules.char import actions

# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Adonthell 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 Adonthell; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#


class action_talk (object):
    """
     Implementation for a conversation between two characters
    """
    def __init__ (self, initiator, other):
        self.factory = event.factory()
        self.initiator = initiator
        self.other = other

    def perform (self):
        # -- stop character schedules during conversation
        self.initiator.get_schedule().set_active(0)
        self.other.get_schedule().set_active(0)
        # -- stop initiator, in case he has been walking
        self.initiator.set_direction(0)
        # -- look in the direction of the character that adressed us

        actions.face_character(self.other, self.initiator)