From aa114dabb3dac33c595374010d2c7f88f3a9b4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Torres?= Date: Fri, 21 May 2021 16:46:01 -0300 Subject: [PATCH] Fixed error drawing ghost area when selecting a window blueprint. --- 1.1/Assemblies/OpenTheWindows.dll | Bin 60416 -> 60416 bytes Source/OpenTheWindows.csproj | 2 +- Source/PlaceWorker_Window.cs | 12 ++++++++---- Source/Properties/AssemblyInfo.cs | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/1.1/Assemblies/OpenTheWindows.dll b/1.1/Assemblies/OpenTheWindows.dll index 9d2bc271c49663c95d00d3f7f6373a1c5b11428e..7d1b7fab4613bba195a16276b733c503696d5a71 100644 GIT binary patch delta 7395 zcmaKx33wD$w#Uz{>aOnUy*fLckWQK`o$e%rh=6QilVn(9kj1b?)*ujqfGi1}*bJfr z4EZjg5fv~n5Q73XDhNtqA~P_of$sZ67>yQOGYHrViWe0i@yTsVQMkJ>NfyXFTjIPf>7umI|jqa0E$iTmu>pFUtog2 zTk1*xlUb)17u`c6GIcY6WO;;99Ia|hr#Beo)D0Lx@+68lF7tfsXA`S%JdLDnH(D!TsbY2MHK%b}o zvw3~-nu|P;HVjB1e-E_|C?RA39W`i>wKjc)-UR2v=UGi~iG~JwiIbii6ctwGW1b4b zJgWqG;z`W;o*D)(P`ddBK(-sF1>1Ej;~=dX+{^IL8*4PdB-%3gL|BguW|!Myu+3|2 znU18N4JjZCs4_H@OrpJpdSY^U^~J_{)<&UU1grLe!m4>_`B1NQMFz8*EKGOO&`^)z zIImwwPY?BwWO{#STvz~m`6tYeVQrTsvQZXOUw&88M5pBUBsb`m{C;FKy_sJ`w$LHZ z^dnxn=9!}YkUk|TA5!2++(!qT@=Zyqg$&5y^f^)yX%EkE>X zCUB~w-3$7WQW`91B!g-HVFjITSP85Ozl*vORe>j6_fX%n{)9RqN@r8xUKqUgo0bfZN?L>!Zl$m_ zTf?;sH4;{5Fk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A7^68+>_thNXK6{<&F>$MR??1rwMHxd;WEx552PYEV0vae^I?VG=mwcT|8 E1KjYoUjP6A diff --git a/Source/OpenTheWindows.csproj b/Source/OpenTheWindows.csproj index f016ed6..a908617 100644 --- a/Source/OpenTheWindows.csproj +++ b/Source/OpenTheWindows.csproj @@ -48,7 +48,7 @@ ..\1.1\Assemblies\ TRACE none - 4 + 0 false diff --git a/Source/PlaceWorker_Window.cs b/Source/PlaceWorker_Window.cs index 1c258d4..88e5737 100644 --- a/Source/PlaceWorker_Window.cs +++ b/Source/PlaceWorker_Window.cs @@ -1,4 +1,6 @@ -using System.Linq; +using RimWorld; +using System.Collections.Generic; +using System.Linq; using UnityEngine; using Verse; @@ -8,18 +10,20 @@ public class PlaceWorker_Window : PlaceWorker { public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol, Thing thing = null) { - if (thing == null) + List field; + if (thing == null || thing is Blueprint) { Map currentMap = Find.CurrentMap; IntVec3 start = WindowUtility.FindEnd(center, rot, def.size, false); IntVec3 end = WindowUtility.FindEnd(center, rot, def.size, true); - GenDraw.DrawFieldEdges(WindowUtility.GetWindowObfuscation(def.size, center, rot, currentMap, start, end).ToList()); + field = WindowUtility.GetWindowObfuscation(def.size, center, rot, currentMap, start, end).ToList(); } else { var window = thing as Building_Window; - GenDraw.DrawFieldEdges(window.EffectArea); + field = window.EffectArea; } + GenDraw.DrawFieldEdges(field); } } } \ No newline at end of file diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index e09208b..6450e61 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.0")] -[assembly: AssemblyFileVersion("2.2.2")] \ No newline at end of file +[assembly: AssemblyFileVersion("2.3")] \ No newline at end of file