feature/effects #37

Manually merged
neckrat merged 64 commits from feature/effects into main 2026-05-06 10:19:49 +03:00
Showing only changes of commit 8b24793e82 - Show all commits

View File

@ -131,12 +131,12 @@ function effect:onBirth(owner, stacks, intensity)
if not effects then return end
-- проверяем на наличие такого же эффекта
if effects.effectsProperties[self.tag] then
for i, ef in ipairs(effects.effectsPriority) do
if ef == self.tag then
table.remove(effects.effectsProperties, i)
effects.effectsProperties[#effects.effectsProperties + 1] = ef
end
local i = 1
while i < #effects.effectsPriority and effects.effectsPriority[i] ~= self.tag do
i = i + 1
end
local ef = table.remove(effects.effectsPriority, i)
effects.effectsPriority[#effects.effectsPriority + 1] = ef
else
effects.effectsPriority[#effects.effectsPriority + 1] = self.tag
end