From f0fa6b5aeef5c9a931d0c7d67ffa946b25bccf75 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 8 Mar 2013 21:42:51 +0100 Subject: [PATCH] Fixed a bug in IMC2 implementation. Made sure the Tutorial world Ghost keeps moving after winning a battle. --- contrib/tutorial_world/mob.py | 4 ++++ src/comms/imc2.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/tutorial_world/mob.py b/contrib/tutorial_world/mob.py index f210e15bcf..87f6611b0c 100644 --- a/contrib/tutorial_world/mob.py +++ b/contrib/tutorial_world/mob.py @@ -241,6 +241,10 @@ class Enemy(Mob): elif not ostring: ostring = "%s falls to the ground!" % target.key self.location.msg_contents(ostring, exclude=[target]) + # Pursue any stragglers after the battle + self.battle_mode = False + self.roam_mode = False + self.pursue_mode = True else: # no players found, this could mean they have fled. Switch to pursue mode. self.battle_mode = False diff --git a/src/comms/imc2.py b/src/comms/imc2.py index 1f04c0502e..07cfac24d1 100644 --- a/src/comms/imc2.py +++ b/src/comms/imc2.py @@ -434,7 +434,7 @@ def create_connection(channel, imc2_channel): # how the evennia channel will be able to contact this protocol in reverse send_code = "from src.comms.imc2 import IMC2_CLIENT\n" send_code += "data={'channel':from_channel}\n" - send_code += "IMC2_CLIENT.msg_imc2(message, from_obj=from_obj, data=data)\n" + send_code += "IMC2_CLIENT.msg_imc2(message, senders=[self])\n" conn = ExternalChannelConnection(db_channel=channel, db_external_key=key, db_external_send_code=send_code, db_external_config=config) conn.save()