예제 #1
0
 public static PressurizedInfo GetPressurizedInfo(string id)
 {
     if (PressurizedLookup.ContainsKey(id))
     {
         return(PressurizedLookup[id]);
     }
     else
     {
         return(PressurizedLookup[""]);
     }
 }
예제 #2
0
 public static bool TryAddPressurizedInfo(string id, PressurizedInfo info)
 {
     if (PressurizedLookup.ContainsKey(id))
     {
         Debug.LogWarning($"[Pressurized] PressurizedTuning.TryAddPressurizedInfo(string, PressurizedInfo) -> Attempted to add an id that already exists.");
         return(false);
     }
     else if (info == null || info.IsDefault == true || info.Capacity <= 0f)
     {
         Debug.LogWarning($"[Pressurized] PressurizedTuning.TryAddPressurizedInfo(string, PressurizedInfo) -> PressurizedInfo argument was invalid. Must not be null, have a Capacity > 0, and IsDefault must be false.");
         return(false);
     }
     PressurizedLookup.Add(id, info);
     return(true);
 }