1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-31 05:33:00 +00:00

Merge branch 'mc-1.15.x' into mc-1.16.x

This commit is contained in:
Jonathan Coates
2021-01-16 11:38:59 +00:00
134 changed files with 3938 additions and 1639 deletions

View File

@@ -1,3 +1,16 @@
# New features in CC: Tweaked 1.95.2
* Add `isReadOnly` to `fs.attributes` (Lupus590)
* Many more programs now support numpad enter (Wojbie)
Several bug fixes:
* Fix some commands failing to parse on dedicated servers.
* Fix all disk recipes appearing to produce a white disk in JEI/recipe book.
* Hopefully improve edit's behaviour with AltGr on some European keyboards.
* Prevent files being usable after their mount was removed.
* Fix the `id` program crashing on non-disk items (Wojbie).
* Preserve registration order of turtle/pocket upgrades when displaying in JEI.
# New features in CC: Tweaked 1.95.1
Several bug fixes:

View File

@@ -1,9 +1,14 @@
New features in CC: Tweaked 1.95.1
New features in CC: Tweaked 1.95.2
* Add `isReadOnly` to `fs.attributes` (Lupus590)
* Many more programs now support numpad enter (Wojbie)
Several bug fixes:
* Command computers now drop items again.
* Restore crafting of disks with dyes.
* Fix CraftTweaker integrations for damageable items.
* Catch reflection errors in the generic peripheral system, resolving crashes with Botania.
* Fix some commands failing to parse on dedicated servers.
* Fix all disk recipes appearing to produce a white disk in JEI/recipe book.
* Hopefully improve edit's behaviour with AltGr on some European keyboards.
* Prevent files being usable after their mount was removed.
* Fix the `id` program crashing on non-disk items (Wojbie).
* Preserve registration order of turtle/pocket upgrades when displaying in JEI.
Type "help changelog" to see the full version history.

View File

@@ -5,17 +5,24 @@
local expect = require "cc.expect".expect
--- Wraps a block of text, so that each line fits within the given width.
--
-- This may be useful if you want to wrap text before displaying it to a
-- @{monitor} or @{printer} without using @{_G.print|print}.
--
-- @tparam string text The string to wrap.
-- @tparam[opt] number width The width to constrain to, defaults to the width of
-- the terminal.
--
-- @treturn { string... } The wrapped input string.
-- @usage require "cc.strings".wrap("This is a long piece of text", 10)
--[[- Wraps a block of text, so that each line fits within the given width.
This may be useful if you want to wrap text before displaying it to a
@{monitor} or @{printer} without using @{_G.print|print}.
@tparam string text The string to wrap.
@tparam[opt] number width The width to constrain to, defaults to the width of
the terminal.
@treturn { string... } The wrapped input string as a list of lines.
@usage Wrap a string and write it to the terminal.
term.clear()
local lines = require "cc.strings".wrap("This is a long piece of text", 10)
for i = 1, #lines do
term.setCursorPos(1, i)
term.write(lines[i])
end
]]
local function wrap(text, width)
expect(1, text, "string")
expect(2, width, "number", "nil")

View File

@@ -687,7 +687,7 @@ while bRunning do
end
elseif param == keys.leftCtrl or param == keys.rightCtrl or param == keys.rightAlt then
elseif param == keys.leftCtrl or param == keys.rightCtrl then
-- Menu toggle
bMenu = not bMenu
if bMenu then
@@ -696,7 +696,12 @@ while bRunning do
term.setCursorBlink(true)
end
redrawMenu()
elseif param == keys.rightAlt then
if bMenu then
bMenu = false
term.setCursorBlink(true)
redrawMenu()
end
end
elseif sEvent == "char" then

View File

@@ -13,16 +13,30 @@ if sDrive == nil then
end
else
local bData = disk.hasData(sDrive)
if not bData then
if disk.hasAudio(sDrive) then
local title = disk.getAudioTitle(sDrive)
if title then
print("Has audio track \"" .. title .. "\"")
else
print("Has untitled audio")
end
return
end
if not disk.hasData(sDrive) then
print("No disk in drive " .. sDrive)
return
end
print("The disk is #" .. disk.getID(sDrive))
local id = disk.getID(sDrive)
if id then
print("The disk is #" .. id)
else
print("Non-disk data source")
end
local label = disk.getLabel(sDrive)
if label then
print("The disk is labelled \"" .. label .. "\"")
print("Labelled \"" .. label .. "\"")
end
end