public static void OnFuelButtonClick_Postfix(UIPowerGeneratorWindow __instance)
        {
            //Notify about changing amount of fuel in power plant
            PowerGeneratorComponent thisComponent = __instance.powerSystem.genPool[__instance.generatorId];

            LocalPlayer.SendPacketToLocalStar(new PowerGeneratorFuelUpdatePacket(__instance.generatorId, thisComponent.fuelId, thisComponent.fuelCount, GameMain.localPlanet?.factoryIndex ?? -1));
        }
Beispiel #2
0
 public static void OnGammaMode2Click_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about change of ray receiver to mode "produce photons"
     if (Multiplayer.IsActive)
     {
         Multiplayer.Session.Network.SendPacketToLocalStar(new RayReceiverChangeModePacket(__instance.generatorId, RayReceiverMode.Photon, GameMain.localPlanet?.id ?? -1));
     }
 }
Beispiel #3
0
 public static void OnProductButtonClick(UIPowerGeneratorWindow __instance)
 {
     if (Multiplayer.IsActive)
     {
         PowerGeneratorComponent thisComponent = __instance.powerSystem.genPool[__instance.generatorId];
         Multiplayer.Session.Network.SendPacketToLocalStar(new PowerGeneratorProductUpdatePacket(thisComponent, __instance.factory.planetId));
     }
 }
 public static void OnCataButtonClick_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about changing amount of gravitational lens
     if (SimulatedWorld.Initialized)
     {
         LocalPlayer.SendPacketToLocalStar(new RayReceiverChangeLensPacket(__instance.generatorId, __instance.powerSystem.genPool[__instance.generatorId].catalystPoint, GameMain.localPlanet?.id ?? -1));
     }
 }
 public static void OnGammaMode2Click_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about change of ray receiver to mode "produce photons"
     if (SimulatedWorld.Initialized)
     {
         LocalPlayer.SendPacketToLocalStar(new RayReceiverChangeModePacket(__instance.generatorId, RayReceiverMode.Photon, GameMain.localPlanet?.id ?? -1));
     }
 }
 public static void OnGammaMode1Click_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about change of ray receiver to mode "electricity"
     if (SimulatedWorld.Initialized)
     {
         LocalPlayer.SendPacketToLocalStar(new RayReceiverChangeModePacket(__instance.generatorId, RayReceiverMode.Electricity, GameMain.localPlanet?.factoryIndex ?? -1));
     }
 }
Beispiel #7
0
 public static void OnFuelButtonClick_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about changing amount of fuel in power plant
     if (Multiplayer.IsActive)
     {
         PowerGeneratorComponent thisComponent = __instance.powerSystem.genPool[__instance.generatorId];
         Multiplayer.Session.Network.SendPacketToLocalStar(new PowerGeneratorFuelUpdatePacket(__instance.generatorId, thisComponent.fuelId, thisComponent.fuelCount, thisComponent.fuelInc, GameMain.localPlanet?.id ?? -1));
     }
 }
Beispiel #8
0
 public static void OnCataButtonClick_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about changing amount of gravitational lens
     if (Multiplayer.IsActive)
     {
         RayReceiverChangeLensPacket packet = new RayReceiverChangeLensPacket(__instance.generatorId,
                                                                              __instance.powerSystem.genPool[__instance.generatorId].catalystPoint,
                                                                              __instance.powerSystem.genPool[__instance.generatorId].catalystIncPoint,
                                                                              GameMain.localPlanet?.id ?? -1);
         Multiplayer.Session.Network.SendPacketToLocalStar(packet);
     }
 }
 public static void OnGammaMode2Click_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about change of ray receiver to mode "produce photons"
     LocalPlayer.SendPacketToLocalStar(new RayReceiverChangeModePacket(__instance.generatorId, RayReceiverMode.Photon, GameMain.localPlanet?.factoryIndex ?? -1));
 }
Beispiel #10
0
 public static void OnCataButtonClick_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about changing amount of gravitational lens
     LocalPlayer.SendPacketToLocalPlanet(new RayReceiverChangeLensPacket(__instance.generatorId, __instance.powerSystem.genPool[__instance.generatorId].catalystPoint));
 }
Beispiel #11
0
 public static void OnGammaMode1Click_Postfix(UIPowerGeneratorWindow __instance)
 {
     //Notify about change of ray receiver to mode "electricity"
     LocalPlayer.SendPacketToLocalPlanet(new RayReceiverChangeModePacket(__instance.generatorId, RayReceiverMode.Electricity));
 }