This file contains 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; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using System.Xml.Serialization; |
This file contains 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
// Anim UV Scripts | |
// Create scrolling or multi-frame animations for props. | |
// Run in asset editor and see effects in real time. | |
// Animated faces must be vertex painted black! The rest reimains white. | |
// Shades of gray animate slower, don't use unless you know what you're doing. | |
// Google how to do vertex color painting in your 3d software of choice! |
This file contains 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 UnityEngine; | |
using System.IO; | |
using ColossalFramework.IO; | |
using ObjUnity3D; | |
using ICities; |
This file contains 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
// Prop Rotating Script | |
// Control rotation axis, pivot and speed. | |
// Run in asset editor and see effects in real time. | |
// Animated faces must be vertex painted black! The rest reimains white. | |
// Google how to do vertex color painting in your 3d software of choice! | |
// The LODs are not rotating, they are like regular props. |
This file contains 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
// replace all target nets with replacement net | |
var target = PrefabCollection<NetInfo>.FindLoaded("Pedestrian Connection Surface"); | |
var replacement = PrefabCollection<NetInfo>.FindLoaded("Pedestrian Connection"); | |
var b = NetManager.instance.m_segments.m_buffer; | |
for(var i=0;i<b.Length;i++) if(b[i].m_flags!=0) if(b[i].Info==target) b[i].Info=replacement; | |
var b2 = NetManager.instance.m_nodes.m_buffer; | |
for(var i=0;i<b2.Length;i++) if(b2[i].m_flags!=0) if(b2[i].Info==target) b2[i].Info=replacement; | |
for(var i=0;i<b.Length;i++) if(b[i].m_flags!=0) NetManager.instance.UpdateSegment((ushort)i); |
This file contains 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 place the exact amount of props (any kind of props anywhere) before running the prop set script, otherwise it will not work properly. | |
// Generate a script to place props, located in local addons folder. | |
var s = "PropInstance[] nb = new PropInstance[65536];\n\n"; | |
var buffer = PropManager.instance.m_props.m_buffer; | |
for(var i = 0; i < buffer.Length; i++) if (buffer[i].m_flags!=0) { | |
s = s + "nb[" + i + "].Angle = " + buffer[i].Angle + "f;\n"; | |
s = s + "nb[" + i + "].Blocked = " + buffer[i].Blocked.ToString().ToLower() + ";\n"; |
This file contains 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 styleName = "Sugondese"; // Name which will be visible in the UI | |
var type = "cat1n"; // The type of prop: | |
// cat1n single normal catenary | |
// cat1e single end-catenary | |
// cat1t single tunnel catenary | |
// cat2n double normal catenary | |
// cat2e double end-catenary | |
// cat2t double tunnel catenary |
This file contains 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) |
This file contains 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
// Traffic Light Shader - Railway Crossing Barriers | |
// Control rotation axis and pivot. | |
// Run in asset editor. | |
// (This used to require the PropRotating mod but that is no longer necessary) | |
// (added modless shader parameter saving method by boformer) | |
// Rotating parts must be vertex painted black! The rest reimains white. |
This file contains 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 NetworkTiling | |
{ | |
public class NetworkTilingMod : LoadingExtensionBase, IUserMod |
NewerOlder