Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-miasik committed Jan 5, 2023
2 parents f6d19bf + 832e6e8 commit 304ecdb
Show file tree
Hide file tree
Showing 28 changed files with 1,416 additions and 1,320 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### How to Start
- Please see our [code of conduct](/CODE_OF_CONDUCT.md) prior to contribution.
- The best way to start contributing is to open a line of dialog in our [discussions page](https://github.com/adrian-miasik/unity-pomodoro/discussions). I'm asking potential contributors to come forward with a discussion prior to doing any work.
- In the discussions page you can propose ideas, pull requests, and discuss how you'd like to help out. Even fixing typos is highly appreciated!
- We reserve the right to decline any proposals but likely will accept any help we can get. 😃
- The best way to start contributing is to open a line of dialog in our [discussions page](https://github.com/adrian-miasik/unity-pomodoro/discussions). I'm asking contributors to come forward with a discussion prior to doing any work if the intent is to merge into this repo. Otherwise, fork away and modify for your own personal use!
- In the discussions page you can propose ideas, pull requests, and discuss how you'd like to help out. Even fixing typos is highly appreciated.
- Once your contribution is accepted and merged we will modify the credits bubble to include your github name and link if you'd like.
- We reserve the right to decline any proposals if they don't align with the projects vision or intent, but honestly can get all the help we can get. 😄
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ Want to help? If you're interested in contributing to the project, please see ou

 
## Downloads
### [Latest Release - v2.2.0](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.2.0)
### [Latest Release - v2.4.0](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.4.0)
#### Direct
- Windows
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.2.0/unity-pomodoro-2.2.0-windows-desktop-64-bit.zip)
- [32-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.2.0/unity-pomodoro-2.2.0-windows-desktop-32-bit.zip)
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.4.0/unity-pomodoro-2.4.0-windows-desktop-64-bit.zip)
- [32-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.4.0/unity-pomodoro-2.4.0-windows-desktop-32-bit.zip)
- Mac
- [Universal](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.2.0/unity-pomodoro-2.2.0-mac-desktop-universal.zip)
- [Universal](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.4.0/unity-pomodoro-2.4.0-mac-desktop-universal.zip)
- Linux
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.2.0/unity-pomodoro-2.2.0-linux-desktop-64-bit.zip)
- Android
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.4.0/unity-pomodoro-2.4.0-linux-desktop-64-bit.zip)
- Android (v2.2.0)
- [APK](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.2.0/unity-pomodoro-2.2.0-android.apk)
#### Platform Specific
- Steam - [Wishlist Now!](https://store.steampowered.com/app/2173940/Unity_Pomodoro/) - Releasing Q1 2023
- [Steam (Windows)](https://store.steampowered.com/app/2173940/Unity_Pomodoro/)
- The Steam version will include **Steam Achievements**.
- The Steam version will include **Steam Cloud Saves** for your preferred settings.
- The Steam version will include **Steam Statistics**.
Expand All @@ -59,6 +59,7 @@ Want to help? If you're interested in contributing to the project, please see ou
- The UWP version provides **Windows Notifications** when the timer is complete.
- The UWP version provides **Windows Launcher** when a user interacts with a URL.
### Previous Releases
- [v2.2.0 - Google Play Store, New Animations, Documentation, Code Improvements, and Bugfixes](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.2.0)
- [v2.1.1 (Hotfix) - Desktop Timer No Longer Decrements on App Focus Loss & Regain](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.1.1)
- [v2.1.0 - Android Support, Fixed Visual Artifacts, Improved Performance, and New Community Efforts](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.1.0)
- [v2.0.0 - Persistent Settings, Translucent Image Blur, Unity Analytics, Architecture, and Bugfixes!](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.0.0)
Expand Down
540 changes: 264 additions & 276 deletions UnityPomodoro/Assembly-CSharp-Editor.csproj

Large diffs are not rendered by default.

514 changes: 257 additions & 257 deletions UnityPomodoro/Assembly-CSharp.csproj

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions UnityPomodoro/Assets/AdrianMiasik/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 17.183512
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.y
Expand Down Expand Up @@ -2926,7 +2926,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 17.183512
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.y
Expand Down Expand Up @@ -5125,7 +5125,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 35.25
m_fontSize: 31.95
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -5741,7 +5741,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 17.183512
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.y
Expand Down Expand Up @@ -6710,7 +6710,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20.95
m_fontSize: 19.3
m_fontSizeBase: 10.07
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -8734,7 +8734,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 17.183512
objectReference: {fileID: 0}
- target: {fileID: 489833435901344923, guid: 88cf29bd208ddcf4ca1a76e1dd21e99c, type: 3}
propertyPath: m_SizeDelta.y
Expand Down Expand Up @@ -11411,7 +11411,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 10.15
m_fontSize: 9.35
m_fontSizeBase: 9
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
using AdrianMiasik.Components.Core.Helpers;
using AdrianMiasik.Components.Core.Items;
using AdrianMiasik.Components.Specific;
using AdrianMiasik.Interfaces;
using AdrianMiasik.ScriptableObjects;
#if !UNITY_ANDROID
using Steamworks;
using Steamworks.Data;
using UnityEditor;
#endif
using UnityEngine;
using UnityEngine.UI;
using Color = UnityEngine.Color;
Expand Down Expand Up @@ -465,6 +466,7 @@ private void OnSecondsChanged(int previousValue, int newValue)

// Debug.Log("Second changed from " + previousValue + " to " + newValue);

#if !UNITY_ANDROID
if (SteamClient.IsValid)
{
// Add second to User Stats (User for stats and achievements)
Expand Down Expand Up @@ -497,9 +499,10 @@ private void OnSecondsChanged(int previousValue, int newValue)
}
}
}
#endif
}

