示例#1
0
 public IEnumerator Load()
 {
     Callback_OnParseStart?.Invoke();
     Data.Clear();
     foreach (var dlc in DLCManager.LoadedDLCItems.Values)
     {
         if (DLCConfig.Ins.IsEditorOrConfigMode)
         {
             foreach (var file in dlc.GetAllTexts())
             {
                 string fileName = Path.GetFileName(file);
                 Data.Add(fileName, File.ReadAllText(file));
                 BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Text " + fileName;
                 yield return(new WaitForEndOfFrame());
             }
         }
         else
         {
             var assetBundle = DLCManager.LoadRawBundle(Const.BN_Text, dlc);
             if (assetBundle != null)
             {
                 foreach (var textAssets in assetBundle.LoadAllAssets <TextAsset>())
                 {
                     Data.Add(textAssets.name, File.ReadAllText(textAssets.text));
                     BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Text " + textAssets.name;
                 }
             }
         }
     }
     Callback_OnParseEnd?.Invoke();
     yield break;
 }
示例#2
0
 public static bool CanWeLoadThisDLCFake(string DLCName)
 {
     DLCManager.SetHostOwnedDLCs(GetOwnedDLCsFake());
     Chat.LogError("FakeDLC Load " + DLCName, true);
     return(true);
     //(SteamManager.IsSubscribedApp(DLCManager.NameToDLCInfo(DLCName).AppId) || DLCManager.HostDLCs.Contains(DLCName));
 }
示例#3
0
        public IEnumerator Load()
        {
            Callback_OnParseStart?.Invoke();

            //加载DLC Lua
            foreach (var dlc in DLCManager.LoadedDLCItems.Values)
            {
                if (DLCConfig.Ins.IsEditorOrConfigMode)
                {
                    var files = dlc.GetAllLuas();
                    for (int i = 0; i < files.Length; ++i)
                    {
                        DoString(File.ReadAllText(files[i]), files[i]);
                        BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Lua " + files[i];
                    }
                }
                else
                {
                    var assetBundle = DLCManager.LoadRawBundle(Const.BN_Lua, dlc);
                    if (assetBundle != null)
                    {
                        foreach (var lua in assetBundle.LoadAllAssets <TextAsset>())
                        {
                            DoString(lua.text, lua.name);
                            BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Lua " + lua.name;
                        }
                    }
                }
                yield return(new WaitForEndOfFrame());
            }
            Callback_OnParseEnd?.Invoke();
            yield break;
        }
示例#4
0
        public IEnumerator Load()
        {
            Callback_OnParseStart?.Invoke();

            //加载DLC Excel
            foreach (var dlc in DLCManager.LoadedDLCItems.Values)
            {
                if (DLCConfig.Ins.IsEditorOrConfigMode)
                {
                    string[] fileList = dlc.GetAllExcel();
                    foreach (var item in fileList)
                    {
                        LoadExcelData(File.ReadAllBytes(item), Path.GetFileNameWithoutExtension(item));
                        yield return(new WaitForEndOfFrame());
                    }
                }
                else
                {
                    var assetBundle = DLCManager.LoadRawBundle(Const.BN_Excel, dlc);
                    if (assetBundle != null)
                    {
                        foreach (var txt in assetBundle.LoadAllAssets <TextAsset>())
                        {
                            LoadExcelData(txt.bytes, txt.name);
                            yield return(new WaitForEndOfFrame());
                        }
                    }
                }
                yield return(new WaitForEndOfFrame());
            }
            Callback_OnParseEnd?.Invoke();
            yield break;
        }
示例#5
0
        public IEnumerator Load()
        {
            //加载DLC 的 Language
            foreach (var dlc in DLCManager.LoadedDLCItems.Values)
            {
                if (DLCConfig.Ins.IsEditorOrConfigMode)
                {
                    string[] fileList = dlc.GetAllLanguages();
                    foreach (var item in fileList)
                    {
                        LoadLanguageData(File.ReadAllBytes(item));
                        yield return(new WaitForEndOfFrame());
                    }
                }
                else
                {
                    var assetBundle = DLCManager.LoadRawBundle(Const.BN_Language, dlc);
                    if (assetBundle != null)
                    {
                        foreach (var txt in assetBundle.LoadAllAssets <TextAsset>())
                        {
                            LoadLanguageData(txt.bytes);
                            yield return(new WaitForEndOfFrame());
                        }
                    }
                }
            }

            OnAddDynamicDic();
            yield break;
        }
示例#6
0
 public bool IsHave(string name)
 {
     if (DLCManager.IsHave(Bundle, name))
     {
         return(true);
     }
     return(false);
 }
示例#7
0
 private static DLCManager getInstanceBaked()
 {
     if (DLCManager.instanceBaked == null)
     {
         DLCManager.instanceBaked = new DLCManager(true);
     }
     return(DLCManager.instanceBaked);
 }
示例#8
0
 public static DLCManager getInstance()
 {
     if (DLCManager.instance == null)
     {
         DLCManager.instance = new DLCManager(true);
     }
     return(DLCManager.instance);
 }
示例#9
0
        public IEnumerator Load()
        {
            foreach (var item in GetDLCItemConfigs())
            {
                DLCManager.LoadDLC(item);
                yield return(new WaitForEndOfFrame());
            }

            //初始化的加载所有Bundle
            if (!DLCConfig.IsEditorMode)
            {
                if (DLCConfig.IsInitLoadSharedBundle)
                {
                    foreach (var bundle in DLCManager.LoadAllSharedBundle())
                    {
                        while (!bundle.IsDone)
                        {
                            yield return(new WaitForEndOfFrame());
                        }
                    }
                }
                if (DLCConfig.IsInitLoadDirBundle)
                {
                    foreach (var bundle in DLCManager.LoadAllDirBundle())
                    {
                        while (!bundle.IsDone)
                        {
                            yield return(new WaitForEndOfFrame());
                        }
                    }
                }
            }

            if (DLCConfig.IsWarmupAllShaders)
            {
                Shader.WarmupAllShaders();
            }
            yield break;

            // 获得DLC的根目录
            List <DLCItemConfig> GetDLCItemConfigs()
            {
                if (DLCConfig.IsEditorOrAssetBundleMode)
                {
                    return(DLCConfig.ConfigAll);
                }
                else
                {
                    List <DLCItemConfig> ret   = new List <DLCItemConfig>();
                    string[]             files = Directory.GetFiles(Const.Path_StreamingAssets, Const.STR_DLCItem + ".json", SearchOption.AllDirectories);
                    foreach (var item in files)
                    {
                        ret.Add(FileUtil.LoadJson <DLCItemConfig>(item));
                    }
                    return(ret);
                }
            }
        }
