Example #1
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (Name)
            {
            case ColorName.MoonInnerCorona:
                return(SetValue(metaData.moonInnerCorona));

            case ColorName.MoonOuterCorona:
                return(SetValue(metaData.moonOuterCorona));

            case ColorName.SkyTint:
                return(SetValue(metaData.skyTint));

            case ColorName.NightHorizonColor:
                return(SetValue(metaData.nightHorizonColor));

            case ColorName.EarlyNightZenithColor:
                return(SetValue(metaData.earlyNightZenithColor));

            case ColorName.LateNightZenithColor:
                return(SetValue(metaData.lateNightZenithColor));

            default: return(false);
            }
        }
Example #2
0
        protected ListItem CreateListItem(MapThemeMetaData metaData)
        {
            string id            = metaData.assetRef.fullName;
            string displayName   = metaData.name;
            string author        = GetAuthorName(metaData.assetRef);
            bool   isFavourite   = IsFavourite(id);
            bool   isBlacklisted = IsBlacklisted(id);

            return(new ListItem(id, displayName, author, isFavourite, isBlacklisted, Category));
        }
Example #3
0
        private void CreateAndAddItemToFastList(MapThemeMetaData metaData, ref int count, ref int index, ref int selectedIndex)
        {
            ListItem listItem = CreateListItem(metaData);

            _fastList.RowsData.Add(listItem);
            if (Controller.IsSelected(listItem.ID, Category))
            {
                selectedIndex = index;
            }
            count++;
            index++;
        }
Example #4
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (Name)
            {
            case ValueName.MinTemperatureDay:
                return(SetValue(metaData.minTemperatureDay));

            case ValueName.MaxTemperatureDay:
                return(SetValue(metaData.maxTemperatureDay));

            case ValueName.MinTemperatureNight:
                return(SetValue(metaData.minTemperatureNight));

            case ValueName.MaxTemperatureNight:
                return(SetValue(metaData.maxTemperatureNight));

            case ValueName.MinTemperatureRain:
                return(SetValue(metaData.minTemperatureRain));

            case ValueName.MaxTemperatureRain:
                return(SetValue(metaData.maxTemperatureRain));

            case ValueName.MinTemperatureFog:
                return(SetValue(metaData.minTemperatureFog));

            case ValueName.MaxTemperatureFog:
                return(SetValue(metaData.maxTemperatureFog));

            case ValueName.RainProbabilityDay:
                return(SetValue(metaData.rainProbabilityDay));

            case ValueName.RainProbabilityNight:
                return(SetValue(metaData.rainProbabilityNight));

            case ValueName.FogProbabilityDay:
                return(SetValue(metaData.fogProbabilityDay));

            case ValueName.FogProbabilityNight:
                return(SetValue(metaData.fogProbabilityNight));

            case ValueName.NorthernLightsProbability:
                return(SetValue(metaData.northernLightsProbability));

            default: return(false);
            }
        }
Example #5
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            bool success;

            switch (Name)
            {
            case TextureName.GrassDiffuseTexture:
                success = SetTexture(metaData.grassDiffuseAsset);
                return(success && SetValue(metaData.grassTiling));

            case TextureName.RuinedDiffuseTexture:
                success = SetTexture(metaData.ruinedDiffuseAsset);
                return(success && SetValue(metaData.ruinedTiling));

            case TextureName.PavementDiffuseTexture:
                success = SetTexture(metaData.pavementDiffuseAsset);
                return(success && SetValue(metaData.pavementTiling));

            case TextureName.GravelDiffuseTexture:
                success = SetTexture(metaData.gravelDiffuseAsset);
                return(success && SetValue(metaData.gravelTiling));

            case TextureName.CliffDiffuseTexture:
                success = SetTexture(metaData.cliffDiffuseAsset);
                return(success && SetValue(metaData.cliffDiffuseTiling));

            case TextureName.OilDiffuseTexture:
                success = SetTexture(metaData.oilDiffuseAsset);
                return(success && SetValue(metaData.oilTiling));

            case TextureName.OreDiffuseTexture:
                success = SetTexture(metaData.oreDiffuseAsset);
                return(success && SetValue(metaData.oreTiling));

            case TextureName.SandDiffuseTexture:
                success = SetTexture(metaData.sandDiffuseAsset);
                return(success && SetValue(metaData.sandDiffuseTiling));

            case TextureName.CliffSandNormalTexture:
                success = SetTexture(metaData.cliffSandNormalAsset);
                return(success && SetValue(metaData.cliffSandNormalTiling));

            default: return(false);
            }
        }
