Gitlab to Gitea Migration

This commit is contained in:
2022-07-02 13:02:05 +02:00
parent 3d070e36e6
commit 0fd1c1acf2
196 changed files with 14059 additions and 1 deletions

View File

@@ -0,0 +1,86 @@
namespace Eco.Mods.TechTree
{
using System;
using System.Collections.Generic;
using Eco.Gameplay.Components;
using Eco.Gameplay.Components.Auth;
using Eco.Gameplay.DynamicValues;
using Eco.Gameplay.Items;
using Eco.Gameplay.Objects;
using Eco.Gameplay.Players;
using Eco.Gameplay.Skills;
using Eco.Gameplay.Systems.TextLinks;
using Eco.Shared.Math;
using Eco.Shared.Networking;
using Eco.Shared.Localization;
using Eco.Shared.Serialization;
using Eco.Shared.Utils;
[Serialized]
[Weight(15000)]
public class PoweredCartItem : WorldObjectItem<PoweredCartObject>
{
public override string FriendlyName { get { return "Powered Cart"; } }
public override string Description { get { return "Large cart for hauling sizable loads."; } }
}
[RequiresSkill(typeof(MechanicalEngineeringSkill), 0)]
public class PoweredCartRecipe : Recipe
{
public PoweredCartRecipe()
{
this.Products = new CraftingElement[]
{
new CraftingElement<PoweredCartItem>(),
};
this.Ingredients = new CraftingElement[]
{
new CraftingElement<LumberItem>(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy),
new CraftingElement<ClothItem>(typeof(MechanicsAssemblyEfficiencySkill), 20, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy),
new CraftingElement<CombustionEngineItem>(typeof(MechanicsAssemblyEfficiencySkill), 1, MechanicsAssemblyEfficiencySkill.MultiplicativeStrategy),
};
this.CraftMinutes = new ConstantValue(25);
this.Initialize("Powered Cart", typeof(PoweredCartRecipe));
CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this);
}
}
[Serialized]
[RequireComponent(typeof(StandaloneAuthComponent))]
[RequireComponent(typeof(PublicStorageComponent))]
[RequireComponent(typeof(MovableLinkComponent))]
[RequireComponent(typeof(FuelSupplyComponent))]
[RequireComponent(typeof(FuelConsumptionComponent))]
[RequireComponent(typeof(AirPollutionComponent))]
[RequireComponent(typeof(VehicleComponent))]
[RequireComponent(typeof(TailingsReportComponent))]
public class PoweredCartObject : PhysicsWorldObject
{
private static Dictionary<Type, float> roadEfficiency = new Dictionary<Type, float>()
{
{ typeof(DirtRoadBlock), 1.0f }, { typeof(DirtRoadWorldObjectBlock), 1.0f },
{ typeof(StoneRoadBlock), 1.4f }, { typeof(StoneRoadWorldObjectBlock), 1.4f },
{ typeof(AsphaltRoadBlock), 1.8f }, { typeof(AsphaltRoadWorldObjectBlock), 1.8f }
};
public override string FriendlyName { get { return "Powered Cart"; } }
private static Type[] fuelTypeList = new Type[]
{
typeof(PetroleumItem),
typeof(GasolineItem),
};
private PoweredCartObject() { }
protected override void Initialize()
{
base.Initialize();
this.GetComponent<PublicStorageComponent>().Initialize(20, 3000000);
this.GetComponent<FuelSupplyComponent>().Initialize(2, fuelTypeList);
this.GetComponent<FuelConsumptionComponent>().Initialize(25);
this.GetComponent<AirPollutionComponent>().Initialize(0.1f);
this.GetComponent<VehicleComponent>().Initialize(20, 1, roadEfficiency);
}
}
}

View File

