Difference between revisions of "User:Yemmel/sandbox"

From ComputerCraft
Jump to navigation Jump to search
 
Line 1: Line 1:
 
{{ombox | text = This is my sandbox. I will sometimes test random things out in here.}}
 
{{ombox | text = This is my sandbox. I will sometimes test random things out in here.}}
 +
 +
{| class="wikitable"
 +
! scope="col" rowspan="2" | On
 +
! scope="col" rowspan="2" | Computer ID
 +
! scope="col" rowspan="2" | Name
 +
! scope="col" rowspan="2" | Type
 +
! scope="col" rowspan="2" | Location
 +
! scope="col" colspan="4" | Coordinates
 +
! scope="col" rowspan="2" | Notes
 +
|-
 +
! scope="row"            | X
 +
! scope="row"            | Y
 +
! scope="row"            | Z
 +
! scope="row"            | World
 +
|-
 +
|}
  
 
{| class="wikitable" style="text-align:right;"
 
{| class="wikitable" style="text-align:right;"

Latest revision as of 23:15, 26 March 2020

On Computer ID Name Type Location Coordinates Notes
X Y Z World
Colour Value Default Palette Representation
Decimal Hexadecimal Paint/Blit Sample Hex RGB
colours.red 16384 0x4000 e #CC4C4C 204, 76, 76
colours.orange 2 0x2 1 #F2B233 242, 178, 51
colours.yellow 16 0x10 4 #DEDE6C 222, 222, 108
colours.lime 32 0x20 5 #7FCC19 127, 204, 25
colours.green 8192 0x2000 d #57A64E 87, 166, 78
colours.cyan 512 0x200 9 #4C99B2 76, 153, 178
colours.lightBlue 8 0x8 3 #99B2F2 153, 178, 242
colours.blue 2048 0x800 b #3366CC 51, 102, 204
colours.purple 1024 0x400 a #B266E5 178, 102, 229
colours.magenta 4 0x4 2 #E57FD8 229, 127, 216
colours.pink 64 0x40 6 #F2B2CC 242, 178, 204
colours.brown 4096 0x1000 c #7F664C 127, 102, 76
colours.white 1 0x1 0 #F0F0F0 240, 240, 240
colours.lightGrey 256 0x100 8 #999999 153, 153, 153
colours.grey 128 0x80 7 #4C4C4C 76, 76, 76
colours.black 32768 0x8000 f #111111 17, 17, 17
Yes No Maybe

[citation needed]

#ff0000

Foobar

Standard terminal sizes
Device Width Height
Computer 51 19
Turtle 39 13
Pocket Computer 26 20
Neural Interface 39 13

Foo bar

Foo bar

  local c = coroutine.create(function()
    print("foo")
    coroutine.yield()
    print("bar")
  end)


FunctionFunctionos.shutdown
Shuts the executing machine down immediately.
Syntax os.shutdown()
Returns nil
Part of CC:Tweaked (source)
API os


FunctionFunctiontextutils.formatTime
Formats time (in ticks) in a human-readable format such as "6:30 PM". If twentyFourHour is set to true, the AM/PM prefix is omitted, and the time is presented in a 24-hour format such as "18:30".
Syntax textutils.formatTime()
Returns string
Part of CC:Tweaked (source)
API textutils
ExampleExampleWith 12-hour format
Prints the Minecraft world time in a 12-hour human-readable format.
Code
print(textutils.formatTime(os.time()))
Output Depends on the world time, for example "6:30 PM".
ExampleExampleWith 24-hour format
Prints the Minecraft world time in a 24-hour human-readable format.
Code
print(textutils.formatTime(os.time(), true))
Output Depends on the world time, for example "18:30".