<?
if($ku['time_drakon']>$time)$drakon_act=1;

if($ku['time_yastreb']>$time)$yastreb_act=1;

if($ku['time_shmel']>$time)$shmel_act=1;

if($ku['time_vetruk']>$time)$vetruk=1;

if($ku['hydropinics_time']>$time)
{
$hp_act=1;
$hp_ps=$ku['hydropinics_type'];
}

if($ku['scarecrow_time']>$time)$sc_act=1;

if($ku['seeder']>0)
{
$sd=$ku['seeder'];
if($sd<=10)$seeder_act_skid=$sd*5;
elseif($sd==11)$seeder_act_skid=50;
elseif($sd==12)$seeder_act_skid=50;

if($sd<=6)$seeder_act=$sd*10;
elseif($sd==7)$seeder_act=80;
elseif($sd==8)$seeder_act=100;
elseif($sd==9)$seeder_act=130;
elseif($sd==10)$seeder_act=170;

elseif($sd==11)$seeder_act=220;
elseif($sd==12)$seeder_act=280;

}
if($ku['harvester']>0)
{
$hv=$ku['harvester'];
if($hv<=6)$harvester_act=$hv*10;
elseif($hv==7)$harvester_act=80;
elseif($hv==8)$harvester_act=100;
elseif($hv==9)$harvester_act=130;
elseif($hv==10)$harvester_act=170;
elseif($hv==11)$harvester_act=220;
elseif($hv==12)$harvester_act=280;

}

if($ku['soiler']>0)
{
$sr=$ku['soiler'];
if($sr<=6)$soiler_act=$sr*10;
elseif($sr==7)$soiler_act=80;
elseif($sr==8)$soiler_act=100;
elseif($sr==9)$soiler_act=130;
elseif($sr==10)$soiler_act=170;
elseif($sr==11)$soiler_act=220;
elseif($sr==12)$soiler_act=280;
if((isset($mc)) && ($mc['soil'])>0)
{
$mc_p_soiler=$mc['soil']*5;
$soiler_act=(($soiler_act/100)*$mc_p_soiler)+$soiler_act;
}
//echo $soiler_act;
}

if($ku['flowerbed']>0)
{
$fb=$ku['flowerbed'];
if($fb<=6)$flowerbed_act=$fb;
elseif($fb==7)$flowerbed_act=8;
elseif($fb==8)$flowerbed_act=10;
elseif($fb==9)$flowerbed_act=13;
elseif($fb==10)$flowerbed_act=17;
elseif($fb==11)$flowerbed_act=22;
elseif($fb==12)$flowerbed_act=28;
}

if($ku['irregate']>0)
{
$ig=$ku['irregate'];
if($ig<=6)
{
$irregate_act=$ig*10;
$irregate_act_m=$ig*1;
if($ig<=4)$irregate_act_mnp=$ig*1;
elseif($ig==5)$irregate_act_mnp=6;
elseif($ig==6)$irregate_act_mnp=8;
}
elseif($ig==7)
{
$irregate_act=80;
$irregate_act_m=8;
$irregate_act_mnp=10;
}
elseif($ig==8)
{
$irregate_act=100;
$irregate_act_m=10;
$irregate_act_mnp=13;
}
elseif($ig==9)
{
$irregate_act=130;
$irregate_act_m=13;
$irregate_act_mnp=18;
}
elseif($ig==10)
{
$irregate_act=170;
$irregate_act_m=17;
$irregate_act_mnp=25;
}
elseif($ig==11)
{
$irregate_act=220;
$irregate_act_m=22;
$irregate_act_mnp=26;
}
elseif($ig==12)
{
$irregate_act=280;
$irregate_act_m=28;
$irregate_act_mnp=27;
}
//if(isset($shmel_act))$irregate_act=$irregate_act*2;
}

if($ku['conveyor']>0)
{
$cr=$ku['conveyor'];
if($cr==1)$conveyor_act=20;
elseif($cr==2)$conveyor_act=40;
elseif($cr==3)$conveyor_act=60;
elseif($cr==4)$conveyor_act=80;
elseif($cr==5)$conveyor_act=100;
elseif($cr==6)$conveyor_act=120;
elseif($cr==7)$conveyor_act=160;
elseif($cr==8)$conveyor_act=200;
elseif($cr==9)$conveyor_act=260;
elseif($cr==10)$conveyor_act=340;
elseif($cr==11)$conveyor_act=440;
elseif($cr==12)$conveyor_act=560;
//if(isset($shmel_act))$conveyor_act=$conveyor_act*2;
}

