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
        public static void VerifyPassOut()
        {
            if (Game1.player.health <= 0)
            {
                if (!alreadyCheckedFaint)
                {
                    ModEntry.data.actual_hunger = ModEntry.data.max_hunger / 3;
                    ModEntry.data.actual_thirst = ModEntry.data.max_thirst / 2;

                    NetController.Sync();

                    alreadyCheckedFaint = true;
                }
            }
            else
            {
                alreadyCheckedFaint = false;
            }
        }
Esempio n. 4
0
 public static void ForceSync(string command, string[] args)
 {
     if (!Context.IsWorldReady)
     {
         return;
     }
     if (Context.IsMultiplayer)
     {
         if (Context.IsMainPlayer)
         {
             NetController.SyncAllPlayers();
             NetController.Sync();
             Debugger.Log($"All players are now synchronized!", "Info");
         }
         else
         {
             Debugger.Log(_error_permission, "Error");
         }
     }
     else
     {
         Debugger.Log(_error_multiplayer, "Info");
     }
 }