Compare commits

...

3 Commits

Author SHA1 Message Date
9a02f8008c Updated for 1.6
- Bump Dependency
- Bump target framework to NET6.0
- Replace getExtraMillisecondsPerInGameMinuteForThisLocation with corresponding property
2024-04-08 21:16:11 +02:00
f4c9868f6a Version Bump missing from last commit 2022-07-23 12:22:56 +02:00
df7084b438 Update Keys for nexusmods.com 2022-07-23 12:18:27 +02:00
3 changed files with 7 additions and 8 deletions

View File

@ -9,7 +9,7 @@ namespace Relativity
public class ModEntry : Mod
{
// GTI = GameTickInterval, STP = ShouldTimePass
private static int LocalGTI => 7000 + (Game1.currentLocation?.getExtraMillisecondsPerInGameMinuteForThisLocation() ?? 0);
private static int LocalGTI => 7000 + (Game1.currentLocation?.ExtraMillisecondsPerInGameMinute ?? 0);
private static bool LocalSTP => Game1.shouldTimePass(true);
private readonly Dictionary<long, (bool STP, int GTI)> playerTimeData = new();
@ -62,10 +62,9 @@ namespace Relativity
if (float.IsNaN(totalElapsedGTI)) totalElapsedGTI = 0;
float players = playerTimeData.Count;
float paused = playerTimeData.Count(x => !x.Value.STP);
float timeSpeedFactor = 1f - paused / players;
float active = playerTimeData.Count(x => x.Value.STP);
totalElapsedGTI += Game1.gameTimeInterval * timeSpeedFactor;
totalElapsedGTI += Game1.gameTimeInterval * (active / players);
Game1.gameTimeInterval = 0;
float averageGTI = playerTimeData.Sum(x => x.Value.GTI) / players;

View File

@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.0.1" />
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" />
</ItemGroup>
</Project>

View File

@ -1,10 +1,10 @@
{
"Name": "Relativity",
"Author": "AdroSlice",
"Version": "1.0.0",
"Version": "1.0.2",
"Description": "Slows down multiplayer time based on how many players would normally not have time pass in singleplayer.",
"UniqueID": "AdroSlice.Relativity",
"EntryDll": "Relativity.dll",
"MinimumApiVersion": "3.0.0",
"UpdateKeys": []
"UpdateKeys": [ "Nexus:13028" ]
}