-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ciggie sounds #32426
base: master
Are you sure you want to change the base?
ciggie sounds #32426
Conversation
gone are the days of me looking like an idiot trying to smoke a cigarette butt |
no media? |
trust |
if (state == SmokableState.Lit) | ||
_active.Add(uid); | ||
EnsureComp<BurningComponent>(uid); | ||
else | ||
_active.Remove(uid); | ||
RemComp<BurningComponent>(uid); | ||
|
||
var sound = state == SmokableState.Lit | ||
? smokable.LightSound | ||
: smokable.SnuffSound; |
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.
if (state == SmokableState.Lit) | |
_active.Add(uid); | |
EnsureComp<BurningComponent>(uid); | |
else | |
_active.Remove(uid); | |
RemComp<BurningComponent>(uid); | |
var sound = state == SmokableState.Lit | |
? smokable.LightSound | |
: smokable.SnuffSound; | |
SoundSpecifier? sound = null; | |
if (state == SmokableState.Lit) | |
{ | |
EnsureComp<BurningComponent>(uid); | |
sound = smokable.LightSound; | |
} | |
else | |
{ | |
RemComp<BurningComponent>(uid); | |
sound = smokable.SnuffSound; | |
} |
considering the if and ternary have the same condition.
edit: realized I butchered the var sound
bit -- I am not sure exactly what I've edited to is correct either, but you get the idea.
tryna smoke here |
About the PR
plays a sound when lighting a ciggie or it goes out
Why / Balance
good
Technical details
replaced _active hashset with BurningComponent to track actively lit ciggies
Media
it work
Requirements