/
githubmirror
/
vgstation13
Обзор
Документация
Войти
/
githubmirror
/
vgstation13
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
Bleeding-Edge
code/modules/power/rust/virtual_particle_catcher.dm
46 строк
1 KB
kane-f
Refactors effect/effect into effect (#30138)
11 авг 2021, 23:19
Не верифицирован
11 авг 2021, 23:19
da52806
Код
Авторство
О чём код?
//gimmicky hack to collect particles and direct them into the field /obj/effect/rust_particle_catcher density = 0 anchored = 1 plane = ABOVE_HUMAN_PLANE var/obj/effect/rust_em_field/parent var/mysize = 0 invisibility = 101 /obj/effect/rust_particle_catcher/Destroy() . =..() parent.particle_catchers -= src parent = null /obj/effect/rust_particle_catcher/proc/SetSize(var/newsize) name = "collector [newsize]" mysize = newsize UpdateSize() /obj/effect/rust_particle_catcher/proc/AddParticles(var/name, var/quantity = 1) if(parent && parent.size >= mysize) parent.AddParticles(name, quantity) return 1 return 0 /obj/effect/rust_particle_catcher/proc/UpdateSize() if(parent.size >= mysize) setDensity(TRUE) //invisibility = 0 name = "collector [mysize] ON" else setDensity(FALSE) //invisibility = 101 name = "collector [mysize] OFF" /obj/effect/rust_particle_catcher/bullet_act(var/obj/item/projectile/Proj) if(Proj.flag != "bullet" && parent) parent.AddEnergy(Proj.damage * 100, 0, 1) update_icon() return ..() /obj/effect/rust_particle_catcher/Bumped(atom/AM) if(ismob(AM) && density && prob(10)) to_chat(AM, "<span class='warning'>A powerful force pushes you back.</span>") ..()