fix temp storm duration growth
This commit is contained in:
6
.idea/.idea.TemporalTempestLight/.idea/vcs.xml
generated
Normal file
6
.idea/.idea.TemporalTempestLight/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,6 +1,8 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AICoreAPI_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F185df8fd8a7e41f3aa8086976f138a921db000_003F9c_003Fd1964c41_003FICoreAPI_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AICoreServerAPI_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F185df8fd8a7e41f3aa8086976f138a921db000_003F84_003F9c13deda_003FICoreServerAPI_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIGameCalendar_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F185df8fd8a7e41f3aa8086976f138a921db000_003F15_003F938573ab_003FIGameCalendar_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIServerEventAPI_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F185df8fd8a7e41f3aa8086976f138a921db000_003Fbd_003Fd2fe3ff1_003FIServerEventAPI_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIWorldAccessor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F185df8fd8a7e41f3aa8086976f138a921db000_003Fbc_003Facf979cc_003FIWorldAccessor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASystemTemporalStability_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fae66fe3dcb4e4d08b5173bd19fa1fd242b7200_003Fc7_003Fe07d0c83_003FSystemTemporalStability_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATemporalStormRunTimeData_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fae66fe3dcb4e4d08b5173bd19fa1fd242b7200_003F03_003F0523d017_003FTemporalStormRunTimeData_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
|
@ -4,11 +4,11 @@ namespace TemporalTempestLight;
|
||||
|
||||
public class ModConfig
|
||||
{
|
||||
public double InitialStormDuration = 0.2;
|
||||
public double StormDurationGrowthPerMonth = 0.0208;
|
||||
public double StormDurationLimit = 2;
|
||||
public double InitialStormDuration = 6;
|
||||
public double StormDurationGrowthPerYear = 12;
|
||||
public double StormDurationLimit = 42;
|
||||
|
||||
public double InitialStormDurationReductionMul = 0.2;
|
||||
public double StormDurationReductionMulGrowthPerDay = 0.00139;
|
||||
public double StormDurationReductionMulDecreasePerYear = 0.09;
|
||||
public double StormDurationReductionMulLimit = 0.02;
|
||||
}
|
@ -31,7 +31,7 @@ internal class TemporalStabilityPatches
|
||||
|
||||
var stormActiveDays = system.StormData.stormActiveTotalDays - api.World.Calendar.TotalDays;
|
||||
|
||||
((IServerPlayer)(((EntityPlayer)(damageSource.GetCauseEntity())).Player)).SendMessage(GlobalConstants.GeneralChatGroup, (api.World.Calendar.TotalDays).ToString(), EnumChatType.Notification);
|
||||
((IServerPlayer)(((EntityPlayer)(damageSource.GetCauseEntity())).Player)).SendMessage(GlobalConstants.GeneralChatGroup, (stormActiveDays).ToString(), EnumChatType.Notification);
|
||||
|
||||
var stormActiveDaysReduction =
|
||||
stormActiveDays * 0.2;
|
||||
@ -50,11 +50,13 @@ internal class TemporalStabilityPatches
|
||||
if (stabilitySystem.StormData.nowStormActive)
|
||||
{
|
||||
if (tempest.IsStormInitialized) return;
|
||||
|
||||
var daysPerMoth = api.World.Config.GetAsInt("daysPerMonth");
|
||||
|
||||
stabilitySystem.StormData.stormActiveTotalDays = Math.Min(
|
||||
TemporalTempestLightModSystem.Config.InitialStormDuration +
|
||||
TemporalTempestLightModSystem.Config.StormDurationGrowthPerMonth * (api.World.Calendar.TotalDays / 9),
|
||||
TemporalTempestLightModSystem.Config.StormDurationLimit) + api.World.Calendar.TotalDays;
|
||||
TemporalTempestLightModSystem.Config.StormDurationGrowthPerYear * ((api.World.Calendar.TotalDays - 36) / daysPerMoth / 12),
|
||||
TemporalTempestLightModSystem.Config.StormDurationLimit) / 24 + api.World.Calendar.TotalDays;
|
||||
|
||||
tempest.IsStormInitialized = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user