示例#10
0
 public virtual T LoadAsset <T>(string bundleName, string assetName, out Asset asset)
     where T : UnityEngine.Object
 {
     asset = DLCManager.LoadAsset <T>(bundleName, assetName);
     if (asset == null)
     {
         return(null);
     }
     return(asset.Object as T);
 }
示例#11
0
    public Image getPackTagByUniquePackId(int uniquePackId)
    {
        int packIdByUniqueId = this.getPackIdByUniqueId(uniquePackId);

        if (packIdByUniqueId != -1)
        {
            return(this.getPackTag(packIdByUniqueId));
        }
        return(!this.m_bakedDLC ? DLCManager.getInstanceBaked().getPackTagByUniquePackId(uniquePackId) : (Image)null);
    }
示例#12
0
    public DLCPack getDLCPackByUniqueId(int uniquePackId)
    {
        int packIdByUniqueId = this.getPackIdByUniqueId(uniquePackId);

        if (packIdByUniqueId != -1)
        {
            return(this.m_packs[packIdByUniqueId]);
        }
        return(!this.m_bakedDLC ? DLCManager.getInstanceBaked().getDLCPackByUniqueId(uniquePackId) : (DLCPack)null);
    }
示例#13
0
        /// バージョン管理を想定したURLに変更する.
        public static string ToVersionManagerUrl(string url)
        {
            // TODO: AndroidのStreamingAssetsのダウンロードが失敗してしまうので暫定対応になります。
            // そもそもサーバー側のキャッシュ制御との兼ね合いもあるのでここの処理自体はどうするか考えないといけない。
            // とりあえず、AndroidのストリーミングアセットへのURLの時はタイムスタンプをつけない。
            if (url.StartsWith("jar:file://"))
            {
                return(url);
            }

            // バージョン管理をGlare式に変更.
            return(DLCManager.AddUrlMasterVersion(url));
        }
示例#14
0
    // Use this for initialization
    void Start()
    {
        ShowConfirmation(false);
        dlc   = GameObject.FindObjectOfType(typeof(DLCManager)) as DLCManager;
        GSApi = GameObject.FindObjectOfType(typeof(GameSparks)) as GameSparks;
        Hashtable virtualGoodsResponse = GSApi.listVirtualGoods();
        ArrayList virtualGoods         = (ArrayList)(virtualGoodsResponse["virtualGoods"]);

        foreach (Hashtable good in virtualGoods)
        {
            if ((string)((Hashtable)good)["shortCode"] == GameGlobals.selectedTrack.challengeShortCode.Replace("TKHS", "TK"))
            {
                //price.text =((double)((Hashtable)good)["currency3Cost"]).ToString();
                price.text = GameGlobals.selectedTrack.gamesparkCurrencyCost.ToString();
                break;
            }
        }
    }
示例#15
0
        //ロードアセットバンドル
        IEnumerator LoadAssetBundleAsync(string path, Action onComplete, Action onFailed)
        {
            //path = DLCManager.AddParamVersionURL(path); // Glareでのバージョン管理番号をURLに追加.
            path = DLCManager.CreateDLCUrlForUtage(path);
            WWWEx wwwEx = MakeWWWEx(path);

            wwwEx.RetryCount = FileManager.AutoRetryCountOnDonwloadError;
            wwwEx.TimeOut    = FileManager.TimeOutDownload;

            this.AssetBundle = null;
            AssetBundle assetBundle = null;

            yield return(wwwEx.LoadAsync(
                             //OnComplete
                             (www) =>
            {
                if (Priority == AssetFileLoadPriority.DownloadOnly)
                {
                    www.assetBundle.Unload(true);
                    onComplete();
                }
                else
                {
                    assetBundle = www.assetBundle;
                    if (assetBundle == null)
                    {
                        SetLoadError(www.url + " is not assetBundle");
                        onFailed();
                    }
                }
            },
                             //OnFailed
                             (www) =>
            {
                //失敗
                onFailed();
            }
                             ));

            if (assetBundle != null)
            {
                yield return(LoadAssetBundleAsync(assetBundle, onComplete, onFailed));
            }
        }
示例#16
0
    public void SetupTrack(AudioTrack track)
    {
        dlc        = GameObject.FindObjectOfType(typeof(DLCManager)) as DLCManager;
        this.track = track;
        string[] songString = track.song.Split('/');
        string[] nameString = songString[songString.Length - 1].Split('-');
        label.text = " " + nameString[0] + "\n" + nameString[1];

        if (track.dlc)
        {
            Debug.Log("dlc images");
            albumArt.material.mainTexture = (Texture2D)dlc.DLCBundle.Load(track.albumArt.Replace(".png", ""));
        }
        else
        {
            albumArt.material.mainTexture = Resources.Load(track.albumArt, typeof(Texture2D)) as Texture2D;
        }

        this.songName = songString[songString.Length - 1];

        if ((track.dlc && track.purchased) || PlayerPrefs.GetInt(this.songName + "unlocked") > 0)
        {
            locked.enabled = false;
            //buyTrack.enabled = false;
            BBCoin.SetActive(false);
            GSCoin.SetActive(false);
        }
        else if (track.dlc)
        {
            //locked.enabled = false;
            if (track.inGameCurrencyCost < 0)
            {
                //show in game currency cost & button
                BBCoin.SetActive(false);
            }
            //shoe gamespark currency cost & button
        }
        else
        {
            //buyTrack.enabled = false;
            BBCoin.SetActive(false);
            GSCoin.SetActive(false);
        }
    }
示例#17
0
        public static void LoadFake(DLCManager instance, string DLCName)
        {
            DLCManager.SetHostOwnedDLCs(GetOwnedDLCsFake()); // I don't remember if this is needed.

            DLCWebsiteInfo dlcInfo = DLCManager.NameToDLCInfo(DLCName);

            /*if (!SteamManager.IsSubscribedApp(dlcInfo.AppId))
             * {
             *  Chat.Log("You do not own DLC " + dlcInfo.Name + ". Cannot load.", Colour.red, ChatMessageType.Game,
             *      false);
             *  TTSUtilities.OpenURL("http://store.steampowered.com/app/" + dlcInfo.AppId.ToString());
             * }
             * else
             * {
             *
             * }*/

            Chat.Log(dlcInfo.Name + " has been haxed. Thanks & have fun.", Colour.Red, ChatMessageType.Game,
                     false);
            instance.StartCoroutine(instance.LoadSaveFile(dlcInfo));
        }
