[Ready]Fusion V6: Chaos Hyper-Torus Edition (#42748)

* Fusion 6 begins.

* Adds location effects, updates analyzer feedback.

* Fixes a messed up prob statement

* Further work on reaction and some testing stuff.

* The debuggery continues

* Fusion continues

* Removes a check that's not longer relevant

* Tries to make filtering more possible

* More tweaks to make stable fusion more accessible, prevents a rare float overflow issue, makes unstable fusion less rewarding, reduces nuclear particle damage.

* Fixes my really poor implementation of the examine for volume pumps.

* Fixes an oopsie with probability

* Merge, and also tweaks instability scaling
This commit is contained in:
as334
2019-03-05 14:23:41 -05:00
committed by AnturK
parent 6c2f37c6b1
commit 3237b64188
14 changed files with 165 additions and 192 deletions

View File

@@ -3,10 +3,10 @@
name = "nuclear particle"
icon_state = "nuclear_particle"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
damage = 10
damage_type = TOX
irradiate = 2500 //enough to knockdown and induce vomiting
speed = 0.4
speed = 0.4
hitsound = 'sound/weapons/emitter2.ogg'
impact_type = /obj/effect/projectile/impact/xray
var/static/list/particle_colors = list(
@@ -25,22 +25,7 @@
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
/atom/proc/fire_nuclear_particles(power_ratio) //used by fusion to fire random # of nuclear particles - power ratio determines about how many are fired
var/random_particles = rand(3,6)
var/particles_to_fire
var/particles_fired
switch(power_ratio) //multiply random_particles * factor for whatever tier
if(0 to FUSION_MID_TIER_THRESHOLD)
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_LOW
if(FUSION_MID_TIER_THRESHOLD to FUSION_HIGH_TIER_THRESHOLD)
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_MID
if(FUSION_HIGH_TIER_THRESHOLD to FUSION_SUPER_TIER_THRESHOLD)
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_HIGH
if(FUSION_SUPER_TIER_THRESHOLD to INFINITY)
particles_to_fire = random_particles * FUSION_PARTICLE_FACTOR_SUPER
while(particles_to_fire)
particles_fired++
var/angle = rand(0,360)
var/obj/item/projectile/energy/nuclear_particle/P = new /obj/item/projectile/energy/nuclear_particle(src)
addtimer(CALLBACK(P, /obj/item/projectile.proc/fire, angle), particles_fired) //multiply particles fired * delay so the particles end up stagnated (once every decisecond)
particles_to_fire--
/atom/proc/fire_nuclear_particle() //used by fusion to fire random nuclear particles. Fires one particle in a random direction.
var/angle = rand(0,360)
var/obj/item/projectile/energy/nuclear_particle/P = new /obj/item/projectile/energy/nuclear_particle(src)
P.fire(angle)