public static void OnEmptyOrFullUIButtonClick_Postfix(UIPowerExchangerWindow __instance, int itemId) { //Notify other about taking or inserting accumulators PowerExchangerComponent powerExchangerComponent = __instance.powerSystem.excPool[__instance.exchangerId]; LocalPlayer.SendPacketToLocalStar(new PowerExchangerStorageUpdatePacket(__instance.exchangerId, powerExchangerComponent.emptyCount, powerExchangerComponent.fullCount, GameMain.localPlanet?.factoryIndex ?? -1)); }
public static void OnModeButtonClick_Prefix(UIPowerExchangerWindow __instance, int targetState) { //Notify other players about changing mode of the Power Exchenger if (SimulatedWorld.Initialized) { LocalPlayer.SendPacketToLocalStar(new PowerExchangerChangeModePacket(__instance.exchangerId, targetState, GameMain.localPlanet?.id ?? -1)); } }
public static void OnModeButtonClick_Prefix(UIPowerExchangerWindow __instance, int targetState) { //Notify other players about changing mode of the Power Exchenger if (Multiplayer.IsActive) { Multiplayer.Session.Network.SendPacketToLocalStar(new PowerExchangerChangeModePacket(__instance.exchangerId, targetState, GameMain.localPlanet?.id ?? -1)); } }
public static void OnEmptyOrFullUIButtonClick_Postfix(UIPowerExchangerWindow __instance) { //Notify other about taking or inserting accumulators if (Multiplayer.IsActive) { PowerExchangerComponent powerExchangerComponent = __instance.powerSystem.excPool[__instance.exchangerId]; Multiplayer.Session.Network.SendPacketToLocalStar(new PowerExchangerStorageUpdatePacket(__instance.exchangerId, powerExchangerComponent.emptyCount, powerExchangerComponent.fullCount, GameMain.localPlanet?.id ?? -1)); } }
public static void OnModeButtonClick_Prefix(UIPowerExchangerWindow __instance, int targetState) { //Notify other players about changing mode of the Power Exchenger LocalPlayer.SendPacketToLocalStar(new PowerExchangerChangeModePacket(__instance.exchangerId, targetState, GameMain.localPlanet?.factoryIndex ?? -1)); }