Play sound independent from placement/toggle action #6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sound effects are local to the client. When placement prediction is turned off (i.e. when using the alternative toggle action), neither the placement or toggle sounds are playing.
This could be circumvented by getting the game’s default sound/placement/etc. action and the wall node’s
sounddefinition.toggle_between_types– Where the toggling happensregister_wall– Alternative toggle actionregister_wall– Types definition needs logic for the soundsNeeds to be configurable and investigation
sound)Placement logic and sounds after placement are unaffected.
Type toggling was completely overhauled.
It now behaves like most other “interactive elements”: This means that rightclicking now toggles the wall type regardless of game mode or game. Also the wielded item is not relevant anymore. Shift-rightclick overrides this functionality like for most other interactive elements (chest from Minetest Game for example).
The mod now also does not rely on digging/placement functionality when it comes to toggling the wall elements. A custom-made function now fetches and plays the correct sound (in that order, the first found sound is used: digging sound → sound when dug → sound when placed), swaps out the wall node with the replacement, and also shows some particles to visually indicate the replacement.