mirror of
https://github.com/kepler155c/opus
synced 2025-01-11 16:20:26 +00:00
Initial commit
This commit is contained in:
parent
fc243a9c12
commit
46d0c8d43d
@ -1,5 +1,6 @@
|
||||
local function follow(id)
|
||||
|
||||
require = requireInjector(getfenv(1))
|
||||
local GPS = require('gps')
|
||||
local Socket = require('socket')
|
||||
local Point = require('point')
|
||||
|
@ -1,4 +1,5 @@
|
||||
turtle.run(function()
|
||||
require = requireInjector(getfenv(1))
|
||||
local GPS = require('gps')
|
||||
local Socket = require('socket')
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
local function summon(id)
|
||||
|
||||
require = requireInjector(getfenv(1))
|
||||
local GPS = require('gps')
|
||||
local Socket = require('socket')
|
||||
local Point = require('point')
|
||||
|
@ -1,4 +1,5 @@
|
||||
local json = require('json')
|
||||
local Util = require('util')
|
||||
|
||||
local TREE_URL = 'https://api.github.com/repos/%s/%s/git/trees/%s?recursive=1'
|
||||
local FILE_URL = 'https://raw.github.com/%s/%s/%s/%s'
|
||||
|
@ -1590,9 +1590,11 @@ end
|
||||
function UI.ViewportWindow:setScrollPosition(offset)
|
||||
local oldOffset = self.offy
|
||||
self.offy = math.max(offset, 0)
|
||||
local max = self.height
|
||||
for _, child in ipairs(self.children) do
|
||||
max = math.max(child.y + child.height - 1, max)
|
||||
local max = self.ymax or self.height
|
||||
if self.children then
|
||||
for _, child in ipairs(self.children) do
|
||||
max = math.max(child.y + child.height - 1, max)
|
||||
end
|
||||
end
|
||||
self.offy = math.min(self.offy, max - self.height)
|
||||
if self.offy ~= oldOffset then
|
||||
|
Loading…
Reference in New Issue
Block a user