File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
OTAPI.Scripts/Shims/System.Drawing Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
1717along with this program. If not, see <http://www.gnu.org/licenses/>.
1818*/
1919using ModFramework ;
20+ using System . Linq ;
2021
2122/// <summary>
2223/// @doc Shims and relinks System.Drawing.Graphics
@@ -31,5 +32,19 @@ public static void RedirectAssembly(ModFwModder modder)
3132 {
3233 modder . RelinkAssembly ( "System.Drawing.Graphics" ) ;
3334 }
35+
36+ /// <summary>
37+ /// Renames the System.Graphics shim due to conflicts with plugins that use the newer NuGet package.
38+ /// </summary>
39+ /// <remarks>These shims are not intended for use</remarks>
40+ /// <see cref="https://github.com/elevatorguy/map/issues/4"/>
41+ /// <param name="modder"></param>
42+ [ Modification ( ModType . PostPatch , "Renaming System.Drawing" ) ]
43+ public static void Rename ( ModFwModder modder )
44+ {
45+ var type = modder . Module . Types . Where ( x => x . Namespace == "System.Drawing" ) ;
46+ foreach ( var mod in type )
47+ mod . Namespace += ".Shims" ;
48+ }
3449 }
3550}
You can’t perform that action at this time.
0 commit comments