-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Heinous Junction Restrictions overlay (#845)
* Moved Overlay rendering parts to a separate class in PrioritySigns tool * PrioritySigns Overlay is not a stateful struct * More cleanup for PrioritySigns overlay * Overlay for view and edit of junction restrictions now looks consistent * Remove 2 trash documentation comments * -use CalculateCorner for more precise calculations. -define constants to make sure sign sizes have harmony in both normal mode and view mode. - simplified the code. * Style changes and renaming * cached corner calculations * calculate corners In NetSegment.CalcualteSegment.Postfix() * corner cache is initialzed on startup. Co-authored-by: kian.zarrin <kian.zarrin@gmail.com>
- Loading branch information
1 parent
0725f9a
commit 78cd4a7
Showing
17 changed files
with
694 additions
and
571 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
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,16 @@ | ||
namespace TrafficManager.Patch._NetSegment { | ||
using Harmony; | ||
using JetBrains; | ||
using JetBrains.Annotations; | ||
using TrafficManager.Manager.Impl; | ||
|
||
[HarmonyPatch(typeof(NetSegment), nameof(NetSegment.CalculateSegment))] | ||
[UsedImplicitly] | ||
public class CalculateSegmentPatch { | ||
[UsedImplicitly] | ||
public static void Postfix(ushort segmentID) { | ||
ExtSegmentEndManager.Instance.CalculateCorners(segmentID, false); | ||
ExtSegmentEndManager.Instance.CalculateCorners(segmentID, true); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.