Exemple #1
0
 public CivScripts(IInterfaceCommands uInterfaceCommands, StringBuilder log, Game game)
 {
     _game = game;
     ui    = new UIScripts(uInterfaceCommands, log);
     scen  = new ScenarioHooks(game);
     core  = new AxxExtensions(game, log);
 }
Exemple #2
0
        public ScriptEngine(IInterfaceCommands uInterfaceCommands, Game game, string[] paths)
        {
            _scriptPaths = paths.ToList();
            _scriptPaths.Add(Environment.CurrentDirectory + Path.DirectorySeparatorChar + "Scripts");
            _lua         = new Lua();
            _environment = _lua.CreateEnvironment();
            dynamic dg = _environment;

            _log = new StringBuilder();
            _log.AppendLine(_environment.Version);
            dg.print = new Action <string>(s => _log.AppendLine(s));
            dg.civ   = new CivScripts(uInterfaceCommands, _log, game);
        }
Exemple #3
0
 public UIScripts(IInterfaceCommands uInterfaceCommands, StringBuilder log)
 {
     _uInterfaceCommands = uInterfaceCommands;
     _log = log;
 }