Skip to content

Navatusein/GTNH-OC-Lua-Documentation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTNH-OC-Lua-Documentation

Caution

The documentation is written for a modified version of Open Computers from GTNH modpack.

Content

Information

This documentation is written for the VS Code IDE and Lua extension by sumneko. It adds autocomplete code and function descriptions of Open Computers components and libraries.

Note

The documentation is written using generative models of artificial intelligence (ChatGPT). So mistakes are not excluded, feel free to write I will correct.

An example of the autocomplete documentation in action in vs code.

How to install

  1. Install extension Lua by sumneko: link
  2. Open the VS code settings (Ctrl+,).
  3. Search for Lua.workspace.library.
  4. Click Add Item and enter the path to lua folder in the input.
  5. Click OK

Add the path to the the docs in the Lua.workspace.library setting.

How to use

To use it, just import the required library and if there is documentation for it, everything will work automatically.

If you want to use documentation for components, pass the component type as parameter when calling functions:

  • For component.proxy

    local proxy = component.proxy("address", "type")
  • For component.getPrimary

    local proxy = component.getPrimary("type")

For a list of supported components, see the section What's already done

An example of autocomplete documentation from component.

What's already done

At the moment documentation has been written for the following libraries:

  • buffer
  • colors
  • component
  • computer
  • event
  • filesystem
  • internet
  • keyboard
  • os
  • robot
  • serialization
  • shell
  • sides
  • term
  • text
  • uuid

Documentation is also ready for the following components:

  • aemultipart
  • blood_altar
  • database
  • glasses
  • gpu
  • gt_machine
  • inventory_controller
  • level_maintainer
  • master_ritual_stone
  • me_controller
  • me_exportbus
  • me_interface
  • reactor
  • reactor_chamber
  • reactor_redstone_port
  • redstone
  • screen
  • tilechest
  • transposer
  • tank_controller

About

Basic Lua documentation for Open Computer types for use with GTNH

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Lua 100.0%