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