W.I.P. XII: Big heap of assorted stuff
This commit is contained in:
parent
dae3fdec76
commit
5769c9c82b
22 changed files with 613 additions and 60 deletions
|
|
@ -54,14 +54,16 @@
|
|||
<HintPath>vs_libs\VSSurvivalMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>vs_libs\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MetalRecoverySystem.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="BlockEntities\MetalRecovery_BlockEntityAnvil.cs" />
|
||||
<Compile Include="Items\ItemMallet.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
<Compile Include="Helpers.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="modinfo.json">
|
||||
|
|
@ -98,7 +100,6 @@
|
|||
<Folder Include="BlockEntities\" />
|
||||
<Folder Include="assets\fma\shapes\item\tools\" />
|
||||
<Folder Include="assets\fma\itemtypes\tools\" />
|
||||
<Folder Include="Items\" />
|
||||
<Folder Include="assets\fma\recipes\" />
|
||||
<Folder Include="assets\fma\recipes\grid\" />
|
||||
<Folder Include="assets\fma\recipes\grid\tool\" />
|
||||
|
|
|
|||
30
AnvilMetalRecovery/Helpers.cs
Normal file
30
AnvilMetalRecovery/Helpers.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Server;
|
||||
using Vintagestory.Common;
|
||||
using Vintagestory.Server;
|
||||
|
||||
namespace AnvilMetalRecovery
|
||||
{
|
||||
internal static class Helpers
|
||||
{
|
||||
internal static void ReplaceBlockEntityType(this ClassRegistry registry, string className, Type blockentity)
|
||||
{
|
||||
if (registry.blockEntityClassnameToTypeMapping.ContainsKey(className)) {
|
||||
//replace it
|
||||
registry.blockEntityClassnameToTypeMapping[className] = blockentity;
|
||||
registry.blockEntityTypeToClassnameMapping[blockentity] = className;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ReplaceItemClassType(this ClassRegistry registry, string className, Type replacer)
|
||||
{
|
||||
if (registry.ItemClassToTypeMapping.ContainsKey(className)) {
|
||||
//replace it
|
||||
registry.ItemClassToTypeMapping[className] = replacer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5,16 +5,16 @@ using Vintagestory.API.Common;
|
|||
using Vintagestory.API.Server;
|
||||
using Vintagestory.Common;
|
||||
using Vintagestory.Server;
|
||||
using Vintagestory.ServerMods;
|
||||
|
||||
namespace AnvilMetalRecovery
|
||||
{
|
||||
public class MetalRecoverySystem : ModSystem
|
||||
{
|
||||
internal const string anvilKey = @"Anvil";
|
||||
|
||||
public partial class MetalRecoverySystem : ModSystem
|
||||
{
|
||||
private ICoreAPI CoreAPI;
|
||||
private ICoreServerAPI ServerAPI;
|
||||
private ServerCoreAPI ServerCore { get; set; }
|
||||
//private RecipeLoader LoaderOfRecipies { get; set;}
|
||||
|
||||
public override bool AllowRuntimeReload {
|
||||
get { return false; }
|
||||
|
|
@ -27,23 +27,23 @@ namespace AnvilMetalRecovery
|
|||
|
||||
public override double ExecuteOrder( )
|
||||
{
|
||||
return 0.10d;
|
||||
return 0.1d;
|
||||
}
|
||||
|
||||
public override void Start(ICoreAPI api)
|
||||
{
|
||||
this.CoreAPI = api;
|
||||
CoreAPI.RegisterItemClass(@"ItemMallet", typeof(ItemMallet));
|
||||
|
||||
RegisterItemClasses();
|
||||
|
||||
|
||||
base.Start(api);
|
||||
}
|
||||
|
||||
public override void StartServerSide(ICoreServerAPI api)
|
||||
{
|
||||
base.StartServerSide(api);
|
||||
|
||||
this.ServerAPI = api;
|
||||
|
||||
//LoaderOfRecipies = ServerAPI.ModLoader.GetModSystem<RecipeLoader>( );
|
||||
|
||||
if (api is ServerCoreAPI) {
|
||||
ServerCore = api as ServerCoreAPI;
|
||||
|
|
@ -52,6 +52,8 @@ namespace AnvilMetalRecovery
|
|||
Mod.Logger.Error("Cannot access 'ServerCoreAPI' class: API (implimentation) has changed, Contact Developer!");
|
||||
return;
|
||||
}
|
||||
|
||||
ServerCore.Event.ServerRunPhase(EnumServerRunPhase.LoadGame, OnServerLoadGame);
|
||||
//ServerAPI.ClassRegistry.GetBlockEntityClass
|
||||
//ServerAPI.RegisterBlockEntityClass(anvilKey, typeof(MetalRecovery_BlockEntityAnvil));
|
||||
|
||||
|
|
@ -60,46 +62,12 @@ namespace AnvilMetalRecovery
|
|||
Mod.Logger.VerboseDebug("Anvil Metal Recovery - should be installed...");
|
||||
}
|
||||
|
||||
internal void GenerateMetalShavingsItems( )
|
||||
private void OnServerLoadGame( )
|
||||
{
|
||||
//TODO: Automatic Generation of Item 'metal_shaving' by metal & alloy list at RUNTIME
|
||||
var genericShaving = ServerAPI.World.ClassRegistry.CreateItem("metal_shaving");
|
||||
//genericShaving.CombustibleProps.
|
||||
|
||||
var metalProperties = new Dictionary<AssetLocation, MetalProperty>( );
|
||||
|
||||
foreach (var entry in ServerAPI.Assets.GetMany<MetalProperty>(Mod.Logger, "worldproperties/"))
|
||||
{
|
||||
AssetLocation loc = entry.Key.Clone( );
|
||||
loc.Path = loc.Path.Replace("worldproperties/", "");
|
||||
loc.RemoveEnding( );
|
||||
|
||||
entry.Value.Code.Domain = entry.Key.Domain;
|
||||
|
||||
metalProperties.Add(loc, entry.Value);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static class Helpers
|
||||
{
|
||||
internal static void ReplaceBlockEntityType(this ClassRegistry registry, string className, Type blockentity)
|
||||
{
|
||||
if (registry.blockEntityClassnameToTypeMapping.ContainsKey(className)) {
|
||||
//replace it
|
||||
registry.blockEntityClassnameToTypeMapping[className] = blockentity;
|
||||
registry.blockEntityTypeToClassnameMapping[blockentity] = className;
|
||||
ManipulateGridRecipies( );
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ReplaceItemClassType(this ClassRegistry registry, string className, Type replacer)
|
||||
{
|
||||
if (registry.ItemClassToTypeMapping.ContainsKey(className)) {
|
||||
//replace it
|
||||
registry.ItemClassToTypeMapping[className] = replacer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
heldTpHitAnimation: "smithing",
|
||||
shape: { base: "item/tools/mallet" },
|
||||
textures: {
|
||||
"head": { base:"game:block/wood/debarked/birch"},
|
||||
"head": { base:"game:block/wood/debarked/oak"},
|
||||
"side": { base:"game:block/wood/treetrunk/oak"},
|
||||
"wood": { base:"game:item/tool/material/wood"}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ingredientPattern: "K H S",
|
||||
ingredients: {
|
||||
"K": { type: "item", code:"game:knife-*", isTool: true},
|
||||
"H": { type: "block", code: "game:log-*", name: "head" },
|
||||
"H": { type: "block", code: "game:log-*", allowedVariants: ["placed-birch-ud", "placed-oak-ud", "placed-maple-ud", "placed-pine-ud", "placed-acacia-ud"], name: "head" },
|
||||
"S": { type: "item", code: "game:stick" }
|
||||
},
|
||||
width: 1,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"name": "Metal Recovery & More",
|
||||
"description" : "Get back lost scrap and smithing discards, and more.",
|
||||
"authors": ["Melchior"],
|
||||
"ModID":"metalrecovery",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"game": "1.12.11",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace FirstMachineAge
|
|||
private readonly string verticalKey;
|
||||
|
||||
/*
|
||||
* abstact/"horizontalorientation"
|
||||
* "abstract/verticalorientation"
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
|||
121
ElementalTools/Assignments.cs
Normal file
121
ElementalTools/Assignments.cs
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Config;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace ElementalTools
|
||||
{
|
||||
public partial class ElementalToolsSystem : ModSystem
|
||||
{
|
||||
internal const string anvilKey = @"Anvil";
|
||||
internal const string malletItemKey = @"ItemMallet";
|
||||
internal const string malletAssetKey = @"mallet";
|
||||
|
||||
private void RegisterItemClasses()
|
||||
{
|
||||
CoreAPI.RegisterItemClass(malletItemKey, typeof(ItemMallet));
|
||||
}
|
||||
|
||||
|
||||
private void ManipulateGridRecipies( )
|
||||
{
|
||||
uint malletizedCount = 0;
|
||||
//Thread.Sleep(1000);
|
||||
Mod.Logger.VerboseDebug($"Total GridRecipies: {CoreAPI.World.GridRecipes.Count}");
|
||||
|
||||
/*
|
||||
var alternateQuery = from gridRecipie in CoreAPI.World.GridRecipes
|
||||
where gridRecipie.Ingredients.Any(gi => gi.Value.IsTool && gi.Value.Code.BeginsWith(GlobalConstants.DefaultDomain, @"hammer"))
|
||||
where gridRecipie.Output.Code.BeginsWith(GlobalConstants.DefaultDomain, @"nugget") == false
|
||||
where gridRecipie.Output.Code.BeginsWith(GlobalConstants.DefaultDomain, @"lime") == false
|
||||
select gridRecipie;
|
||||
|
||||
Mod.Logger.VerboseDebug($"Found {alternateQuery.Count()} Recipies using Hammer, (non ore)");
|
||||
|
||||
if (alternateQuery.Any()) {
|
||||
foreach (var recipieToClone in alternateQuery.ToArray()) {
|
||||
var cloneRecipie = recipieToClone.Clone( );
|
||||
var hammerIngredient = cloneRecipie.Ingredients.First(gi => gi.Value.IsTool && gi.Value.Code.BeginsWith(GlobalConstants.DefaultDomain, @"hammer"));
|
||||
|
||||
CraftingRecipeIngredient malletIngredient = new CraftingRecipeIngredient {
|
||||
Type = EnumItemClass.Item,
|
||||
IsTool = true,
|
||||
Code = new AssetLocation(@"fma", malletAssetKey),
|
||||
IsWildCard = false,
|
||||
//Name = "mallet",
|
||||
};
|
||||
cloneRecipie.Ingredients[hammerIngredient.Key] = malletIngredient;
|
||||
ServerCore.RegisterCraftingRecipe(cloneRecipie);
|
||||
malletizedCount++;
|
||||
}
|
||||
|
||||
Mod.Logger.VerboseDebug($"Added {malletizedCount} Mallet recipies");
|
||||
}
|
||||
*/
|
||||
|
||||
GridRecipe testRecipie = new GridRecipe {
|
||||
IngredientPattern = "M\tF",
|
||||
Name = new AssetLocation("fma","LogToSticks"),
|
||||
Height = 2,
|
||||
Width = 1,
|
||||
Ingredients =
|
||||
new Dictionary<string, CraftingRecipeIngredient>{
|
||||
{"M", new CraftingRecipeIngredient{
|
||||
Name = "mallet",
|
||||
Type = EnumItemClass.Item,
|
||||
Code = new AssetLocation("fma",malletAssetKey),
|
||||
IsTool = true,
|
||||
Quantity = 1,}
|
||||
},
|
||||
{"F", new CraftingRecipeIngredient{
|
||||
Name = "wood",
|
||||
Type = EnumItemClass.Item,
|
||||
Code = new AssetLocation(GlobalConstants.DefaultDomain,"firewood"),
|
||||
Quantity = 1,}
|
||||
},
|
||||
},
|
||||
Output = new CraftingRecipeIngredient{
|
||||
Type = EnumItemClass.Item,
|
||||
Quantity = 3,
|
||||
Code = new AssetLocation(GlobalConstants.DefaultDomain,"stick"),
|
||||
},
|
||||
};//Needs: ResolvedItemstack <- for Non-wildcard !!!!
|
||||
testRecipie.ResolveIngredients(ServerCore.World);
|
||||
|
||||
ServerCore.RegisterCraftingRecipe(testRecipie);
|
||||
}
|
||||
|
||||
//TODO: Recycling assignment of Smeltable properties from all smith/grid/recipe forms...
|
||||
|
||||
|
||||
internal void GenerateMetalShavingsItems( )
|
||||
{
|
||||
//TODO: Automatic Generation of Item 'metal_shaving' by metal & alloy list at RUNTIME
|
||||
var genericShaving = ServerAPI.World.ClassRegistry.CreateItem("metal_shaving");
|
||||
//genericShaving.CombustibleProps.
|
||||
|
||||
var metalProperties = new Dictionary<AssetLocation, MetalProperty>( );
|
||||
|
||||
foreach (var entry in ServerAPI.Assets.GetMany<MetalProperty>(Mod.Logger, "worldproperties/")) {
|
||||
AssetLocation loc = entry.Key.Clone( );
|
||||
loc.Path = loc.Path.Replace("worldproperties/", "");
|
||||
loc.RemoveEnding( );
|
||||
|
||||
entry.Value.Code.Domain = entry.Key.Domain;
|
||||
|
||||
metalProperties.Add(loc, entry.Value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
97
ElementalTools/ElementalTools.csproj
Normal file
97
ElementalTools/ElementalTools.csproj
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EA9BA3EC-EF08-4192-A844-4D3F398B1FFF}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>ElementalTools</RootNamespace>
|
||||
<AssemblyName>ElementalTools</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CustomCommands>
|
||||
<CustomCommands>
|
||||
<Command type="AfterBuild" command="7z -tzip a ${ProjectName}_${ProjectConfig}.zip" workingdir="${TargetDir}" />
|
||||
<Command type="AfterClean" command="rm -f *.zip" workingdir="${TargetDir}" />
|
||||
</CustomCommands>
|
||||
</CustomCommands>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>vs_libs\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="protobuf-net">
|
||||
<HintPath>vs_libs\protobuf-net.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VintagestoryAPI">
|
||||
<HintPath>vs_libs\VintagestoryAPI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VintagestoryLib">
|
||||
<HintPath>vs_libs\VintagestoryLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSCreativeMod">
|
||||
<HintPath>vs_libs\VSCreativeMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSEssentials">
|
||||
<HintPath>vs_libs\VSEssentials.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSSurvivalMod">
|
||||
<HintPath>vs_libs\VSSurvivalMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ElementalToolsMod.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Assignments.cs" />
|
||||
<Compile Include="Items\ItemMallet.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Items\" />
|
||||
<Folder Include="assets\" />
|
||||
<Folder Include="assets\fma\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="modinfo.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="assets\fma\itemtypes\tools\mallet.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="assets\fma\lang\en.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="assets\fma\recipes\grid\tool\mallet.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="assets\fma\shapes\item\tools\mallet.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
72
ElementalTools/ElementalToolsMod.cs
Normal file
72
ElementalTools/ElementalToolsMod.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Server;
|
||||
using Vintagestory.Common;
|
||||
using Vintagestory.Server;
|
||||
using Vintagestory.ServerMods;
|
||||
|
||||
namespace ElementalTools
|
||||
{
|
||||
public partial class ElementalToolsSystem : ModSystem
|
||||
{
|
||||
private ICoreAPI CoreAPI;
|
||||
private ICoreServerAPI ServerAPI;
|
||||
private ServerCoreAPI ServerCore { get; set; }
|
||||
//private RecipeLoader LoaderOfRecipies { get; set;}
|
||||
|
||||
public override bool AllowRuntimeReload {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override bool ShouldLoad(EnumAppSide forSide)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double ExecuteOrder( )
|
||||
{
|
||||
return 0.1d;
|
||||
}
|
||||
|
||||
public override void Start(ICoreAPI api)
|
||||
{
|
||||
this.CoreAPI = api;
|
||||
|
||||
RegisterItemClasses( );
|
||||
|
||||
|
||||
base.Start(api);
|
||||
}
|
||||
|
||||
public override void StartServerSide(ICoreServerAPI api)
|
||||
{
|
||||
this.ServerAPI = api;
|
||||
//LoaderOfRecipies = ServerAPI.ModLoader.GetModSystem<RecipeLoader>( );
|
||||
|
||||
if (api is ServerCoreAPI) {
|
||||
ServerCore = api as ServerCoreAPI;
|
||||
}
|
||||
else {
|
||||
Mod.Logger.Error("Cannot access 'ServerCoreAPI' class: API (implimentation) has changed, Contact Developer!");
|
||||
return;
|
||||
}
|
||||
|
||||
ServerCore.Event.ServerRunPhase(EnumServerRunPhase.LoadGame, OnServerLoadGame);
|
||||
|
||||
|
||||
|
||||
|
||||
Mod.Logger.VerboseDebug("Elemental Tools - should be installed...");
|
||||
}
|
||||
|
||||
private void OnServerLoadGame( )
|
||||
{
|
||||
ManipulateGridRecipies( );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Config;
|
||||
|
||||
namespace AnvilMetalRecovery
|
||||
namespace ElementalTools
|
||||
{
|
||||
public class ItemMallet : Item
|
||||
{
|
||||
|
|
@ -28,7 +28,10 @@ namespace AnvilMetalRecovery
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ingredient.IsTool && ingredient.Code.BeginsWith(GlobalConstants.DefaultDomain, @"hammer")) {
|
||||
if (ingredient.IsTool &&
|
||||
(ingredient.Code.BeginsWith(GlobalConstants.DefaultDomain, @"hammer") ||
|
||||
ingredient.Code.BeginsWith("fma",ElementalToolsSystem.malletAssetKey)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
27
ElementalTools/Properties/AssemblyInfo.cs
Normal file
27
ElementalTools/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("ElementalTools")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("librarian")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
|
||||
49
ElementalTools/assets/fma/itemtypes/tools/mallet.json
Normal file
49
ElementalTools/assets/fma/itemtypes/tools/mallet.json
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
code: "mallet",
|
||||
class: "ItemMallet",
|
||||
attributes: {
|
||||
handbook: {
|
||||
include: true
|
||||
},
|
||||
toolrackTransform: {
|
||||
rotation: { y: 1, z: -1 },
|
||||
translation: { x: -0.2 },
|
||||
scale: 1.5,
|
||||
}
|
||||
},
|
||||
tool: "hammer",
|
||||
heldTpHitAnimation: "smithing",
|
||||
shape: { base: "item/tools/mallet" },
|
||||
textures: {
|
||||
"head": { base:"game:block/wood/debarked/oak"},
|
||||
"side": { base:"game:block/wood/treetrunk/oak"},
|
||||
"wood": { base:"game:item/tool/material/wood"}
|
||||
},
|
||||
tooltier: 1,
|
||||
durability: 200,
|
||||
attackpower: 1,
|
||||
creativeinventory: { "general": ["*"], "items": ["*"], "tools": ["*"] },
|
||||
fpHandTransform: {
|
||||
translation: { x: 0.0468, y: -0.2, z: 0 },
|
||||
rotation: { x: 15, y: 15, z: 90 },
|
||||
scale: 2.5
|
||||
},
|
||||
guiTransform: {
|
||||
rotate: false,
|
||||
translation: { x: 0, y: 5, z: 0 },
|
||||
rotation: { x: -77, y: -135, z: 160 },
|
||||
origin: { x: 0.54, y: 0.5, z: 0.48 },
|
||||
scale: 2.6
|
||||
},
|
||||
groundTransform: {
|
||||
translation: { x: 0, y: 0, z: 0 },
|
||||
rotation: { x: 0, y: 0, z: 0 },
|
||||
origin: { x: 0.5, y: 0.45, z: 0.5 },
|
||||
scale: 4.5
|
||||
},
|
||||
tpHandTransform: {
|
||||
translation: { x: -0.75, y: -0.48, z: -0.52 },
|
||||
rotation: { x: 90, y: 1, z: 0 },
|
||||
scale: 1
|
||||
}
|
||||
}
|
||||
23
ElementalTools/assets/fma/lang/en.json
Normal file
23
ElementalTools/assets/fma/lang/en.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"itemdesc-metal_shaving-*": "Various small bits of metal. Looks re-smeltable.",
|
||||
"item-metal_shaving-*":"Metal Shavings",
|
||||
"item-metal_shaving-bismuth": "Bismuth Shavings",
|
||||
"item-metal_shaving-bismuthbronze": "Bismuth bronze Shavings",
|
||||
"item-metal_shaving-blackbronze": "Black bronze Shavings",
|
||||
"item-metal_shaving-brass": "Brass Shavings",
|
||||
"item-metal_shaving-chromium": "Chromium Shavings",
|
||||
"item-metal_shaving-copper": "Copper Shavings",
|
||||
"item-metal_shaving-gold": "Gold Shavings",
|
||||
"item-metal_shaving-iron": "Iron Shavings",
|
||||
"item-metal_shaving-lead": "Lead Shavings",
|
||||
"item-metal_shaving-platinum": "Platinum Shavings",
|
||||
"item-metal_shaving-rhodium": "Rhodium Shavings",
|
||||
"item-metal_shaving-silver": "Silver Shavings",
|
||||
"item-metal_shaving-stainlesssteel": "Stainless-Steel Shavings",
|
||||
"item-metal_shaving-steel": "Steel Shavings",
|
||||
"item-metal_shaving-tin": "Tin Shavings",
|
||||
"item-metal_shaving-tinbronze": "Tin bronze Shavings",
|
||||
"item-metal_shaving-titanium": "Titanium Shavings",
|
||||
"item-metal_shaving-uranium": "Uranium Shavings",
|
||||
"item-metal_shaving-zinc": "Zinc Shavings",
|
||||
}
|
||||
11
ElementalTools/assets/fma/recipes/grid/tool/mallet.json
Normal file
11
ElementalTools/assets/fma/recipes/grid/tool/mallet.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
ingredientPattern: "K H S",
|
||||
ingredients: {
|
||||
"K": { type: "item", code:"game:knife-*", isTool: true},
|
||||
"H": { type: "block", code: "game:log-*", allowedVariants: ["placed-birch-ud", "placed-oak-ud", "placed-maple-ud", "placed-pine-ud", "placed-acacia-ud"], name: "head" },
|
||||
"S": { type: "item", code: "game:stick" }
|
||||
},
|
||||
width: 1,
|
||||
height: 3,
|
||||
output: { type: "item", code: "mallet", quantity: 1 }
|
||||
}
|
||||
44
ElementalTools/assets/fma/shapes/item/tools/mallet.json
Normal file
44
ElementalTools/assets/fma/shapes/item/tools/mallet.json
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"editor": {
|
||||
"allAngles": false,
|
||||
"entityTextureMode": false
|
||||
},
|
||||
"textureWidth": 16,
|
||||
"textureHeight": 8,
|
||||
"textureSizes": {
|
||||
},
|
||||
"textures": {
|
||||
"head": "game:block/wood/debarked/birch",
|
||||
"side": "game:block/wood/treetrunk/oak",
|
||||
"wood": "game:item/tool/material/wood"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "handle",
|
||||
"from": [ 0.5, 7.5, 7.5 ],
|
||||
"to": [ 13.5, 8.5, 8.5 ],
|
||||
"rotationOrigin": [ -3.0, 0.0, 8.0 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#wood", "uv": [ 2.0, 3.0, 15.0, 4.0 ] },
|
||||
"east": { "texture": "#wood", "uv": [ 6.5, 5.25, 7.5, 6.25 ] },
|
||||
"south": { "texture": "#wood", "uv": [ 1.5, 5.5, 14.5, 6.5 ] },
|
||||
"west": { "texture": "#wood", "uv": [ 7.0, 3.25, 8.0, 4.25 ] },
|
||||
"up": { "texture": "#wood", "uv": [ 2.0, 4.0, 15.0, 5.0 ] },
|
||||
"down": { "texture": "#wood", "uv": [ 1.5, 4.25, 14.5, 5.25 ] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Head",
|
||||
"from": [ 7.5, 5.5, 5.5 ],
|
||||
"to": [ 13.0, 10.5, 10.5 ],
|
||||
"rotationOrigin": [ -1.0, -1.0, -1.0 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#head", "uv": [ 4.0, 2.0, 9.5, 7.0 ] },
|
||||
"east": { "texture": "#side", "uv": [ 5.0, 1.5, 10.0, 6.5 ] },
|
||||
"south": { "texture": "#head", "uv": [ 5.0, 1.75, 10.5, 6.75 ] },
|
||||
"west": { "texture": "#side", "uv": [ 5.5, 1.75, 10.5, 6.75 ] },
|
||||
"up": { "texture": "#head", "uv": [ 5.0, 1.5, 13.0, 6.5 ], "autoUv": false },
|
||||
"down": { "texture": "#head", "uv": [ 4.5, 1.75, 10.0, 6.75 ] }
|
||||
}
|
||||
}
|
||||
]}
|
||||
13
ElementalTools/modinfo.json
Normal file
13
ElementalTools/modinfo.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"type": "code",
|
||||
"name": "𝙴𝙻𝙴𝙼𝙴𝙽𝚃𝙰𝙻 𝚃𝙾𝙾𝙻𝚂",
|
||||
"description" : "Devices of great empowerment.",
|
||||
"authors": ["Melchior"],
|
||||
"ModID":"elementaltools",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"game": "1.12.14",
|
||||
"survival": ""
|
||||
},
|
||||
"website": "http://nowebsite.nope"
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ namespace FirstMachineAge
|
|||
'Membrane' block: points to Nucleus block, but also is input/output point for AbstractCircuits / Power
|
||||
'Nucleus' block: houses MBM state/data & definition, as well as list of component block pos, and prototype
|
||||
*/
|
||||
public interface IMultiBlockModule<T> where T : Block
|
||||
public interface IMultiBlockModule<T> where T : Block //MultiBlock ?
|
||||
{
|
||||
ulong UniqueModuleID { get; }
|
||||
IMultiBlockModule<T> NucleusBlock { get; }
|
||||
|
|
@ -46,11 +46,16 @@ namespace FirstMachineAge
|
|||
public enum MBMType
|
||||
{
|
||||
Cyto,
|
||||
Membrane,
|
||||
Membrane, //or 'Ports' / Interface
|
||||
Nucleus,
|
||||
//Vacuole // a "empty" 'Space' for Hardpoints or Sub-modules?
|
||||
//Vacuole // a "empty" 'Space' for Hardpoints or Sub-modules? Optional slot?
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*****
|
||||
|
||||
public virtual void OnBlockPlaced <- will set BlockEntity in BASE overirde for MultiBlock : Block
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnvilMetalRecovery", "Anvil
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assorted", "Assorted\Assorted.csproj", "{805B37F5-F87D-4A63-BD3F-66AE59F1C998}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PsudeoTarget", "PsudeoTarget\PsudeoTarget.csproj", "{DF81DB59-817A-48BA-88CC-8173E6D2919D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElementalTools", "ElementalTools\ElementalTools.csproj", "{EA9BA3EC-EF08-4192-A844-4D3F398B1FFF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -31,6 +35,14 @@ Global
|
|||
{805B37F5-F87D-4A63-BD3F-66AE59F1C998}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{805B37F5-F87D-4A63-BD3F-66AE59F1C998}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{805B37F5-F87D-4A63-BD3F-66AE59F1C998}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DF81DB59-817A-48BA-88CC-8173E6D2919D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DF81DB59-817A-48BA-88CC-8173E6D2919D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DF81DB59-817A-48BA-88CC-8173E6D2919D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DF81DB59-817A-48BA-88CC-8173E6D2919D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA9BA3EC-EF08-4192-A844-4D3F398B1FFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EA9BA3EC-EF08-4192-A844-4D3F398B1FFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EA9BA3EC-EF08-4192-A844-4D3F398B1FFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA9BA3EC-EF08-4192-A844-4D3F398B1FFF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
Policies = $0
|
||||
|
|
|
|||
12
PsudeoTarget/Program.cs
Normal file
12
PsudeoTarget/Program.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace PsudeoTarget
|
||||
{
|
||||
class MainClass
|
||||
{
|
||||
public static void Main(string[ ] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
27
PsudeoTarget/Properties/AssemblyInfo.cs
Normal file
27
PsudeoTarget/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("PsudeoTarget")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("librarian")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
|
||||
37
PsudeoTarget/PsudeoTarget.csproj
Normal file
37
PsudeoTarget/PsudeoTarget.csproj
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{DF81DB59-817A-48BA-88CC-8173E6D2919D}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>PsudeoTarget</RootNamespace>
|
||||
<AssemblyName>PsudeoTarget</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ExternalConsole>true</ExternalConsole>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ExternalConsole>true</ExternalConsole>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue