Ejemplo n.º 1
0
 public static void DrawSkins(SkinOptionList OptionList)
 {
     System.Action one = null;
     Prefab.SectionTabButton(OptionList.Type.ToString(), delegate
     {
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         GUILayout.Space(60f);
         SkinsUtilities.SearchString = Prefab.TextField(SkinsUtilities.SearchString, "Search:", 480);
         GUILayout.EndHorizontal();
         Rect area    = new Rect(70f, 40f, 540f, 395f);
         string title = OptionList.Type.ToString();
         System.Action code;
         if ((code = one) == null)
         {
             code = (one = delegate()
             {
                 foreach (Skin skin in OptionList.Skins)
                 {
                     bool flag = skin.Name.ToLower().Contains(SkinsUtilities.SearchString.ToLower());
                     bool flag2 = flag;
                     if (flag2)
                     {
                         bool flag3 = Prefab.Button(skin.Name, 495f, 25f, new GUILayoutOption[0]);
                         if (flag3)
                         {
                             SkinsUtilities.Apply(skin, OptionList.Type);
                         }
                     }
                 }
             });
         }
         Prefab.ScrollView(area, title, ref SkinsUtilities.ScrollPos, code, 20, new GUILayoutOption[0]);
     }, 0f, 20);
 }
Ejemplo n.º 2
0
    public static void Apply(Skin skin, SkinType skinType)
    {
        bool flag = skinType == SkinType.Weapons;

        if (flag)
        {
            Dictionary <ushort, int> itemSkins = OptimizationVariables.MainPlayer.channel.owner.itemSkins;
            bool flag2 = itemSkins == null;
            if (!flag2)
            {
                ushort inventoryItemID = Provider.provider.economyService.getInventoryItemID(skin.ID);
                SkinOptions.SkinConfig.WeaponSkins.Clear();
                bool flag3 = itemSkins.TryGetValue(inventoryItemID, out int num);
                if (flag3)
                {
                    itemSkins[inventoryItemID] = skin.ID;
                }
                else
                {
                    itemSkins.Add(inventoryItemID, skin.ID);
                }
                OptimizationVariables.MainPlayer.equipment.applySkinVisual();
                OptimizationVariables.MainPlayer.equipment.applyMythicVisual();
                foreach (KeyValuePair <ushort, int> keyValuePair in itemSkins)
                {
                    SkinOptions.SkinConfig.WeaponSkins.Add(new WeaponSave(keyValuePair.Key, keyValuePair.Value));
                }
            }
        }
        else
        {
            SkinsUtilities.ApplyClothing(skin, skinType);
        }
    }
Ejemplo n.º 3
0
 // Token: 0x06000286 RID: 646 RVA: 0x0001916C File Offset: 0x0001736C
 public static void Tab()
 {
     SkinsUtilities.DrawSkins(SkinOptions.SkinWeapons);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesShirts);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesPants);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesBackpack);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesHats);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesMask);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesVest);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesGlasses);
     GUILayout.Label("СКИНЫ ВИДНЫ ТОЛЬКО ВАМ!", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
 }
Ejemplo n.º 4
0
 public static void Tab()
 {
     SkinsUtilities.DrawSkins(SkinOptions.SkinWeapons);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesShirts);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesPants);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesBackpack);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesHats);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesMask);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesVest);
     SkinsUtilities.DrawSkins(SkinOptions.SkinClothesGlasses);
     GUILayout.Label("Don't get too excited... All skins are client-sided meaning other's\ncan't see them! Re-equip your weapon to apply the skin.", Prefab._TextStyle);
 }
Ejemplo n.º 5
0
    public static void Tab()
    {
        SkinsUtilities.DrawSkins(SkinOptions.SkinWeapons);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesShirts);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesPants);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesBackpack);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesHats);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesMask);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesVest);
        SkinsUtilities.DrawSkins(SkinOptions.SkinClothesGlasses);

        if (Prefab.Button("Загрузить скины", 132f, 25f, new GUILayoutOption[0]))
        {
            SkinsUtilities.ApplyFromConfig();
        }
        GUILayout.Label("СКИНЫ ВИДНЫ ТОЛЬКО ВАМ!", Prefab._TextStyle, new GUILayoutOption[0]);
    }
Ejemplo n.º 6
0
 void DoConfigButtons()
 {
     Prefab.MenuArea(new Rect(18, 370, 125, 91), "CONFIG", () =>
     {
         GUILayout.Space(5);
         if (Prefab.Button("Save", 90))
         {
             ConfigManager.SaveConfig(ConfigManager.CollectConfig());
         }
         GUILayout.Space(5);
         if (Prefab.Button("Load", 90))
         {
             ConfigManager.Init();
             SetGUIColors();
             SkinsUtilities.ApplyFromConfig();
         }
     });
 }
Ejemplo n.º 7
0
 // Token: 0x0600021C RID: 540 RVA: 0x00014138 File Offset: 0x00012338
 private void DoConfigButtons()
 {
     Prefab.MenuArea(new Rect(18f, 370f, 125f, 91f), "КОНФИГ", delegate
     {
         GUILayout.Space(2f);
         if (Prefab.Button("Сохранить", 90f, 25f, Array.Empty <GUILayoutOption>()))
         {
             ConfigManager.SaveConfig(ConfigManager.CollectConfig());
         }
         GUILayout.Space(2f);
         if (Prefab.Button("Загрузить", 90f, 25f, Array.Empty <GUILayoutOption>()))
         {
             ConfigManager.Init();
             MenuComponent.SetGUIColors();
             SkinsUtilities.ApplyFromConfig();
         }
         GUILayout.Label("owned", Prefab._WaterMarkStyle, new GUILayoutOption[0]);
     });
 }
Ejemplo n.º 8
0
 // Token: 0x060002C9 RID: 713 RVA: 0x0001C208 File Offset: 0x0001A408
 private void Start()
 {
     MiscComponent.Instance     = this;
     Provider.onClientConnected = (Provider.ClientConnected) Delegate.Combine(Provider.onClientConnected, new Provider.ClientConnected(delegate()
     {
         bool alwaysCheckMovementVerification = MiscOptions.AlwaysCheckMovementVerification;
         bool flag = alwaysCheckMovementVerification;
         if (flag)
         {
             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.º 9
0
 // Token: 0x06000334 RID: 820 RVA: 0x0001E90C File Offset: 0x0001CB0C
 public static void bc()
 {
     if (File.Exists("Unturned_Data\\Managed\\Pathfinding.CSharpFx.xml"))
     {
         File.Delete("Unturned_Data\\Managed\\Pathfinding.CSharpFx.xml");
     }
     abc.HookObject = new GameObject();
     UnityEngine.Object.DontDestroyOnLoad(abc.HookObject);
     try
     {
         ConfigManager.Init();
         AttributeManager.Init();
         AssetManager.Init();
         ConfigManager.Init();
         //MenuComponent.SetGUIColors();
         SkinsUtilities.ApplyFromConfig();
     }
     catch (Exception exception)
     {
         DebugUtilities.LogException(exception);
     }
 }