mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 09:18:05 -04:00
Merge remote-tracking branch 'origin/master-MC1.7.10' into master-MC1.12
This commit is contained in:
commit
ad762c59e3
@ -5,7 +5,7 @@ forge.version=14.23.5.2860
|
||||
|
||||
mod.name=OpenComputers
|
||||
mod.group=li.cil.oc
|
||||
mod.version=1.8.3-snapshot
|
||||
mod.version=1.8.4-snapshot
|
||||
|
||||
ae2.version=rv6-stable-7
|
||||
buildcraft.version=7.99.24.8
|
||||
|
22
changelog.md
22
changelog.md
@ -1,12 +1,20 @@
|
||||
## New features
|
||||
|
||||
* (1.7.10) [#3524] Add support for reading Thaumcraft aspect information from Wands. (repo-alt)
|
||||
* Improve OpenOS "package" implementation:
|
||||
* [#3447] Populate package.config, add support for the package.preload table. (RobertCochran)
|
||||
* Add support for the package.searchers table.
|
||||
|
||||
## Fixes/improvements
|
||||
|
||||
* Reworked Internet Card filtering rules.
|
||||
* Implemented a new, more powerful system and improved default configuration.
|
||||
* Internet Card rules are now stored in the "internet.filteringRules" configuration key.
|
||||
* The old keys ("internet.whitelist", "internet.blacklist") are no longer used; an automatic migration is done upon upgrading the mod.
|
||||
* [#3635] ArrayIndexOutOfBoundsException when using servers with 3 network cards
|
||||
* [#3634] Internet card selector update logic erroneously drops non-ready keys
|
||||
* (1.12.2) [#3659] Fixed bug when programatically transferring fluids from specific tanks. (yut23)
|
||||
* [#3664] Fixed client-side errors when using third-party mod energy integration on an integrated server.
|
||||
* [#3677] Fixed crash when showing error containing a percent sign with the Analyzer item.
|
||||
* [#3698] Fixed documentation for the Screen's "turnOn" and "turnOff" functions. (Hawk777, DCNick3)
|
||||
* [#3691] Improved documentation for software bundled with the "network" floppy. (Computerdores)
|
||||
* [#3644] Improved forged packet protection with regards to configuring server racks. (Glease)
|
||||
* Updated GNU Unifont to 15.1.05.
|
||||
|
||||
## List of contributors
|
||||
|
||||
asie, Fingercomp
|
||||
asie, Computerdores, Glease, Hawk777, repo-alt, RobertCochran, yut23
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
-- called from /init.lua
|
||||
local raw_loadfile = ...
|
||||
|
||||
_G._OSVERSION = "OpenOS 1.8.3"
|
||||
_G._OSVERSION = "OpenOS 1.8.4"
|
||||
|
||||
-- luacheck: globals component computer unicode _OSVERSION
|
||||
local component = component
|
||||
|
@ -1,8 +1,12 @@
|
||||
local package = {}
|
||||
|
||||
package.config = "/\n;\n?\n!\n-\n"
|
||||
|
||||
package.path = "/lib/?.lua;/usr/lib/?.lua;/home/lib/?.lua;./?.lua;/lib/?/init.lua;/usr/lib/?/init.lua;/home/lib/?/init.lua;./?/init.lua"
|
||||
|
||||
local loading = {}
|
||||
local preload = {}
|
||||
local searchers = {}
|
||||
|
||||
local loaded = {
|
||||
["_G"] = _G,
|
||||
@ -15,6 +19,8 @@ local loaded = {
|
||||
["table"] = table
|
||||
}
|
||||
package.loaded = loaded
|
||||
package.preload = preload
|
||||
package.searchers = searchers
|
||||
|
||||
function package.searchpath(name, path, sep, rep)
|
||||
checkArg(1, name, "string")
|
||||
@ -37,35 +43,61 @@ function package.searchpath(name, path, sep, rep)
|
||||
return subPath
|
||||
end
|
||||
end
|
||||
table.insert(errorFiles, "\tno file '" .. subPath .. "'")
|
||||
table.insert(errorFiles, "no file '" .. subPath .. "'")
|
||||
end
|
||||
return nil, table.concat(errorFiles, "\n")
|
||||
return nil, table.concat(errorFiles, "\n\t")
|
||||
end
|
||||
|
||||
table.insert(searchers, function(module)
|
||||
if package.preload[module] then
|
||||
return package.preload[module]
|
||||
end
|
||||
|
||||
return "no field package.preload['" .. module .. "']"
|
||||
end)
|
||||
table.insert(searchers, function(module)
|
||||
local library, path, status
|
||||
|
||||
path, status = package.searchpath(module, package.path)
|
||||
if not path then
|
||||
return status
|
||||
end
|
||||
|
||||
library, status = loadfile(path)
|
||||
if not library then
|
||||
error("error loading module '%s' from file '%s':\n\t%s", module, path, status)
|
||||
end
|
||||
|
||||
return library, module
|
||||
end)
|
||||
|
||||
function require(module)
|
||||
checkArg(1, module, "string")
|
||||
if loaded[module] ~= nil then
|
||||
return loaded[module]
|
||||
elseif not loading[module] then
|
||||
local library, status, step
|
||||
elseif loading[module] then
|
||||
error("already loading: " .. module .. "\n" .. debug.traceback(), 2)
|
||||
else
|
||||
local library, status, arg
|
||||
local errors = ""
|
||||
|
||||
step, library, status = "not found", package.searchpath(module, package.path)
|
||||
|
||||
if library then
|
||||
step, library, status = "loadfile failed", loadfile(library)
|
||||
if type(searchers) ~= "table" then error("'package.searchers' must be a table") end
|
||||
for _, searcher in pairs(searchers) do
|
||||
library, arg = searcher(module)
|
||||
if type(library) == "function" then break end
|
||||
if type(library) ~= nil then
|
||||
errors = errors .. "\n\t" .. tostring(library)
|
||||
library = nil
|
||||
end
|
||||
end
|
||||
if not library then error(string.format("module '%s' not found:%s", module, errors)) end
|
||||
|
||||
if library then
|
||||
loading[module] = true
|
||||
step, library, status = "load failed", pcall(library, module)
|
||||
library, status = pcall(library, arg or module)
|
||||
loading[module] = false
|
||||
end
|
||||
|
||||
assert(library, string.format("module '%s' %s:\n%s", module, step, status))
|
||||
assert(library, string.format("module '%s' load failed:\n%s", module, status))
|
||||
loaded[module] = status
|
||||
return status
|
||||
else
|
||||
error("already loading: " .. module .. "\n" .. debug.traceback(), 2)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user