Content deleted Content added
No edit summary |
No edit summary Tags: Mobile edit Mobile web edit |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
}} |
}} |
||
The |
The Disk is a programmable object that is used for storing and retrieving value by writing (saving its data) and reading (loading its data), acting as a data storage device. The maximum storage on the disk is 10KB. Its data will be saved in a game. |
||
==Programming== |
==Programming== |
||
Line 35: | Line 35: | ||
end |
end |
||
Button: |
Button:Connect("OnClick", Fire) |
||
OffButton: |
OffButton:Connect("OnClick", function() |
||
Disk:Write(1, not Disk:Read(1)) |
Disk:Write(1, not Disk:Read(1)) |
||
end) |
end) |
||
Line 42: | Line 42: | ||
TextLabel Data Save: |
TextLabel Data Save: |
||
<syntaxhighlight lang="lua" line=1> |
<syntaxhighlight lang="lua" line="1"> |
||
local Screen = GetPartFromPort(1, 'Screen') |
local Screen = GetPartFromPort(1, 'Screen') |
||
local Disk = GetPartFromPort(3,'Disk') |
local Disk = GetPartFromPort(3,'Disk') |
||
Line 77: | Line 77: | ||
}) |
}) |
||
Keyboard: |
Keyboard:Connect("TextInputted", function(text, playername) |
||
TextLabel:ChangeProperties({ |
TextLabel:ChangeProperties({ |
||
Text = text |
Text = text |
||
Line 109: | Line 109: | ||
==Gallery== |
==Gallery== |
||
[[File:OldDisk.jpg|thumb|left|Disk in the |
[[File:OldDisk.jpg|thumb|left|Disk in the crafting menu in the old version.]] |
||
[[Category:Parts]] |
[[Category:Parts]] |