Esempio n. 1
0
 private void OnTimeChanged(object sender, TimeChangedEventArgs e)
 {
     BarsUpdate.UpdateBarsInformation();
     BarsUpdate.CalculatePercentage();
     BarsWarnings.VerifyStatus();
     Penalty.VerifyPenalty();
     NetController.Sync();
 }
Esempio n. 2
0
 private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
 {
     if (!NetController.firstLoad)
     {
         NetController.Sync();
     }
     Interaction.Awake();
     NetController.Sync();
     BarsPosition.SetBarsPosition();
     Interaction.ReceiveAwakeInfos();
     BarsUpdate.CalculatePercentage();
     BarsWarnings.VerifyStatus();
 }
Esempio n. 3
0
        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();
            }
        }