This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // scripts to change map theme textures, colors and other stuff ingame | |
| // textures must be located in gamefolder/textures/ | |
| // also applies sharp textures mod default settings | |
| // grass.png | |
| if (File.Exists("textures/" + "grass.png")) { Texture2D texture2D = new Texture2D(1, 1); | |
| texture2D.LoadImage(File.ReadAllBytes("textures/" + "grass.png")); | |
| UnityEngine.Object.FindObjectOfType<TerrainProperties>().m_grassDiffuse = texture2D; } | |
| TerrainManager.instance.m_properties.InitializeShaderProperties(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; // BuildingInfo PropInfo VehicleInfo | |
| var color1 = new Color32(255, 255, 255, 255); | |
| var color2 = new Color32(255, 255, 255, 255); | |
| var color3 = new Color32(255, 255, 255, 255); | |
| var color4 = new Color32(255, 255, 255, 255); | |
| asset.m_material.SetColor("_ColorV0", color1); | |
| asset.m_material.SetColor("_ColorV1", color2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using ColossalFramework.Plugins; | |
| using ColossalFramework.UI; | |
| using ICities; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Reflection; | |
| using System.Xml.Serialization; | |
| using UnityEngine; | |
| namespace ThemeDecals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // You MUST use a unique diffuse texture (put whatever texture in it) to avoid unforeseen consequences! | |
| // Import a decal or a big decal as usual and run this script using the texture tag you want: | |
| //themedecal-grass | |
| //themedecal-cliff | |
| //themedecal-sand | |
| //themedecal-gravel | |
| //themedecal-ruined | |
| //themedecal-oil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Rotors Shader | |
| // Also deletes LOD. | |
| // Prop | |
| var shader = Shader.Find("Custom/Vehicles/Vehicle/Rotors"); | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| if(asset.m_material != null) asset.m_material.shader = shader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using ColossalFramework.Plugins; | |
| using ColossalFramework.UI; | |
| using ICities; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Reflection; | |
| using System.Xml.Serialization; | |
| using UnityEngine; | |
| namespace ThemeDecals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //asphalt props | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| asset.m_mesh.name="ploppableasphalt-prop"; | |
| //asphalt decal | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| asset.m_mesh.name="ploppableasphalt-decal"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Custom/Buildings/Building/AnimUV | |
| Custom/Buildings/Building/Basement | |
| Custom/Buildings/Building/Construction | |
| Custom/Buildings/Building/Default | |
| Custom/Buildings/Building/Fence | |
| Custom/Buildings/Building/Floating | |
| Custom/Buildings/Building/NoBase | |
| Custom/Buildings/Building/Water | |
| Custom/Buildings/Building/WaterFlow | |
| Custom/Buildings/Building/WindTurbine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var prefabNames = new List<string>(); | |
| for (uint i = 0; i < PrefabCollection<NetInfo>.LoadedCount(); i++) | |
| { | |
| var prefab = PrefabCollection<NetInfo>.GetLoaded(i); | |
| if (prefab == null) continue; | |
| Debug.Log(prefab); | |
| prefabNames.Add(prefab.ToString()); | |
| } | |
| prefabNames.Sort(); | |
| var s="\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var shader = Shader.Find("Custom/Particles/Additive (Soft)"); | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| if(asset.m_material != null) asset.m_material.shader = shader; | |
| if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader; |