Ejemplo n.º 1
0
 private void Start()
 {
     _menu = Game.Instance.gameObject.AddComponent <Menu>();
     Game.Scheduler.Register(Scheduler.Priority.BeginFrame, Update);
     _craftingComponent = new CraftingComponent();
     _autoSellComponent = new AutoSellComponent();
     _miscComponent     = new MiscComponent();
 }
    public void FixedUpdate()
    {
        bool flag = !OptimizationVariables.MainPlayer;

        if (!flag)
        {
            MiscComponent.VehicleFlight();
            MiscComponent.PlayerFlight();
        }
    }
Ejemplo n.º 3
0
        public bool ValidMisc(MiscComponent mc)
        {
            if (mc.State == SVMStateEnum.Unadded || mc.State == SVMStateEnum.Deleted)
            {
                return(true);
            }
            if (string.IsNullOrEmpty(mc.Name))
            {
                throw new OjMissingMiscException("You must enter a Name!");
            }

            return(true);
        }
Ejemplo n.º 4
0
        void AddMisc(MiscComponent m, StyleViewModel svm, int keyVal)
        {
            Misc misc = new Misc(m);

            misc.Id = m.Id == 0 ? keyVal : m.Id;
            db.Miscs.Add(misc);
            StyleMisc sm = new StyleMisc()
            {
                StyleId = svm.Style.Id, MiscId = misc.Id
            };

            db.StyleMiscs.Add(sm);
        }
 public void Start()
 {
     MiscComponent.Instance     = this;
     Provider.onClientConnected = (Provider.ClientConnected) Delegate.Combine(Provider.onClientConnected, new Provider.ClientConnected(delegate()
     {
         bool alwaysCheckMovementVerification = MiscOptions.AlwaysCheckMovementVerification;
         if (alwaysCheckMovementVerification)
         {
             MiscComponent.CheckMovementVerification();
         }
         else
         {
             MiscOptions.NoMovementVerification = false;
         }
     }));
     SkinsUtilities.RefreshEconInfo();
     HotkeyComponent.ActionDict.Add("_Com1", delegate
     {
         ChatManager.sendChat(EChatMode.GLOBAL, "/" + BindOptions.Com1);
     });
     HotkeyComponent.ActionDict.Add("_Com2", delegate
     {
         ChatManager.sendChat(EChatMode.GLOBAL, "/" + BindOptions.Com2);
     });
     HotkeyComponent.ActionDict.Add("_Com3", delegate
     {
         ChatManager.sendChat(EChatMode.GLOBAL, "/" + BindOptions.Com3);
     });
     HotkeyComponent.ActionDict.Add("_Com4", delegate
     {
         ChatManager.sendChat(EChatMode.GLOBAL, "/" + BindOptions.Com4);
     });
     HotkeyComponent.ActionDict.Add("_Com5", delegate
     {
         ChatManager.sendChat(EChatMode.GLOBAL, "/" + BindOptions.Com5);
     });
     HotkeyComponent.ActionDict.Add("_AutoPickUp", delegate
     {
         ItemOptions.AutoItemPickup = !ItemOptions.AutoItemPickup;
     });
 }
Ejemplo n.º 6
0
        public void AddDefaultEntries(StyleViewModel svm)
        {
            // Get the cost data and find initial values for the Finishing Labor & Packaging Costs. Both are based on the style's jewelry type
            decimal flPrice   = 0;
            decimal packPrice = 0;

            JewelryType jt = db.JewelryTypes.Where(j => svm.CompanyId == j.CompanyId).FirstOrDefault();

            if (jt != null)
            {
                flPrice   = jt.FinishingCost;
                packPrice = jt.PackagingCost;
            }

            // Add 2 Fixed Labor entries and 1 Fixed Misc entry
            LaborComponent lc = new LaborComponent
            {
                Id    = -1,
                Name  = StyleViewModel.FinishingLaborName,
                State = LMState.Fixed,
                PPP   = flPrice,
                Qty   = 1,
                Total = flPrice
            };

            svm.Labors.Add(lc);
            MiscComponent mc = new MiscComponent
            {
                Id    = -1,
                Name  = StyleViewModel.PackagingName,
                State = SVMStateEnum.Fixed,
                PPP   = packPrice,
                Qty   = 1,
                Total = packPrice
            };

            svm.Miscs.Add(mc);
        }
