Example #1
0
 public ScriptProcessor(World world)
 {
     World = new HybrasylWorld(world);
     // Register UserData types for MoonScript
     UserData.RegisterAssembly(typeof(Game).Assembly);
     UserData.RegisterType <Xml.Gender>();
     UserData.RegisterType <LegendIcon>();
     UserData.RegisterType <LegendColor>();
     UserData.RegisterType <LegendMark>();
     UserData.RegisterType <DateTime>();
     UserData.RegisterType <TimeSpan>();
     _scripts = new Dictionary <string, List <Script> >();
 }
Example #2
0
        public ScriptProcessor(World world)
        {
            Engine = Python.CreateEngine();
            var paths = Engine.GetSearchPaths();

            // FIXME: obvious
            paths.Add(@"C:\Program Files (x86)\IronPython 2.7\Lib");
            paths.Add(@"C:\Python27\Lib");
            Engine.SetSearchPaths(paths);
            Engine.ImportModule("random");

            Scripts = new Dictionary <string, Script>();
            World   = new HybrasylWorld(world);
        }
Example #3
0
 public HybrasylUser(User user)
 {
     User  = user;
     World = new HybrasylWorld(user.World);
     Map   = new HybrasylMap(user.Map);
 }
Example #4
0
 public HybrasylMonster(Monster monster)
 {
     Monster = monster;
     World   = new HybrasylWorld(monster.World);
     Map     = new HybrasylMap(monster.Map);
 }
Example #5
0
 public ScriptProcessor(World world)
 {
     Scripts = new Dictionary <string, Script>();
     World   = new HybrasylWorld(world);
 }