Example #1
0
        private static bool CheckAdd(ListerHaulables __instance, Thing t)
        {
            lock (Locker)
            {
                if (__instance.ShouldBeHaulable(t) && !__instance.haulables.Contains(t))
                {
                    __instance.haulables.Add(t);
                }
            }

            return(false);
        }
Example #2
0
 // internal check without lock object
 private static void Check_Internal(ListerHaulables lister, Thing t)
 {
     if (lister.ShouldBeHaulable(t))
     {
         if (!lister.haulables.Contains(t))
         {
             lister.haulables.Add(t);
         }
     }
     else if (lister.haulables.Contains(t))
     {
         lister.haulables.Remove(t);
     }
 }