Merge branch master-MC1.7.10 into master-MC1.10

This commit is contained in:
payonel 2018-01-20 07:41:18 -08:00
commit f84fb968c3
5 changed files with 45 additions and 31 deletions

View File

@ -139,6 +139,19 @@ if #sources ~= 1 then
end end
if not source then return 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 -- Remove the source from the target options
for index,entry in ipairs(targets) do for index,entry in ipairs(targets) do
if entry.dev == source.dev then if entry.dev == source.dev then
@ -149,23 +162,16 @@ end
-- Ask the user to select a target -- Ask the user to select a target
if #targets ~= 1 then if #targets ~= 1 then
if #sources == 1 then
io.write(source_display, " selected for install\n")
end
utils = utils or loadfile(utils_path, "bt", _G) utils = utils or loadfile(utils_path, "bt", _G)
target = utils("select", "targets", options, targets) target = utils("select", "targets", options, targets)
end end
if not target then return end if not target then return end
options = options.to = target.path .. '/'
{
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,
}
local cp_args = local cp_args =
{ {
@ -175,7 +181,6 @@ local cp_args =
fs.concat(options.to , options.root) fs.concat(options.to , options.root)
} }
local source_display = options.label or source.dev.getLabel() or source.path
local special_target = "" local special_target = ""
if #targets > 1 or target_filter or source_filter then if #targets > 1 or target_filter or source_filter then
special_target = " to " .. cp_args[4] special_target = " to " .. cp_args[4]

View File

@ -53,20 +53,6 @@ if cmd == "select" then
end end
os.exit(1) os.exit(1)
end 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?") return select_prompt(devices, "What do you want to install?")
elseif arg == "targets" then elseif arg == "targets" then
if #devices == 0 then if #devices == 0 then
@ -77,7 +63,6 @@ if cmd == "select" then
end end
os.exit(1) os.exit(1)
end end
return select_prompt(devices, "Where do you want to install to?") return select_prompt(devices, "Where do you want to install to?")
end end
end end

View File

@ -5,13 +5,21 @@ function uuid.next()
-- 8-4-4-4-12 (halved sizes because bytes make hex pairs) -- 8-4-4-4-12 (halved sizes because bytes make hex pairs)
local sets = {4, 2, 2, 2, 6} local sets = {4, 2, 2, 2, 6}
local result = "" local result = ""
local pos = 0
for _,set in ipairs(sets) do for _,set in ipairs(sets) do
if result:len() > 0 then if result:len() > 0 then
result = result .. "-" result = result .. "-"
end end
for i = 1,set do 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
end end

View File

@ -24,7 +24,8 @@ rules[{"%[", "[%d;]*", "m"}] = function(window, _, number_text)
if num == 7 then if num == 7 then
if not window.flip 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 fg, bg = bg, fg
end end
window.flip = true window.flip = true

View File

@ -16,6 +16,7 @@ Anson Argyris # Perry Rhodan
ASIMO # Honda ASIMO # Honda
Atlas # Portal Atlas # Portal
Augustus # Perry Rhodan Augustus # Perry Rhodan
Autobot # Transfomers
Ava # Ex Machina Ava # Ex Machina
Baymax # Big Hero 6 Baymax # Big Hero 6
BB-8 # Star Wars BB-8 # Star Wars
@ -39,6 +40,7 @@ Dalek Sec # Doctor Who
Data # Star Trek Data # Star Trek
David # A.I. (the movie) David # A.I. (the movie)
Death Trap # Borderlands 2's Mechromancer Death Trap # Borderlands 2's Mechromancer
Decepticon #Transformers
Deep Thought # Hitchhiker's Guide to the Galaxy Deep Thought # Hitchhiker's Guide to the Galaxy
Deputy ANDY # Eureka Deputy ANDY # Eureka
Dog # Half-Life Dog # Half-Life
@ -53,16 +55,21 @@ Eve # Wall-E
Fact Core # Portal Fact Core # Portal
Flexo # Futurama Flexo # Futurama
Gerty # Moon (film) Gerty # Moon (film)
Ghost # I, Robot quote "There have always been ghosts in the machine"
GLaDOS # Portal GLaDOS # Portal
Gipsy Danger # Pacific Rim
HAL 9000 # Space Odyssey HAL 9000 # Space Odyssey
Harbinger # Mass Effect
Harkness # Fallout 3 Harkness # Fallout 3
Heron # Vexatos Heron # Vexatos
Hex # Discworld Hex # Discworld
Homunk # Perry Rhodan Homunk # Perry Rhodan
*Hyun-ae # Analogue: A Hate Story / Hate Plus *Hyun-ae # Analogue: A Hate Story / Hate Plus
Icarus # Deus Ex Icarus # Deus Ex
Jaeger # Pacific Rim (means hunter)
J.A.R.V.I.S. # Iron Man J.A.R.V.I.S. # Iron Man
Johnny 5 # Short Circuit Johnny 5 # Short Circuit
Legion # Mass Effect
LizzyTrickster # Contributor LizzyTrickster # Contributor
K-9 # Doctor Who K-9 # Doctor Who
KARR # Knight Rider KARR # Knight Rider
@ -77,9 +84,12 @@ Mawhrin-skel # The Player of Games (Iain M Banks)
Michiyo # Contributor Michiyo # Contributor
*Mute # Analogue: A Hate Story / Hate Plus *Mute # Analogue: A Hate Story / Hate Plus
Mycroft Holmes # The Moon Is a Harsh Mistress 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 P-Body # Portal
Pintsize # Questionable Content Pintsize # Questionable Content
PixelToast # Contributor PixelToast # Contributor
Prime # Transformers. Seperated "Optimus Prime" into two names, as both are quite fitting robot names.
QT-1 # I, Robot QT-1 # I, Robot
R. Daneel Olivaw # Isaac Asimov's R. Daneel Olivaw # Isaac Asimov's
R. Giskard Reventlov # 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. Shakey # The first general-purpose mobile robot that could reason about its actions.
SHODAN # System Shock SHODAN # System Shock
Skynet # Terminator Skynet # Terminator
Sonny # I, Robot
Sovereign # Mass Effect
Space Core # Portal Space Core # Portal
SpiritedDusty # Contributor SpiritedDusty # Contributor
T.A.R.S # Interstellar
T-800 # Terminator T-800 # Terminator
T-1000 # Terminator T-1000 # Terminator
Tachikoma # Ghost in the Shell Tachikoma # Ghost in the Shell
TARA UH # Perry Rhodan TARA UH # Perry Rhodan
Terminator # Terminator Terminator # Terminator
Rinzler # Tron
Twiki # Buck Rodgers Twiki # Buck Rodgers
Uniblab # The Jetsons Uniblab # The Jetsons
Unimate # First programmable robot. Unimate # First programmable robot.
@ -111,3 +125,4 @@ Weebo # Flubber
Wheatley # Portal Wheatley # Portal
Wintermute # Neuromancer Wintermute # Neuromancer
Wobbo # Contributor Wobbo # Contributor
Yui-MHCP001 # AKA Yui (Mental Health Counseling Program 001) - Sword Art Online