First Machine Age's Mods (Combined repo.)
Revisión | 2e6bbec8d1fca13cef0647b55748080e3e3c1574 (tree) |
---|---|
Tiempo | 2020-09-10 08:13:58 |
Autor | melchior <melchior@user...> |
Commiter | melchior |
Adjusted new constant
@@ -159,7 +159,7 @@ namespace ElementalTools | ||
159 | 159 | } |
160 | 160 | |
161 | 161 | var stuffedInside = GetContents(world, inSlot.Itemstack); |
162 | - if (stuffedInside != null) | |
162 | + if (stuffedInside != null && stuffedInside.Length > 0) | |
163 | 163 | { |
164 | 164 | dsc.Append("Contents: \n"); |
165 | 165 | foreach (var thing in stuffedInside) { |
@@ -18,6 +18,7 @@ namespace ElementalTools | ||
18 | 18 | public class SteelWrap<T>: Item, IAmSteel where T : Item, new() |
19 | 19 | { |
20 | 20 | private const float eutectoid_transition_temperature = 727f;//Celcius |
21 | + private const float quenchTimeConstant = 180f; | |
21 | 22 | private const float quench_min_temperature = 450f;//Celcius |
22 | 23 | private const string _timestampKey = @"timestamp"; |
23 | 24 |
@@ -308,7 +309,7 @@ namespace ElementalTools | ||
308 | 309 | |
309 | 310 | float temperature = entityItem.Itemstack.Collectible.GetTemperature(api.World, entityItem.Itemstack); |
310 | 311 | //Track first moment in liquid; |
311 | - this.SetTimestamp(entityItem);//Clear on pickup or...? | |
312 | + this.SetTimestamp(entityItem);//Need to clear when NORMALIZING. | |
312 | 313 | |
313 | 314 | //Above 900C - What should happen in this range; different phase of iron? |
314 | 315 |
@@ -318,7 +319,7 @@ namespace ElementalTools | ||
318 | 319 | //TODO: Thermal capacity & Transfer values for NON-Water fluids...and surfaces too! |
319 | 320 | var elapsedTime = this.GetTimestampElapsed(entityItem); |
320 | 321 | |
321 | - uint quenchUnits = ( uint )Math.Round(elapsedTime.TotalMilliseconds / 175f, 0); | |
322 | + uint quenchUnits = ( uint )Math.Round(elapsedTime.TotalMilliseconds / quenchTimeConstant, 0); | |
322 | 323 | |
323 | 324 | if (quenchUnits < (uint)HardnessState.Brittle) { |
324 | 325 | this.Hardness(entityItem.Itemstack, ( HardnessState )quenchUnits); |
@@ -328,7 +329,7 @@ namespace ElementalTools | ||
328 | 329 | } |
329 | 330 | |
330 | 331 | //Being that water conducts heat well - reduce Temperature _FASTER_ |
331 | - entityItem.Itemstack.Collectible.SetTemperature(api.World, entityItem.Itemstack, temperature - 17, false); | |
332 | + entityItem.Itemstack.Collectible.SetTemperature(api.World, entityItem.Itemstack, temperature - 15, false); | |
332 | 333 | |
333 | 334 | #if DEBUG |
334 | 335 | api.World.Logger.VerboseDebug("Quench process: {0}S elapsed @{1}C H:{2} ~ QU#{3}", elapsedTime.TotalSeconds, temperature, this.Hardness(entityItem.Itemstack), quenchUnits ); |