Files
Polaris/code/modules/power/singularity/particle_accelerator/particle_emitter.dm
petethegoat@gmail.com 21387370c9 Tonnes of stuff, please check the changelog.
In short: massive updates to security, the library, hydroponics, the kitchen and the bar, by Flazeo and Ikarrus
Massive updates to the PA, with Invisty's new sprites, done by Sieve
New sprites for field gens too, also by Invisty
Borg and battery updates by Sieve
Fake gloves by Sieve
I messed around with some pressure_resistance stuff on Dumpdavidson's suggestion (only in paperwork)

PROBABLY A BUNCH OF OTHER SHIT

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3505 316c924e-a436-60f5-8080-3fe189b3f50e
2012-04-25 19:28:40 +00:00

49 lines
1.1 KiB
Plaintext

/obj/structure/particle_accelerator/particle_emitter
name = "EM Containment Grid"
desc_holder = "This launchs the Alpha particles, might not want to stand near this end."
icon = 'particle_accelerator.dmi'
icon_state = "none"
var
fire_delay = 50
last_shot = 0
center
icon_state = "emitter_center"
reference = "emitter_center"
left
icon_state = "emitter_left"
reference = "emitter_left"
right
icon_state = "emitter_right"
reference = "emitter_right"
update_icon()
..()
return
proc
set_delay(var/delay)
if(delay && delay >= 0)
src.fire_delay = delay
return 1
return 0
emit_particle(var/strength = 0)
if((src.last_shot + src.fire_delay) <= world.time)
src.last_shot = world.time
var/obj/effect/accelerated_particle/A = null
var/turf/T = get_step(src,dir)
switch(strength)
if(0)
A = new/obj/effect/accelerated_particle/weak(T, dir)
if(1)
A = new/obj/effect/accelerated_particle(T, dir)
if(2)
A = new/obj/effect/accelerated_particle/strong(T, dir)
if(A)
A.dir = src.dir
return 1
return 0