Exemple #1
1
        protected virtual bool OnChestUnlock(TileLocationEventArgs e)
        {
            Contract.Requires <ArgumentNullException>(e != null);

            try {
                if (this.ChestUnlock != null)
                {
                    this.ChestUnlock(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("ChestUnlock", ex);
            }

            return(e.Handled);
        }
Exemple #2
0
        protected virtual bool OnHitSwitch(TileLocationEventArgs e)
        {
            Contract.Requires <ArgumentNullException>(e != null);

            try {
                if (this.HitSwitch != null)
                {
                    this.HitSwitch(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("HitSwitch", ex);
            }

            return(e.Handled);
        }
        protected virtual bool OnSignRead(TileLocationEventArgs e)
        {
            Contract.Requires <ArgumentNullException>(e != null);

            try {
                if (this.SignRead != null)
                {
                    this.SignRead(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("SignRead", ex);
            }

            this.WriteHadnlerDebugInfo("SignRead", e);
            return(e.Handled);
        }
Exemple #4
0
        protected virtual bool OnChestUnlock(TileLocationEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException();
            }

            try {
                if (this.ChestUnlock != null)
                {
                    this.ChestUnlock(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("ChestUnlock", ex);
            }

            this.WriteHadnlerDebugInfo("ChestUnlock", e);
            return(e.Handled);
        }
        protected virtual bool OnHitSwitch(TileLocationEventArgs e)
        {
            //Contract.Requires<ArgumentNullException>(e != null);
            if (e == null)
            {
                throw new ArgumentNullException();
            }

            try {
                if (this.HitSwitch != null)
                {
                    this.HitSwitch(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("HitSwitch", ex);
            }

            this.WriteHadnlerDebugInfo("HitSwitch", e);
            return(e.Handled);
        }
    private void Net_HitSwitch(object sender, TileLocationEventArgs e) {
      if (this.isDisposed || !this.hooksEnabled || e.Handled)
        return;

      if (this.CircuitHandler != null)
        e.Handled = this.CircuitHandler.HandleHitSwitch(e.Player, e.Location);
    }
        protected virtual bool OnSignRead(TileLocationEventArgs e)
        {
            Contract.Requires<ArgumentNullException>(e != null);

              try {
            if (this.SignRead != null)
              this.SignRead(this, e);
              } catch (Exception ex) {
            this.ReportEventHandlerException("SignRead", ex);
              }

              return e.Handled;
        }
        protected virtual bool OnChestUnlock(TileLocationEventArgs e)
        {
            Contract.Requires<ArgumentNullException>(e != null);

              try {
            if (this.ChestUnlock != null)
              this.ChestUnlock(this, e);
              } catch (Exception ex) {
            this.ReportEventHandlerException("ChestUnlock", ex);
              }

              return e.Handled;
        }
        private void Net_SignRead(object sender, TileLocationEventArgs e)
        {
            if (this.isDisposed || !this.hooksEnabled || e.Handled)
            return;

              e.Handled = this.UserInteractionHandler.HandleSignRead(e.Player, e.Location);
        }