Exemple #1
0
        // Extras

        //+ METHODS
        /// <inheritdoc />
        public override void Register()
        {
            //? Identifiable Registration
            IdentifiableRegistry.Classify(ID, Types);
            IdentifiableRegistry.RegisterPrefab(FakePrefab);
            IdentifiableRegistry.RegisterVacEntry(VacEntry);

            //? Ammo Registration
            if (IsVacuumable)
            {
                AmmoRegistry.RegisterPlayerAmmo(PlayerState.AmmoMode.DEFAULT, ID);
            }

            foreach (SiloStorage.StorageType type in StorageTypes)
            {
                AmmoRegistry.RegisterStorageAmmo(type, ID);
            }

            //? Refinery Registration
            if (IsRefineryResource)
            {
                AmmoRegistry.RegisterRefineryResource(ID);
            }
        }
 /// <summary>Retrieves the max ammo for an identifiable or inventory slot</summary>
 public static int GetMaxAmmo(Identifiable.Id id, int slot, PlayerState.AmmoMode mode) => AmmoRegistry.RetrieveMaxAmmo(id, slot, mode) ?? -1;
 /// <summary>Checks if a storage can hold a specific item</summary>
 public static bool CanStorageHold(Identifiable.Id id, SiloStorage storage) => AmmoRegistry.CheckStorageLocks(id, storage);
 /// <summary>Checks if a catcher can receive a specific item</summary>
 public static bool CanCatcherReceive(Identifiable.Id id, SiloCatcher catcher) => AmmoRegistry.CheckCatcherLocks(id, catcher);
 //+ LOCK CHECK
 /// <summary>Checks if a player can hold a specific item in a specific ammo mode</summary>
 public static bool CanPlayerHold(Identifiable.Id id, PlayerState.AmmoMode mode) => AmmoRegistry.CheckInventoryLocks(id, mode);