protected override void OnSelectEnd()
        {
            // Item highlighted?
            if ((highlighted != null) && !highlighted.IsDisposed)
            {
                General.Map.UndoRedo.CreateUndo("Toggle \"Shown as 1-sided on automap\" linedef flag");

                // Toggle flag
                highlighted.SetFlag(BuilderPlug.Me.SecretFlag, !highlighted.IsFlagSet(BuilderPlug.Me.SecretFlag));
                UpdateValidLinedefs();
            }

            base.OnSelectEnd();
        }
示例#2
0
 public void Apply(Linedef l)
 {
     if ((front != null) && (l.Front != null))
     {
         front.Apply(l.Front);
     }
     if ((back != null) && (l.Back != null))
     {
         back.Apply(l.Back);
     }
     l.ClearFlags();
     foreach (KeyValuePair <string, bool> f in flags)
     {
         l.SetFlag(f.Key, f.Value);
     }
     l.Action   = action;
     l.Activate = activate;
     l.Tag      = tag;
     for (int i = 0; i < l.Args.Length; i++)
     {
         l.Args[i] = args[i];
     }
     l.Fields.BeforeFieldsChange();
     l.Fields.Clear();
     foreach (KeyValuePair <string, UniValue> v in fields)
     {
         l.Fields.Add(v.Key, new UniValue(v.Value));
     }
 }
示例#3
0
 public void SetFlag(string flagname, bool val = true)
 {
     if (linedef.IsDisposed)
     {
         throw new ScriptRuntimeException("Linedef has been disposed, can't SetFlag().");
     }
     if (flagname == null)
     {
         throw new ScriptRuntimeException("flagname is nil, can't SetFlag() (not enough arguments maybe?).");
     }
     // FIXME warn on no such flag
     linedef.SetFlag(flagname, val);
 }
		//mxd. If a linedef is highlighted, toggle the sound blocking flag 
		protected override void OnSelectEnd()
		{
			if(highlightedline == null) return;

			// Make undo
			General.Map.UndoRedo.CreateUndo("Toggle Linedef Sound Blocking");

			// Toggle flag
			highlightedline.SetFlag(BlockSoundFlag, !highlightedline.IsFlagSet(BlockSoundFlag));
			
			// Update
			ResetSoundPropagation();
			General.Interface.RedrawDisplay();
		}
        //mxd. If a linedef is highlighted, toggle the sound blocking flag, if a sound environment is clicked, select it in the tree view
        protected override void OnSelectEnd()
        {
            if (highlightedline != null)
            {
                // Make undo
                General.Map.UndoRedo.CreateUndo("Toggle Sound Zone Boundary");

                // Toggle flag
                highlightedline.SetFlag(ZoneBoundaryFlag, !highlightedline.IsFlagSet(ZoneBoundaryFlag));

                // Update
                UpdateData();
                General.Interface.RedrawDisplay();
            }
            else             //mxd
            {
                panel.SelectSoundEnvironment(highlightedsoundenvironment);
            }
        }