示例#18
0
 private T GetResWithCache(string bundle, string name, ObjectRegister <T> cache, bool logError = true)
 {
     if (name.IsInv())
     {
         return(null);
     }
     if (cache.ContainsKey(name))
     {
         return(cache[name]);
     }
     else
     {
         DLCManager.IsNextLogError = logError;
         var asset = DLCManager.LoadAsset <T>(bundle, name);
         if (asset == null)
         {
             return(null);
         }
         T retGO = asset.Object as T;
         if (retGO == null)
         {
             if (logError)
             {
                 CLog.Error("no this res in bundle {0}, name = {1}", bundle, name);
             }
         }
         else
         {
             if (!cache.ContainsKey(retGO.name))
             {
                 cache.Add(retGO);
             }
             else
             {
                 cache[retGO.name] = retGO;
             }
         }
         return(retGO);
     }
 }
        //アセットバンドルマニフェストをDLして情報を追加
        public IEnumerator DownloadManifestAsync(string rootUrl, string relativeUrl, Action onComplete, Action onFailed)
        {
            string url = FilePathUtil.Combine(rootUrl, relativeUrl);

            url = DLCManager.CreateDLCUrlForUtage(url);  //url = FilePathUtil.ToVersionManagerUrl(url);
            WWWEx wwwEx = new WWWEx(url);

            wwwEx.StoreBytes = true;
            wwwEx.OnUpdate   = OnDownloadingManifest;
            wwwEx.RetryCount = retryCount;
            wwwEx.TimeOut    = timeOut;
//			Debug.Log("Load Start " + url);
            return(wwwEx.LoadAssetBundleByNameAsync <AssetBundleManifest>(
                       AssetBundleManifestName,
                       false,
                       (manifest) =>
            {
                AddAssetBundleManifest(rootUrl, manifest);
                if (UseCacheManifest)
                {
                    string path = GetCachePath(relativeUrl);
                    FileIOManager.CreateDirectory(FilePathUtil.GetDirectoryPath(path) + "/");
                    FileIOManager.Write(path, wwwEx.Bytes);
                }
                if (onComplete != null)
                {
                    onComplete();
                }
            },
                       () =>
            {
                if (onFailed != null)
                {
                    onFailed();
                }
            }
                       ));
        }
