Skip to content

Commit c2d8f7a

Browse files
Update for 1.4, add ability to hide zones and overlays
1 parent 36c5026 commit c2d8f7a

10 files changed

Lines changed: 160 additions & 68 deletions

File tree

About/About.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<li>1.1</li>
88
<li>1.2</li>
99
<li>1.3</li>
10+
<li>1.4</li>
1011
</supportedVersions>
1112
<packageId>neptimus7.progressrenderer</packageId>
1213
<modDependencies>

Common/Languages/English/Keyed/All.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
<LPR_SettingsRenderGameConditionsDescription>Enable this when the rendered images should contain game condition effects (like weather and lighting from toxic fallout).</LPR_SettingsRenderGameConditionsDescription>
4545
<LPR_SettingsRenderWeatherLabel>Weather</LPR_SettingsRenderWeatherLabel>
4646
<LPR_SettingsRenderWeatherDescription>Enable this when the rendered images should contain the current ingame weather.</LPR_SettingsRenderWeatherDescription>
47+
<LPR_SettingsRenderZonesLabel>Zones</LPR_SettingsRenderZonesLabel>
48+
<LPR_SettingsRenderZonesDescription>Enable this to include zones in the rendered image.</LPR_SettingsRenderZonesDescription>
49+
<LPR_SettingsRenderOverlaysLabel>Overlays</LPR_SettingsRenderOverlaysLabel>
50+
<LPR_SettingsRenderOverlaysDescription>Enable this to include overlays in the rendered image. This setting includes all overlays.</LPR_SettingsRenderOverlaysDescription>
4751
<LPR_SettingsSmoothRenderAreaStepsLabel>Smooth render area on change (set smoothing steps)</LPR_SettingsSmoothRenderAreaStepsLabel>
4852
<LPR_SettingsSmoothRenderAreaStepsDescription>You can increase this if you want a smoother transition of your rendered area when you change the area with corner markers. Rendering will transition smoothly to the new area in the next X renderings. (Note that it may take a while to get to the new area if you choose a high step value and a low render interval.)</LPR_SettingsSmoothRenderAreaStepsDescription>
4953
<LPR_SettingsIntervalLabel>Render every</LPR_SettingsIntervalLabel>

Progress-Renderer.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
<Compile Include="Source\Mod\PRMod.cs" />
110110
<Compile Include="Source\Mod\PRModSettings.cs" />
111111
<Compile Include="Source\UI\SmallMessageBox.cs" />
112+
<Compile Include="Source\Utils\Utils.cs" />
112113
</ItemGroup>
113114
<ItemGroup>
114115
<Content Include="About\About.xml" />
@@ -124,6 +125,7 @@
124125
<Content Include="Common\Textures\UI\Designators\CornerMarkerOn.png" />
125126
<Content Include="News\UpdateFeatureDefs\UpdateFeatures.xml" />
126127
<Content Include="v1.2\Assemblies\Progress-Renderer.dll" />
128+
<Content Include="v1.4\Assemblies\Progress-Renderer.dll" />
127129
</ItemGroup>
128130
<ItemGroup>
129131
<None Include=".gitattributes" />

Source/Designator/Designator_CornerMarker.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ public override void DesignateSingleCell(IntVec3 c)
7070

7171
private void DesignateSingleCellFeedback()
7272
{
73-
List<Designation> cornerMarkers = Map.designationManager.allDesignations.FindAll(des => des.def == DesignationDefOf.CornerMarker);
73+
var cornerMarkers = Map.designationManager.AllDesignations.FindAll(des => des.def == DesignationDefOf.CornerMarker);
7474
// Message for the amount of markers on the map
75-
int markerCount = cornerMarkers.Count;
75+
var markerCount = cornerMarkers.Count;
7676
string message = TranslatorFormattedStringExtensions.Translate("LPR_MessageCornerMarkerAmount", markerCount) + " ";
7777
if (markerCount < 2)
7878
{
@@ -90,23 +90,23 @@ private void DesignateSingleCellFeedback()
9090
// Message for the created area (if enough markers)
9191
if (markerCount > 1)
9292
{
93-
int startX = Map.Size.x;
94-
int startZ = Map.Size.z;
95-
int endX = 0;
96-
int endZ = 0;
97-
foreach (Designation des in cornerMarkers)
93+
var startX = Map.Size.x;
94+
var startZ = Map.Size.z;
95+
var endX = 0;
96+
var endZ = 0;
97+
foreach (var des in cornerMarkers)
9898
{
99-
IntVec3 cell = des.target.Cell;
99+
var cell = des.target.Cell;
100100
if (cell.x < startX) { startX = cell.x; }
101101
if (cell.z < startZ) { startZ = cell.z; }
102102
if (cell.x > endX) { endX = cell.x; }
103103
if (cell.z > endZ) { endZ = cell.z; }
104104
}
105105
endX += 1;
106106
endZ += 1;
107-
int distX = endX - startX;
108-
int distZ = endZ - startZ;
109-
string ratio = ((float)distX / distZ).ToString("0.###");
107+
var distX = endX - startX;
108+
var distZ = endZ - startZ;
109+
var ratio = ((float)distX / distZ).ToString("0.###");
110110
string messageRect = TranslatorFormattedStringExtensions.Translate("LPR_MessageCornerMarkersRect", distX, distZ);
111111
if (distX * 3 == distZ * 4)
112112
{

Source/Gen/MoreGenDate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static class MoreGenDate
88

99
public static int QuadrumInteger(long absTicks, float longitude)
1010
{
11-
Quadrum quadrum = GenDate.Quadrum(absTicks, longitude);
11+
var quadrum = GenDate.Quadrum(absTicks, longitude);
1212
if (quadrum == Quadrum.Aprimay) { return 1; }
1313
else if (quadrum == Quadrum.Jugust) { return 2; }
1414
else if (quadrum == Quadrum.Septober) { return 3; }
@@ -18,7 +18,7 @@ public static int QuadrumInteger(long absTicks, float longitude)
1818

1919
public static int HoursPassedInteger(int absTicks, float longitude)
2020
{
21-
int ticks = absTicks + LocalTicksOffsetFromLongitude(longitude);
21+
var ticks = absTicks + LocalTicksOffsetFromLongitude(longitude);
2222
return ticks / 2500;
2323
}
2424

0 commit comments

Comments
 (0)