First Machine Age's Mods (Combined repo.)
Revision | aac184e55025da84d0c7528700a7648588fea763 (tree) |
---|---|
Time | 2023-05-08 03:31:21 |
Author | melchior <melchior@user...> |
Commiter | melchior |
removed unused smelting code
@@ -89,8 +89,7 @@ namespace AnvilMetalRecovery | ||
89 | 89 | public override void GetHeldItemInfo(ItemSlot inSlot, StringBuilder dsc, IWorldAccessor world, bool withDebugInfo) |
90 | 90 | { |
91 | 91 | var metalName = MetalName(inSlot.Itemstack); |
92 | - var metalQuantity = ( int )Math.Floor(MetalQuantity(inSlot.Itemstack) * AnvilMetalRecoveryMod.CachedConfiguration.VoxelEquivalentValue); | |
93 | - var props = RegenerateCombustablePropsFromStack(inSlot.Itemstack); | |
92 | + var metalQuantity = ( int )Math.Floor(MetalQuantity(inSlot.Itemstack) * AnvilMetalRecoveryMod.CachedConfiguration.VoxelEquivalentValue); | |
94 | 93 | |
95 | 94 | base.GetHeldItemInfo(inSlot, dsc, world, withDebugInfo); |
96 | 95 |
@@ -101,43 +100,10 @@ namespace AnvilMetalRecovery | ||
101 | 100 | public void ApplyMetalProperties(RecoveryEntry recoveryData, ref ItemStack contStack, float percentAdjust = 1.0f) |
102 | 101 | { |
103 | 102 | contStack.Attributes.SetInt(metalQuantityKey, ( int )(recoveryData.TotalQuantity * percentAdjust)); |
104 | - contStack.Attributes.SetString(metalIngotCodeKey, recoveryData.PrimaryMaterial.ToString( )); | |
105 | - | |
106 | - RegenerateCombustablePropsFromStack(contStack); | |
103 | + contStack.Attributes.SetString(metalIngotCodeKey, recoveryData.PrimaryMaterial.ToString( )); | |
107 | 104 | } |
108 | 105 | |
109 | - //Why is this actually done...? whole item isn't smeltable now... | |
110 | - protected CombustibleProperties RegenerateCombustablePropsFromStack(ItemStack contStack) | |
111 | - { | |
112 | - if (contStack == null ) return null; | |
113 | - //if (contStack.Class == EnumItemClass.Item && contStack.Item.CombustibleProps != null) return contStack.Item.CombustibleProps; | |
114 | - | |
115 | - var metalAssetCode = MetalIngotCode(contStack); | |
116 | - var metalUnits = MetalQuantity(contStack); | |
117 | 106 | |
118 | - if (metalAssetCode != null && metalUnits > 0) | |
119 | - if (MetalRecoverySystem.MetalProperties.ContainsKey(metalAssetCode.PathEnding())) | |
120 | - { | |
121 | - var sourceInfo = MetalRecoverySystem.MetalProperties[metalAssetCode.PathEnding( )];//Mabey more...rustic lookup? | |
122 | - | |
123 | - var aCombustibleProps = new CombustibleProperties( ) { | |
124 | - SmeltingType = EnumSmeltType.Smelt, | |
125 | - MeltingPoint = ( int )sourceInfo.MeltingPoint, | |
126 | - MeltingDuration = sourceInfo.MeltingDuration, | |
127 | - //HeatResistance = 500, //sourceInfo.SpecificHeatCapacity & Formula...? | |
128 | - MaxTemperature = ( int )sourceInfo.BoilingPoint, | |
129 | - //SmokeLevel = sourceInfo.SmokeLevel, | |
130 | - SmeltedRatio = 100, | |
131 | - SmeltedStack = new JsonItemStack( ) { Type = EnumItemClass.Item, Code = metalAssetCode.Clone( ), Quantity = (int)Math.Floor(metalUnits * AnvilMetalRecoveryMod.CachedConfiguration.VoxelEquivalentValue) } | |
132 | - }; | |
133 | - aCombustibleProps.SmeltedStack.Resolve(api.World, "VariableMetalItem_regen", true); | |
134 | - | |
135 | - | |
136 | - | |
137 | - return aCombustibleProps; | |
138 | - } | |
139 | - return null; | |
140 | - } | |
141 | 107 | |
142 | 108 | /// <summary> |
143 | 109 | /// Bend Crafting output result - to Dynamic item |
@@ -4,7 +4,7 @@ | ||
4 | 4 | "description" : "Get back smithing discards, broken tool scrap, failed molds; and MORE!", |
5 | 5 | "authors": ["Melchior"], |
6 | 6 | "ModID":"metalrecovery", |
7 | - "version": "0.1.19-pre.0", | |
7 | + "version": "0.1.19-pre.1", | |
8 | 8 | "dependencies": { |
9 | 9 | "game": "1.18.0", |
10 | 10 | "survival": "" |