Example #1
0
 public void action()
 {
     if (tweakEnabled)
     {
         UnityHelper.FindObjectsOfTypeAll <StorageAutoname>().forEach(info => info.onContentsChanged());
     }
 }
Example #2
0
            public void action()
            {
                using var _ = Common.Debug.profiler("StorageActions.UpdateStorages");

                Patches.ColliderPatches.setCollidersEnabled <ColoredLabel>(!tweakEnabled);
                Patches.ColliderPatches.setCollidersEnabled <PickupableStorage>(!tweakEnabled);

                if (tweakEnabled)
                {
                    UnityHelper.FindObjectsOfTypeAll <StorageContainer>().forEach(StorageHandlerProcessor.ensureHandlers);
                }
            }
Example #3
0
            public static void init(TypesConfig typesConfig)
            {
                listCount = typesConfig.techTypeLists.Count;

                typeLists = typesConfig.techTypeLists.Select(list => new TypesConfig.TechTypeList(list)).ToList();
                typeLists.Insert(0, new TypesConfig.TechTypeList("ids_All"));

                for (int i = 1; i <= listCount; i++)
                {
                    if (!typesConfig.noJoin.Contains(typeLists[i].name))
                    {
                        typeLists[0].add(typeLists[i]);
                    }

                    L10n.add(typeLists[i].name, typeLists[i].name);
                }

                // can't use events for that
                UnityHelper.FindObjectsOfTypeAll <GravTrapObjectsType>().forEach(cmp => cmp.refreshIndex());
            }
Example #4
0
 public void action() =>
 UnityHelper.FindObjectsOfTypeAll <StorageContentsInfo>().forEach(info => info.invalidateCache());
Example #5
0
 public static void setCollidersEnabled <T>(bool enabled) where T : MonoBehaviour
 {
     UnityHelper.FindObjectsOfTypeAll <T>().forEach(cmp => setColliderEnabled(cmp, enabled));
 }