public static bool GasCheck(ThingDef constructible, ThingDef target)
 {
     Log.Debug($"c: {constructible.defName}, t: {target.defName}");
     if (!constructible.EverTransmitsGas())
     {
         return(false);
     }
     if (target != DefOf.VPE_GasPipe && target != DefOf.VPE_GasPipeSub)
     {
         return(false);
     }
     if (constructible == DefOf.VPE_GasPipe || constructible == DefOf.VPE_GasPipeSub)
     {
         return(false);
     }
     return(true);
 }
 public static bool BuildingFrameOrBlueprintEverTransmitsGas(this ThingDef def)
 {
     return(def.EverTransmitsGas() ||
            def.entityDefToBuild is ThingDef defToBuild &&
            defToBuild.EverTransmitsGas());
 }
示例#3
0
 public static bool GasUserOverPipe(ThingDef constructible, ThingDef target)
 {
     return(constructible.EverTransmitsGas() &&
            (target == DefOf.VPE_GasPipe || target == DefOf.VPE_GasPipeSub));
 }