Перейти к основному содержимому

Где искать разрядку детекторов

Вопрос

Где искать разрядку детекторов

Ответ

Нужно оставить только детекторы и вставить следующий скрипт под строчку 'xr_sound.update_actor()' в функцию 'actor_binder:update(delta)':

```lua
function keep_items_charged()
local items_to_check = {
-- Детекторы
"detector_simple",
"detector_advances",
"detector_elite"
}
local STbron = db.actor:object("device_pda")
if STbron then
STbron:set_condition(1.0)
for _, section in ipairs(items_to_check) do
local obj = db.actor:object(section)
if obj and db.actor:is_on_belt(obj) then
if obj.set_charge then
obj:set_charge(1)
elseif obj.set_condition then
obj:set_condition(1)
end
end
end
end
end