Contributing guidelines

Welcome to the new ComputerCraft wiki! Thank you for your interest in contributing to this project. As it is a wiki, everybody is welcome to edit. Don't worry too much about getting things wrong your first time, as more experienced editors are more than happy to make improvements to your edits, and inform you about how you can improve. If you have any questions, feel free to ask in the #wiki channel in Discord.

General content

When editing pages on this wiki, there are a few key points we would like you to keep in mind:

  • Pages should be written in an encyclopaedic tone, however they should use language that is easy to understand for newbies.
  • Use proper grammar. That includes putting a full stop at the end of your sentences.
  • Avoid using language that may be difficult to understand for English-language learners.
  • Prioritise new users over experienced users, however do not obscure important information for sake of simplicity.
  • British spellings must always be used, with redirects to American spellings where necessary (e.g. colour instead of color).
  • Avoid use of colloquialisms, and do not swear.
  • Do not plagiarise content or copy pages from other sources without the original author's permission.
  • Do not plagiarise content or copy pages from the original ComputerCraft wiki, at all.

Lua

There is also a Lua code style that we would like you to remain consistent with. It boils down to these major points:

  • Always use local variables and functions instead of global ones.
  • Always use camelCase for variable and function names (e.g. oldColour)
  • Use self-describing variable names (e.g. mon) where possible, but make sure not to shadow any global APIs. (e.g. win instead of window, because window is already taken).
  • Always use British spellings of APIs and functions (e.g. colours.grey).
  • Always indent your code properly. Use 2 spaces for indentation.
  • Always use spaces between operators (e.g. 2 + 5 and variable = "value"), but do not put spaces around parentheses (e.g. print("foo")).
  • Always use spaces between table items and curly brackets in tables (e.g. { item, item, item } and { [1] = "one", [2] = "two", [3] = "three" }).
gollark: Discord: will their bad UI ever not be bad? Probably not!
gollark: I could probably add some sort of "dark mode" or custom CSS options to my site, but so far nobody at all has requested it and it seems like a problem for browsers instead of my code.
gollark: Why randomly hide a somewhat useful thing?
gollark: *flexes in having a superior LCD display instead of foolish (AM)OLED*
gollark: *flexes in having a website with no theming capability whatsoever*
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.