Skip to content

Commit

Permalink
Fix Next Budget Alarm doubling up time
Browse files Browse the repository at this point in the history
  • Loading branch information
severedsolo committed Aug 13, 2021
1 parent 2d20ad0 commit 8aacc9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions .idea/.idea.Bureaucracy/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Bureaucracy/Crew/CrewMember.cs
Expand Up @@ -92,7 +92,7 @@ public void Train()
KerbalRoster.SetExperienceLevel(CrewReference(), newLevel);
double trainingTime = newLevel * Utilities.Instance.GetMonthLength();
CrewReference().SetInactive(trainingTime);
Utilities.Instance.NewStockAlarm(Name+" - Training", Name+" has completed their training", trainingTime);
Utilities.Instance.NewStockAlarm(Name+" - Training", Name+" has completed their training",Planetarium.GetUniversalTime()+trainingTime);
Debug.Log("[Bureaucracy]: "+Name+" entered training for "+trainingTime+", new Level: "+newLevel);
}

Expand Down
2 changes: 1 addition & 1 deletion Bureaucracy/Utilities.cs
Expand Up @@ -27,7 +27,7 @@ public void NewStockAlarm(string alarmName, string alarmDescription, double alar
warp = AlarmActions.WarpEnum.KillWarp,
message = AlarmActions.MessageEnum.Yes
},
ut = Planetarium.GetUniversalTime() + alarmTime
ut = alarmTime
};
AlarmClockScenario.AddAlarm(alarmToSet);
}
Expand Down

0 comments on commit 8aacc9a

Please sign in to comment.