Beispiel #1
0
        /// <summary>
        /// Loops through all types in the app domain and creates functions in
        /// the engine for methods that have a JavascriptFunction attribute.
        /// </summary>
        protected void CreateScriptFunctions()
        {
            JistPlugin.RequestExternalFunctions();

            lock (syncRoot)
                jsEngine.SetValue("alert", new Action <object>(Console.WriteLine));
        }
Beispiel #2
0
 public JistEngine(JistPlugin parent)
 {
     this.providedPackages = new List <string>();
     this.plugin           = parent;
     this.scriptContainer  = new ScriptContainer(this);
     ServerApi.Hooks.GamePostInitialize.Register(plugin, Game_PostInitialize);
     PercentChanged += (sender, args) => ConsoleEx.WriteBar(args);
 }
Beispiel #3
0
		public JistEngine(JistPlugin parent)
		{
			this.providedPackages = new List<string>();
			this.plugin = parent;
			this.scriptContainer = new ScriptContainer(this);
            ServerApi.Hooks.GamePostInitialize.Register(plugin, Game_PostInitialize);
            PercentChanged += (sender, args) => ConsoleEx.WriteBar(args);
		}
Beispiel #4
0
        public JistRestInterface(JistPlugin plugin)
        {
            this._plugin = plugin;

            TShockAPI.TShock.RestApi.Register(new Rests.SecureRestCommand("/_jist/v1/send", rest_send, "jist.rest.send"));
        }