Collection of RPC device documentation changes#243
Collection of RPC device documentation changes#243zccafa3 wants to merge 3 commits intofnuecke:1.18-forgefrom
Conversation
…issing parameter name handling in scripts/lib/*/devices.*
…issing parameter name handling in scripts/lib/*/devices.*
CoolCat467
left a comment
There was a problem hiding this comment.
Shouldn't getDeviceDocumentation return things based on current language localization instead of always English?
|
Hi @CoolCat467, thanks for your response. Ultimately I think that is a question for @fnuecke to answer with how he would like to skin that cat (sorry! 😅). |
Disclaimer: I have no experience with java, nor have these changes been built and tested locally. So please validate them on your side (I'd be happy to do this myself, but don't know how).
Commits:
Added parameter names to RPC device handlers where missing, Deleted missing parameter name handling in scripts/lib/*/devices.*I believe I have checked the documentation for all of the RPC devices.
Here is the list of (all?) the RPC device typeNames that I have checked;
"robot","inventory_operations","block_operations","redstone","item_handler","oc2:computer","energy_storage","file_import_export","sound"The
"item_handler"device is the only one without named parameters. This commit provides the parameter names and thus negates the requirement for handling un-named parameters inscripts/lib/*/devices.*.This script will print the documentation for an available device's methods (split at the 80th character):
Output:
Attempted to provide device documentation for BlockOperationsModuleDeviceI have attempted to provide
getDeviceDocumentationforBlockOperationsModuleDevice.javafollowing the format ofRedstoneInterfaceCardItemDevice.javawith the documentation inblock_operations_module.md.I would be happy to do the same for all of the remaining devices without
getDeviceDocumentation. Please let me know if you would like me to do this, and of course, any and all feedback is appreciated.Given my disclaimer above there's a decent chance I've not done this right. Also, I had to take a guess at the prefferred max line-width.