10 pos = pSettings.
m_Parent.GetPosition();
13 foreach (
Object nearestObject : nearestObjects)
17 if (nearestItem && nearestItem.HasWetness() && nearestItem != pSettings.
m_Parent && !nearestItem.IsInherited(Man))
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);
proto native void GetObjectsAtPosition(vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
Returns list of all objects in circle "radius" around position "pos".
void Execute(UniversalTemperatureSourceSettings pSettings, UniversalTemperatureSourceResult resultValues)
override void DryItemsInVicinity(UniversalTemperatureSourceSettings pSettings)
override void Execute(UniversalTemperatureSourceSettings pSettings, UniversalTemperatureSourceResult resultValues)
float m_TemperatureMax
min temperature you can get from the TemperatureSource
vector m_Position
if the temperature generated is also set as Temperature Stat on Item itself
float m_RangeMax
range where the full temperature is given to receiver
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
proto native CGame GetGame()
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.