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 networks = Resources.FindObjectsOfTypeAll<NetInfo>(); | |
for(uint i = 0; i < networks.Length; i++) | |
{ | |
var network = networks[i]; | |
if(network == null) continue; | |
if(network.m_netAI == null) continue; | |
if(network.m_netAI.GetType().Name != "RoadAI" && | |
network.m_netAI.GetType().Name != "RoadBridgeAI" && | |
network.m_netAI.GetType().Name != "RoadTunnelAI") continue; | |
{ |
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
// Network segment and node reorder scripts. Refreshes UI automatically. | |
// SEGMENTS | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as NetInfo; |
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
// for vehicles, vertex colors get generated and overwritten on import | |
// therefore you need to import the rotors sub mesh as a prop, save, reload | |
// and then import the vehicle sub mesh, | |
// and copy the vertex paint from the prop to the vehicle sub mesh using this script: | |
var subMesh = 1; // vehicle sub mesh id, starting from 1 | |
var asset2 = PrefabCollection<PropInfo>.FindLoaded("filename.Asset Name_Data"); // CHANGE TO PROP NAME |
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
// map theme texture | |
var source = UnityEngine.Object.FindObjectOfType<TerrainProperties>().m_grassDiffuse; | |
var target = new Texture2D(source.width, source.height, TextureFormat.RGBAFloat, true); | |
target.SetPixels(source.GetPixels()); | |
target.anisoLevel = source.anisoLevel; target.filterMode = source.filterMode; | |
target.wrapMode = source.wrapMode; target.Apply(); | |
UnityEngine.Object.FindObjectOfType<NetProperties>().m_downwardDiffuse = target; |
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
BuildingManager.instance.UpdateBuildingColors(); |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using ICities; | |
using UnityEngine; | |
namespace FlagParams | |
{ | |
public class FlagParamsMod : LoadingExtensionBase, IUserMod |
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
// The script will not work properly if you have no texture imported. | |
// | |
// The vertex paint of the mesh controls the amount of movement: | |
// white means no movement and black means maximum movement. | |
// | |
// If you're using multiple "flag" textures in one prop, (like vanilla flags) | |
// the flag must be entirely black and everything else should be white, | |
// and you can't use the strength variable, otherwise the UV mapping will break. | |
// The flag should be UV mapped onto the flag on the bottom right of the texture. |
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
(function(){ 'use strict'; | |
var headingNodes = [], results, link, tags = ['td']; | |
tags.forEach(function(tag) { | |
results = document.getElementsByTagName(tag); | |
Array.prototype.push.apply(headingNodes, results); | |
}); | |
console.log( | |
document.getElementsByClassName("workshopItemTitle")[0].innerHTML + '@' + | |
document.getElementsByClassName("littleNum")[0].innerHTML.split(" ")[1] + '@' + | |
results[1].innerHTML + '@' + results[3].innerHTML + '@' + results[5].innerHTML + |
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 ICities; | |
using System; | |
namespace HDRIH1Cubemap | |
{ | |
public class HDRIH1Cubemap : IUserMod | |
{ | |
public string Name | |
{ | |
get |
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 stationTrackType = "r69rwst-double"; // The type of station track: | |
// r69rwst-double (normal double station track) | |
// r69rwst-edouble (elevated double station track) | |
// r69rwst-single2 (single station track - two sided boarding) | |
// r69rwst-single1 (single station track - left sided boarding) | |
// r69rwst-singler (single station track - right sided boarding) | |
// r69rwst-esingle2 (elevated single station track - two sided boarding (shinkansen only afaik)) | |
// r69rwst-esinglel (elevated single station track - left sided boarding) |