Files
CHOMPStation2/code/modules/power/singularity/particle_accelerator/particle_emitter.dm
Erthilo f2777aa65f TG: 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
Revision: r3505
Author: 	 petethegoat
2012-05-06 18:26:41 +01: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