-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
155 additions
and
833 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using HarmonyLib; | ||
using UnityEngine; | ||
|
||
namespace Crossings | ||
{ | ||
[HarmonyPatch(typeof(NetNode))] | ||
[HarmonyPatch(nameof(NetNode.CalculateNode))] | ||
class CalculateNode | ||
{ | ||
static void Postfix(ref NetNode __instance) | ||
{ | ||
if ((__instance.m_flags & NetNode.Flags.Outside) != NetNode.Flags.None) | ||
{ | ||
// Do nothing | ||
} | ||
else if ((__instance.m_flags & NetNode.Flags.Junction) != NetNode.Flags.None) | ||
{ | ||
// This is already a junction - clear out any crossing flag we might have set | ||
__instance.m_flags &= ~(NetNode.Flags)Crossings.CrossingFlag; | ||
} | ||
else if ((__instance.m_flags & (NetNode.Flags)Crossings.CrossingFlag) != NetNode.Flags.None) | ||
{ | ||
__instance.m_flags |= NetNode.Flags.Junction; | ||
__instance.m_flags &= ~(NetNode.Flags.Moveable | NetNode.Flags.Middle | NetNode.Flags.AsymForward | NetNode.Flags.AsymBackward | NetNode.Flags.Bend | NetNode.Flags.End); | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ReferencePath>C:\Program Files (x86)\Steam\steamapps\common\Cities_Skylines\Cities_Data\Managed\</ReferencePath> | ||
</PropertyGroup> | ||
</Project> |
Oops, something went wrong.