<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.trainzsimulator.com/index.php?action=history&amp;feed=atom&amp;title=CCG%2FKind%3A_Interior_Diesel_Cab_Script</id>
	<title>CCG/Kind: Interior Diesel Cab Script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.trainzsimulator.com/index.php?action=history&amp;feed=atom&amp;title=CCG%2FKind%3A_Interior_Diesel_Cab_Script"/>
	<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;action=history"/>
	<updated>2026-11-05T15:24:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=4452&amp;oldid=prev</id>
		<title>Frogpipe at 03:02, 18 June 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=4452&amp;oldid=prev"/>
		<updated>2013-06-18T03:02:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:02, 18 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l181&quot;&gt;Line 181:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 181:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             cd.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;animatingiper &lt;/del&gt;= !cd.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;animatingiper&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             cd.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;animatingWiper &lt;/ins&gt;= !cd.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;animatingWiper&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             float value;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             float value;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l243&quot;&gt;Line 243:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 243:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         else if (p_control == window_wipers)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         else if (p_control == window_wipers)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             bool &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wantiperAnimation &lt;/del&gt;= p_value &amp;gt; 0.5;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             bool &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wantWiperAnimation &lt;/ins&gt;= p_value &amp;gt; 0.5;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             if (wantWiperAnimation != cd.animatingWiper)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             if (wantWiperAnimation != cd.animatingWiper)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 cd.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;animatingiper &lt;/del&gt;= wantWiperAnimation;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 cd.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;animatingWiper &lt;/ins&gt;= wantWiperAnimation;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 UpdateWipers();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 UpdateWipers();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l404&quot;&gt;Line 404:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 404:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             if (!cd.animatingWiper)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             if (!cd.animatingWiper)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 StopMeshAnimation(&amp;quot;wipers&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 StopMeshAnimation(&amp;quot;wipers&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Continue&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;continue&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Frogpipe</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=4450&amp;oldid=prev</id>
		<title>Frogpipe: Reformatted the script into a more human readable form.  Aligned opening and closing braces and so forth.</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=4450&amp;oldid=prev"/>
		<updated>2013-06-18T02:21:58Z</updated>

		<summary type="html">&lt;p&gt;Reformatted the script into a more human readable form.  Aligned opening and closing braces and so forth.&lt;/p&gt;
&lt;a href=&quot;https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;amp;diff=4450&amp;amp;oldid=2070&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Frogpipe</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2070&amp;oldid=prev</id>
		<title>Pev at 14:14, 3 June 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2070&amp;oldid=prev"/>
		<updated>2011-06-03T14:14:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:14, 3 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l395&quot;&gt;Line 395:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 395:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** &lt;/del&gt;[[CCG/Kind:_Interior#DD40_Cab_Interior|Diesel Cab Config.txt]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[CCG/Kind:_Interior#DD40_Cab_Interior|Diesel Cab Config.txt]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Return to CCG Index==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Return to CCG Index==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Content Creator&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Content Creator&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pev</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2069&amp;oldid=prev</id>
		<title>Pev at 14:14, 3 June 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2069&amp;oldid=prev"/>
		<updated>2011-06-03T14:14:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:14, 3 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l394&quot;&gt;Line 394:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 394:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  } ;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  } ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** [[CCG/Kind:_Interior#DD40_Cab_Interior|Diesel Cab Config.txt]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Return to CCG Index==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Return to CCG Index==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Content Creator&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Content Creator&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pev</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2067&amp;oldid=prev</id>
		<title>Pev at 14:08, 3 June 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2067&amp;oldid=prev"/>
		<updated>2011-06-03T14:08:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:08, 3 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l397&quot;&gt;Line 397:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 397:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Return to CCG Index==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Return to CCG Index==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Content Creator&#039;s Guide&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Content Creator&#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pev</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2066&amp;oldid=prev</id>
		<title>Pev: New page: ==Diesel Cab Script== &#039;&#039;&#039;DD40Cabin.gs&#039;&#039;&#039;  This is the DD40 interior script file.  This sets up the fan and wiper animations to be switch controlled and controls the visibility of switchlig...</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=CCG/Kind:_Interior_Diesel_Cab_Script&amp;diff=2066&amp;oldid=prev"/>
		<updated>2011-06-03T14:07:00Z</updated>

		<summary type="html">&lt;p&gt;New page: ==Diesel Cab Script== &amp;#039;&amp;#039;&amp;#039;DD40Cabin.gs&amp;#039;&amp;#039;&amp;#039;  This is the DD40 interior script file.  This sets up the fan and wiper animations to be switch controlled and controls the visibility of switchlig...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Diesel Cab Script==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DD40Cabin.gs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This is the DD40 interior script file.&lt;br /&gt;
&lt;br /&gt;
This sets up the fan and wiper animations to be switch controlled and controls the visibility of switchlights.&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;defaultlocomotivecabin.gs&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
 class DD40CabinData isclass CabinData&lt;br /&gt;
 {&lt;br /&gt;
  public bool animatingFan;&lt;br /&gt;
  public bool animatingiper;&lt;br /&gt;
  public bool switchOn3;&lt;br /&gt;
  public bool switchOn4;&lt;br /&gt;
  public bool switchOn5;&lt;br /&gt;
  public bool switchOn6;&lt;br /&gt;
  public bool switchOn7;&lt;br /&gt;
  public bool switchOn8;&lt;br /&gt;
  };&lt;br /&gt;
   &lt;br /&gt;
  class DD40Cabin isclass&lt;br /&gt;
 DefaultLocomotiveCabin&lt;br /&gt;
  {&lt;br /&gt;
    // Switches&lt;br /&gt;
    CabinControl cabin_fan_switch;&lt;br /&gt;
    CabinControl window_wipers;&lt;br /&gt;
    CabinControl switch3;&lt;br /&gt;
    CabinControl switch4;&lt;br /&gt;
    CabinControl switch5;&lt;br /&gt;
    CabinControl switch6;&lt;br /&gt;
    CabinControl switch7;&lt;br /&gt;
    CabinControl switch8;&lt;br /&gt;
   &lt;br /&gt;
    // Lights&lt;br /&gt;
    CabinControl     cabin_fan_light;&lt;br /&gt;
    CabinControl     window_wipers_light;&lt;br /&gt;
    CabinControl     light3;&lt;br /&gt;
    CabinControl     light4;&lt;br /&gt;
    CabinControl     light5;&lt;br /&gt;
    CabinControl     light6;&lt;br /&gt;
    CabinControl     light7;&lt;br /&gt;
    CabinControl     light8;&lt;br /&gt;
   &lt;br /&gt;
    thread void SlowFanDown(void);&lt;br /&gt;
    thread void SpeedFanUp(void);&lt;br /&gt;
   &lt;br /&gt;
    void UpdateFan(void);&lt;br /&gt;
    void UpdateWipers(void);&lt;br /&gt;
    thread void RunAnimation(void);&lt;br /&gt;
   &lt;br /&gt;
    float fanSpeed;&lt;br /&gt;
    bool isFanSpeedingUp;&lt;br /&gt;
    bool isFanSlowingDown;&lt;br /&gt;
   &lt;br /&gt;
    //! Attach this cabin to a game object (i.e. a locomotive).&lt;br /&gt;
    //&lt;br /&gt;
    // Param: obj Game object to attach this cabin to (usually a Locomotive).&lt;br /&gt;
    //&lt;br /&gt;
    void Attach(GameObject obj)&lt;br /&gt;
    {&lt;br /&gt;
       inherited(obj);&lt;br /&gt;
   &lt;br /&gt;
       // get cabin data&lt;br /&gt;
       CabinData cd = loco.GetCabinData();&lt;br /&gt;
       if(cd)&lt;br /&gt;
       {&lt;br /&gt;
         // reset the controls from saved values&lt;br /&gt;
         DD40CabinData ddcd = cast&amp;lt;DD40CabinData&amp;gt;cd;&lt;br /&gt;
        float value = 0.0;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
     // ANIMATING FAN&lt;br /&gt;
     if (ddcd.animatingFan)&lt;br /&gt;
     {&lt;br /&gt;
       fanSpeed = 1.0;&lt;br /&gt;
       SetMeshAnimationSpeed(&amp;quot;fan&amp;quot;, 1.0);&lt;br /&gt;
   StartMeshAnimationLoop(&amp;quot;fan&amp;quot;);&lt;br /&gt;
   value = 1.0;&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
   &lt;br /&gt;
 cabin_fan_switch.SetValue(value);&lt;br /&gt;
 cabin_fan_light.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // ANIMATING IPER&lt;br /&gt;
 if (ddcd.animatingWiper)&lt;br /&gt;
 {&lt;br /&gt;
   value = 1.0;&lt;br /&gt;
   SetMeshAnimationSpeed(&amp;quot;wipers&amp;quot;, 1.0);&lt;br /&gt;
   StartMeshAnimationLoop(&amp;quot;wipers&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
   &lt;br /&gt;
 window_wipers.SetValue(value);&lt;br /&gt;
 window_wipers_light.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // SWITCH 3&lt;br /&gt;
 if (ddcd.switchOn3)&lt;br /&gt;
 value = 1.0;&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
 switch3.SetValue(value);&lt;br /&gt;
 light3.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // SWITCH 4&lt;br /&gt;
 if (ddcd.switchOn4)&lt;br /&gt;
 value = 1.0;&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
 switch4.SetValue(value);&lt;br /&gt;
 light4.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // SWITCH 5&lt;br /&gt;
 if (ddcd.switchOn5)&lt;br /&gt;
 value = 1.0;&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
 switch5.SetValue(value);&lt;br /&gt;
 light5.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // SWITCH 6&lt;br /&gt;
 if (ddcd.switchOn6)&lt;br /&gt;
 value = 1.0;&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
 switch6.SetValue(value);&lt;br /&gt;
 light6.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // SWITCH 7&lt;br /&gt;
 if (ddcd.switchOn7)&lt;br /&gt;
 value = 1.0;&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
 switch7.SetValue(value);&lt;br /&gt;
 light7.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
 // SWITCH 8&lt;br /&gt;
 if (ddcd.switchOn8)&lt;br /&gt;
 value = 1.0;&lt;br /&gt;
 else&lt;br /&gt;
 value = 0.0;&lt;br /&gt;
 switch8.SetValue(value);&lt;br /&gt;
 light8.SetValue(value);&lt;br /&gt;
      }&lt;br /&gt;
   &lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData ddd = new DD40CabinData();&lt;br /&gt;
        loco.SetCabinData(ddd);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    void UserPressKey(string s)&lt;br /&gt;
    {&lt;br /&gt;
      if(s == &amp;quot;cabin-fans&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
        cd.animatingFan = !cd.animatingFan;&lt;br /&gt;
   &lt;br /&gt;
            float value;&lt;br /&gt;
            if (cd.animatingFan)&lt;br /&gt;
            value = 1.0;&lt;br /&gt;
            else&lt;br /&gt;
            value = 0.0;&lt;br /&gt;
   &lt;br /&gt;
            cabin_fan_switch.SetValue(value);&lt;br /&gt;
            cabin_fan_light.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
        UpdateFan();&lt;br /&gt;
      }&lt;br /&gt;
      if(s == &amp;quot;wipers&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
        cd.animatingiper = !cd.animatingiper;&lt;br /&gt;
   &lt;br /&gt;
            float value;&lt;br /&gt;
            if (cd.animatingWiper)&lt;br /&gt;
            value = 1.0;&lt;br /&gt;
            else&lt;br /&gt;
            value = 0.0;&lt;br /&gt;
   &lt;br /&gt;
            window_wipers.SetValue(value);&lt;br /&gt;
            window_wipers_light.SetValue(value);&lt;br /&gt;
   &lt;br /&gt;
            UpdateWipers();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    public void Init(void)&lt;br /&gt;
    {&lt;br /&gt;
      inherited();&lt;br /&gt;
   &lt;br /&gt;
      cabin_fan_switch = GetNamedControl(&amp;quot;fan_switch&amp;quot;);&lt;br /&gt;
      window_wipers = GetNamedControl(&amp;quot;wiper_switch&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
      switch3 = GetNamedControl(&amp;quot;switch_3&amp;quot;);&lt;br /&gt;
      switch4 = GetNamedControl(&amp;quot;switch_4&amp;quot;);&lt;br /&gt;
      switch5 = GetNamedControl(&amp;quot;switch_5&amp;quot;);&lt;br /&gt;
      switch6 = GetNamedControl(&amp;quot;switch_6&amp;quot;);&lt;br /&gt;
      switch7 = GetNamedControl(&amp;quot;switch_7&amp;quot;);&lt;br /&gt;
      switch8 = GetNamedControl(&amp;quot;switch_8&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
       cabin_fan_light = GetNamedControl(&amp;quot;switchlight0&amp;quot;);&lt;br /&gt;
       window_wipers_light = GetNamedControl(&amp;quot;sw itchlight1&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
       light3 = GetNamedControl(&amp;quot;switchlight2&amp;quot;);&lt;br /&gt;
       light4 = GetNamedControl(&amp;quot;switchlight3&amp;quot;);&lt;br /&gt;
       light5 = GetNamedControl(&amp;quot;switchlight4&amp;quot;);&lt;br /&gt;
       light6 = GetNamedControl(&amp;quot;switchlight5&amp;quot;);&lt;br /&gt;
       light7 = GetNamedControl(&amp;quot;switchlight6&amp;quot;);&lt;br /&gt;
       light8 = GetNamedControl(&amp;quot;switchlight7&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
          RunAnimation();&lt;br /&gt;
      }&lt;br /&gt;
      void UserSetControl(CabinControl p_control, float p_value)&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
   &lt;br /&gt;
       if (p_control == cabin_fan_switch)&lt;br /&gt;
       {&lt;br /&gt;
         bool wantFanAnimation = p_value &amp;gt; 0.5;&lt;br /&gt;
         if (wantFanAnimation != cd.animatingFan)&lt;br /&gt;
         {&lt;br /&gt;
           cd.animatingFan = wantFanAnimation;&lt;br /&gt;
           UpdateFan();&lt;br /&gt;
         }&lt;br /&gt;
              if (wantFanAnimation)&lt;br /&gt;
              cabin_fan_light.SetValue(1.0);&lt;br /&gt;
              else&lt;br /&gt;
              cabin_fan_light.SetValue(0.0);&lt;br /&gt;
          }&lt;br /&gt;
   &lt;br /&gt;
          else if (p_control == window_wipers)&lt;br /&gt;
          {&lt;br /&gt;
            bool wantiperAnimation = p_value &amp;gt; 0.5;&lt;br /&gt;
         if (wantWiperAnimation != cd.animatingWiper)&lt;br /&gt;
        {&lt;br /&gt;
           cd.animatingiper = wantWiperAnimation;&lt;br /&gt;
           UpdateWipers();&lt;br /&gt;
         }&lt;br /&gt;
              if (wantWiperAnimation)&lt;br /&gt;
              window_wipers_light.SetValue(1.0);&lt;br /&gt;
              else&lt;br /&gt;
              window_wipers_light.SetValue(0.0);&lt;br /&gt;
          }&lt;br /&gt;
   &lt;br /&gt;
          else if (p_control == switch3)&lt;br /&gt;
          {&lt;br /&gt;
            bool isOn = p_value &amp;gt; 0.5;&lt;br /&gt;
            float value = 0.0;&lt;br /&gt;
   &lt;br /&gt;
            if (isOn) value = 1.0;&lt;br /&gt;
            light3.SetValue(value);&lt;br /&gt;
            cd.switchOn3 = value;&lt;br /&gt;
           }&lt;br /&gt;
  &lt;br /&gt;
        else if (p_control == switch4)&lt;br /&gt;
        {&lt;br /&gt;
          bool isOn = p_value &amp;gt; 0.5;&lt;br /&gt;
          float value = 0.0;&lt;br /&gt;
          if (isOn) value = 1.0;&lt;br /&gt;
   &lt;br /&gt;
            light4.SetValue(value);&lt;br /&gt;
            cd.switchOn4 = value;&lt;br /&gt;
        }&lt;br /&gt;
   &lt;br /&gt;
       else if (p_control == switch5)&lt;br /&gt;
       {&lt;br /&gt;
         bool isOn = p_value &amp;gt; 0.5;&lt;br /&gt;
         float value = 0.0;&lt;br /&gt;
         if (isOn) value = 1.0;&lt;br /&gt;
   &lt;br /&gt;
            light5.SetValue(value);&lt;br /&gt;
            cd.switchOn5 = value;&lt;br /&gt;
        }&lt;br /&gt;
   &lt;br /&gt;
      else if (p_control == switch6)&lt;br /&gt;
        {&lt;br /&gt;
          bool isOn = p_value &amp;gt; 0.5;&lt;br /&gt;
          float value = 0.0;&lt;br /&gt;
          if (isOn) value = 1.0;&lt;br /&gt;
   &lt;br /&gt;
            light6.SetValue(value);&lt;br /&gt;
            cd.switchOn6 = value;&lt;br /&gt;
        }&lt;br /&gt;
   &lt;br /&gt;
        else if (p_control == switch7)&lt;br /&gt;
        {&lt;br /&gt;
          bool isOn = p_value &amp;gt; 0.5;&lt;br /&gt;
          float value = 0.0;&lt;br /&gt;
          if (isOn) value = 1.0;&lt;br /&gt;
   &lt;br /&gt;
            light7.SetValue(value);&lt;br /&gt;
            cd.switchOn7 = value;&lt;br /&gt;
        }&lt;br /&gt;
   &lt;br /&gt;
        else if (p_control == switch8)&lt;br /&gt;
        {&lt;br /&gt;
          bool isOn = p_value &amp;gt; 0.5;&lt;br /&gt;
          float value = 0.0;&lt;br /&gt;
          if (isOn) value = 1.0;&lt;br /&gt;
   &lt;br /&gt;
            light8.SetValue(value);&lt;br /&gt;
            cd.switchOn8 = value;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        inherited(p_control, p_value);&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
  thread void SlowFanDown(void)&lt;br /&gt;
    {&lt;br /&gt;
      DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
   &lt;br /&gt;
        if (isFanSlowingDown)&lt;br /&gt;
        return;&lt;br /&gt;
           isFanSpeedingUp = false;&lt;br /&gt;
           // Slow it down...&lt;br /&gt;
           while (fanSpeed &amp;gt; 0.1)&lt;br /&gt;
           {&lt;br /&gt;
             fanSpeed = fanSpeed - 0.1;&lt;br /&gt;
             SetMeshAnimationSpeed(&amp;quot;fan&amp;quot;, fanSpeed);&lt;br /&gt;
               Sleep(0.5);&lt;br /&gt;
               if (!isFanSlowingDown)&lt;br /&gt;
               return;&lt;br /&gt;
           }&lt;br /&gt;
   &lt;br /&gt;
           fanSpeed = 0.0;&lt;br /&gt;
           StopMeshAnimation(vfan&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
      thread void SpeedFanUp(void)&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData cd =&lt;br /&gt;
  cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
   &lt;br /&gt;
           if (isFanSpeedingUp)&lt;br /&gt;
           return;&lt;br /&gt;
           isFanSpeedingUp = true;&lt;br /&gt;
           isFanSlowingDown = false;&lt;br /&gt;
   &lt;br /&gt;
           // Speed it up...&lt;br /&gt;
           while (fanSpeed &amp;lt; 1.0)&lt;br /&gt;
           {&lt;br /&gt;
             fanSpeed = fanSpeed + 0.1;&lt;br /&gt;
             SetMeshAnimationSpeed(&amp;quot;fan&amp;quot;, fanSpeed);&lt;br /&gt;
             StartMeshAnimationLoop(&amp;quot;fan&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
               Sleep(0.5);&lt;br /&gt;
               if (!isFanSpeedingUp)&lt;br /&gt;
               return;&lt;br /&gt;
           }&lt;br /&gt;
           fanSpeed = 1.0;&lt;br /&gt;
           SetMeshAnimationSpeed(&amp;quot;fan&amp;quot;, fanSpeed);&lt;br /&gt;
           //isFanSpeedingUp = false;&lt;br /&gt;
       }&lt;br /&gt;
      void UpdateFan(void)&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData cd =&lt;br /&gt;
  cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
   &lt;br /&gt;
           if (cd.animatingFan)&lt;br /&gt;
           SpeedFanUp();&lt;br /&gt;
           else&lt;br /&gt;
           SlowFanDown();&lt;br /&gt;
       }&lt;br /&gt;
   &lt;br /&gt;
      void UpdateWipers(void)&lt;br /&gt;
      {&lt;br /&gt;
        DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
   &lt;br /&gt;
        // Don&amp;#039;t need to worry about else, as it will be handled when the loop is done.&lt;br /&gt;
        if (cd.animatingWiper)&lt;br /&gt;
        {&lt;br /&gt;
          SetMeshAnimationSpeed(&amp;quot;wipers&amp;quot;, 1.0);&lt;br /&gt;
          StartMeshAnimationLoop(&amp;quot;wipers&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
    thread void RunAnimation(void)&lt;br /&gt;
    {&lt;br /&gt;
      DD40CabinData cd = cast&amp;lt;DD40CabinData&amp;gt;loco.GetCabinData();&lt;br /&gt;
   &lt;br /&gt;
         wait()&lt;br /&gt;
         {&lt;br /&gt;
           on &amp;quot;Animation-Event&amp;quot;, &amp;quot;wiperstop&amp;quot;:&lt;br /&gt;
           if (!cd.animatingWiper)&lt;br /&gt;
           StopMeshAnimation(&amp;quot;wipers&amp;quot;);&lt;br /&gt;
           continue;&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 } ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Return to CCG Index==&lt;br /&gt;
[[Content Creator&amp;#039;s Guide]]]&lt;/div&gt;</summary>
		<author><name>Pev</name></author>
	</entry>
</feed>