summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrebecca <ubq323@ubq323.website>2026-02-28 21:13:36 +0000
committerrebecca <ubq323@ubq323.website>2026-02-28 21:13:36 +0000
commit1b67049ca60368a3347312cdfd7a95054699ec25 (patch)
treebd7d8dc7b28241eb9185b38001e1409f5ed04bd2
parent4c06023fe2f0705eefe4d279a08d85cedf9eb1c8 (diff)
grav
-rw-r--r--grav.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/grav.lua b/grav.lua
new file mode 100644
index 0000000..5f0f0bd
--- /dev/null
+++ b/grav.lua
@@ -0,0 +1,21 @@
+local p = peripheral.wrap"back"
+assert(p.hasModule"plethora:kinetic", "need kinetic!")
+assert(p.hasModule"plethora:glasses", "need glasses!")
+
+local strength = 0.5
+
+local canvas = p.canvas()
+local text = canvas.addText({x=5,y=5}, "..")
+text.setScale(3)
+
+parallel.waitForAny(
+ function() while true do
+ p.launch(0,-90,strength)
+ end end,
+ function() while true do
+ text.setText(tostring(strength))
+ local _,key = os.pullEvent"key"
+ if key == 265 then strength=strength+0.1
+ elseif key == 264 then strength=strength-0.1 end
+ end end
+)