コード例 #1
0
 public FCSModule(string classId, string friendlyName, string description, FcCraftingTab parentTab, RecipeData ingredients) : base(classId, friendlyName, description, parentTab)
 {
     _ingredients        = ingredients;
     OnFinishedPatching += () =>
     {
         CraftDataHandler.SetEquipmentType(TechType, EquipmentType.CyclopsModule);
     };
 }
コード例 #2
0
        public FreonPatcher(string classId, string friendlyName, string description, FcCraftingTab parentTab) : base(classId, friendlyName, description, parentTab)
        {
            OnFinishedPatching += () =>
            {
                AddComponentsToPrefab();

                CraftDataHandler.SetEquipmentType(TechType, EquipmentType.Hand);
            };
        }
コード例 #3
0
 public FCSKit(string classId, string friendlyName, FcCraftingTab parentTab, RecipeData ingredients) :
     base(classId, friendlyName, $"A kit that allows you to build one {friendlyName} Unit", parentTab)
 {
     _ingredients        = ingredients;
     OnFinishedPatching += () =>
     {
         GetKitPrefab();
         CraftDataHandler.SetEquipmentType(TechType, EquipmentType.Hand);
     };
 }
コード例 #4
0
 public FCSGlassCraftable(FcCraftingTab parentTab) : base("FCSGlass", "Glass", "SiO4. Pure fused quartz glass.", parentTab)
 {
     _ingredients = new TechData
     {
         LinkedItems = new List <TechType> {
             TechType.Glass
         },
         craftAmount = 0,
         Ingredients = new List <Ingredient>()
         {
             new Ingredient(Mod.SandSpawnableClassID.ToTechType(), 1)
         }
     };
 }
コード例 #5
0
 public ServerCraftable(string classId, string friendlyName, string description, FcCraftingTab parentTab) : base(classId, friendlyName, description, parentTab)
 {
     OnFinishedPatching += () =>
     {
         CraftDataHandler.SetEquipmentType(TechType, EquipmentType.Hand);
     };
 }
コード例 #6
0
        public SeaGasTankCraftable(string classId, string friendlyName, string description, FcCraftingTab parentTab) : base(classId, friendlyName, description, parentTab)
        {
            _tank = QPatch.AssetBundle.LoadAsset <GameObject>("SeaGasTank");

            OnFinishedPatching += () =>
            {
                CraftDataHandler.SetEquipmentType(TechType, EquipmentType.NuclearReactor);
            };
        }
コード例 #7
0
 public FCSVehicleModule(string classId, string friendlyName, string description, EquipmentType equipmentType, FcCraftingTab parentTab, TechData ingredients) : base(classId, friendlyName, description, parentTab)
 {
     _ingredients        = ingredients;
     OnFinishedPatching += () =>
     {
         CraftDataHandler.SetEquipmentType(TechType, equipmentType);
     };
 }
コード例 #8
0
        protected FcCraftable(string classId, string friendlyName, string description, FcCraftingTab parentTab)
            : base(classId, friendlyName, description)
        {
            this.ParentTab = parentTab;

            OnStartedPatching += () =>
            {
                this.ParentTab.LoadAssets(this.AssetBundlesService);
                this.AssetBundle = this.AssetBundlesService.GetAssetBundleByName(this.AssetBundleName);
            };

            OnFinishedPatching += () =>
            {
                if (!this.FabricatorService.HasCraftingTab(this.ParentTab.Id))
                {
                    string tabId       = this.ParentTab.Id;
                    string displayText = this.ParentTab.DisplayName;
                    Sprite icon        = this.ParentTab.Icon;

                    this.FabricatorService.AddTabNode(tabId, displayText, icon);
                }

                this.FabricatorService.AddCraftNode(this, this.ParentTab.Id);
            };
        }
コード例 #9
0
        protected FCSVehicleUpgradeModule(string classId, string friendlyName, string description, FcCraftingTab parentTab)
            : base(classId, friendlyName, description)
        {
            this.ParentTab = parentTab;

            OnStartedPatching += () =>
            {
                this.ParentTab.LoadAssets(this.AssetBundlesService);
                this.AssetBundle = this.AssetBundlesService.GetAssetBundleByName(this.AssetBundleName);
            };

            OnFinishedPatching += () =>
            {
                if (!this.FabricatorService.HasCraftingTab(this.ParentTab.Id))
                {
                    string       tabId       = this.ParentTab.Id;
                    string       displayText = this.ParentTab.DisplayName;
                    Atlas.Sprite icon        = this.ParentTab.Icon;

                    this.FabricatorService.AddTabNode(tabId, displayText, icon);
                }
                CraftDataHandler.SetQuickSlotType(this.TechType, QuickSlotType.Passive);
                this.FabricatorService.AddCraftNode(this, this.ParentTab.Id);
            };
        }