Exemplo n.º 1
0
        public static void OnManualServingContentChange_Postfix(UISiloWindow __instance)
        {
            //Notify about manual rockets inserting / withdrawing change
            StorageComponent storage = (StorageComponent)AccessTools.Field(typeof(UISiloWindow), "servingStorage").GetValue(__instance);

            LocalPlayer.SendPacketToLocalPlanet(new SiloStorageUpdatePacket(__instance.siloId, storage.grids[0].count));
        }
Exemplo n.º 2
0
 public static void OnManualServingContentChange_Postfix(UISiloWindow __instance)
 {
     //Notify about manual rockets inserting / withdrawing change
     if (SimulatedWorld.Initialized)
     {
         StorageComponent storage = (StorageComponent)AccessTools.Field(typeof(UISiloWindow), "servingStorage").GetValue(__instance);
         LocalPlayer.SendPacketToLocalStar(new SiloStorageUpdatePacket(__instance.siloId, storage.grids[0].count, GameMain.localPlanet?.factoryIndex ?? -1));
     }
 }
Exemplo n.º 3
0
 public static void OnManualServingContentChange_Postfix(UISiloWindow __instance)
 {
     //Notify about manual rockets inserting / withdrawing change
     if (Multiplayer.IsActive)
     {
         StorageComponent storage = __instance.servingStorage;
         Multiplayer.Session.Network.SendPacketToLocalStar(new SiloStorageUpdatePacket(__instance.siloId, storage.grids[0].count, storage.grids[0].inc, GameMain.localPlanet?.id ?? -1));
     }
 }