Open zccafa3 opened 2 years ago
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! 😅).
But it is normal for documentation to be written in English by default, and other languages are potentially supported. There are exceptions ofc like if the application is indended to only be used in the native language in which it is written.
I assume that the purpose of the src/main/resources/assests/oc2/doc/*
md documents is to provide additional language support for the APIs outside of the deployed code (as currently the ability to support has not been implemented within it).
Perhaps the final intention is for documentation to only reside outside of the deployed code, to avoid dual maintenance. However, currently device method documentation is supported for some but not all devices (see RedstoneInterfaceCardItemDevice.java
for an example of where this has been implemented).
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 BlockOperationsModuleDevice
_I have attempted to provide
getDeviceDocumentation
forBlockOperationsModuleDevice.java
following the format ofRedstoneInterfaceCardItemDevice.java
with the documentation inblock_operations_module.md
. I would be happy to do the same for all of the remaining devices withoutgetDeviceDocumentation
. 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._