mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Conflicts: code/ATMOSPHERICS/pipe/pipe_dispenser.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/embedded_controller/embedded_controller_base.dm code/modules/mining/money_bag.dm code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/silicon/mommi/mommi.dm code/modules/mob/living/simple_animal/friendly/farm_animals.dm code/modules/research/destructive_analyzer.dm code/modules/research/rdconsole.dm code/modules/research/xenoarchaeology/machinery/analysis_base.dm code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm code/modules/research/xenoarchaeology/tools/ano_device_battery.dm
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
|
|
//gimmicky hack to collect particles and direct them into the field
|
|
/obj/effect/rust_particle_catcher
|
|
icon = 'icons/effects/effects.dmi'
|
|
density = 0
|
|
anchored = 1
|
|
layer = 4
|
|
var/obj/effect/rust_em_field/parent
|
|
var/mysize = 0
|
|
|
|
invisibility = 101
|
|
|
|
/*/obj/effect/rust_particle_catcher/New()
|
|
for(var/obj/machinery/rust/em_field/field in range(6))
|
|
parent = field
|
|
if(!parent)
|
|
del(src)*/
|
|
|
|
/obj/effect/rust_particle_catcher/process()
|
|
if(!parent)
|
|
del(src)
|
|
|
|
/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)
|
|
density = 1
|
|
//invisibility = 0
|
|
name = "collector [mysize] ON"
|
|
else
|
|
density = 0
|
|
//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 * 20, 0, 1)
|
|
update_icon()
|
|
return 0
|
|
|
|
/obj/effect/rust_particle_catcher/Bumped(atom/AM)
|
|
if(ismob(AM) && density && prob(10))
|
|
AM << "<span class='warning'>A powerful force pushes you back.</span>"
|
|
..()
|