8 vector pos = pSettings.m_Position;
9 if (pSettings.m_Parent !=
null)
10 pos = pSettings.m_Parent.GetPosition();
12 GetGame().GetObjectsAtPosition(pos, pSettings.m_RangeMax, nearestObjects,
null);
13 foreach (
Object nearestObject : nearestObjects)
17 if (nearestItem && nearestItem.HasWetness() && nearestItem != pSettings.m_Parent && !nearestItem.IsInherited(Man))
19 distance =
vector.Distance(nearestItem.GetPosition(), pSettings.m_Position);
20 distance =
Math.Max(distance, 0.1);
22 float dryModifier = 0;
26 dryModifier = (-1 * pSettings.m_UpdateInterval * nearestItem.GetDryingIncrement(
"groundHeatSource")) / distance;
27 Math.Clamp(dryModifier, nearestItem.GetWetMin(), nearestItem.GetWetMax());
28 nearestItem.AddWet(dryModifier);
33 foreach (
EntityAI cargoEntity : cargoEntities)
41 dryModifier = (-1 * pSettings.m_UpdateInterval * cargoItem.GetDryingIncrement(
"groundHeatSource")) / distance;
42 Math.Clamp(dryModifier, cargoItem.GetWetMin(), cargoItem.GetWetMax());
43 cargoItem.AddWet(dryModifier);
56 resultValues.m_Temperature = pSettings.m_TemperatureMax;
66 resultValues.m_Temperature = pSettings.m_TemperatureMax;