mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
Merge branch master-MC1.7.10 into master-MC1.10
This commit is contained in:
commit
f84fb968c3
@ -139,6 +139,19 @@ if #sources ~= 1 then
|
||||
end
|
||||
if not source then return end
|
||||
|
||||
options =
|
||||
{
|
||||
from = source.path .. '/',
|
||||
fromDir = fs.canonical(options.fromDir or source.prop.fromDir or ""),
|
||||
root = fs.canonical(options.root or options.toDir or source.prop.root or ""),
|
||||
update = options.update or options.u,
|
||||
label = source.prop.label or label,
|
||||
setlabel = not (options.nosetlabel or options.nolabelset) and source.prop.setlabel,
|
||||
setboot = not (options.nosetboot or options.noboot) and source.prop.setboot,
|
||||
reboot = not options.noreboot and source.prop.reboot,
|
||||
}
|
||||
local source_display = options.label or source.dev.getLabel() or source.path
|
||||
|
||||
-- Remove the source from the target options
|
||||
for index,entry in ipairs(targets) do
|
||||
if entry.dev == source.dev then
|
||||
@ -149,23 +162,16 @@ end
|
||||
|
||||
-- Ask the user to select a target
|
||||
if #targets ~= 1 then
|
||||
utils = utils or loadfile(utils_path, "bt", _G)
|
||||
if #sources == 1 then
|
||||
io.write(source_display, " selected for install\n")
|
||||
end
|
||||
|
||||
utils = utils or loadfile(utils_path, "bt", _G)
|
||||
target = utils("select", "targets", options, targets)
|
||||
end
|
||||
if not target then return end
|
||||
|
||||
options =
|
||||
{
|
||||
from = source.path .. '/',
|
||||
to = target.path .. '/',
|
||||
fromDir = fs.canonical(options.fromDir or source.prop.fromDir or ""),
|
||||
root = fs.canonical(options.root or options.toDir or source.prop.root or ""),
|
||||
update = options.update or options.u,
|
||||
label = source.prop.label or label,
|
||||
setlabel = not (options.nosetlabel or options.nolabelset) and source.prop.setlabel,
|
||||
setboot = not (options.nosetboot or options.noboot) and source.prop.setboot,
|
||||
reboot = not options.noreboot and source.prop.reboot,
|
||||
}
|
||||
options.to = target.path .. '/'
|
||||
|
||||
local cp_args =
|
||||
{
|
||||
@ -175,7 +181,6 @@ local cp_args =
|
||||
fs.concat(options.to , options.root)
|
||||
}
|
||||
|
||||
local source_display = options.label or source.dev.getLabel() or source.path
|
||||
local special_target = ""
|
||||
if #targets > 1 or target_filter or source_filter then
|
||||
special_target = " to " .. cp_args[4]
|
||||
|
@ -53,20 +53,6 @@ if cmd == "select" then
|
||||
end
|
||||
os.exit(1)
|
||||
end
|
||||
local index_of_rw_source
|
||||
for index,entry in ipairs(devices) do
|
||||
if not entry.dev.isReadOnly() then
|
||||
if index_of_rw_source then
|
||||
-- this means there was another rw source, no special action required
|
||||
index_of_rw_source = nil
|
||||
break
|
||||
end
|
||||
index_of_rw_source = index
|
||||
end
|
||||
end
|
||||
if index_of_rw_source then
|
||||
table.remove(devices, index_of_rw_source)
|
||||
end
|
||||
return select_prompt(devices, "What do you want to install?")
|
||||
elseif arg == "targets" then
|
||||
if #devices == 0 then
|
||||
@ -77,7 +63,6 @@ if cmd == "select" then
|
||||
end
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
return select_prompt(devices, "Where do you want to install to?")
|
||||
end
|
||||
end
|
@ -5,13 +5,21 @@ function uuid.next()
|
||||
-- 8-4-4-4-12 (halved sizes because bytes make hex pairs)
|
||||
local sets = {4, 2, 2, 2, 6}
|
||||
local result = ""
|
||||
local pos = 0
|
||||
|
||||
for _,set in ipairs(sets) do
|
||||
if result:len() > 0 then
|
||||
result = result .. "-"
|
||||
end
|
||||
for i = 1,set do
|
||||
result = result .. string.format("%02x", math.random(0, 255))
|
||||
local byte = math.random(0, 255)
|
||||
if pos == 6 then
|
||||
byte = bit32.bor(bit32.band(byte, 0x0F), 0x40)
|
||||
elseif pos == 8 then
|
||||
byte = bit32.bor(bit32.band(byte, 0x3F), 0x80)
|
||||
end
|
||||
result = result .. string.format("%02x", byte)
|
||||
pos = pos + 1
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -24,7 +24,8 @@ rules[{"%[", "[%d;]*", "m"}] = function(window, _, number_text)
|
||||
|
||||
if num == 7 then
|
||||
if not window.flip then
|
||||
fg(bg(window.gpu.getForeground()))
|
||||
local rgb, pal = bg(window.gpu.getForeground())
|
||||
fg(pal or rgb, not not pal)
|
||||
fg, bg = bg, fg
|
||||
end
|
||||
window.flip = true
|
||||
|
@ -16,6 +16,7 @@ Anson Argyris # Perry Rhodan
|
||||
ASIMO # Honda
|
||||
Atlas # Portal
|
||||
Augustus # Perry Rhodan
|
||||
Autobot # Transfomers
|
||||
Ava # Ex Machina
|
||||
Baymax # Big Hero 6
|
||||
BB-8 # Star Wars
|
||||
@ -39,6 +40,7 @@ Dalek Sec # Doctor Who
|
||||
Data # Star Trek
|
||||
David # A.I. (the movie)
|
||||
Death Trap # Borderlands 2's Mechromancer
|
||||
Decepticon #Transformers
|
||||
Deep Thought # Hitchhiker's Guide to the Galaxy
|
||||
Deputy ANDY # Eureka
|
||||
Dog # Half-Life
|
||||
@ -53,16 +55,21 @@ Eve # Wall-E
|
||||
Fact Core # Portal
|
||||
Flexo # Futurama
|
||||
Gerty # Moon (film)
|
||||
Ghost # I, Robot quote "There have always been ghosts in the machine"
|
||||
GLaDOS # Portal
|
||||
Gipsy Danger # Pacific Rim
|
||||
HAL 9000 # Space Odyssey
|
||||
Harbinger # Mass Effect
|
||||
Harkness # Fallout 3
|
||||
Heron # Vexatos
|
||||
Hex # Discworld
|
||||
Homunk # Perry Rhodan
|
||||
*Hyun-ae # Analogue: A Hate Story / Hate Plus
|
||||
Icarus # Deus Ex
|
||||
Jaeger # Pacific Rim (means hunter)
|
||||
J.A.R.V.I.S. # Iron Man
|
||||
Johnny 5 # Short Circuit
|
||||
Legion # Mass Effect
|
||||
LizzyTrickster # Contributor
|
||||
K-9 # Doctor Who
|
||||
KARR # Knight Rider
|
||||
@ -77,9 +84,12 @@ Mawhrin-skel # The Player of Games (Iain M Banks)
|
||||
Michiyo # Contributor
|
||||
*Mute # Analogue: A Hate Story / Hate Plus
|
||||
Mycroft Holmes # The Moon Is a Harsh Mistress
|
||||
PacMan # Pacman
|
||||
Optimus # Transformers. Seperated "Optimus Prime" into two names, as both are quite fitting robot names.
|
||||
P-Body # Portal
|
||||
Pintsize # Questionable Content
|
||||
PixelToast # Contributor
|
||||
Prime # Transformers. Seperated "Optimus Prime" into two names, as both are quite fitting robot names.
|
||||
QT-1 # I, Robot
|
||||
R. Daneel Olivaw # Isaac Asimov's
|
||||
R. Giskard Reventlov # Isaac Asimov's
|
||||
@ -92,13 +102,17 @@ Skaffen-Amtiskaw # Use of weapons (Iain M Banks)
|
||||
Shakey # The first general-purpose mobile robot that could reason about its actions.
|
||||
SHODAN # System Shock
|
||||
Skynet # Terminator
|
||||
Sonny # I, Robot
|
||||
Sovereign # Mass Effect
|
||||
Space Core # Portal
|
||||
SpiritedDusty # Contributor
|
||||
T.A.R.S # Interstellar
|
||||
T-800 # Terminator
|
||||
T-1000 # Terminator
|
||||
Tachikoma # Ghost in the Shell
|
||||
TARA UH # Perry Rhodan
|
||||
Terminator # Terminator
|
||||
Rinzler # Tron
|
||||
Twiki # Buck Rodgers
|
||||
Uniblab # The Jetsons
|
||||
Unimate # First programmable robot.
|
||||
@ -111,3 +125,4 @@ Weebo # Flubber
|
||||
Wheatley # Portal
|
||||
Wintermute # Neuromancer
|
||||
Wobbo # Contributor
|
||||
Yui-MHCP001 # AKA Yui (Mental Health Counseling Program 001) - Sword Art Online
|
||||
|
Loading…
x
Reference in New Issue
Block a user