• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

First Machine Age's Mods (Combined repo.)


Commit MetaInfo

Revision4cf6a65e323e65253acee704faa2562996d12ac0 (tree)
Zeit2020-12-01 16:20:09
Autormelchior <melchior@user...>
Commitermelchior

Log Message

Updates for V1.14 *WIP*

Ändern Zusammenfassung

Diff

--- a/AnvilMetalRecovery/BlockEntities/MetalRecovery_BlockEntityAnvil.cs
+++ b/AnvilMetalRecovery/BlockEntities/MetalRecovery_BlockEntityAnvil.cs
@@ -40,9 +40,10 @@ namespace AnvilMetalRecovery
4040
4141 public override void OnSplit(Vec3i voxelPos)
4242 {
43- if (!this.IsIronBloom && Voxels[voxelPos.X, voxelPos.Y, voxelPos.Z] == ( byte )EnumVoxelMaterial.Metal) {
43+
44+ if (this.IsShavable && Voxels[voxelPos.X, voxelPos.Y, voxelPos.Z] == ( byte )EnumVoxelMaterial.Metal) {
4445 #if DEBUG
45- Logger.VerboseDebug("Split some {0} @{1}, Total:{2}", this.BaseMaterial.Collectible.LastCodePart( ), voxelPos, SplitCount);
46+ Logger.VerboseDebug("Split some {0} @{1}, Total:{2}", this.BaseMaterial.Collectible.LastCodePart( ), voxelPos, SplitCount);
4647 #endif
4748 SplitCount++;
4849 }
@@ -55,7 +56,7 @@ namespace AnvilMetalRecovery
5556 {
5657 int splitTemp = SplitCount;
5758 base.CheckIfFinished(byPlayer);
58- // base.MatchesRecipe( ) -- Private; argh
59+ // base.MatchesRecipe( ) -- Private; still in V1.14.... :\
5960 /*
6061 this.Voxels = new byte[16, 6, 16];
6162 this.workItemStack = null;
@@ -85,5 +86,30 @@ namespace AnvilMetalRecovery
8586 }
8687 }
8788 }
89+
90+ protected bool IsShavable {
91+ get {
92+ //this.SelectedRecipe <-- things that are recoverable?
93+ return this.WorkItemStack?.Collectible?.FirstCodePart( ).Equals("ironbloom") == false;
94+ }
95+ }
96+
97+ protected IAnvilWorkable AnvilWorkpiece {
98+ get
99+ {
100+ if (this.WorkItemStack != null && this.WorkItemStack.Collectible is IAnvilWorkable)
101+ { return this.WorkItemStack.Collectible as IAnvilWorkable; }
102+
103+ return null;
104+ }
105+ }
106+
107+ protected ItemStack BaseMaterial
108+ {
109+ get
110+ {
111+ return AnvilWorkpiece.GetBaseMaterial(this.WorkItemStack);//Right??
112+ }
113+ }
88114 }
89115 }
\ No newline at end of file
--- a/AnvilMetalRecovery/assets/fma/itemtypes/shavings/metal_shavings.json
+++ b/AnvilMetalRecovery/assets/fma/itemtypes/shavings/metal_shavings.json
@@ -5,12 +5,12 @@
55 attributes: {
66 handbook: {
77 excludeByType: {
8- "*-chromium": true,
9- "*-platinum": true,
10- "*-titanium": true,
11- "*-rhodium": true,
12- "*-stainlessteel": true,
13- "*-uranium": true
8+ "*-chromium": true,
9+ "*-platinum": true,
10+ "*-titanium": true,
11+ "*-rhodium": true,
12+ "*-stainlessteel": true,
13+ "*-uranium": true
1414 }
1515 }
1616 },
@@ -31,6 +31,9 @@
3131 "*-bismuthbronze": 7900,
3232 "*-blackbronze": 9000,
3333 "*-iron": 7870,
34+ "*-meteoriciron": 7800,
35+ "*-steel": 7820,
36+ "*-blistersteel": 7720,
3437 "*-gold": 19300,
3538 "*-lead": 11300,
3639 "*-tin": 7260,
@@ -79,6 +82,24 @@
7982 smeltedRatio: 20,
8083 smeltedStack: { type: "item", code: "game:ingot-iron" }
8184 },
85+ "*-meteoriciron": {
86+ meltingPoint: 1476,
87+ meltingDuration: 30,
88+ smeltedRatio: 20,
89+ smeltedStack: { type: "item", code: "game:ingot-meteoriciron" }
90+ },
91+ "*-steel": {
92+ meltingPoint: 1502,
93+ meltingDuration: 30,
94+ smeltedRatio: 20,
95+ smeltedStack: { type: "item", code: "game:ingot-steel" }
96+ },
97+ "*-blistersteel": {
98+ meltingPoint: 1602,
99+ meltingDuration: 30,
100+ smeltedRatio: 20,
101+ smeltedStack: { type: "item", code: "game:ingot-blistersteel" }
102+ },
82103 "*-gold": {
83104 meltingPoint: 1063,
84105 meltingDuration: 30,
--- a/AnvilMetalRecovery/modinfo.json
+++ b/AnvilMetalRecovery/modinfo.json
@@ -4,9 +4,9 @@
44 "description" : "Get back lost scrap and smithing discards.",
55 "authors": ["Melchior"],
66 "ModID":"metalrecovery",
7- "version": "0.1.3",
7+ "version": "0.1.4",
88 "dependencies": {
9- "game": "1.13.0",
9+ "game": "1.14.0",
1010 "survival": ""
1111 },
1212 "website": "http://nowebsite.nope"
--- a/Assorted/BlockEntityClasses/CollapsingBlockEntity.cs
+++ /dev/null
@@ -1,89 +0,0 @@
1-using System;
2-using System.Text;
3-
4-using Vintagestory.API.Common;
5-using Vintagestory.API.Config;
6-using Vintagestory.API.Datastructures;
7-
8-namespace FirstMachineAge
9-{
10- public class CollapsingBlockEntity : BlockEntity
11- {
12-
13- public override void Initialize(ICoreAPI api)
14- {
15- base.Initialize(api);
16- //origlightHsv = Block.LightHsv;
17- //lightHsv = ( byte[ ] )Block.LightHsv.Clone( );
18- }
19-
20- public void UponPlacement(string camo )
21- {
22- this.Camo = camo;
23-
24- }
25-
26- public string Camo { get; protected set;}
27-
28- public override void GetBlockInfo(IPlayer forPlayer, StringBuilder sb)
29- {
30- //Mirror whatever tooltip for this material normally?
31- //sb.AppendLine(Lang.Get("{0} with {1} lining and {2} glass panels", material.UcFirst( ), lining.UcFirst( ), glass));
32- }
33-
34- public override void FromTreeAtributes(ITreeAttribute tree, IWorldAccessor worldForResolving)
35- {
36- base.FromTreeAtributes(tree, worldForResolving);
37-
38- this.Camo = tree.GetString(CollapsingBlock.CamoKey, "dirt");
39-
40- if (Api != null && Api.Side == EnumAppSide.Client)
41- { MarkDirty(true);}
42-
43- }
44-
45-
46- public override void ToTreeAttributes(ITreeAttribute tree)
47- {
48- base.ToTreeAttributes(tree);
49-
50- tree.SetString(CollapsingBlock.CamoKey, this.Camo);
51- }
52-
53- /*
54- private MeshData getMesh(ITesselatorAPI tesselator)
55- {
56- Dictionary<string, MeshData> lanternMeshes = ObjectCacheUtil.GetOrCreate(Api, "blockLanternBlockMeshes", ( ) => new Dictionary<string, MeshData>( ));
57-
58- MeshData mesh = null;
59- BlockLantern block = Api.World.BlockAccessor.GetBlock(Pos) as BlockLantern;
60- if (block == null) return null;
61-
62- string orient = block.LastCodePart( );
63-
64- if (lanternMeshes.TryGetValue(material + "-" + lining + "-" + orient + "-" + glass, out mesh)) {
65- return mesh;
66- }
67-
68- return lanternMeshes[material + "-" + lining + "-" + orient + "-" + glass] = block.GenMesh(Api as ICoreClientAPI, material, lining, glass, null, tesselator);
69- }
70-
71- public override bool OnTesselation(ITerrainMeshPool mesher, ITesselatorAPI tesselator)
72- {
73- MeshData mesh = getMesh(tesselator);
74-
75- if (mesh == null) return false;
76-
77- string part = Block.LastCodePart( );
78- if (part == "up" || part == "down") {
79- mesh = mesh.Clone( ).Rotate(new Vec3f(0.5f, 0.5f, 0.5f), 0, MeshAngle, 0);
80- }
81-
82- mesher.AddMeshData(mesh);
83-
84- return true;
85- }
86- */
87- }
88-}
89-