-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathnuclear_particle.dm
49 lines (45 loc) · 1.76 KB
/
nuclear_particle.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//Nuclear particle projectile - a deadly side effect of fusion just kidding fuck that shit rads shouldn`t be a vomit ICBM
/obj/projectile/energy/nuclear_particle
name = "nuclear particle"
icon_state = "nuclear_particle"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 5
damage_type = BURN
irradiate = 400
speed = 0.4
hitsound = 'sound/weapons/emitter2.ogg'
impact_type = /obj/effect/projectile/impact/xray
var/static/list/particle_colors = list(
"red" = "#FF0000",
"green" = "#00FF00",
"blue" = "#0000FF",
"yellow" = "#FFFF00",
"cyan" = "#00FFFF",
"purple" = "#FF00FF"
)
/obj/projectile/energy/nuclear_particle/Initialize(mapload)
. = ..()
//Random color time!
var/our_color = pick(particle_colors)
add_atom_colour(particle_colors[our_color], FIXED_COLOUR_PRIORITY)
set_light(4, 3, particle_colors[our_color]) //Range of 4, brightness of 3 - Same range as a flashlight
/obj/projectile/energy/nuclear_particle/Move(atom/newloc, dir)
..()
for(var/obj/projectile/energy/nuclear_particle/P in newloc.contents)
if(istype(P) && MODULUS(Angle - P.Angle, 360) > 150 && MODULUS(Angle - P.Angle, 360) < 210 && prob(10))
name = "high-energy " + name
damage += P.damage
irradiate += P.irradiate
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, (damage * 10) + (irradiate / 10))
range = initial(range)
setAngle(rand(0, 360))
qdel(P)
break
/atom/proc/fire_nuclear_particle(angle = rand(0,360)) //used by fusion to fire random nuclear particles. Fires one particle in a random direction.
var/obj/projectile/energy/nuclear_particle/P = new /obj/projectile/energy/nuclear_particle(src)
P.fire(angle)
/// stronger particles
/obj/projectile/energy/nuclear_particle/strong
name = "high-energy particle"
damage = 10
irradiate = 800