NPCs can funk out to music, too. #77137
Open
+36
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Balance "NPCs can funk out to music, too."
Purpose of change
...Also NPCs couldn't enjoy music played from vehicle/appliance stereos.
Describe the solution
Properly check for everyone that can hear the music, and make them feel the groove.
Pipe musical_instrument_actor::use through iuse::play_music to minimize code duplication
Describe alternatives you've considered
Ehhh maybe there's a way to do this without lambdas. I know a lot of people don't like lambdas, but I've gotten used to them and these are pretty simple.
vehicle::play_music() probably shouldn't assume the player character and pass it on as
Character *p
?Testing
instrument played by the player
2024-10-18.16-32-28.mp4
vehicle/appliance stereo
2024-10-18.16-45-04.mp4
Apparently there may be some way for NPCs to play instruments and for you to listen, but I wasn't able to find out how. Still I structured my changes so that anything that previously worked should continue to work.
Additional context