Describe the bug
Calling .setAlarm() while passing a sound name that doesnt exist, makes the function return true
In which environment did the Bug appear?
Singleplayer, fresh world.
To Reproduce
Steps to reproduce the behavior:
Make a new world
use the /oc_sc command to plop down a opencomputers computer
place an alarm block next to the computer
turn on the pc
open the lua prompt in oc by typing "lua" and hitting enter
6.1. set the variable "a" to be an alarm (a = require("component").os_alarm)
6.2 now execute a.setAlarm("wontwork")
observe that the result is true
Expected behavior
The function should throw a error if the sound is invalid.
Users can use pcall to catch those errors if necessary. Just making it return false is not a good option in my opinion.
Screenshots / Code Snippet
If applicable, add the code you used and screenshots of how your setup looks like
Minecraft:
Mod Version (e.g. OpenSecurity-MC1.12.2-1.0-48)
Minecraft Version (e.g. Minecraft 1.12)
Forge Version (e.g. Forge 14.23.5.2854)
(some other mods are installed, but this should not be a compatibility issue i am assuming)
Additional context
There are no outputs in the log file while this problem happens.
This isn't a bug, as setAlarm always returns true. The server never sees the sounds the client has loaded, so it would have no way of knowing if a sound exists or not.
Describe the bug Calling .setAlarm() while passing a sound name that doesnt exist, makes the function return true
In which environment did the Bug appear? Singleplayer, fresh world.
To Reproduce Steps to reproduce the behavior:
a.setAlarm("wontwork")
true
Expected behavior The function should throw a error if the sound is invalid. Users can use pcall to catch those errors if necessary. Just making it return false is not a good option in my opinion.
Screenshots / Code Snippet If applicable, add the code you used and screenshots of how your setup looks like
Minecraft:
Additional context There are no outputs in the log file while this problem happens.