DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ChangeInfestation()

void ChangeInfestation ( bool is_infested)
private

См. определение в файле PlantBase.c строка 464

465 {
466 m_IsInfested = is_infested;
467
468 string plant_type = GetType();
469 PlantMaterialHealth material = m_ModuleHorticulture.GetPlantMaterial( plant_type );
470
471 if ( m_IsInfested )
472 {
473 if ( material.m_InfestedTex != "" )
474 {
475 SetObjectTexture( 0, material.m_InfestedTex );
476 }
477 if ( material.m_InfestedMat != "" )
478 {
479 SetObjectMaterial( 0, material.m_InfestedMat );
480 }
481 }
482 else
483 {
484 if ( material.m_HealthyTex != "" )
485 {
486 SetObjectTexture( 0, material.m_HealthyTex );
487 }
488 if ( material.m_HealthyMat != "" )
489 {
490 SetObjectMaterial( 0, material.m_HealthyMat );
491 }
492 }
493 }
eBleedingSourceType GetType()
Определения BleedingSource.c:63
PluginHorticulture m_ModuleHorticulture
Определения PlantBase.c:42
bool m_IsInfested
Определения PlantBase.c:26
string m_HealthyMat
Определения PlantMaterial.c:6
string m_InfestedMat
Определения PlantMaterial.c:4
string m_HealthyTex
Определения PlantMaterial.c:5
string m_InfestedTex
Определения PlantMaterial.c:3

Перекрестные ссылки GetType(), PlantMaterialHealth::m_HealthyMat, PlantMaterialHealth::m_HealthyTex, PlantMaterialHealth::m_InfestedMat, PlantMaterialHealth::m_InfestedTex, m_IsInfested и m_ModuleHorticulture.

Используется в GrowthTimerTick(), SprayPlant() и StopInfestation().