if($ku['catchfish']>0)
{
$ac=$ku['catchfish'];
if($ac==1)$catchfisher_act=10;
elseif($ac==2)$catchfish_act=20;
elseif($ac==3)$catchfish_act=30;
elseif($ac==4)$catchfish_act=40;
elseif($ac==5)$catchfish_act=50;
elseif($ac==6)$catchfish_act=60;
elseif($ac==7)$catchfish_act=80;
elseif($ac==8)$catchfish_act=100;
elseif($ac==9)$catchfish_act=130;
elseif($ac==10)$catchfish_act=170;
elseif($ac==11)$catchfish_act=220;
elseif($ac==12)$catchfish_act=280;
//if(isset($catchfish_act))$catchfish_act=$catchfish_act*2;
}

if($ku['fooder']>0)
{
$fr=$ku['fooder'];
if($fr==1)$fooder_act=10;
elseif($fr==2)$fooder_act=20;
elseif($fr==3)$fooder_act=30;
elseif($fr==4)$fooder_act=40;
elseif($fr==5)$fooder_act=50;
elseif($fr==6)$fooder_act=60;
elseif($fr==7)$fooder_act=80;
elseif($fr==8)$fooder_act=100;
elseif($fr==9)$fooder_act=130;
elseif($fr==10)$fooder_act=170;
elseif($fr==11)$fooder_act=220;
elseif($fr==12)$fooder_act=280;
//if(isset($shmel_act))$fooder_act=$fooder_act*2;
}
if($ku['sponder']>0)
{
$ffr=$ku['sponder'];
if($ffr<=6)$sponder_act=$ffr*20;
elseif($ffr==7)$sponder_act=160;
elseif($ffr==8)$sponder_act=200;
elseif($ffr==9)$sponder_act=260;
elseif($ffr==10)$sponder_act=340;
elseif($ffr==11)$sponder_act=440;
elseif($ffr==12)$sponder_act=560;
}

if($ku['incubator']>0)
{
$icr=$ku['incubator'];
if($icr==1)$incubator_act=10;
elseif($icr==2)$incubator_act=20;
elseif($icr==3)$incubator_act=30;
elseif($icr==4)$incubator_act=40;
elseif($icr==5)$incubator_act=50;
elseif($icr==6)$incubator_act=60;
elseif($icr==7)$incubator_act=70;
elseif($icr==8)$incubator_act=80;
elseif($icr==9)$incubator_act=90;
elseif($icr==10)$incubator_act=100;
elseif($icr==11)$incubator_act=110;
elseif($icr==12)$incubator_act=120;
//if(isset($shmel_act))$incubator_act=$incubator_act*2;
}

if($ku['cultivator']>0)
{
$sr=$ku['cultivator'];
if($sr<=6)$cultivator_act=$sr*20;
elseif($sr==7)$cultivator_act=160;
elseif($sr==8)$cultivator_act=200;
elseif($sr==9)$cultivator_act=260;
elseif($sr==10)$cultivator_act=340;
elseif($sr==11)$cultivator_act=440;
elseif($sr==12)$cultivator_act=560;
}

if($ku['cultivator2']>0)
{
$sr=$ku['cultivator2'];
if($sr==1)$cultivator2_act=$sr*20;
elseif($sr==2)$cultivator2_act=30;
elseif($sr==3)$cultivator2_act=40;
}
if(isset($mc) && $mc['irrigate']>0)
{
$mc_hp_act=1;
$mc_hp_ps=$mc['irrigate']*10;
// ороситель (кх постройка)
// даёт эфект подобный гидре
// уровень оросителя*10
}

if(isset($mc) && $mc['school']>0) // колхозная школа
{
$exp=25+($mc['school']*2); // уровень фермеров
if($exp>=$ku['level'])$school_act=1; // удвоение базового опыта доступо фермерам с уровнем больше $exp включительно
}

if(isset($mc) && $mc['vet']>0) //вет. клиника
{
$vet_act=1;
$vet_ps_m=$mc['vet']*10;
$vet_ps_r=$mc['vet']*25;
}

if(isset($mc) && $mc['kulinary']>0) //кул. техникум
{
$kulinary_act=1;
$kulinary_ps_r=$mc['kulinary']*20;
}

if(isset($mc) && $mc['bank']>0) // кх банк
{
$payment_act=1;
$payment_ps=$mc['bank']*5;
// даёт дополнительные рубины при покупке (уровень * 5%)
}

if(isset($mc) && $mc['lib']==1) // кх библиотека
{
$lib_act=1;
// повышает получаемый базовый опыт всех колхозников на 50%
}

if(isset($mc) && $mc['greenhouse']>0) // кх теплица
{
$greenhouse_act=1;
$greenhouse_ps=$mc['greenhouse']*20;
// увеличивает урожай с грядок на (уровень * 20%)
}
?>