forked from hkc/cc-stuff
Compare commits
2 Commits
89f4685a22
...
2856bf796b
Author | SHA1 | Date |
---|---|---|
Vftdan | 2856bf796b | |
Vftdan | aee2fae003 |
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"repository": "https://git.salushnes.solutions/hkc/cc-stuff/raw/branch/master/augment",
|
"repository": "https://git.salushnes.solutions/vftdan/cc-stuff/raw/branch/vftdan/augment",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "startup",
|
"path": "startup",
|
||||||
|
@ -13,6 +13,10 @@
|
||||||
"path": "modules/event.lua",
|
"path": "modules/event.lua",
|
||||||
"src": "modules/event.lua"
|
"src": "modules/event.lua"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "modules/hangglider_boost.lua",
|
||||||
|
"src": "modules/hangglider_boost.lua"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "modules/wh.lua",
|
"path": "modules/wh.lua",
|
||||||
"src": "modules/wh.lua"
|
"src": "modules/wh.lua"
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
return function()
|
||||||
|
local ni = peripheral.wrap("back")
|
||||||
|
|
||||||
|
local sneakTicks = 0
|
||||||
|
local meta = nil
|
||||||
|
local windowEvents = {nil, nil, nil}
|
||||||
|
local windowDuration = 20
|
||||||
|
local clockCounter = 0
|
||||||
|
|
||||||
|
parallel.waitForAny(
|
||||||
|
function() while _G._running do
|
||||||
|
if meta and windowEvents[3] ~= nil and windowEvents[3] + windowDuration >= clockCounter then
|
||||||
|
local mainHand = meta.heldItem and meta.heldItem.getMetadata().name
|
||||||
|
local offHand = meta.offhandItem and meta.offhandItem.getMetadata().name
|
||||||
|
if mainHand == "openblocks:hang_glider" or offHand == "openblocks:hang_glider" then
|
||||||
|
ni.launch(meta.yaw, meta.pitch, 4)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
os.sleep(0.05)
|
||||||
|
end end,
|
||||||
|
function() while _G._running do
|
||||||
|
meta = ni.getMetaOwner()
|
||||||
|
clockCounter = clockCounter + 1
|
||||||
|
if meta.isSneaking then
|
||||||
|
sneakTicks = sneakTicks + 1
|
||||||
|
elseif sneakTicks ~= 0 then
|
||||||
|
windowEvents = {clockCounter, windowEvents[1], windowEvents[2]}
|
||||||
|
sneakTicks = 0
|
||||||
|
end
|
||||||
|
os.sleep(0.05)
|
||||||
|
end end)
|
||||||
|
end
|
|
@ -1,4 +1,4 @@
|
||||||
local repository = "https://git.salushnes.solutions/hkc/cc-stuff/raw/branch/master/augment/files.json"
|
local repository = "https://git.salushnes.solutions/vftdan/cc-stuff/raw/branch/vftdan/augment/files.json"
|
||||||
local files = textutils.unserializeJSON(http.get(repository).readAll())
|
local files = textutils.unserializeJSON(http.get(repository).readAll())
|
||||||
|
|
||||||
local function getFile(url, path)
|
local function getFile(url, path)
|
||||||
|
|
Loading…
Reference in New Issue