private void OnTimeChanged(object sender, TimeChangedEventArgs e) { BarsUpdate.UpdateBarsInformation(); BarsUpdate.CalculatePercentage(); BarsWarnings.VerifyStatus(); Penalty.VerifyPenalty(); NetController.Sync(); }
private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) { if (!NetController.firstLoad) { NetController.Sync(); } Interaction.Awake(); NetController.Sync(); BarsPosition.SetBarsPosition(); Interaction.ReceiveAwakeInfos(); BarsUpdate.CalculatePercentage(); BarsWarnings.VerifyStatus(); }
private static void DecreaseStatus(string tool_used) { if (Tools.GetToolDatabase().TryGetValue(tool_used, out string tool_status_string)) { List <string> tool_status = tool_status_string.Split('/').ToList(); if (ModEntry.data.actual_hunger >= 0) { ModEntry.data.actual_hunger -= float.Parse(tool_status[0]) * BarsDatabase.tool_use_multiplier; } if (ModEntry.data.actual_thirst >= 0) { ModEntry.data.actual_thirst -= float.Parse(tool_status[1]) * BarsDatabase.tool_use_multiplier; } Penalty.VerifyPenalty(); BarsInformations.NormalizeStatus(); BarsWarnings.VerifyStatus(); } }