Skip to content

Commit

Permalink
v3.8.6 fixes a bug in Rescue switchen, widens the bolt menu icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Oct 2, 2023
1 parent 11163c8 commit 46bbb9a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Binary file modified 1.4/Assemblies/AchtungMod.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</li>
</modDependencies>
<packageId>brrainz.achtung</packageId>
<modVersion>3.8.5.0</modVersion>
<modVersion>3.8.6.0</modVersion>
<steamAppId>730936602</steamAppId>
<url>https://github.com/pardeike/Achtung2</url>
<description>Command your colonists like a boss!
Expand Down
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>net.pardeike.rimworld.mod.achtung</identifier>
<version>3.8.5.0</version>
<version>3.8.6.0</version>
<targetVersions>
<li>1.0.0</li>
<li>1.1.0</li>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ModName>Achtung</ModName>
<ModFileName>Achtung</ModFileName>
<Repository>https://github.com/pardeike/Achtung2</Repository>
<ModVersion>3.8.5.0</ModVersion>
<ModVersion>3.8.6.0</ModVersion>
<ProjectGuid>{8BD5A28F-96C4-43B4-907F-600AA0162F84}</ProjectGuid>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Source/DynamicWorkTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static void Reload<T>() where T : Def

static void UpdatePawns(int index, int copyFrom)
{
Find.Maps.Do(map => map.mapPawns.AllPawnsSpawned.DoIf(p => p.workSettings != null, p =>
Find.Maps.Do(map => map.mapPawns.AllPawnsSpawned.DoIf(p => p.workSettings?.priorities != null, p =>
{
if (p.workSettings.EverWork)
{
Expand Down
8 changes: 4 additions & 4 deletions Source/ForcedMultiFloatMenuOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ForcedMultiFloatMenuOption : FloatMenuOption
public bool actionSelected = false;

public static float buttonSpace = 10;
public static float buttonSize = 16;
public static float buttonWidth = 32;

public ForcedMultiFloatMenuOption(List<Pawn> forcedPawns, List<FloatMenuOption> options, Func<Rect, bool> originalExtraPartOnGUI, string label)
: base(label, null, MenuOptionPriority.Default, null, null, 0f, null, null, false, 0)
Expand All @@ -36,16 +36,16 @@ public ForcedMultiFloatMenuOption(List<Pawn> forcedPawns, List<FloatMenuOption>
return RenderExtraPartOnGui(extraPartRect);
};
// somehow necessary or else 'extraPartWidth' will be 0
extraPartWidth = buttonSpace + buttonSize;
extraPartWidth = buttonSpace + buttonWidth;
}

public bool RenderExtraPartOnGui(Rect drawRect)
{
var rect = drawRect;
rect.xMin = rect.xMax - buttonSize;
rect.xMin = rect.xMax - buttonWidth;
rect = rect.Rounded();
var buttonRect = rect;
var padding = Mathf.FloorToInt((rect.height - buttonSize) / 2);
var padding = Mathf.FloorToInt((rect.height - 16) / 2);
rect.y += padding;
rect.height -= 2 * padding;

Expand Down

0 comments on commit 46bbb9a

Please sign in to comment.