wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
549 stars 333 forks source link

Fix e2 soundcore & sound emitter from not playing soundscripts & sounds with sound characters. #3125

Closed unknao closed 1 week ago

unknao commented 3 weeks ago

Fixes a design oversight introduced by #3122 not accounting for soundscripts & sound paths with sound characters in them.

StrawWagen commented 3 weeks ago

This should be merged, already ran into this bug lol

unknao commented 3 weeks ago

@thegrb93 if you are still concerned about the pattern not working, here's an image of it working. image

thegrb93 commented 2 weeks ago

It's not removing those characters for the string that goes into the sound functions though, just the string that checks if the path exists.

thegrb93 commented 2 weeks ago

Also I'm pretty sure sure some non-alphanumerical characters are allowed for file paths. I'm not sure what removing them from the front of the string accomplishes

unknao commented 1 week ago

who names their sound directories in the way that would purposely break sound characters?

thegrb93 commented 1 week ago

Let me know if my commit works for ya, and can merge if so

unknao commented 1 week ago

Let me know if my commit works for ya, and can merge if so

Nope, sound characters don't work.

thegrb93 commented 1 week ago

Let me know if my commit works for ya, and can merge if so

Nope, sound characters don't work.

what sound character?

unknao commented 1 week ago

what sound character?

i tried both ^ and )

thegrb93 commented 1 week ago

and what about those doesn't work?

thegrb93 commented 1 week ago

What are sound characters? Some kind of syntax in the path?

unknao commented 1 week ago

What are sound characters? Some kind of syntax in the path?

https://developer.valvesoftware.com/wiki/Soundscripts See the sound characters section.

thegrb93 commented 1 week ago

Those aren't things the sound-emitter or e2 sound lib should care about.

unknao commented 1 week ago

Those aren't things the sound-emitter or e2 sound lib should care about.

And yet it does, why choose to break something that has always worked in e2 and sound emitter before?

thegrb93 commented 1 week ago

Those should be handled another way, not using the sound path. Valve are fucking morons for doing it that way. You can add some inputs or new logic somewhere that handles them, but wire users shouldn't have to manipulate the sound path like that for different effects.

unknao commented 1 week ago

Why change something that's worked for years and years with the justification that you can just bloat e2 later to fix the issue? It's not impossible to use the e2 helper to inform the people who would benefit from such information instead of just removing the functionality altogether.

thegrb93 commented 1 week ago

Because it should be done in a better way and this incentivizes improving it.

unknao commented 1 week ago

This is the hand the source engine has dealt us, you don't need to fix what's not broken.

thegrb93 commented 1 week ago

What effects are actually needed?

thegrb93 commented 1 week ago

Is there no other way to do those effects in glua?

thegrb93 commented 1 week ago

It looks like the '?' char was already banned due to crashing or something. I'm surprised the other chars were even allowed.

unknao commented 1 week ago

So when i try to change something that's backwards compatible (like in #2693) i get told for it immediately but when you do it it's ok?

unknao commented 1 week ago

It's not as if some new method of controlling sound characters can't coexist with the way sound characters have been used for 10+ years now.

unknao commented 1 week ago

What effects are actually needed?

Everything that doesn't crash the game is well and good.

thegrb93 commented 1 week ago

So when i try to change something that's backwards compatible (like in #2693) i get told for it immediately but when you do it it's ok?

The file.Exists change broke it, not me. We need a fix that can verify both the flags and the path.