Skip to content

Commit

Permalink
Merge pull request #2 from Mehni/Unstable-1.0
Browse files Browse the repository at this point in the history
Unstable 1.0
  • Loading branch information
Mehni authored Aug 29, 2018
2 parents acde56b + daef07d commit b27cc9c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 21 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
4 changes: 2 additions & 2 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModMetaData>
<name>Food Alert</name>
<author>Mehni</author>
<targetVersion>0.18.0</targetVersion>
<targetVersion>0.19.0</targetVersion>
<url>https://github.com/Mehni/FoodAlert/releases/latest</url>
<description>v0.18.0.2\n\n Shows a persistent readout with the amount of food you currently have in storage, and an estimate of how long stocks will last.</description>
<description>v1.0.1\n\n Shows a persistent readout with the amount of food you currently have in storage, and an estimate of how long stocks will last.</description>
</ModMetaData>
7 changes: 0 additions & 7 deletions About/ModSync.xml

This file was deleted.

Binary file modified Assemblies/0Harmony.dll
Binary file not shown.
Binary file modified Assemblies/FoodAlert.dll
Binary file not shown.
10 changes: 5 additions & 5 deletions Source/FoodAlert/FoodAlert.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
<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">
<Reference Include="0Harmony, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\0Harmony.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\..\..\Users\Maniak\Documents\RimWorld Mods\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\..\..\RimWorldWin_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand All @@ -46,7 +46,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\..\..\RimWorldWin_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
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
4 changes: 2 additions & 2 deletions 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: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("0.1.0.1")]
[assembly: AssemblyFileVersion("0.1.0.1")]

0 comments on commit b27cc9c

Please sign in to comment.