Ejemplo n.º 7
0
 // Token: 0x06000269 RID: 617 RVA: 0x00017A0C File Offset: 0x00015C0C
 public static void Tab()
 {
     Prefab.ScrollView(new Rect(0f, 0f, 466f, 436f), "Прочее", ref StatsTab.ScrollPos, delegate()
     {
         bool flag = MiscTab.cb == EEngine.CAR;
         if (flag)
         {
             MiscTab.car = "Машина";
         }
         else
         {
             bool flag2 = MiscTab.cb == EEngine.PLANE;
             if (flag2)
             {
                 MiscTab.car = "Самолёт";
             }
             else
             {
                 bool flag3 = MiscTab.cb == EEngine.HELICOPTER;
                 if (flag3)
                 {
                     MiscTab.car = "Вертолёт";
                 }
                 else
                 {
                     bool flag4 = MiscTab.cb == EEngine.BLIMP;
                     if (flag4)
                     {
                         MiscTab.car = "Дирижабль";
                     }
                     else
                     {
                         bool flag5 = MiscTab.cb == EEngine.TRAIN;
                         if (flag5)
                         {
                             MiscTab.car = "Поезд";
                         }
                     }
                 }
             }
         }
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.BeginVertical(new GUILayoutOption[]
         {
             GUILayout.Width(230f)
         });
         Prefab.Toggle("Для транспорта", ref MiscOptions.EnVehicle, 17);
         bool enVehicle = MiscOptions.EnVehicle;
         if (enVehicle)
         {
             Prefab.Toggle("Полёт транспорта", ref MiscOptions.VehicleFly, 17);
             bool vehicleFly = MiscOptions.VehicleFly;
             bool flag6      = vehicleFly;
             if (flag6)
             {
                 Prefab.Toggle("Максимальная скорость", ref MiscOptions.VehicleUseMaxSpeed, 17);
                 bool flag7 = !MiscOptions.VehicleUseMaxSpeed;
                 bool flag8 = flag7;
                 if (flag8)
                 {
                     GUILayout.Space(2f);
                     GUILayout.Label("Множитель скорости: " + MiscOptions.SpeedMultiplier + "x", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
                     GUILayout.Space(2f);
                     MiscOptions.SpeedMultiplier = (float)System.Math.Round((double)Prefab.Slider(0f, 10f, MiscOptions.SpeedMultiplier, 175), 2);
                     GUILayout.Space(4f);
                 }
             }
             GUILayout.Space(2f);
             GUILayout.Label("_________________________", Prefab._TextStyle, new GUILayoutOption[0]);
         }
         Prefab.Toggle("Быстрое снятия строений", ref MiscOptions.CustomSalvageTime, 17);
         Prefab.Toggle("Постройка в препядствиях", ref MiscOptions.BuildinObstacles, 17);
         Prefab.Toggle("Время суток", ref MiscOptions.SetTimeEnabled, 17);
         Prefab.Toggle("Зависание", ref MiscOptions.hang, 17);
         bool noMovementVerification = MiscOptions.NoMovementVerification;
         bool flag11 = noMovementVerification;
         if (flag11)
         {
             Prefab.Toggle("Полёт игрока", ref MiscOptions.PlayerFlight, 17);
             bool playerFlight = MiscOptions.PlayerFlight;
             bool flag12       = playerFlight;
             if (flag12)
             {
                 GUILayout.Label("Множитель скорости: " + MiscOptions.FlightSpeedMultiplier + "x", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
                 GUILayout.Space(2f);
                 MiscOptions.FlightSpeedMultiplier = (float)System.Math.Round((double)Prefab.Slider(0f, 10f, MiscOptions.FlightSpeedMultiplier, 175), 2);
             }
         }
         Prefab.Toggle("Дальность удара", ref MiscOptions.PunchSilentAim, 17);
         bool punchSilentAim = MiscOptions.PunchSilentAim;
         if (punchSilentAim)
         {
             MiscOptions.ExtendMeleeRange = true;
         }
         else
         {
             MiscOptions.ExtendMeleeRange = false;
         }
         GUILayout.EndVertical();
         GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
         bool flag13 = Provider.isConnected && OptimizationVariables.MainPlayer != null;
         bool flag14 = flag13;
         if (flag14)
         {
             bool flag15 = !OptimizationVariables.MainPlayer.look.isOrbiting;
             bool flag16 = flag15;
             if (flag16)
             {
                 OptimizationVariables.MainPlayer.look.orbitPosition = Vector3.zero;
             }
             Prefab.Toggle("Свободная камера", ref MiscOptions.Freecam, 17);
         }
         Prefab.Toggle("Краш сервера", ref ServerCrashThread.ServerCrashEnabled, 17);
         Prefab.Toggle("Авто краш сервера", ref ServerCrashThread.AlwaysCrash, 17);
         Prefab.Toggle("Автопроверка движения", ref MiscOptions.AlwaysCheckMovementVerification, 17);
         bool isConnected = Provider.isConnected;
         bool flag20      = isConnected;
         if (flag20)
         {
             bool flag21 = Prefab.Button("Проверить движение", 150f, 25f, Array.Empty <GUILayoutOption>());
             bool flag22 = flag21;
             if (flag22)
             {
                 MiscComponent.CheckMovementVerification();
             }
         }
         bool extendMeleeRange = MiscOptions.ExtendMeleeRange;
         bool flag23           = extendMeleeRange;
         if (flag23)
         {
             GUILayout.Space(2f);
             GUILayout.Label("Расстояние удара: " + MiscOptions.MeleeRangeExtension, Prefab._TextStyle, Array.Empty <GUILayoutOption>());
             GUILayout.Space(2f);
             MiscOptions.MeleeRangeExtension = (float)System.Math.Round((double)Prefab.Slider(0f, 7.5f, MiscOptions.MeleeRangeExtension, 175), 1);
         }
         GUILayout.Space(5f);
         bool setTimeEnabled = MiscOptions.SetTimeEnabled;
         if (setTimeEnabled)
         {
             GUILayout.Label("ТЕКУЩЕЕ ВРЕМЯ", Prefab._TextStyle, new GUILayoutOption[0]);
             GUILayout.Label("Время: " + MiscOptions.Time, Prefab._TextStyle, new GUILayoutOption[0]);
             GUILayout.Space(2f);
             MiscOptions.Time = (float)System.Math.Round((double)Prefab.Slider(0f, 0.9f, MiscOptions.Time, 175), 2);
             GUILayout.Space(8f);
         }
         GUILayout.Space(5f);
         bool customSalvageTime = MiscOptions.CustomSalvageTime;
         if (customSalvageTime)
         {
             GUILayout.Label("ВРЕМЯ СНЯТИЯ ПОСТРОЕК", Prefab._TextStyle, new GUILayoutOption[0]);
             GUILayout.Label("Время снятия: " + MiscOptions.SalvageTime + " секунда", Prefab._TextStyle, new GUILayoutOption[0]);
             GUILayout.Space(2f);
             MiscOptions.SalvageTime = (float)System.Math.Round((double)Prefab.Slider(0f, 10f, MiscOptions.SalvageTime, 175));
             bool flag24             = MiscOptions.SalvageTime == 0f;
             if (flag24)
             {
                 MiscOptions.SalvageTime = 1f;
             }
             GUILayout.Space(8f);
         }
         GUILayout.Space(5f);
         GUILayout.EndVertical();
         GUILayout.EndHorizontal();
     }, 20, Array.Empty <GUILayoutOption>());
     Prefab.MenuArea(new Rect(17f, 291f, 215f, 135f), "СПАМЕР", delegate
     {
         Prefab.Toggle("Включить", ref MiscOptions.SpammerEnabled, 17);
         GUILayout.Space(5f);
         MiscOptions.SpamText = Prefab.TextField(MiscOptions.SpamText, "Текст: ", 150);
         GUILayout.Space(10f);
         GUILayout.Label("Задержка: " + MiscOptions.SpammerDelay + "ms", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(5f);
         MiscOptions.SpammerDelay = (int)Prefab.Slider(0f, 10000f, (float)MiscOptions.SpammerDelay, 175);
     });
     Prefab.MenuArea(new Rect(235f, 271f, 221f, 155f), "Взаимодействия", delegate
     {
         Prefab.Toggle("Взаимодейвие через:", ref InteractionOptions.InteractThroughWalls, 17);
         bool flag  = !InteractionOptions.InteractThroughWalls;
         bool flag2 = !flag;
         if (flag2)
         {
             Prefab.Toggle("Стены/Полы/т.д.", ref InteractionOptions.NoHitStructures, 17);
             Prefab.Toggle("Сейфы/Двери/т.д.", ref InteractionOptions.NoHitBarricades, 17);
             Prefab.Toggle("Предметы", ref InteractionOptions.NoHitItems, 17);
             Prefab.Toggle("Транспорт", ref InteractionOptions.NoHitVehicles, 17);
             Prefab.Toggle("Ресурсы", ref InteractionOptions.NoHitResources, 17);
             Prefab.Toggle("Землю/Здания", ref InteractionOptions.NoHitEnvironment, 17);
         }
     });
 }
Ejemplo n.º 8
0
    public static void Tab()
    {
        Prefab.ScrollView(new Rect(0f, 0f, 466f, 436f), "Прочее", ref StatsTab.ScrollPos, delegate()
        {
            if (cb == EEngine.CAR)
            {
                car = "Машина";
            }
            else
            {
                if (cb == EEngine.PLANE)
                {
                    car = "Самолёт";
                }
                else
                {
                    if (cb == EEngine.HELICOPTER)
                    {
                        car = "Вертолёт";
                    }
                    else
                    {
                        if (cb == EEngine.BLIMP)
                        {
                            car = "Дирижабль";
                        }
                        else
                        {
                            if (cb == EEngine.TRAIN)
                            {
                                car = "Поезд";
                            }
                            else
                            {
                            }
                        }
                    }
                }
            }
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.BeginVertical(new GUILayoutOption[]
            {
                GUILayout.Width(230f)
            });
            Prefab.Toggle("Для транспорта", ref MiscOptions.EnVehicle, 17);
            if (MiscOptions.EnVehicle == true)
            {
                Prefab.Toggle("Полёт транспорта", ref MiscOptions.VehicleFly, 17);
                bool vehicleFly = MiscOptions.VehicleFly;
                if (vehicleFly)
                {
                    Prefab.Toggle("Максимальная скорость", ref MiscOptions.VehicleUseMaxSpeed, 17);
                    bool flag = !MiscOptions.VehicleUseMaxSpeed;
                    if (flag)
                    {
                        GUILayout.Space(2f);
                        GUILayout.Label("Множитель скорости: " + MiscOptions.SpeedMultiplier + "x", Prefab._TextStyle, new GUILayoutOption[0]);
                        GUILayout.Space(2f);
                        MiscOptions.SpeedMultiplier = (float)System.Math.Round(Prefab.Slider(0f, 10f, MiscOptions.SpeedMultiplier, 175), 2);
                        GUILayout.Space(4f);
                    }
                }
                GUILayout.Space(2f);
                GUILayout.Space(2f);
                if (Prefab.Button("Заправить машину", 200f, 25f, new GUILayoutOption[0]))
                {
                    InteractableVehicle vehicle1 = Player.player.movement.getVehicle();
                    if (vehicle1 != null)
                    {
                        vehicle1.askFillFuel(2000);
                    }
                }
                GUILayout.Space(2f);
                if (Prefab.Button("Проезд сквозь объекты" + MoreMiscTab.a(lb), 200f, 25f, new GUILayoutOption[0]))
                {
                    g();
                }
                GUILayout.Label("_________________________", Prefab._TextStyle, new GUILayoutOption[0]);
            }
            Prefab.Toggle("Быстрое снятия строений", ref MiscOptions.CustomSalvageTime, 17);
            Prefab.Toggle("Постройка в препядствиях", ref MiscOptions.BuildinObstacles, 17);
            Prefab.Toggle("Время суток", ref MiscOptions.SetTimeEnabled, 17);
            Prefab.Toggle("Зависание", ref MiscOptions.hang, 17);
            bool noMovementVerification = MiscOptions.NoMovementVerification;
            if (noMovementVerification)
            {
                Prefab.Toggle("Полёт игрока", ref MiscOptions.PlayerFlight, 17);
                bool playerFlight = MiscOptions.PlayerFlight;
                if (playerFlight)
                {
                    GUILayout.Label("Множитель скорости: " + MiscOptions.FlightSpeedMultiplier + "x", Prefab._TextStyle, new GUILayoutOption[0]);
                    GUILayout.Space(2f);
                    MiscOptions.FlightSpeedMultiplier = (float)System.Math.Round(Prefab.Slider(0f, 10f, MiscOptions.FlightSpeedMultiplier, 175), 2);
                }
            }

            Prefab.Toggle("Дальность удара", ref MiscOptions.PunchSilentAim, 17);
            if (MiscOptions.PunchSilentAim)
            {
                MiscOptions.ExtendMeleeRange = true;
            }
            else
            {
                MiscOptions.ExtendMeleeRange = false;
            }
            GUILayout.Space(5f);


            GUILayout.EndVertical();
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            bool flag2 = Provider.isConnected && OptimizationVariables.MainPlayer != null;
            if (flag2)
            {
                bool flag3 = !OptimizationVariables.MainPlayer.look.isOrbiting;
                if (flag3)
                {
                    OptimizationVariables.MainPlayer.look.orbitPosition = Vector3.zero;
                }
                Prefab.Toggle("Свободная камера", ref MiscOptions.Freecam, 17);
                bool isOrbiting = OptimizationVariables.MainPlayer.look.isOrbiting;
                if (isOrbiting)
                {
                    bool flag4 = Prefab.Button("Вернуть камеру", 150f, 25f, new GUILayoutOption[0]);
                    if (flag4)
                    {
                        OptimizationVariables.MainPlayer.look.orbitPosition = Vector3.zero;
                    }
                }
            }
            Prefab.Toggle("Автопроверка движения", ref MiscOptions.AlwaysCheckMovementVerification, 17);
            bool isConnected = Provider.isConnected;
            if (isConnected)
            {
                bool flag5 = Prefab.Button("Проверить движение", 150f, 25f, new GUILayoutOption[0]);
                if (flag5)
                {
                    MiscComponent.CheckMovementVerification();
                }
            }
            bool extendMeleeRange = MiscOptions.ExtendMeleeRange;
            if (extendMeleeRange)
            {
                GUILayout.Space(2f);
                GUILayout.Label("Расстояние удара: " + MiscOptions.MeleeRangeExtension, Prefab._TextStyle, new GUILayoutOption[0]);
                GUILayout.Space(2f);
                MiscOptions.MeleeRangeExtension = (float)System.Math.Round(Prefab.Slider(0f, 7.5f, MiscOptions.MeleeRangeExtension, 175), 1);
            }
            GUILayout.Space(5f);
            if (MiscOptions.SetTimeEnabled)
            {
                GUILayout.Label("ТЕКУЩЕЕ ВРЕМЯ", Prefab._TextStyle, new GUILayoutOption[0]);
                GUILayout.Label("Время: " + MiscOptions.Time, Prefab._TextStyle, new GUILayoutOption[0]);
                GUILayout.Space(2f);
                MiscOptions.Time = (float)System.Math.Round(Prefab.Slider(0f, 0.9f, MiscOptions.Time, 175), 2);
                GUILayout.Space(8f);
            }
            GUILayout.Space(5f);
            if (MiscOptions.CustomSalvageTime)
            {
                GUILayout.Label("ВРЕМЯ СНЯТИЯ ПОСТРОЕК", Prefab._TextStyle, new GUILayoutOption[0]);
                GUILayout.Label("Время снятия: " + MiscOptions.SalvageTime + " секунда", Prefab._TextStyle, new GUILayoutOption[0]);
                GUILayout.Space(2f);
                MiscOptions.SalvageTime = (float)System.Math.Round(Prefab.Slider(0f, 10f, MiscOptions.SalvageTime, 175));
                if (MiscOptions.SalvageTime == 0)
                {
                    MiscOptions.SalvageTime = 1;
                }
                GUILayout.Space(8f);
            }
            GUILayout.Space(5f);
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
        });
        Prefab.MenuArea(new Rect(17f, 291f, 215f, 135f), "СПАМЕР", delegate
        {
            Prefab.Toggle("Включить", ref MiscOptions.SpammerEnabled, 17);
            GUILayout.Space(5f);
            MiscOptions.SpamText = Prefab.TextField(MiscOptions.SpamText, "Текст: ", 150);
            GUILayout.Space(10f);
            GUILayout.Label("Задержка: " + MiscOptions.SpammerDelay + "ms", Prefab._TextStyle, new GUILayoutOption[0]);
            GUILayout.Space(5f);
            MiscOptions.SpammerDelay = (int)Prefab.Slider(0f, 10000f, MiscOptions.SpammerDelay, 175);
        });
        Prefab.MenuArea(new Rect(235f, 271f, 221f, 155f), "Взаимодействия", delegate
        {
            Prefab.Toggle("Взаимодейвие через:", ref InteractionOptions.InteractThroughWalls, 17);
            bool flag6 = !InteractionOptions.InteractThroughWalls;
            if (!flag6)
            {
                Prefab.Toggle("Стены/Полы/т.д.", ref InteractionOptions.NoHitStructures, 17);
                Prefab.Toggle("Сейфы/Двери/т.д.", ref InteractionOptions.NoHitBarricades, 17);
                Prefab.Toggle("Предметы", ref InteractionOptions.NoHitItems, 17);
                Prefab.Toggle("Транспорт", ref InteractionOptions.NoHitVehicles, 17);
                Prefab.Toggle("Ресурсы", ref InteractionOptions.NoHitResources, 17);
                Prefab.Toggle("Землю/Здания", ref InteractionOptions.NoHitEnvironment, 17);
            }
        });
    }
 public static void CheckMovementVerification()
 {
     MiscComponent.Instance.StartCoroutine(MiscComponent.CheckVerification(OptimizationVariables.MainPlayer.transform.position));
 }