fuck yeah (#93)

This commit is contained in:
L.E.D
2016-12-29 07:51:43 -05:00
committed by TalkingCactus
parent aae92e7f82
commit 9c62fa0d42
2 changed files with 26 additions and 0 deletions

View File

@@ -48,6 +48,8 @@
var/oxygen = 0 // Moving this up here for easier debugging.
var/playingglowsound //for sound loop
//Temporary values so that we can optimize this
//How much the bullets damage should be multiplied by when it is added to the internal variables
var/config_bullet_energy = 2
@@ -164,11 +166,17 @@
if(oxygen > 0.8)
// with a perfect gas mix, make the power less based on heat
icon_state = "[base_icon_state]_glow"
if(!playingglowsound)
start_glow_sound()
else
// in normal mode, base the produced energy around the heat
temp_factor = 30
icon_state = base_icon_state
if(playingglowsound)
playingglowsound = FALSE
power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
//We've generated power, now let's transfer it to the collectors for storing/usage
@@ -209,6 +217,24 @@
return 1
/obj/machinery/power/supermatter_shard/proc/start_glow_sound() //starts the loop
if(!playingglowsound)
playingglowsound = TRUE
playsound(src, 'sound/ambience/supermatterglow.ogg', 50, 0)
addtimer(src, "play_glow_sound", 1.2, FALSE)
return TRUE
else
return FALSE
/obj/machinery/power/supermatter_shard/proc/play_glow_sound() // loop
if(playingglowsound)
playsound(src, 'sound/ambience/supermatterglow.ogg', 50, 0)
addtimer(src, "play_glow_sound", 1.2, FALSE)
return TRUE
else
playingglowsound = FALSE
return FALSE
/obj/machinery/power/supermatter_shard
/obj/machinery/power/supermatter_shard/bullet_act(obj/item/projectile/Proj)

Binary file not shown.