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)); }
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)); } }
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)); } }