mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
fuck yeah (#93)
This commit is contained in:
@@ -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)
|
||||
|
||||
BIN
sound/ambience/supermatterglow.ogg
Normal file
BIN
sound/ambience/supermatterglow.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user