• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No 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

Revisionaac184e55025da84d0c7528700a7648588fea763 (tree)
Time2023-05-08 03:31:21
Authormelchior <melchior@user...>
Commitermelchior

Log Message

removed unused smelting code

Change Summary

Incremental Difference

--- a/AnvilMetalRecovery/Items/VariableMetalItem.cs
+++ b/AnvilMetalRecovery/Items/VariableMetalItem.cs
@@ -89,8 +89,7 @@ namespace AnvilMetalRecovery
8989 public override void GetHeldItemInfo(ItemSlot inSlot, StringBuilder dsc, IWorldAccessor world, bool withDebugInfo)
9090 {
9191 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);
9493
9594 base.GetHeldItemInfo(inSlot, dsc, world, withDebugInfo);
9695
@@ -101,43 +100,10 @@ namespace AnvilMetalRecovery
101100 public void ApplyMetalProperties(RecoveryEntry recoveryData, ref ItemStack contStack, float percentAdjust = 1.0f)
102101 {
103102 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( ));
107104 }
108105
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);
117106
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- }
141107
142108 /// <summary>
143109 /// Bend Crafting output result - to Dynamic item
--- a/AnvilMetalRecovery/modinfo.json
+++ b/AnvilMetalRecovery/modinfo.json
@@ -4,7 +4,7 @@
44 "description" : "Get back smithing discards, broken tool scrap, failed molds; and MORE!",
55 "authors": ["Melchior"],
66 "ModID":"metalrecovery",
7- "version": "0.1.19-pre.0",
7+ "version": "0.1.19-pre.1",
88 "dependencies": {
99 "game": "1.18.0",
1010 "survival": ""