コード例 #1
0
        public static CrateInfoModalScreen CreateForStore(string crateUid, string planetID)
        {
            BuildingLookupController buildingLookupController = Service.Get <BuildingLookupController>();
            Entity         currentHQ    = buildingLookupController.GetCurrentHQ();
            BuildingTypeVO buildingType = currentHQ.Get <BuildingComponent>().BuildingType;

            return(new CrateInfoModalScreen(crateUid, planetID, buildingType.Lvl)
            {
                ModalReason = CrateInfoReason.Reason_Store_Buy
            });
        }
コード例 #2
0
        public static CrateInfoModalScreen CreateForTargetedOffer(TargetedBundleVO offer, CrateVO crate)
        {
            BuildingLookupController buildingLookupController = Service.Get <BuildingLookupController>();
            Entity         currentHQ    = buildingLookupController.GetCurrentHQ();
            BuildingTypeVO buildingType = currentHQ.Get <BuildingComponent>().BuildingType;
            string         planetId     = Service.Get <CurrentPlayer>().PlanetId;

            return(new CrateInfoModalScreen(crate.Uid, planetId, buildingType.Lvl)
            {
                ModalReason = CrateInfoReason.Reason_Targeted_Offer,
                CurrentOffer = offer
            });
        }
コード例 #3
0
        public static CrateInfoModalScreen CreateForMobileConnectorAd(string crateUid, string planetID)
        {
            BuildingLookupController buildingLookupController = Service.BuildingLookupController;
            Entity         currentHQ    = buildingLookupController.GetCurrentHQ();
            BuildingTypeVO buildingType = currentHQ.Get <BuildingComponent>().BuildingType;
            FactionType    faction      = Service.CurrentPlayer.Faction;
            bool           flag         = ArmoryUtils.PlayerHasArmory();

            return(new CrateInfoModalScreen(crateUid, planetID, buildingType.Lvl, faction, flag)
            {
                ModalReason = CrateInfoReason.Reason_Mobile_Connector_Ad
            });
        }
コード例 #4
0
        public static CrateInfoModalScreen CreateForTargetedOffer(TargetedBundleVO offer, CrateVO crate)
        {
            BuildingLookupController buildingLookupController = Service.BuildingLookupController;
            Entity         currentHQ    = buildingLookupController.GetCurrentHQ();
            BuildingTypeVO buildingType = currentHQ.Get <BuildingComponent>().BuildingType;
            string         planetId     = Service.CurrentPlayer.PlanetId;
            FactionType    faction      = Service.CurrentPlayer.Faction;
            bool           flag         = ArmoryUtils.PlayerHasArmory();

            return(new CrateInfoModalScreen(crate.Uid, planetId, buildingType.Lvl, faction, flag)
            {
                ModalReason = CrateInfoReason.Reason_Targeted_Offer,
                CurrentOffer = offer
            });
        }
コード例 #5
0
ファイル: VideosSearch.cs プロジェクト: Hengle/swc-decompiled
        private Dictionary <string, VideosSearch.FilterData> GetFilterData()
        {
            Lang   lang = Service.Get <Lang>();
            string key  = lang.Get("hn_ui_hq_level", new object[0]);
            string key2 = lang.Get("hn_ui_source", new object[0]);
            Dictionary <string, VideosSearch.FilterData> dictionary = new Dictionary <string, VideosSearch.FilterData>
            {
                {
                    lang.Get("hn_ui_date", new object[0]),
                    new VideosSearch.FilterData(new Dictionary <string, string[]>
                    {
                        {
                            lang.Get("hn_ui_anytime", new object[0]),
                            new string[]
                            {
                                ""
                            }
                        },
                        {
                            lang.Get("hn_ui_past_week", new object[0]),
                            new string[]
                            {
                                "7"
                            }
                        },
                        {
                            lang.Get("hn_ui_past_month", new object[0]),
                            new string[]
                            {
                                "30"
                            }
                        }
                    }, ChoiceType.SimpleList, FilterType.Date)
                },
                {
                    key2,
                    new VideosSearch.FilterData(new Dictionary <string, string[]>
                    {
                        {
                            lang.Get("hn_ui_all", new object[0]),
                            new string[]
                            {
                                ""
                            }
                        }
                    }, ChoiceType.SimpleList, FilterType.Tag)
                },
                {
                    key,
                    new VideosSearch.FilterData(new Dictionary <string, string[]>
                    {
                        {
                            lang.Get("hn_ui_any", new object[0]),
                            new string[]
                            {
                                ""
                            }
                        }
                    }, ChoiceType.Picker, FilterType.Tag)
                },
                {
                    lang.Get("hn_ui_faction", new object[0]),
                    new VideosSearch.FilterData(new Dictionary <string, string[]>
                    {
                        {
                            lang.Get("hn_ui_both", new object[0]),
                            new string[]
                            {
                                ""
                            }
                        },
                        {
                            lang.Get("hn_ui_rebel", new object[0]),
                            new string[]
                            {
                                "rebel"
                            }
                        },
                        {
                            lang.Get("hn_ui_empire", new object[0]),
                            new string[]
                            {
                                "empire"
                            }
                        }
                    }, ChoiceType.SimpleList, FilterType.Tag)
                }
            };
            BuildingLookupController buildingLookupController = Service.Get <BuildingLookupController>();
            Entity         currentHQ    = buildingLookupController.GetCurrentHQ();
            BuildingTypeVO buildingType = currentHQ.Get <BuildingComponent>().BuildingType;
            int            lvl          = Service.Get <BuildingUpgradeCatalog>().GetMaxLevel(buildingType.UpgradeGroup).Lvl;

            for (int i = 1; i <= lvl; i++)
            {
                string text = i.ToString();
                dictionary[key].Choices[text] = new string[]
                {
                    text
                };
            }
            Dictionary <string, string> sourceTypes = Service.Get <VideoDataManager>().SourceTypes;

            foreach (string current in sourceTypes.Keys)
            {
                string key3 = lang.Get(sourceTypes[current], new object[0]);
                dictionary[key2].Choices[key3] = new string[]
                {
                    current
                };
            }
            return(dictionary);
        }