Exemplo n.º 1
0
 public void SelectedAdd(SimPosition o)
 {
     if (!SelectedObjects.AddTo(o) || !_SelectedBeam) return;
     if (true)
     {
         _SelectedBeam = false;
         SelectedBeam = true;
         return;
     }
     EffectBeamInfo info = new EffectBeamInfo(GetGridClient());
     info.SetPointing(o, 3);
     BeamInfos.AddTo(info);
 }
        public void SelectedAdd(SimPosition o)
        {
            if (!SelectedObjects.AddTo(o) || !_SelectedBeam)
            {
                return;
            }
            if (true)
            {
                _SelectedBeam = false;
                SelectedBeam  = true;
                return;
            }
            EffectBeamInfo info = new EffectBeamInfo(GetGridClient());

            info.SetPointing(o, 3);
            BeamInfos.AddTo(info);
        }
Exemplo n.º 3
0
        public override CmdResult ExecuteRequest(CmdRequest args)
        {
            RadegastInstance instance = TheBotClient.TheRadegastInstance;

            foreach (var set in BeamInfos)
            {
                set.UnSetPointing();
            }
            BeamInfos.Clear();
            int used;
            if (args.Length == 0)
            {
                if (instance != null) instance.State.UnSetPointing();
                TheSimAvatar.SelectedBeam = !TheSimAvatar.SelectedBeam;
                return Success("SelectedBeam = " + TheSimAvatar.SelectedBeam);
            }
            var targets = args.GetProperty("targets");
            List<SimObject> PS = WorldSystem.GetPrimitives(targets, out used);
            GridClient grc = TheBotClient;
            if (PS.Count==0)
            {
                SimPosition pos = WorldSystem.GetVector(targets, out used);
                if (pos!=null)
                {
                    EffectBeamInfo info = new EffectBeamInfo(grc);
                    info.SetPointing(pos, 3);
                    BeamInfos.AddTo(info);
                    return Success(Name + " on " + pos);
                }
                return Failure(string.Format("Cant find {0}", string.Join(" ", args)));
            }
            foreach (var o in PS)
            {             
                EffectBeamInfo info = new EffectBeamInfo(grc);
                info.SetPointing(o, 3);
                BeamInfos.AddTo(info);
                Primitive p = o.Prim;
                if (p != null && instance != null) instance.State.SetPointing(p, 3);                
            }
            return Success(Name + " on " + PS.Count);
        }