changeset 180:0d0422243490

The getGameEnvironment method of GameState will now return a globals dictionary where __builtins__ is disabled.
author Beliar
date Sat, 10 Mar 2012 13:31:47 +0100
parents 90b2545f7459
children ff4f9b387cac
files gamestate.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamestate.py	Wed Mar 07 20:04:48 2012 +0100
+++ b/gamestate.py	Sat Mar 10 13:31:47 2012 +0100
@@ -29,6 +29,7 @@
         self.maps = {}
         self.npcs_met = set()
         self.funcs = {
+            "__builtins__":None,
             "meet":self.meet,
             "met":self.met,
             "sqrt":math.sqrt,
@@ -175,4 +176,4 @@
         can work with it. This can be used in functions like eval or exec"""
         vals = {}
         vals.update(self.getObjectDictOfMap(self.current_map_name))
-        return vals, self.funcs
\ No newline at end of file
+        return self.funcs, vals
\ No newline at end of file