Example #6
0
 protected override bool SetFromTheme()
 {
     MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);
     if (metaData == null) return false;
     switch (Name) {
         case OffsetName.GrassFertilityColorOffset:
             return SetValue(metaData.grassFertilityColorOffset);
         case OffsetName.GrassFieldColorOffset:
             return SetValue(metaData.grassFieldColorOffset);
         case OffsetName.GrassForestColorOffset:
             return SetValue(metaData.grassForestColorOffset);
         case OffsetName.GrassPollutionColorOffset:
             return SetValue(metaData.grassPollutionColorOffset);
         default: return false;
     }
 }
        protected new void RebuildThemeDictionary()
        {
            if (this.m_Themes == null)
            {
                return;
            }
            using (Dictionary <string, List <MapThemeMetaData> > .KeyCollection.Enumerator enumerator = this.m_Themes.Keys.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    this.m_Themes[enumerator.Current].Clear();
                }
            }
            List <MapThemeMetaData> themes = new List <MapThemeMetaData>();

            Package.AssetType[] assetTypeArray = new Package.AssetType[1] {
                UserAssetType.MapThemeMetaData
            };
            foreach (Package.Asset filterAsset in PackageManager.FilterAssets(assetTypeArray))
            {
                if (filterAsset != (Package.Asset)null && filterAsset.isEnabled)
                {
                    MapThemeMetaData mapThemeMetaData = filterAsset.Instantiate <MapThemeMetaData>();
                    mapThemeMetaData.SetSelfRef(filterAsset);
                    if (!this.m_Themes.ContainsKey(mapThemeMetaData.environment))
                    {
                        List <MapThemeMetaData> mapThemeMetaDataList = new List <MapThemeMetaData>();
                        this.m_Themes[mapThemeMetaData.environment] = mapThemeMetaDataList;
                    }
                    //begin mod
                    themes.Add(mapThemeMetaData);
                    //end mod
                }
            }

            //begin mod
            this.m_Themes["Tropical"] = themes;
            this.m_Themes["Sunny"]    = themes;
            this.m_Themes["Winter"]   = themes;
            this.m_Themes["North"]    = themes;
            this.m_Themes["Europe"]   = themes;
            //end mod
            this.RefreshOverrideThemes();
        }
Example #8
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (Name)
            {
            case TextureName.WaterFoam:
                return(SetTexture(metaData.waterFoamAsset));

            case TextureName.WaterNormal:
                return(SetTexture(metaData.waterNormalAsset));

            default: return(false);
            }
        }
Example #9
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (Name)
            {
            case FloatName.Longitude:
                return(SetValue(metaData.longitude));

            case FloatName.Latitude:
                return(SetValue(metaData.latitude));

            case FloatName.SunSize:
                return(SetValue(metaData.sunSize));

            case FloatName.SunAnisotropy:
                return(SetValue(metaData.sunAnisotropy));

            case FloatName.MoonSize:
                return(SetValue(metaData.moonSize));

            case FloatName.Rayleigh:
                return(SetValue(metaData.rayleight));

            case FloatName.Mie:
                return(SetValue(metaData.mie));

            case FloatName.Exposure:
                return(SetValue(metaData.exposure));

            case FloatName.StarsIntensity:
                return(SetValue(metaData.starsIntensity));

            case FloatName.OuterSpaceIntensity:
                return(SetValue(metaData.outerSpaceIntensity));

            default: return(false);
            }
        }
Example #10
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (DetailName)
            {
            case Name.GrassDetailEnabled:
                return(SetValue(metaData.grassDetailEnabled));

            case Name.FertileDetailEnabled:
                return(SetValue(metaData.fertileDetailEnabled));

            case Name.RocksDetailEnabled:
                return(SetValue(metaData.rocksDetailEnabled));

            default: return(false);
            }
        }
Example #11
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (Name)
            {
            case ColorName.WaterClean:
                return(SetValue(metaData.waterClean));

            case ColorName.WaterDirty:
                return(SetValue(metaData.waterDirty));

            case ColorName.WaterUnder:
                return(SetValue(metaData.waterUnder));

            default: return(false);
            }
        }
Example #12
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            if (metaData == null)
            {
                return(false);
            }
            switch (Name)
            {
            case TextureName.UpwardRoadDiffuse:
                return(SetTexture(metaData.upwardRoadDiffuse));

            case TextureName.DownwardRoadDiffuse:
                return(SetTexture(metaData.downwardRoadDiffuse));

            case TextureName.BuildingFloorDiffuse:
                return(SetTexture(metaData.buildingFloorDiffuse));

            case TextureName.BuildingBaseDiffuse:
                return(SetTexture(metaData.buildingBaseDiffuse));

            case TextureName.BuildingBaseNormal:
                return(SetTexture(metaData.buildingBaseNormal));

            case TextureName.BuildingBurntDiffuse:
                return(SetTexture(metaData.buildingBurntDiffuse));

            case TextureName.BuildingAbandonedDiffuse:
                return(SetTexture(metaData.buildingAbandonedDiffuse));

            case TextureName.LightColorPalette:
                return(SetTexture(metaData.lightColorPalette));

            default: return(false);
            }
        }
Example #13
0
        protected override bool SetFromTheme()
        {
            MapThemeMetaData metaData = ThemeManager.GetTheme(ThemeID);

            return(metaData != null && SetTexture(metaData.moonTexture));
        }