Ejemplo n.º 1
0
 static void Postfix(CommuterChainController __result, StationController sourceStation)
 {
     if (NetworkManager.IsHost())
     {
         NetworkJobsSync jobSync = sourceStation.GetComponent <NetworkJobsSync>();
         if (jobSync != null)
         {
             jobSync.OnSingleChainGeneratedWithExistingCars(__result);
         }
     }
 }
    public void OnFinishLoading()
    {
        if (NetworkManager.IsHost())
        {
            SendCurrentJobs();

            foreach (StationController station in StationController.allStations)
            {
                NetworkJobsSync jobSync = station.gameObject.AddComponent <NetworkJobsSync>();
                jobSync.OnJobsGenerated += SendJobCreatedMessage;
            }
            IsSynced = true;
        }
    }
Ejemplo n.º 3
0
 static void Postfix(CommuterChainController __result, PassengerJobGenerator __instance, TrainCarsPerLogicTrack consistInfo = null)
 {
     if (NetworkManager.IsHost())
     {
         if (__instance.Controller && __instance.Controller.GetComponent <NetworkJobsSync>())
         {
             NetworkJobsSync jobSync = __instance.Controller.GetComponent <NetworkJobsSync>();
             if (consistInfo != null)
             {
                 jobSync.OnSingleChainGeneratedWithExistingCars(__result);
             }
             else
             {
                 jobSync.OnSingleChainGenerated(__result);
             }
         }
     }
 }