#if UNITY_EDITOR
#if UNITY_EDITOR && !UNITY_ANDROID
[MenuItem("Adrian Miasik/Achievements and Statistics/Display 'All in a day's work' progression")]
private static void DisplayAchievementAllInADaysWorkProgression()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
using System.Collections.Generic;
using AdrianMiasik.Components.Base;
using AdrianMiasik.Components.Core.Items;
#if !UNITY_ANDROID
using Steamworks;
using Steamworks.Data;
#endif
using UnityEngine;
using UnityEngine.UI;

Expand Down Expand Up @@ -83,6 +85,7 @@ public void FillTomato()
completedTomatoes.Add(tomatoToFill);
tomatoToFill.Complete();

#if !UNITY_ANDROID
// Check if steam client is found...
if (SteamClient.IsValid)
{
Expand Down Expand Up @@ -124,6 +127,7 @@ public void FillTomato()
}
}
}
#endif

// Check for completion
if (m_uncompletedTomatoes.Count == 0)
Expand All @@ -150,32 +154,38 @@ public void SetHorizontalScale(Vector3 newScale)
/// </summary>
public void ConsumeTomatoes()
{
// CANNED ACHIEVEMENT
// Add discarded pomodoro/tomato to User Stats
SteamUserStats.AddStat("pomodoros_disposed", completedTomatoes.Count);
SteamUserStats.StoreStats();

// Fetch canned achievement
Achievement ach = new("ACH_CANNED");

// If achievement is not unlocked...
if (!ach.State)
#if !UNITY_ANDROID
// Check if steam client is found...
if (SteamClient.IsValid)
{
// Fetch progression
int pomodorosDiscarded = SteamUserStats.GetStatInt("pomodoros_disposed");

if (pomodorosDiscarded >= 8)
{
ach.Trigger();
Debug.Log("Steam Achievement Unlocked! 'Canned for L8R: Dispose of 8" +
" pomodoros/tomatoes..'");
}
else if (pomodorosDiscarded != 0)
// CANNED ACHIEVEMENT
// Add discarded pomodoro/tomato to User Stats
SteamUserStats.AddStat("pomodoros_disposed", completedTomatoes.Count);
SteamUserStats.StoreStats();
// Fetch canned achievement
Achievement ach = new("ACH_CANNED");

// If achievement is not unlocked...
if (!ach.State)
{
// Display progress every time we discard
SteamUserStats.IndicateAchievementProgress(ach.Identifier, pomodorosDiscarded, 8);
// Fetch progression
int pomodorosDiscarded = SteamUserStats.GetStatInt("pomodoros_disposed");

if (pomodorosDiscarded >= 8)
{
ach.Trigger();
Debug.Log("Steam Achievement Unlocked! 'Canned for L8R: Dispose of 8" +
" pomodoros/tomatoes..'");
}
else if (pomodorosDiscarded != 0)
{
// Display progress every time we discard
SteamUserStats.IndicateAchievementProgress(ach.Identifier, pomodorosDiscarded, 8);
}
}
}
#endif

// Move completed tomatoes back into the uncompleted tomatoes list in the correct order
for (int i = completedTomatoes.Count; i > 0; i--)
Expand Down
Loading

0 comments on commit 304ecdb

Please sign in to comment.