diff entities/__init__.py @ 44:98f26f7636d8

Changes to make PARPG "runable" with grease. (With the correct modified assets)
author KarstenBock@gmx.net
date Tue, 06 Sep 2011 15:22:51 +0200
parents 895be696ae86
children 2727d6b78978
line wrap: on
line diff
--- a/entities/__init__.py	Tue Sep 06 15:21:36 2011 +0200
+++ b/entities/__init__.py	Tue Sep 06 15:22:51 2011 +0200
@@ -47,4 +47,7 @@
         info[key] = val
 
     # this is for testing purposes
-    return getAllEntities()[ent_type](world, **info)
+    try:
+        return getAllEntities()[ent_type](world, **info)
+    except KeyError:
+        return None