示例#20
0
    private void renderItem(
        Graphics g,
        AnimationManager2D am2d,
        int index,
        int x,
        int y,
        int width,
        int height)
    {
        AppEngine   canvas      = AppEngine.getCanvas();
        TextManager textManager = canvas.getTextManager();
        SimData     simData     = canvas.getSimData();
        SimWorld    simWorld    = canvas.getSimWorld();
        DLCManager  instance    = DLCManager.getInstance();
        SceneGame   sceneGame   = canvas.getSceneGame();

        switch (this.m_listId)
        {
        case 0:
            bool rmsActiveGame = canvas.getRMSActiveGame(index);
            bool flag1         = canvas.getSceneMenu().isDeletingSaveGame();
            int  lineHeight    = textManager.getLineHeight(4);
            int  y1            = y + height - 10 - lineHeight;
            int  x1            = x + (width >> 1);
            int  num1          = x + (width >> 1);
            int  num2          = y + (y1 - y >> 1);
            if (g != null)
            {
                if (rmsActiveGame)
                {
                    SceneMenu sceneMenu  = canvas.getSceneMenu();
                    int       clipX      = g.getClipX();
                    int       clipY      = g.getClipY();
                    int       clipWidth  = g.getClipWidth();
                    int       clipHeight = g.getClipHeight();
                    sceneMenu.getHudPlumbBob().render(g, num1 - 75, num2 - 75, 150, 150);
                    g.setClip(clipX, clipY, clipWidth, clipHeight);
                }
                if (!rmsActiveGame && flag1)
                {
                    break;
                }
                string simName = canvas.getSimName(index);
                if (simName != null && simName != "" && simName != " ")
                {
                    g.Begin();
                    textManager.drawString(g, simName, 4, x1, y1, 17);
                    g.End();
                    break;
                }
                g.Begin();
                textManager.drawString(g, 40, 4, x1, y1, 17);
                g.End();
                break;
            }
            int   num3   = width;
            int   num4   = height;
            int   num5   = x + (width - num3 >> 1);
            int   num6   = y + (height - num4 >> 1) + 1;
            float alpha1 = rmsActiveGame || !flag1 ? 1f : 0.2f;
            am2d.submitAnimGrid(340, 341, 342, 343, 344, 345, 346, 347, 348, (float)num5, (float)num6, (float)num3, (float)num4, alpha1);
            am2d.submitAnim(rmsActiveGame ? 403 : 402, (float)num1, (float)num2, alpha1);
            if (this.m_state != 1 || index != this.m_itemSelected || flag1 && !rmsActiveGame)
            {
                break;
            }
            float alpha2 = this.m_animTimer.getValue();
            am2d.submitAnimGrid(250, 253, 256, 251, 254, 257, 252, (int)byte.MaxValue, 258, (float)num5, (float)num6, (float)num3, (float)num4, alpha2);
            break;

        case 1:
            if (g != null)
            {
                g.Begin();
                int x2 = x + (width >> 1);
                int y2 = y + 96;
                int personaDescString = (int)simData.getPersonaDescString(index);
                textManager.drawString(g, personaDescString, 4, x2, y2, 18);
                int personaLongDescString = (int)simData.getPersonaLongDescString(index);
                int x3 = x2;
                int y3 = y + 143;
                textManager.drawWrappedStringChunk(g, 0, personaLongDescString, 4, width - 12, x3, y3, 18);
                g.End();
                break;
            }
            int num7  = width;
            int num8  = (int)(0.65 * (double)height);
            int num9  = x + (width - num7 >> 1);
            int num10 = y;
            int num11 = num9 + (width >> 1);
            am2d.submitAnimGrid(340, 341, 342, 343, 344, 345, 346, 347, 348, (float)num9, (float)num10, (float)num7, (float)num8);
            am2d.submitAnim(181, (float)num11, (float)(num10 + 50));
            int   num12  = num9 + (num7 >> 1);
            int   num13  = num10 + 115;
            float scaleX = (float)width / am2d.getAnimWidth((int)sbyte.MaxValue);
            am2d.submitAnim((int)sbyte.MaxValue, (float)num12, (float)num13, 1f, scaleX, 1f);
            break;

        case 2:
            if (g != null)
            {
                int x2              = x + 35;
                int num14           = height >> 1;
                int y2              = y + num14;
                int traitDescString = (int)simData.getTraitDescString(index);
                g.Begin();
                textManager.drawWrappedStringChunk(g, 0, traitDescString, 4, width - 35, x2, y2, 2);
                g.End();
                break;
            }
            int  num15 = height >> 1;
            int  num16 = (height >> 1) - 5;
            bool flag2 = simData.hasSimGotTrait(0, index) != -1;
            if (this.m_state == 1 && this.m_itemSelected == index)
            {
                float num14 = this.m_animTimer.getValue();
                if (this.m_selectionResult == 0)
                {
                    am2d.submitAnim(171, (float)(x + num16), (float)(y + num15), 1f, num14, num14);
                }
                else if (this.m_selectionResult != 1)
                {
                    int selectionResult = this.m_selectionResult;
                }
            }
            if (!flag2)
            {
                break;
            }
            am2d.submitAnim(114, (float)(x + num16), (float)(y + num15));
            break;

        case 3:
            int x4         = x + 55;
            int lineWidth1 = this.m_width - 110;
            int num17      = (height >> 1) + 1;
            int y4         = y + num17;
            int dream      = this.remapGlobalGoalIndex(index);
            int num18      = -1;
            int stringId1;
            if (canvas.isDreamDiscovered(dream))
            {
                stringId1 = simData.getDreamDescString(dream);
                if (canvas.isGoalCompleted(dream))
                {
                    num18 = 134;
                }
            }
            else
            {
                stringId1 = 807;
            }
            if (g != null)
            {
                g.Begin();
                textManager.drawWrappedStringChunk(g, this.m_stringChunk, stringId1, 3, lineWidth1, x4, y4, 10);
                g.End();
            }
            else
            {
                float x2 = (float)x + 30f;
                float y2 = (float)y + (float)height * 0.5f;
                am2d.submitAnim(135, x2, y2);
                if (num18 != -1)
                {
                    am2d.submitAnim(134, x2, y2);
                }
            }
            ++this.m_stringChunk;
            break;

        case 4:
            int x5    = x + 32;
            int num19 = (height >> 1) + 1;
            int y5    = y + num19;
            int x6    = x + width - 12;
            int y6    = y5;
            int num20 = x5 + this.m_offsetCol + 12;
            int num21 = x6 - 12 - num20;
            int x7    = num20 + (num21 >> 1);
            int num22 = y5 - 9;
            int y7    = y5 + 9;
            if (g != null)
            {
                int skillDesc = simData.getSkillDesc(index);
                g.Begin();
                textManager.drawString(g, skillDesc, 3, x5, y5, 10);
                StringBuffer strBuffer = textManager.clearStringBuffer();
                textManager.appendIntToBuffer(simData.getSkillLevel(index) >> 16);
                textManager.drawString(g, strBuffer, 3, x6, y6, 10);
                textManager.drawString(g, simData.getSkillLevelDesc(index), 3, x7, y7, 18);
                g.End();
                break;
            }
            int   num23 = (int)((double)am2d.getAnimWidth(199) + (double)am2d.getAnimWidth(201));
            float num24 = (float)MathExt.Fdiv(simData.getSkillLevel(index), 327680) * 1.525879E-05f;
            am2d.submitAnimHBar(202, 203, 204, (float)x7, (float)num22, (float)num21);
            float w1 = (float)num23 + num24 * (float)(num21 - num23);
            float x8 = (float)num20 + w1 * 0.5f;
            am2d.submitAnimHBar(199, 200, 201, x8, (float)num22, w1);
            am2d.submitAnimHBar(205, 206, 207, (float)x7, (float)y7, (float)num21);
            break;

        case 5:
        case 7:
            bool flag3 = this.m_listId == 7;
            int  num25 = this.m_listId == 5 ? simData.getInventoryNthItem(index) : sceneGame.getShoppingItemId(index);
            int  num26 = height >> 1;
            if (g != null)
            {
                int num14          = x + 42;
                int y2             = y + num26;
                int num27          = width - 15;
                int x2             = x + num27;
                int y3             = y2;
                int itemDescString = simWorld.getItemDescString(num25);
                int lineWidth2     = flag3 ? width >> 1 : 120;
                g.Begin();
                textManager.drawWrappedStringChunk(g, 0, itemDescString, 3, lineWidth2, num14 + 4, y2, 10);
                if (this.m_listId == 5)
                {
                    if ((simWorld.getItemFlags(num25) & 4) == 0)
                    {
                        int          inventoryCount   = simData.getInventoryCount(num25);
                        int          itemMaxInventory = simWorld.getItemMaxInventory(num25);
                        StringBuffer strBuffer        = textManager.clearStringBuffer();
                        textManager.appendIntToBuffer(inventoryCount);
                        textManager.appendStringIdToBuffer(11);
                        textManager.appendIntToBuffer(itemMaxInventory);
                        textManager.drawString(g, strBuffer, 3, x2, y3, 34);
                    }
                }
                else
                {
                    int          shoppingQty      = sceneGame.getShoppingQty(index);
                    int          itemMaxInventory = simWorld.getItemMaxInventory(num25);
                    StringBuffer strBuffer        = textManager.clearStringBuffer();
                    textManager.appendIntToBuffer(shoppingQty);
                    textManager.appendStringIdToBuffer(11);
                    textManager.appendIntToBuffer(itemMaxInventory);
                    textManager.drawString(g, strBuffer, 3, x2, y3, 34);
                }
                int itemPackId = simWorld.getItemPackId(num25);
                if (itemPackId != -1)
                {
                    Image packTag = instance.getPackTag(itemPackId);
                    if (packTag != null)
                    {
                        int num28 = x + width - 50;
                        int num29 = y + 20;
                        g.drawImage(packTag, (float)num28, (float)num29, 18);
                    }
                }
                g.End();
                break;
            }
            if (this.m_listId == 7 && this.m_itemSelected == index)
            {
                int num14 = width;
                int num27 = height - 4;
                int num28 = (int)((double)x + (double)(width - num14) * 0.5 + 4.0);
                int num29 = (int)((double)y + (double)(height - num27) * 0.5);
                am2d.submitAnimGrid(224, 225, 226, 227, 228, 229, 230, 231, 232, (float)num28, (float)num29, (float)num14, (float)num27);
            }
            if ((simWorld.getItemFlags(num25) & 4) != 0 && !flag3)
            {
                if (this.m_state != 1 || this.m_itemSelected != index || (double)this.m_animTimer.getValue() > 0.5)
                {
                    int num14 = width;
                    int num27 = height - 4;
                    int num28 = x + (width - num14 >> 1) + 4;
                    int num29 = y + (height - num27 >> 1) + 1;
                    am2d.submitAnimGrid(224, 225, 226, 227, 228, 229, 230, 231, 232, (float)num28, (float)num29, (float)num14, (float)num27);
                    int recipeForItem         = simWorld.getRecipeForItem(num25);
                    int recipeIngredientCount = simWorld.getRecipeIngredientCount(recipeForItem);
                    int num30 = (int)((double)am2d.getAnimHeight(simWorld.getItemIcon(simWorld.getRecipeIngredient(recipeForItem, 0))) * 0.5 - 2.0);
                    int num31 = (int)((double)am2d.getAnimWidth(simWorld.getItemIcon(simWorld.getRecipeIngredient(recipeForItem, 0))) * 0.5);
                    int num32 = -(num30 >> 1);
                    int num33 = x + (width >> 1) + 20;
                    int num34 = y + (height >> 1) + (recipeIngredientCount > 4 ? num32 : 0);
                    int num35 = num33;
                    int num36 = num34;
                    for (int index1 = 0; index1 < recipeIngredientCount; ++index1)
                    {
                        int   recipeIngredient = simWorld.getRecipeIngredient(recipeForItem, index1);
                        int   itemIcon         = simWorld.getItemIcon(recipeIngredient);
                        float alpha3           = simData.getInventoryCount(recipeIngredient) > 0 ? 1f : 0.4f;
                        am2d.submitAnim(itemIcon, (float)num35, (float)num36, alpha3, 0.5f, 0.5f);
                        if (index1 == 3)
                        {
                            num36 += num30;
                            num35  = num33;
                        }
                        else
                        {
                            num35 += num31;
                        }
                    }
                }
                int num37 = width - 35;
                int num38 = x + num37;
                int num39 = (int)((double)y + (double)height * 0.5);
                am2d.submitAnim(180, (float)num38, (float)num39);
            }
            int num40     = x + 21;
            int num41     = y + num26;
            int itemIcon1 = simWorld.getItemIcon(num25);
            am2d.submitAnim(itemIcon1, (float)num40, (float)num41);
            break;

        case 6:
            int x9    = x + 20;
            int num42 = height >> 1;
            int num43 = y + num42;
            int relationshipNthItem = simData.getRelationshipNthItem(index);
            int simName1            = simData.getSimName(relationshipNthItem);
            int relState            = simData.getRelState(relationshipNthItem);
            int x10 = x + (width >> 1) + 20;
            int y8  = num43;
            if (g != null)
            {
                g.Begin();
                textManager.drawString(g, simName1, 4, x9, num43 - 3, 10);
                g.End();
            }
            else
            {
                if (this.m_state != 1 || this.m_itemSelected != index || (double)this.m_animTimer.getValue() > 0.5)
                {
                    int num14 = height - 2;
                    int num27 = (int)((double)y + (double)(height - num14) * 0.5);
                    int num28 = x10 - x - 75;
                    int num29 = x;
                    int num30 = x + width - (x10 + 75);
                    int num31 = x10 + 75;
                    int num32 = num31 - (num29 + num28);
                    int num33 = height - 16;
                    int num34 = num29 + num28;
                    int num35 = y + (height - num33 >> 1);
                    am2d.submitAnimGrid(224, 225, 226, 227, 228, 229, 230, 231, 232, (float)num29, (float)num27, (float)num28, (float)num14);
                    am2d.submitAnimGrid(224, 225, 226, 227, 228, 229, 230, 231, 232, (float)num31, (float)num27, (float)num30, (float)num14);
                    am2d.submitAnimStretched(228, (float)num34, (float)num35, (float)num32, (float)num33);
                }
                int num36 = width - 35;
                int num37 = x + num36;
                int num38 = (int)((double)y + (double)height * 0.5);
                am2d.submitAnim(180, (float)num37, (float)num38);
            }
            UIInfoScreen.drawRelBar(g, am2d, x10, y8, 150, relState, 65536, false);
            break;

        case 8:
            int nthItemOfCategory = simWorld.getFurnitureNthItemOfCategory(index, sceneGame.getCurFurnitureCategory());
            int objectStringId    = simWorld.getObjectStringId(nthItemOfCategory);
            int num44             = 173;
            int x11 = x + 5;
            int y9  = y + 5;
            int w2  = num44 - 10;
            if (g == null)
            {
                am2d.submitAnimGrid(340, 341, 342, 343, 344, 345, 346, 347, 348, (float)x, (float)y, (float)num44, 195f);
                if (!simWorld.isFurnitureAvailable(nthItemOfCategory))
                {
                    am2d.submitAnim(320, (float)(x11 + (w2 >> 1)), (float)(y9 + 65));
                }
            }
            else
            {
                int clipX      = g.getClipX();
                int clipY      = g.getClipY();
                int clipWidth  = g.getClipWidth();
                int clipHeight = g.getClipHeight();
                if (simWorld.isFurnitureAvailable(nthItemOfCategory))
                {
                    int index1 = -1;
                    for (int index2 = 0; index2 < 5; ++index2)
                    {
                        if (this.m_previewToIndexMap[index2] == index)
                        {
                            index1 = index2;
                            break;
                        }
                    }
                    if (index1 == -1)
                    {
                        int num14 = -this.getSwipeNotch(this.getSwipeOffset());
                        int num27 = num14 == this.m_lastMid ? this.m_lastDir : JMath.min(1, JMath.max(-1, num14 - this.m_lastMid));
                        this.m_lastMid = num14;
                        this.m_lastDir = num27;
                        int num28 = 0;
                        for (int index2 = 0; index2 < 5; ++index2)
                        {
                            int a     = this.m_previewToIndexMap[index2] - num14;
                            int num29 = JMath.abs(a);
                            if (a * num27 < 0 && num29 >= 2 || (num29 >= 4 || this.m_previewToIndexMap[index2] == -1))
                            {
                                this.m_previewToIndexMap[index2] = -1;
                                ++num28;
                            }
                        }
                        int index3     = index;
                        int objectType = nthItemOfCategory;
                        for (int index2 = 0; index2 < 5; ++index2)
                        {
                            if (this.m_previewToIndexMap[index2] == -1)
                            {
                                this.m_objectPreviews[index2].loadObject(objectType);
                                this.m_objectPreviews[index2].getModel().disableFurnitureShadows();
                                this.m_previewToIndexMap[index2] = index3;
                                --num28;
                                if (index3 == index)
                                {
                                    index1 = index2;
                                }
                                index3    += num27;
                                objectType = simWorld.getFurnitureNthItemOfCategory(index3, sceneGame.getCurFurnitureCategory());
                                if (index3 < 0 || index3 >= this.m_itemNum || num28 == 0)
                                {
                                    break;
                                }
                            }
                        }
                    }
                    this.m_objectPreviews[index1].render(g, x11, y9, w2, 130);
                    g.setClip(clipX, clipY, clipWidth, clipHeight);
                }
                int x2 = x + (num44 >> 1);
                int y2 = y9 + 130;
                g.Begin();
                textManager.drawWrappedStringChunk(g, this.m_stringChunk, objectStringId, 4, num44 - 10, x2, y2, 17);
                int          y3             = y + 195 - 10;
                int          x3             = x + (num44 >> 1);
                int          objectBuyPrice = simWorld.getObjectBuyPrice(nthItemOfCategory);
                StringBuffer strBuffer      = textManager.clearStringBuffer();
                textManager.appendMoneyToBuffer(objectBuyPrice);
                textManager.drawString(g, strBuffer, 4, x3, y3, 20);
                int objectPackId = simWorld.getObjectPackId(nthItemOfCategory);
                if (objectPackId != -1)
                {
                    Image packTag = instance.getPackTag(objectPackId);
                    if (packTag != null)
                    {
                        int num14 = x + width - 27;
                        int num27 = y + 21;
                        g.drawImage(packTag, (float)num14, (float)num27, 18);
                    }
                }
                g.End();
            }
            ++this.m_stringChunk;
            break;

        case 9:
            if (g == null)
            {
                break;
            }
            int font1           = 3;
            int x12             = x;
            int x13             = x + width - 30;
            int num45           = sceneGame.shoppingListItem(index);
            int num46           = sceneGame.shoppingListQty(index);
            int itemDescString1 = simWorld.getItemDescString(num45);
            g.Begin();
            textManager.drawString(g, itemDescString1, font1, x12, y, 9);
            StringBuffer strBuffer1 = textManager.clearStringBuffer();
            textManager.appendStringIdToBuffer(1085);
            textManager.appendIntToBuffer(num46);
            textManager.drawString(g, strBuffer1, font1, x13, y, 9);
            g.End();
            break;

        case 10:
        case 11:
        case 12:
        case 13:
            if (g != null)
            {
                int  font2               = 4;
                int  font3               = 3;
                int  x2                  = x + (width >> 1);
                int  y2                  = y + (height - textManager.getLineHeight(font2) >> 1);
                int  y3                  = y + height - textManager.getLineHeight(font3);
                int  lineWidth2          = width - 25;
                int  buildModeOldSetting = canvas.getSceneGame().getBuildModeOldSetting();
                int  stringId2           = -1;
                int  packId              = -1;
                int  num14               = 0;
                bool flag4               = false;
                switch (this.m_listId)
                {
                case 10:
                    int unlockedFloorNthId = simWorld.getUnlockedFloorNthId(index);
                    stringId2 = simWorld.getFloorStringId(unlockedFloorNthId);
                    packId    = simWorld.getFloorPackId(unlockedFloorNthId);
                    flag4     = unlockedFloorNthId == buildModeOldSetting;
                    num14     = 50;
                    break;

                case 11:
                    int unlockedWallNthId = simWorld.getUnlockedWallNthId(index);
                    stringId2 = simWorld.getWallStringId(unlockedWallNthId);
                    packId    = simWorld.getWallPackId(unlockedWallNthId);
                    flag4     = unlockedWallNthId == buildModeOldSetting;
                    num14     = 50;
                    break;

                case 12:
                    int objectFootprintHeight = simWorld.getObjectFootprintHeight(buildModeOldSetting);
                    int windowNthType         = simWorld.getWindowNthType(index, objectFootprintHeight);
                    stringId2 = simWorld.getObjectStringId(windowNthType);
                    flag4     = windowNthType == buildModeOldSetting;
                    break;

                case 13:
                    int doorNthType = simWorld.getDoorNthType(index);
                    stringId2 = simWorld.getObjectStringId(doorNthType);
                    flag4     = doorNthType == buildModeOldSetting;
                    break;
                }
                g.Begin();
                textManager.drawWrappedStringChunk(g, this.m_stringChunk, stringId2, font2, lineWidth2, x2, y2, 18);
                ++this.m_stringChunk;
                if (flag4)
                {
                    textManager.drawString(g, 1078, font3, x2, y3, 18);
                }
                else
                {
                    StringBuffer strBuffer2 = textManager.clearStringBuffer();
                    textManager.appendMoneyToBuffer(num14);
                    textManager.drawString(g, strBuffer2, font3, x2, y3, 18);
                }
                if (packId != -1)
                {
                    Image packTag = instance.getPackTag(packId);
                    if (packTag != null)
                    {
                        int num27 = x + width - 12;
                        int num28 = y + 42;
                        g.drawImage(packTag, (float)num27, (float)num28, 18);
                    }
                }
                g.End();
                break;
            }
            if (index == this.m_itemSelected)
            {
                am2d.submitAnimGrid(349, 350, 351, 352, 353, 354, 355, 356, 357, (float)x, (float)y, (float)width, (float)height);
                break;
            }
            am2d.submitAnimGrid(331, 332, 333, 334, 335, 336, 337, 338, 339, (float)x, (float)y, (float)width, (float)height);
            break;
        }
    }
