Ejemplo n.º 1
0
        public ScriptRoom(RoomInfo roomInfo)
            : base(roomInfo)
        {
            Commands = new Dictionary<string, CommandHandler>();

            _sourceFile = roomInfo["Script"];
            _host = new ScriptHost(this);
            _timer = Stopwatch.StartNew();

            _references = new List<string>();
            _references.AddRange((roomInfo["References"] ?? "").Split(','));

            if (Util.IsRunningOnMono())
            {
                _references.AddRange(new List<string>
                {
                    "System", "System.Collections.Generic", "System.Linq", "System.Text"
                });
            }

            _references.AddRange(new List<string>
            {
                "log4net", "Newtonsoft.Json", "Npgsql", "SteamKit2", "EzSteam"
            });

            _references = _references.Distinct().ToList();

            Recompile();
        }
Ejemplo n.º 2
0
    public void Initialize(ScriptHost host)
    {
        _host = host;

        _greetings = new List<string>()
        {
            "hi!", "sup", "hi mom", "hi how are you", "beep", "boop", "hi im dog",
            "hello world", "hello"
        };
    }
Ejemplo n.º 3
0
        public ScriptRoom(RoomInfo roomInfo)
            : base(roomInfo)
        {
            Commands = new Dictionary<string, CommandHandler>();

            _sourceFile = roomInfo["Script"];
            _host = new ScriptHost(this);
            _timer = Stopwatch.StartNew();

            Recompile();
        }