@@ -0,0 +1,75 @@
namespace Eco.Mods.TechTree
{
using System;
using System.Collections.Generic;
using Eco.Gameplay.Components;
using Eco.Gameplay.Components.Auth;
using Eco.Gameplay.DynamicValues;
using Eco.Gameplay.Items;
using Eco.Gameplay.Objects;
using Eco.Gameplay.Players;
using Eco.Gameplay.Skills;
using Eco.Gameplay.Systems.TextLinks;
using Eco.Shared.Math;
using Eco.Shared.Networking;
using Eco.Shared.Localization;
using Eco.Shared.Serialization;
using Eco.Shared.Utils;
[Serialized]
[Weight(10000)]
public class SmallWoodCartItem : WorldObjectItem<SmallWoodCartObject>
{
public override string FriendlyName { get { return "Small Wood Cart"; } }
public override string Description { get { return "A tiny cart for tiny things."; } }
}
[RequiresSkill(typeof(WoodworkingSkill), 1)]
public class SmallWoodCartRecipe : Recipe
{
public SmallWoodCartRecipe()
{
this.Products = new CraftingElement[]
{
new CraftingElement<SmallWoodCartItem>(),
};
this.Ingredients = new CraftingElement[]
{
new CraftingElement<LogItem>(typeof(WoodworkingEfficiencySkill), 20, WoodworkingEfficiencySkill.MultiplicativeStrategy),
new CraftingElement<BoardItem>(typeof(WoodworkingEfficiencySkill), 30, WoodworkingEfficiencySkill.MultiplicativeStrategy),
};
this.CraftMinutes = new ConstantValue(2);
this.Initialize("Small Wood Cart", typeof(SmallWoodCartRecipe));
CraftingComponent.AddRecipe(typeof(WorkbenchObject), this);
}
}
[Serialized]
[RequireComponent(typeof(StandaloneAuthComponent))]
[RequireComponent(typeof(PublicStorageComponent))]
[RequireComponent(typeof(MovableLinkComponent))]
[RequireComponent(typeof(VehicleComponent))]
[RequireComponent(typeof(TailingsReportComponent))]
public class SmallWoodCartObject : PhysicsWorldObject
{
private static Dictionary<Type, float> roadEfficiency = new Dictionary<Type, float>()
{
{ typeof(DirtRoadBlock), 1 }, { typeof(DirtRoadWorldObjectBlock), 1 },
{ typeof(StoneRoadBlock), 1.4f }, { typeof(StoneRoadWorldObjectBlock), 1.4f },
{ typeof(AsphaltRoadBlock), 1.6f }, { typeof(AsphaltRoadWorldObjectBlock), 1.6f }
};
public override string FriendlyName { get { return "Small Wood Cart"; } }
private SmallWoodCartObject() { }
protected override void Initialize()
{
base.Initialize();
this.GetComponent<PublicStorageComponent>().Initialize(6, 750000);
this.GetComponent<VehicleComponent>().Initialize(8, 1, roadEfficiency);
this.GetComponent<VehicleComponent>().HumanPowered(0.5f);
}
}
}

View File

@@ -0,0 +1,74 @@
namespace Eco.Mods.TechTree
{
using System;
using System.Collections.Generic;
using Eco.Gameplay.Components;
using Eco.Gameplay.Components.Auth;
using Eco.Gameplay.DynamicValues;
using Eco.Gameplay.Items;
using Eco.Gameplay.Objects;
using Eco.Gameplay.Players;
using Eco.Gameplay.Skills;
using Eco.Gameplay.Systems.TextLinks;
using Eco.Shared.Math;
using Eco.Shared.Networking;
using Eco.Shared.Localization;
using Eco.Shared.Serialization;
using Eco.Shared.Utils;
[Serialized]
[Weight(15000)]
public class WoodCartItem : WorldObjectItem<WoodCartObject>
{
public override string FriendlyName { get { return "Wood Cart"; } }
public override string Description { get { return "Small wheelbarrow for hauling minimal loads."; } }
}
[RequiresSkill(typeof(PrimitiveMechanicsSkill), 1)]
public class WoodCartRecipe : Recipe
{
public WoodCartRecipe()
{
this.Products = new CraftingElement[]
{
new CraftingElement<WoodCartItem>(),
};
this.Ingredients = new CraftingElement[]
{
new CraftingElement<BoardItem>(typeof(PrimitiveMechanicsEfficiencySkill), 50, PrimitiveMechanicsEfficiencySkill.MultiplicativeStrategy),
};
this.CraftMinutes = new ConstantValue(5);
this.Initialize("Wood Cart", typeof(WoodCartRecipe));
CraftingComponent.AddRecipe(typeof(WainwrightTableObject), this);
}
}
[Serialized]
[RequireComponent(typeof(StandaloneAuthComponent))]
[RequireComponent(typeof(PublicStorageComponent))]
[RequireComponent(typeof(MovableLinkComponent))]
[RequireComponent(typeof(VehicleComponent))]
[RequireComponent(typeof(TailingsReportComponent))]
public class WoodCartObject : PhysicsWorldObject
{
private static Dictionary<Type, float> roadEfficiency = new Dictionary<Type, float>()
{
{ typeof(DirtRoadBlock), 1.2f }, { typeof(DirtRoadWorldObjectBlock), 1.2f },
{ typeof(StoneRoadBlock), 1.4f }, { typeof(StoneRoadWorldObjectBlock), 1.4f },
{ typeof(AsphaltRoadBlock), 1.6f }, { typeof(AsphaltRoadWorldObjectBlock), 1.6f }
};
public override string FriendlyName { get { return "Wood Cart"; } }
private WoodCartObject() { }
protected override void Initialize()
{
base.Initialize();
this.GetComponent<PublicStorageComponent>().Initialize(12, 1500000);
this.GetComponent<VehicleComponent>().Initialize(10, 1, roadEfficiency);
this.GetComponent<VehicleComponent>().HumanPowered(1);
}
}
}