示例#21
0
 public static void DLCStartFake()
 {
     DLCManager.SetHostOwnedDLCs(GetOwnedDLCsFake());
 }
 /// <summary>
 /// Called when [selected game changed].
 /// </summary>
 /// <param name="game">The game.</param>
 protected override void OnSelectedGameChanged(IGame game)
 {
     Task.Run(async() => await DLCManager.RefreshDLCAsync(gameService.GetSelected()).ConfigureAwait(false)).ConfigureAwait(false);
     base.OnSelectedGameChanged(game);
 }
        /// <summary>
        /// Called when [activated].
        /// </summary>
        /// <param name="disposables">The disposables.</param>
        protected override void OnActivated(CompositeDisposable disposables)
        {
            Task.Run(async() => await DLCManager.RefreshDLCAsync(gameService.GetSelected()).ConfigureAwait(false)).ConfigureAwait(false);

            WikiCommand = ReactiveCommand.CreateFromTask(async() =>
            {
                await appAction.OpenAsync(Constants.WikiUrl);
            }).DisposeWith(disposables);

            LogsCommand = ReactiveCommand.CreateFromTask(async() =>
            {
                if (Directory.Exists(StaticResources.GetLogLocation()))
                {
                    await appAction.OpenAsync(StaticResources.GetLogLocation());
                }
            }).DisposeWith(disposables);

            ErrorLogCommand = ReactiveCommand.CreateFromTask(async() =>
            {
                var game = gameService.GetSelected();
                if (game != null)
                {
                    if (File.Exists(game.LogLocation))
                    {
                        await appAction.OpenAsync(game.LogLocation);
                    }
                }
            }).DisposeWith(disposables);

            ShortcutsCommand = ReactiveCommand.Create(() =>
            {
                IsOpen = true;
            }).DisposeWith(disposables);

            CloseCommand = ReactiveCommand.Create(() =>
            {
                IsOpen = false;
            }).DisposeWith(disposables);

            DLCCommand = ReactiveCommand.Create(() =>
            {
                IsOpen = false;
                DLCManager.Open();
            }).DisposeWith(disposables);

            void evaluateVisibility()
            {
                LogsVisible = Directory.Exists(StaticResources.GetLogLocation());
                var game = gameService.GetSelected();

                ErrorLogVisible = game != null && File.Exists(game.LogLocation);
            }

            evaluateVisibility();
            this.WhenAnyValue(p => p.IsOpen).Where(p => p).Subscribe(s =>
            {
                evaluateVisibility();
            }).DisposeWith(disposables);

            base.OnActivated(disposables);
        }
