Esempio n. 1
0
        public static MappedItem Map(GameObject prefab)
        {
            if (prefab == null)
            {
                throw new ArgumentException("The prefab was NULL.");
            }

            ModComponent modComponent = ModUtils.GetModComponent(prefab);

            if (modComponent == null)
            {
                throw new ArgumentException("Prefab " + prefab.name + " does not contain a ModComponent.");
            }

            if (prefab.GetComponent <GearItem>() == null)
            {
                Implementation.Log("Mapping {0}", prefab.name);

                InspectMapper.Configure(modComponent);
                HarvestableMapper.Configure(modComponent);
                RepairableMapper.Configure(modComponent);
                FireStarterMapper.Configure(modComponent);
                ConfigureAccelerant(modComponent);
                ConfigureStackable(modComponent);
                ConfigureBurnable(modComponent);
                ScentMapper.Configure(modComponent);
                SharpenableMapper.Configure(modComponent);
                EvolveMapper.Configure(modComponent);

                ConfigureEquippable(modComponent);
                ConfigureLiquidItem(modComponent);
                ConfigureFood(modComponent);
                CookableMapper.Configure(modComponent);
                ConfigureCookingPot(modComponent);
                ConfigureRifle(modComponent);
                ClothingMapper.ConfigureClothing(modComponent);
                FirstAidMapper.Configure(modComponent);
                ToolMapper.Configure(modComponent);
                BedMapper.Configure(modComponent);

                ConfigureGearItem(modComponent);

                mappedItems.Add(modComponent);

                PostProcess(modComponent);
            }

            return(new MappedItem(prefab));
        }
Esempio n. 2
0
 internal static void ConfigureBehaviours(ModComponent modComponent)
 {
     AccelerantMapper.Configure(modComponent);
     BurnableMapper.Configure(modComponent);
     FireStarterMapper.Configure(modComponent);
     TinderMapper.Configure(modComponent);
     CarryingCapacityMapper.Configure(modComponent);
     EvolveMapper.Configure(modComponent);
     HarvestableMapper.Configure(modComponent);
     MillableMapper.Configure(modComponent);
     RepairableMapper.Configure(modComponent);
     ScentMapper.Configure(modComponent);
     SharpenableMapper.Configure(modComponent);
     StackableMapper.Configure(modComponent);
 }