Skip to content

Commit

Permalink
Update for unstable 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehni committed Jun 18, 2018
1 parent acde56b commit e7e7847
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,6 @@ ModelManifest.xml

# FAKE - F# Make
.fake/
About/cropped first edit.jpg
About/first edit.jpg
About/preview (2).png
Binary file modified Assemblies/0Harmony.dll
Binary file not shown.
Binary file removed Assemblies/FoodAlert.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions Source/FoodAlert/FoodAlert.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\..\Assemblies\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=1.0.9.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\0Harmony.dll</HintPath>
<HintPath>..\..\..\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Assembly-CSharp.dll</HintPath>
Expand Down
8 changes: 3 additions & 5 deletions Source/FoodAlert/HarmonyPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static HarmonyPatches()
private static void FoodCounter_NearDatePostfix(float leftX, float width, ref float curBaseY)
{
{
var map = Find.VisibleMap;
var map = Find.CurrentMap;
if (map == null || !map.IsPlayerHome) return;
if (Find.TickManager.TicksGame < 150000) return;

Expand Down Expand Up @@ -61,6 +61,7 @@ where pr.guest.GetsFood
addendumForFlavour = "FoodAlert_Decent".Translate();
break;
}
if (humansGettingFood == 0) addendumForFlavour = "\n\nShit you made me divide by zero. Disregard that.";

float rightMargin = 7f;
Rect zlRect = new Rect(UI.screenWidth - Alert.Width, curBaseY - 24f, Alert.Width, 24f);
Expand All @@ -75,10 +76,7 @@ where pr.guest.GetsFood
Text.Anchor = TextAnchor.UpperRight;
Rect rect = zlRect.AtZero();
rect.xMax -= rightMargin;
if (Event.current.capsLock)
{
rect.yMin -= 50f;
}

Widgets.Label(rect, daysWorthOfHumanFood);
Text.Anchor = TextAnchor.UpperLeft;
GUI.EndGroup();
Expand Down
2 changes: 1 addition & 1 deletion Source/FoodAlert/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.18.0.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit e7e7847

Please sign in to comment.