| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using GadgetCore.API;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace VendingMachine.RecipePageRegistry
- {
- /// <summary>
- /// This registry is filled with ChipInfos, and is used for registering custom chips to the game.
- /// </summary>
- public class RecipePageRegistry : Registry<RecipePageRegistry, RecipePageInfo, RecipePageType>
- {
- private static Dictionary<string, int> chipIDsByName;
- private static Dictionary<string, int> chipIDsByRegistryName;
- /// <summary>
- /// The name of this registry.
- /// </summary>
- public const string REGISTRY_NAME = "RecipePage";
- /// <summary>
- /// Gets the name of this registry. Must be constant. Returns <see cref="REGISTRY_NAME"/>.
- /// </summary>
- public override string GetRegistryName()
- {
- return REGISTRY_NAME;
- }
- /// <summary>
- /// Called after the specified Registry Entry has been registered. You should never call this yourself. Note that this is called before <see cref="RegistryEntry{E, T}.PostRegister"/>
- /// </summary>
- protected override void PostRegistration(RecipePageInfo entry)
- {
- //chipIDsByRegistryName[entry.RegistryName] = entry.ID;
- }
- /// <summary>
- /// Called just before an entry is removed from the registry by <see cref="Registry.UnregisterGadget(GadgetInfo)"/>
- /// </summary>
- protected override void OnUnregister(RecipePageInfo entry)
- {
- //chipIDsByName.Remove(entry.Name);
- //chipIDsByRegistryName.Remove(entry.RegistryName);
- }
- }
- /// <summary>
- /// Specifies what type of recipe this is.
- /// </summary>
- public enum RecipePageType
- {
- /// <summary>
- /// This recipe is avalible at the Gear Forge.
- /// </summary>
- GearForge,
- /// <summary>
- /// This recipe is avalible at the Alchemy Station.
- /// </summary>
- AlchemyStation,
- /// <summary>
- /// This recipe is avalible at the Ultimate Forge.
- /// </summary>
- UltimateForge
- }
- }
|