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

◆ RepairDamageTransfer()

void ActionRepairTent::RepairDamageTransfer ( PlayerBase player,
ItemBase repair_kit,
ItemBase item,
float specialty_weight,
string damage_zone = "" )
inlineprivate

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

157 {
158 float transfer_to_global_coef = 0;
159 array<string> transfer_zones = new array<string>;
160 string path = "" + CFG_VEHICLESPATH + " " + item.GetType() + " DamageSystem DamageZones " + damage_zone;
161 PluginRepairing module_repairing;
162 Class.CastTo(module_repairing, GetPlugin(PluginRepairing));
163
164 GetGame().ConfigGetTextArray("" + path + " transferToZonesNames", transfer_zones);
165
166 for (int i = 0; i < transfer_zones.Count(); i++)
167 {
168 transfer_to_global_coef += GetGame().ConfigGetFloat("" + path + " Health transferToGlobalCoef");
169 if (transfer_zones.Get(i) == damage_zone)
170 continue;
171
172 module_repairing.Repair(player,repair_kit,item,specialty_weight,transfer_zones.Get(i),false);
173 }
174
175 //finally, repairs global
176 if (transfer_to_global_coef > 0)
177 {
178 module_repairing.Repair(player,repair_kit,item,specialty_weight,"",false);
179 }
180 }
string path
Определения OptionSelectorMultistate.c:142
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto native CGame GetGame()
const string CFG_VEHICLESPATH
Определения constants.c:220

Перекрестные ссылки Class::CastTo(), CFG_VEHICLESPATH, CGame::ConfigGetFloat(), CGame::ConfigGetTextArray(), GetGame(), GetPlugin() и path.

Используется в OnFinishProgressServer().