-
Notifications
You must be signed in to change notification settings - Fork 548
adds to and fixes yet more fission things #37460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds to and fixes yet more fission things #37460
Conversation
maybe something like [---] [-] RODS [+] [+++] like how the r-ust does it |
i'm not sure i follow with how that would be layed out |
time_last_sound_emission=world.time | ||
for(var/mob/living/M in world) | ||
if(!M.client) | ||
continue | ||
if(M.loc.z!=zlevel) | ||
continue | ||
var/dx1=abs(M.loc.x-origin_x) | ||
var/dx2=abs(M.loc.x-corner_x) | ||
var/dy1=abs(M.loc.y-origin_y) | ||
var/dy2=abs(M.loc.y-corner_y) | ||
var/dist=max(min(dx1,dx2),min(dy1,dy2)) | ||
if( dist<11) //within 10 tiles of a reactor edge | ||
var/sound/S = sound('sound/machines/fission/reactor_hum.ogg') | ||
S.pan=0 | ||
if (M.loc.x>origin_x && M.loc.x > corner_x) | ||
//pan right | ||
S.pan=min(dx1,dx2)*-5 | ||
else if (M.loc.x<origin_x && M.loc.x < corner_x) | ||
//pan left | ||
S.pan=min(dx1,dx2)*5 | ||
|
||
S.falloff = 2 | ||
S.volume=23*(1-control_rod_insertion)+10 | ||
M << S |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you doing this instead of just using playsound() which does most of this for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because playsound is from a single location/atom and reactors are multiple objects. also, i tested playsound, and it had this weird bug where the audio wasn't panning correctly when i was playing it on a fuel rod obj.
[qol] [bugfix]
What this does
adds an ambient hum to reactors

fixes some bugs
allows you to change rod levels with more precision
Why it's good
adds some flair to make them more exciting, a bit more controlable, and fixing bugs is good.
How it was tested
booted into game, verified sound worked correctly, and buttons worked right.
Changelog
🆑