示例#24
0
    public void render(Graphics g)
    {
        this.setup();
        AppEngine          canvas             = AppEngine.getCanvas();
        TextManager        textManager        = canvas.getTextManager();
        AnimationManager2D animationManager2D = canvas.getAnimationManager2D();
        int   num1 = this.m_items[0];
        float num2 = -132f;
        float num3 = -110f;
        float num4 = 110f;
        float num5 = 132f;

        for (int index = 0; index < num1; ++index)
        {
            float num6 = this.getScrollOffset() + (float)index * 36.66667f;
            if ((double)num6 >= (double)num2 && (double)num6 <= (double)num5)
            {
                float num7 = 1f;
                if ((double)num6 > (double)num4)
                {
                    num7 = (float)(1.0 - ((double)num6 - (double)num4) / ((double)num5 - (double)num4));
                }
                else if ((double)num6 < (double)num3)
                {
                    num7 = (float)(1.0 - ((double)num6 - (double)num3) / ((double)num2 - (double)num3));
                }
                float x = (float)(115.0 + (double)((float)System.Math.Cos(System.Math.Asin((double)num6 / 155.0)) * 155f) + 100.0);
                float y = 138f + num6;
                animationManager2D.submitAnimHBar(287, 288, 289, x, y, 200f, num7, num7);
            }
        }
        float x1 = 77f;
        float y1 = 40f;

        animationManager2D.submitAnim(296, x1, y1);
        float x2 = x1 + 87f;
        float y2 = y1 - 11f;

        animationManager2D.submitAnim(297, x2, y2, 1f, 2f, 1f);
        float x3 = x1 + 145f;
        float y3 = y1 - 8f;

        animationManager2D.submitAnim(298, x3, y3);
        float x4 = x1 + 180f;
        float y4 = y1 + 88f;

        animationManager2D.submitAnim(299, x4, y4);
        float num8 = x1 - 1f;
        float num9 = y1 + 2f;

        this.getScene().getUIButton(this.m_commandId).submit(ref animationManager2D, (int)num8, (int)num9);
        float num10 = this.getScrollRangeMax() - this.getScrollRangeMin();
        float num11 = this.getScrollRangeMax() - this.getScrollOffset();
        float num12;
        float num13;

        if ((double)num10 != 0.0)
        {
            num12 = 0.6801548f;
            num13 = (float)((1.36030960083008 - (double)num12 * 1.13329994678497) * (double)num11 / (double)num10 - 0.581194639205933);
        }
        else
        {
            num12 = 1.36031f;
            num13 = -37f * (float)System.Math.PI / 200f;
        }
        float num14 = 135f;
        float num15 = 136f;
        float num16 = 138f;
        float num17 = num12 / 7f;

        for (int index = 0; index < 7; ++index)
        {
            int   num6    = index == 0 ? 0 : (index == 1 ? 6 : index - 1);
            float radians = num13 + num17 * (float)num6;
            float degrees = MathExt.radiansToDegrees(radians);
            float num7    = (float)System.Math.Cos((double)radians) * num16;
            float num18   = (float)System.Math.Sin((double)radians) * num16;
            float x5      = num14 + num7;
            float y5      = num15 + num18;
            int   animId  = 304;
            if (index == 0 || index == 1)
            {
                animId = 302;
            }
            animationManager2D.submitAnim(animId, x5, y5, 1f, 1f, 1f, -degrees);
        }
        int num19      = 253;
        int num20      = 137;
        int animHeight = (int)animationManager2D.getAnimHeight(300);
        int num21      = num20 - (animHeight >> 1);
        int num22      = num20 + (animHeight >> 1) - 1;

        animationManager2D.submitAnim(300, (float)num19, (float)num21, 1f, 1f, -1f);
        animationManager2D.submitAnim(301, (float)num19, (float)num22);
        for (int index = 0; index < num1; ++index)
        {
            float num6 = this.getScrollOffset() + (float)index * 36.66667f;
            if ((double)num6 >= (double)num2 && (double)num6 <= (double)num5)
            {
                float num7 = 1f;
                if ((double)num6 > (double)num4)
                {
                    num7 = (float)(1.0 - ((double)num6 - (double)num4) / ((double)num5 - (double)num4));
                }
                else if ((double)num6 < (double)num3)
                {
                    num7 = (float)(1.0 - ((double)num6 - (double)num3) / ((double)num2 - (double)num3));
                }
                float x5 = (float)(115.0 + (double)((float)System.Math.Cos(System.Math.Asin((double)num6 / 155.0)) * 155f) + 100.0);
                float y5 = 138f + num6;
                animationManager2D.submitAnimHBar(290, 291, 292, x5, y5, 200f, num7, num7);
                if (index == this.m_items[2])
                {
                    float num18 = 0.5f;
                    if (this.m_animTimer.isAnimating())
                    {
                        num18 = this.m_animTimer.getValue();
                    }
                    animationManager2D.submitAnimHBar(293, 294, 295, x5, y5, 200f, num18 * num7, num7);
                }
            }
        }
        animationManager2D.flushAnims(g);
        g.Begin();
        int       x6                = 160;
        int       y6                = 30;
        int       stringId          = this.m_items[1];
        MapObject contextMenuObject = canvas.getSceneGame().getContextMenuObject();

        if (contextMenuObject != null)
        {
            stringId = contextMenuObject.getTypeString();
            if (contextMenuObject.getType() == 0)
            {
                string simName = canvas.getSimName();
                textManager.drawString(g, simName, 4, x6, y6, 18);
                stringId = -1;
            }
        }
        if (stringId != -1)
        {
            textManager.wrapStringChunk(0, stringId, 4, 116);
            textManager.drawWrappedStringChunk(g, 0, 4, x6, y6, 18);
        }
        g.End();
        for (int index1 = 0; index1 < num1; ++index1)
        {
            float num6 = this.getScrollOffset() + (float)index1 * 36.66667f;
            if ((double)num6 >= (double)num2 && (double)num6 <= (double)num5)
            {
                float num7 = 1f;
                if ((double)num6 > (double)num4)
                {
                    num7 = (float)(1.0 - ((double)num6 - (double)num4) / ((double)num5 - (double)num4));
                }
                else if ((double)num6 < (double)num3)
                {
                    num7 = (float)(1.0 - ((double)num6 - (double)num3) / ((double)num2 - (double)num3));
                }
                if ((double)num7 > 0.5)
                {
                    float num18  = 115f + (float)System.Math.Cos(System.Math.Asin((double)num6 / 155.0)) * 155f;
                    float num23  = 138f + num6;
                    int   index2 = 5 + index1;
                    int   x5     = (int)((double)num18 + 100.0);
                    int   y5     = (int)num23;
                    int   strId  = this.m_items[index2];
                    g.Begin();
                    textManager.drawString(g, strId, 4, x5, y5, 18);
                    if (index2 < this.m_actions.Length)
                    {
                        int action       = this.m_actions[index2];
                        int actionPackId = canvas.getSimData().getActionPackId(action);
                        if (actionPackId != -1)
                        {
                            Image packTag = DLCManager.getInstance().getPackTag(actionPackId);
                            if (packTag != null)
                            {
                                int num24 = x5 + 90;
                                int num25 = y5 - 10;
                                g.drawImage(packTag, (float)num24, (float)num25, 18);
                            }
                        }
                    }
                    g.End();
                }
            }
        }
        animationManager2D.flushAnims(g);
        this.setDragArea((int)byte.MaxValue, 0, 200, 320);
    }
