• The move of Eco-Mods.com has taken place and the merge of our old officials forums is currently ongoing, read more here.

Record Mode

OP
Rexzooly

Rexzooly

Copper
Mod Dev
Messages
86
Reaction score
24
Pipes have been playing up on our server so rather then messing with pipes we have now added power as well as fuel to our items
1520299523739.png

I need to remove the Pipes Tab call but there is no pipe needed for any pipe item anymore.
1520299550154.png

C++:
namespace Eco.Mods.TechTree
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using Eco.Gameplay.Blocks;
    using Eco.Gameplay.Components;
    using Eco.Gameplay.Components.Auth;
    using Eco.Gameplay.DynamicValues;
    using Eco.Gameplay.Economy;
    using Eco.Gameplay.Housing;
    using Eco.Gameplay.Interactions;
    using Eco.Gameplay.Items;
    using Eco.Gameplay.Minimap;
    using Eco.Gameplay.Objects;
    using Eco.Gameplay.Players;
    using Eco.Gameplay.Property;
    using Eco.Gameplay.Skills;
    using Eco.Gameplay.Systems.TextLinks;
    using Eco.Gameplay.Pipes.LiquidComponents;
    using Eco.Gameplay.Pipes.Gases;
    using Eco.Gameplay.Systems.Tooltip;
    using Eco.Shared;
    using Eco.Shared.Math;
    using Eco.Shared.Serialization;
    using Eco.Shared.Utils;
    using Eco.Shared.View;
    using Eco.Shared.Items;
    using Eco.Gameplay.Pipes;
    using Eco.World.Blocks;
    
    [Serialized]     
    [RequireComponent(typeof(AttachmentComponent))]
    [RequireComponent(typeof(PowerGridComponent))]             
    [RequireComponent(typeof(PowerConsumptionComponent))] 
    [RequireComponent(typeof(PropertyAuthComponent))]
    [RequireComponent(typeof(MinimapComponent))]               
    [RequireComponent(typeof(LinkComponent))]                   
    [RequireComponent(typeof(CraftingComponent))]               
    [RequireComponent(typeof(FuelSupplyComponent))]                     
    [RequireComponent(typeof(FuelConsumptionComponent))]                 
    [RequireComponent(typeof(HousingComponent))]                               
    public partial class CementKilnObject : WorldObject
    {
        public override string FriendlyName { get { return "Cement Kiln"; } }

        private static Type[] fuelTypeList = new Type[]
        {
            typeof(LogItem),
            typeof(LumberItem),
            typeof(CharcoalItem),
            typeof(ArrowItem),
            typeof(BoardItem),
            typeof(CoalItem),
        };

        protected override void Initialize()
        {
            this.GetComponent<MinimapComponent>().Initialize("Crafting");                                 
            this.GetComponent<FuelSupplyComponent>().Initialize(2, fuelTypeList);                           
            this.GetComponent<FuelConsumptionComponent>().Initialize(50);                                 
            this.GetComponent<PowerConsumptionComponent>().Initialize(250);                     
            this.GetComponent<PowerGridComponent>().Initialize(10, new ElectricPower());               
            this.GetComponent<HousingComponent>().Set(CementKilnItem.HousingVal);                               

        }

        public override void Destroy()
        {
            base.Destroy();
        }
      
    }

    [Serialized]
    public partial class CementKilnItem : WorldObjectItem<CementKilnObject>
    {
        public override string FriendlyName { get { return "Cement Kiln"; } }
        public override string Description { get { return "A rotary kiln that produces cement and concrete products."; } }

        static CementKilnItem()
        {
            
            
            
            
        }
        
        [TooltipChildren] public static HousingValue HousingVal { get { return new HousingValue()
                                                {
                                                    Category = "Industrial",
                                                    Val = 0,
                                                    TypeForRoomLimit = "",
                                                    DiminishingReturnPercent = 0
                                                };}}       
    }


    [RequiresSkill(typeof(MetalworkingSkill), 1)]
    public partial class CementKilnRecipe : Recipe
    {
        public CementKilnRecipe()
        {
            this.Products = new CraftingElement[]
            {
                new CraftingElement<CementKilnItem>(),
            };

            this.Ingredients = new CraftingElement[]
            {
                new CraftingElement<IronIngotItem>(typeof(MetalworkingEfficiencySkill), 30, MetalworkingEfficiencySkill.MultiplicativeStrategy),
                new CraftingElement<GearboxItem>(typeof(MetalworkingEfficiencySkill), 10, MetalworkingEfficiencySkill.MultiplicativeStrategy),
                new CraftingElement<PistonItem>(typeof(MetalworkingEfficiencySkill), 5, MetalworkingEfficiencySkill.MultiplicativeStrategy),   
            };
            SkillModifiedValue value = new SkillModifiedValue(240, MetalworkingSpeedSkill.MultiplicativeStrategy, typeof(MetalworkingSpeedSkill), "craft time");
            SkillModifiedValueManager.AddBenefitForObject(typeof(CementKilnRecipe), Item.Get<CementKilnItem>().UILink(), value);
            SkillModifiedValueManager.AddSkillBenefit(Item.Get<CementKilnItem>().UILink(), value);
            this.CraftMinutes = value;
            this.Initialize("Cement Kiln", typeof(CementKilnRecipe));
            CraftingComponent.AddRecipe(typeof(AnvilObject), this);
        }
    }
}

---- Automatically Merged Double Post ----

I found this view kind of cool
View attachment 90
 
Last edited:
OP
Rexzooly

Rexzooly

Copper
Mod Dev
Messages
86
Reaction score
24
When I am out of ideas or waiting and no one needs help on the server I love record mode :p
 
Top Bottom