From 4c0d17d6fb1054c08743365191f32d7545d69fef Mon Sep 17 00:00:00 2001 From: payonel Date: Sun, 7 Jan 2018 03:21:09 -0800 Subject: [PATCH 1/6] install cleaning reverting a change from july 2017, that had the installer ignore a source if it came from the only rw candidate, when running the multi-selection util. I can see the irritation or confusion of the user when running the installer and it considers a secondary drive as a viable source candidate. Typically, a system would have additional hdds merely to store data. Typically the ro loot floppies are the desired source candidates. I believe the intention here was: "We have multiple source candidates, but only one is rw, thus it is probable that the rw candidate isn't actually intended for install" But I disagree, when testing custom floppies there will easily be one additional rw source. Also, this change includes some additional command line clarification. If the system selects a source automatically, the first prompt the user sees is where to install. This can be jarring or confusing -- as the user doesn't know yet WHAT is being installed. In that case, we now display what is up for installation before asking where to install it. --- .../loot/openos/lib/core/install_basics.lua | 33 +++++++++++-------- .../loot/openos/lib/core/install_utils.lua | 15 --------- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_basics.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_basics.lua index ef6f57346..f139eeb3b 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_basics.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_basics.lua @@ -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] diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_utils.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_utils.lua index a5704a684..35e5eae42 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_utils.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/core/install_utils.lua @@ -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 \ No newline at end of file From 1a8cd8db99efd49e345242883660adc63f93ff7a Mon Sep 17 00:00:00 2001 From: SDPhantom Date: Sat, 24 Jun 2017 00:17:08 -0700 Subject: [PATCH 2/6] Update robot.names Added a couple Reaper names along with an ally from Mass Effect --- src/main/resources/assets/opencomputers/robot.names | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/assets/opencomputers/robot.names b/src/main/resources/assets/opencomputers/robot.names index 09d81f2bc..2276141fb 100644 --- a/src/main/resources/assets/opencomputers/robot.names +++ b/src/main/resources/assets/opencomputers/robot.names @@ -55,6 +55,7 @@ Flexo # Futurama Gerty # Moon (film) GLaDOS # Portal HAL 9000 # Space Odyssey +Harbinger # Mass Effect Harkness # Fallout 3 Heron # Vexatos Hex # Discworld @@ -63,6 +64,7 @@ Homunk # Perry Rhodan Icarus # Deus Ex J.A.R.V.I.S. # Iron Man Johnny 5 # Short Circuit +Legion # Mass Effect LizzyTrickster # Contributor K-9 # Doctor Who KARR # Knight Rider @@ -92,6 +94,7 @@ 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 +Sovereign # Mass Effect Space Core # Portal SpiritedDusty # Contributor T-800 # Terminator From c78cf08b1c8d4931d24f2cee28fa87b28d9ded79 Mon Sep 17 00:00:00 2001 From: Matthew Beeching Date: Tue, 2 Jan 2018 09:45:22 +0000 Subject: [PATCH 3/6] Update uuid.lua to generate RFC4122 valid version 4 UUIDs --- .../assets/opencomputers/loot/openos/lib/uuid.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/uuid.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/uuid.lua index 412810328..d07f7f610 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/uuid.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/uuid.lua @@ -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 From 65fc2664f09674732e0c8af86c160eeade3521e6 Mon Sep 17 00:00:00 2001 From: Ruukas Date: Thu, 11 Jan 2018 15:18:05 +0100 Subject: [PATCH 4/6] Added Robot names (#2555) Got a little creative with some of them.. I have been interested in robots and robot movies for a while and got kind of caught in it. Most of robots/AIs I thought of were already in the list, but I think these would make some nice additions to the list. --- src/main/resources/assets/opencomputers/robot.names | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/resources/assets/opencomputers/robot.names b/src/main/resources/assets/opencomputers/robot.names index 2276141fb..d31a13380 100644 --- a/src/main/resources/assets/opencomputers/robot.names +++ b/src/main/resources/assets/opencomputers/robot.names @@ -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,7 +55,9 @@ 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 @@ -62,6 +66,7 @@ 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 @@ -79,9 +84,11 @@ 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 +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 @@ -94,6 +101,7 @@ 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 @@ -102,6 +110,7 @@ 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. @@ -114,3 +123,4 @@ Weebo # Flubber Wheatley # Portal Wintermute # Neuromancer Wobbo # Contributor +Yui-MHCP001 # AKA Yui (Mental Health Counseling Program 001) - Sword Art Online From eec91730668127ed3440ebbd7781b812b64d4849 Mon Sep 17 00:00:00 2001 From: Anar Abdullayev Date: Thu, 11 Jan 2018 18:26:15 +0400 Subject: [PATCH 5/6] Update robot.names (#2607) --- src/main/resources/assets/opencomputers/robot.names | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/assets/opencomputers/robot.names b/src/main/resources/assets/opencomputers/robot.names index d31a13380..e6e948f64 100644 --- a/src/main/resources/assets/opencomputers/robot.names +++ b/src/main/resources/assets/opencomputers/robot.names @@ -84,6 +84,7 @@ 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 @@ -105,6 +106,7 @@ 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 From 28bf5b7cfe86314fa62448410c05fdfa2e668262 Mon Sep 17 00:00:00 2001 From: payonel Date: Sat, 20 Jan 2018 07:36:45 -0800 Subject: [PATCH 6/6] RIGHT ... setBackground returns number, number when paletted derp --- .../resources/assets/opencomputers/loot/openos/lib/vt100.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/vt100.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/vt100.lua index fce23034d..a161ad5be 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/vt100.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/vt100.lua @@ -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