Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
- Fix for inspiration not showing in mood description
- Inspiration added to the mood tooltip
  • Loading branch information
Jaxe-Dev committed Sep 30, 2018
1 parent 5b1fff6 commit 0e65f23
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<name>RimHUD</name>
<author>Jaxe</author>
<targetVersion>0.19.0</targetVersion>
<description>Mod Version: 1.2.0\n\n\n\nRimHUD is a UI mod that displays a detailed information about a selected character or creature. The HUD display is integrated into the inspect pane which can be resized to fit the additional information. Alternatively the HUD can a separate floating window and docked to any position on the screen.\n\nVisual warnings will appear if a pawn has any life threatening conditions, has wounds that need tending or is close to a mental breakdown.</description>
<description>Mod Version: 1.2.1\n\n\n\nRimHUD is a UI mod that displays a detailed information about a selected character or creature. The HUD display is integrated into the inspect pane which can be resized to fit the additional information. Alternatively the HUD can a separate floating window and docked to any position on the screen.\n\nVisual warnings will appear if a pawn has any life threatening conditions, has wounds that need tending or is close to a mental breakdown.</description>
</ModMetaData>
2 changes: 1 addition & 1 deletion About/ModSync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ModSyncNinjaData>
<ID>59f538ed-f86d-4506-a4a5-7e9faaa37600</ID>
<ModName>RimHUD</ModName>
<Version>v1.2.0</Version>
<Version>v1.2.1</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>Jaxe-Dev</Owner>
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RimHUD
![Mod Version](https://img.shields.io/badge/Mod_Version-1.2.0-blue.svg)
![Mod Version](https://img.shields.io/badge/Mod_Version-1.2.1-blue.svg)
![RimWorld Version](https://img.shields.io/badge/Built_for_RimWorld-B19-blue.svg)
![Harmony Version](https://img.shields.io/badge/Powered_by_Harmony-1.2.0.1-blue.svg)\
![Steam Subscribers](https://img.shields.io/badge/dynamic/xml.svg?label=Steam+Subscribers&query=//table/tr[2]/td[1]&colorB=blue&url=https://steamcommunity.com/sharedfiles/filedetails/%3Fid=1508850027&suffix=+total)
Expand All @@ -16,7 +16,12 @@ Visual warnings will appear if a pawn has any life threatening conditions, has w

---

##### INSTALLATION
##### STEAM INSTALLATION
- **[Go to the Steam Workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=1508850027) and subscribe to the mod.**

---

##### NON-STEAM INSTALLATION
- **[Download the latest release](https://github.com/Jaxe-Dev/RimHUD/releases/latest) and unzip it into your *RimWorld/Mods* folder.**

---
Expand Down
8 changes: 7 additions & 1 deletion Source/Data/PawnModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ private StringPlus GetMindState()
if (Base.mindState.mentalBreaker.BreakMajorIsImminent) { return StringPlus.Create(Lang.Get("Mood.MajorBreakImminent"), Theme.WarningColor.Value); }
if (Base.mindState.mentalBreaker.BreakMinorIsImminent) { return StringPlus.Create(Lang.Get("Mood.MinorBreakImminent"), Theme.WarningColor.Value); }

var inspiration = GetInspiration();
if (inspiration != null) { return inspiration; }

if (Base.needs.mood.CurLevel > 0.9f) { return StringPlus.Create(Lang.Get("Mood.Happy"), Theme.ExcellentColor.Value); }
return Base.needs.mood.CurLevel > 0.65f ? StringPlus.Create(Lang.Get("Mood.Content"), Theme.GoodColor.Value) : StringPlus.Create(Lang.Get("Mood.Indifferent"), Theme.InfoColor.Value);
}
Expand All @@ -226,7 +229,7 @@ private StringPlus GetInspiration()
return StringPlus.Create(inspiration, Theme.ExcellentColor.Value);
}

private StringPlus GetMindCondition() => GetMindState() ?? GetInspiration();
private StringPlus GetMindCondition() => GetMindState();

private string GetActivity()
{
Expand Down Expand Up @@ -329,6 +332,9 @@ private string GetMoodTooltip()
builder.AppendLine(line);
}

builder.AppendLine();
if (Base.Inspired) { builder.AppendLine(Base.Inspiration.InspectLine.Color(Theme.ExcellentColor.Value)); }

return builder.Length > 0 ? builder.ToStringTrimmed().Size(Theme.RegularTextStyle.ActualSize) : null;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Data/Persistent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal static class Persistent
{
private const string ConfigFileName = "Config.xml";

private static bool VersionNeedsNewConfig { get; } = true;
private static bool VersionNeedsNewConfig { get; } = false;
public static bool ConfigWasReset { get; private set; }

private static readonly FileInfo ConfigFile = new FileInfo(Path.Combine(Mod.ConfigDirectory.FullName, ConfigFileName));
Expand Down
2 changes: 1 addition & 1 deletion Source/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal static class Mod
{
public const string Id = "RimHUD";
public const string Name = Id;
public const string Version = "1.2.0";
public const string Version = "1.2.1";

public static readonly DirectoryInfo ConfigDirectory = new DirectoryInfo(Path.Combine(GenFilePaths.ConfigFolderPath, Id));
public static bool FirstTimeUser { get; }
Expand Down

0 comments on commit 0e65f23

Please sign in to comment.