Merge branch 'master-MC1.11' into master-MC1.12

This commit is contained in:
payonel 2018-11-16 02:53:42 -08:00
commit 66f5a040ca
6 changed files with 71 additions and 74 deletions

View File

@ -4,7 +4,7 @@ forge.version=14.23.4.2727
mod.name=OpenComputers
mod.group=li.cil.oc
mod.version=1.7.2
mod.version=1.7.3
ae2.version=rv6-stable-1
buildcraft.version=7.99.17

View File

@ -15,7 +15,7 @@ if #args == 0 then
while true do
if has_prompt then
while not tty.isAvailable() do
event.pull("term_available", .5)
event.pull(.5, "term_available")
end
if needs_profile then -- first time run AND interactive
needs_profile = nil

View File

@ -1,18 +1,15 @@
do
local loadfile = load([[return function(file)
local pc,cp = computer or package.loaded.computer, component or package.loaded.component
local addr, invoke = pc.getBootAddress(), cp.invoke
local handle, reason = invoke(addr, "open", file)
assert(handle, reason)
local addr, invoke = computer.getBootAddress(), component.invoke
local function loadfile(file)
local handle = assert(invoke(addr, "open", file))
local buffer = ""
repeat
local data, reason = invoke(addr, "read", handle, math.huge)
assert(data or not reason, reason)
local data = invoke(addr, "read", handle, math.huge)
buffer = buffer .. (data or "")
until not data
invoke(addr, "close", handle)
return load(buffer, "=" .. file, "bt", _G)
end]], "=loadfile", "bt", _G)()
end
loadfile("/lib/core/boot.lua")(loadfile)
end

View File

@ -1,7 +1,7 @@
-- called from /init.lua
local raw_loadfile = ...
_G._OSVERSION = "OpenOS 1.7.2"
_G._OSVERSION = "OpenOS 1.7.3"
local component = component
local computer = computer
@ -73,13 +73,9 @@ end
status("Booting " .. _OSVERSION .. "...")
-- Custom low-level dofile implementation reading from our ROM.
local loadfile = function(file)
status("> " .. file)
return raw_loadfile(file)
end
local function dofile(file)
local program, reason = loadfile(file)
status("> " .. file)
local program, reason = raw_loadfile(file)
if program then
local result = table.pack(pcall(program))
if result[1] then
@ -112,11 +108,11 @@ do
package.loaded.component = component
package.loaded.computer = computer
package.loaded.unicode = unicode
package.loaded.buffer = assert(loadfile("/lib/buffer.lua"))()
package.loaded.filesystem = assert(loadfile("/lib/filesystem.lua"))()
package.loaded.buffer = dofile("/lib/buffer.lua")
package.loaded.filesystem = dofile("/lib/filesystem.lua")
-- Inject the io modules
_G.io = assert(loadfile("/lib/io.lua"))()
_G.io = dofile("/lib/io.lua")
end
status("Initializing file system...")

View File

@ -1,5 +1,7 @@
local init
do
local component_invoke = component.invoke
function boot_invoke(address, method, ...)
local function boot_invoke(address, method, ...)
local result = table.pack(pcall(component_invoke, address, method, ...))
if not result[1] then
return nil, result[2]
@ -40,7 +42,7 @@ local function tryLoadFrom(address)
boot_invoke(address, "close", handle)
return load(buffer, "=init")
end
local init, reason
local reason
if computer.getBootAddress() then
init, reason = tryLoadFrom(computer.getBootAddress())
end
@ -58,4 +60,5 @@ if not init then
error("no bootable medium found" .. (reason and (": " .. tostring(reason)) or ""), 0)
end
computer.beep(1000, 0.2)
end
init()

View File

@ -34,7 +34,8 @@ object PetRenderer {
"23c7ed71-fb13-4abe-abe7-f355e1de6e62" ->(0.3, 0.3, 1.0), // LizzyTheSiren
"076541f1-f10a-46de-a127-dfab8adfbb75" ->(0.2, 1.0, 0.1), // vifino
"e7e90198-0ccf-4662-a827-192ec8f4419d" ->(0.0, 0.2, 0.6), // Izaya
"f514ee69-7bbb-4e46-9e94-d8176324cec2" ->(0.098, 0.471, 0.784) // Wobbo
"f514ee69-7bbb-4e46-9e94-d8176324cec2" ->(0.098, 0.471, 0.784), // Wobbo
"f812c043-78ba-4324-82ae-e8f05c52ae6e" ->(0.1, 0.8, 0.5) // payonel
)
private val petLocations = com.google.common.cache.CacheBuilder.newBuilder().