示例#25
0
 public virtual void UnloadAsset(Asset asset, bool all) => DLCManager.UnloadAsset(asset, all);
示例#26
0
 public virtual Asset LoadAssetAsync <T>(string bundleName, string assetName) => DLCManager.LoadAssetAsync <T>(bundleName, assetName);
        // Token: 0x06000BF1 RID: 3057 RVA: 0x00054608 File Offset: 0x00052808
        public static Dictionary <string, PlayerFactionSelection> GetFactionOptions(LevelManager levelManager, DLCManager dlcManager, PlayerType playerType, bool useOwnedDLCOnly)
        {
            Dictionary <string, PlayerFactionSelection> dictionary = new Dictionary <string, PlayerFactionSelection>(6);

            if (levelManager != null)
            {
                CommanderAttributes[] commanderAttributes = levelManager.CommanderAttributes;
                if (commanderAttributes != null)
                {
                    for (int i = 0; i < commanderAttributes.Length; i++)
                    {
                        CommanderAttributes commanderAttributes2 = commanderAttributes[i];
                        string key = string.IsNullOrEmpty(commanderAttributes2.NameLocID) ? commanderAttributes2.Name : commanderAttributes2.NameLocID;
                        PlayerFactionSelection value = new PlayerFactionSelection((CustomizationFactionSetting)i, DLCPackID.kInvalidID, false);
                        dictionary.Add(key, value);
                    }
                }
            }
            if (dlcManager != null)
            {
                IEnumerable <DLCPackDescriptor> enumerable = useOwnedDLCOnly ? dlcManager.OwnedDLCPacks : dlcManager.AllDLCPacks;
                foreach (DLCPackDescriptor dlcpackDescriptor in enumerable)
                {
                    if (dlcpackDescriptor.DLCPackType == DLCType.Faction)
                    {
                        UnitFactionDLCPack unitFactionDLCPack = (UnitFactionDLCPack)dlcManager.GetDLCPackHeader(dlcpackDescriptor.DLCPackID);
                        if (!(unitFactionDLCPack == null))
                        {
                            if (playerType == PlayerType.AI)
                            {
                                CommanderAttributesData commanderAttributesData = unitFactionDLCPack.CommanderAttrs as CommanderAttributesData;
                                if (commanderAttributesData == null || commanderAttributesData.AIArchetypeAssets.IsNullOrEmpty <AIArchetypeAttributesAsset>())
                                {
                                    continue;
                                }
                            }
                            string dlcpackLocID           = dlcpackDescriptor.DLCPackLocID;
                            PlayerFactionSelection value2 = new PlayerFactionSelection(unitFactionDLCPack.CustomizesFaction, dlcpackDescriptor.DLCPackID, false);
                            dictionary.Add(dlcpackLocID, value2);
                        }
                    }
                }
            }
            PlayerFactionSelection value3 = new PlayerFactionSelection(CustomizationFactionSetting.Coalition, DLCPackID.kInvalidID, true);

            // MOD
            if (playerType == PlayerType.AI)
            {
                dictionary.Remove("SPECTATOR");
                dictionary.Remove("FATHERSHIP");
                dictionary.Remove("NONE");
            }
            // MOD
            dictionary.Add("ID_UI_FE_MP_RANDOM_253", value3);
            return(dictionary);
        }
示例#28
0
 public virtual void UnloadScene(Asset asset) => DLCManager.UnloadScene(asset);
示例#29
0
 public virtual Asset LoadScene(string bundleName) => DLCManager.LoadScene(bundleName);