значит касаемо радиации.
scripts\4_World\classes\playermodifiers\modifiers\biohazzard.c
при активации зоны (входе игрока)
override protected void OnActivate(PlayerBase player)
{
if (player.GetNotifiersManager()) player.GetNotifiersManager().ActivateByType(MedicalAttentionNotifiers.NTF_POISONED);
}
при деактивации зоны (выходе игрока)
override protected void OnDeactivate(PlayerBase player)
{
if (player.GetNotifiersManager()) player.GetNotifiersManager().DeactivateByType(MedicalAttentionNotifiers.NTF_POISONED);
}
во время нахождения в зоне игрока
override protected void OnTick(PlayerBase player, float deltaT)
{
int count = player.GetSingleAgentCount(MedicalAttentionAgents.UNKNOWN_TOXINE);
int countMax = PluginTransmissionAgents.GetAgentMaxCount(MedicalAttentionAgents.UNKNOWN_TOXINE);
float protection = (float)player.m_SuitProtectionLevel / 100;
if (protection > 1)
{
protection = 1;
}
float accumulationRate = 0;
if (protection == 1)
{
accumulationRate = 0.278; //PluginTransmissionAgents.GetDieOffSpeed(MedicalAttentionAgents.UNKNOWN_TOXINE);
}
else // protection < 1
{
float accumulationTime = Math.Lerp(MAGlobals.Get().g_ToxinAccumulationTimeMin, MAGlobals.Get().g_ToxinAccumulationTimeMax, protection) * 60;
accumulationRate = (float)countMax / accumulationTime + 0.278;
}
float amount = accumulationRate * deltaT;
if (count + amount > countMax)
{
amount = countMax - count;
}
player.InsertAgent(MedicalAttentionAgents.UNKNOWN_TOXINE, amount);
// Obsolete
float damage = MAGlobals.Get().g_BiohazardDamage * (1 - protection);
player.AddHealth("GlobalHealth", "Health" , damage * deltaT * -1);
}
что дописывать:
EntityAI attachment = player.FindAttachmentBySlotName("Mask");
if ( attachment && attachment.IsItemBase() ) {
ItemBase item = Class.Cast(attachment);
string className = item.GetType();
if ( className.Contains("GP5GasMask") ) {
itemEnt.SetHealth("","",itemEnt.GetHealth() - 0.2);
}
}
ну и по аналогии с нужными слотами в инвентаре и id вещей блоки делаем (я просто понятия не имею из чего там сет состоит и куда крепится). В примере если в слоте масок найден гп5 то здоровье предмета на 0.2 уменьшится.
id слотов можешь найти в скрипте например тут
Что модифицировать - думаю функцию OnTick