File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 1.8.0] - 2024-04-12
9+
10+ ### Changed
11+
12+ - Fixed health & days left HUD to actually reflect the correct value (in real time)
13+
814## [ 1.7.1] - 2024-04-12
915
1016### Changed
Original file line number Diff line number Diff line change 44 <TargetFramework >netstandard2.1</TargetFramework >
55 <AssemblyName >ConfigurableWarning</AssemblyName >
66 <Description >Makes the game configurable!</Description >
7- <Version >1.7.1 </Version >
7+ <Version >1.8.0 </Version >
88 <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
99 <LangVersion >latest</LangVersion >
1010 <NoWarn >$(NoWarn);CS0436</NoWarn >
Original file line number Diff line number Diff line change 1+ using HarmonyLib ;
2+
3+ namespace ConfigurableWarning . Patches {
4+ [ HarmonyPatch ]
5+ internal class UIPatches {
6+ [ HarmonyPostfix ]
7+ [ HarmonyPatch ( typeof ( UI_Health ) , nameof ( UI_Health . Update ) ) ]
8+ internal static void UpdateHealth ( UI_Health __instance ) {
9+ __instance . fill . fillAmount = Player . localPlayer . data . health / Plugin . Instance . PluginConfig . maxHealth . Value ;
10+ }
11+
12+ [ HarmonyPostfix ]
13+ [ HarmonyPatch ( typeof ( UI_DaysLeft ) , nameof ( UI_DaysLeft . Update ) ) ]
14+ internal static void UpdateDaysLeft ( UI_DaysLeft __instance ) {
15+ int num = Plugin . Instance . PluginConfig . daysPerQuota . Value - SurfaceNetworkHandler . RoomStats . CurrentQuotaDay + 1 ;
16+
17+ __instance . text . text = ( num == 1 ) ? __instance . m_LastDayText : __instance . m_DaysLeftText . Replace ( "{0}" , num . ToString ( ) ) ;
18+ }
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments