Esempio n. 1
0
 private static bool Prefix(Valve __instance, object data)
 {
     if (FluidWarpMod_Utils.IsWarpGate(__instance.GetValveBase()))
     {
         GameObject gameObject = (GameObject)data;
         Valve      component  = gameObject.GetComponent <Valve>();
         if (component != null && FluidWarpMod_Utils.IsWarpGate(component.GetValveBase()))
         {
             __instance.ChangeFlow(component.GetValveBase().CurrentFlow);
         }
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 private static bool Prefix(Valve __instance, object data)
 {
     if (__instance.GetValveBase().conduitType == GasWarpConfig.CONDUIT_TYPE || __instance.GetValveBase().conduitType == LiquidWarpConfig.CONDUIT_TYPE)
     {
         GameObject gameObject = (GameObject)data;
         Valve      component  = gameObject.GetComponent <Valve>();
         if (component != null && (component.GetValveBase().conduitType == GasWarpConfig.CONDUIT_TYPE || component.GetValveBase().conduitType == LiquidWarpConfig.CONDUIT_TYPE))
         {
             __instance.ChangeFlow(component.GetValveBase().CurrentFlow);
         }
         return(false);
     }
     return(true);
 }