diff --git a/buildSrc/src/main/kotlin/cc/tweaked/gradle/CheckChangelog.kt b/buildSrc/src/main/kotlin/cc/tweaked/gradle/CheckChangelog.kt index c636bff96..3657b0545 100644 --- a/buildSrc/src/main/kotlin/cc/tweaked/gradle/CheckChangelog.kt +++ b/buildSrc/src/main/kotlin/cc/tweaked/gradle/CheckChangelog.kt @@ -34,7 +34,7 @@ fun check() { var ok = true - // Check we're targetting the current version + // Check we're targeting the current version var whatsNew = whatsNew.get().asFile.readLines() if (whatsNew[0] != "New features in CC: Tweaked $version") { ok = false diff --git a/doc/guides/local_ips.md b/doc/guides/local_ips.md index affad7355..ef111b56b 100644 --- a/doc/guides/local_ips.md +++ b/doc/guides/local_ips.md @@ -25,7 +25,7 @@ ## Minecraft 1.13 and later, CC:T 1.87.0 and later {#cc-1.87.0} ``` On 1.95.0 and later, this will be a single entry with `host = "$private"`. On earlier versions, this will be a number of -`[[http.rules]]` with various IP addresses. You will want to remove all of the `[[http.rules]]` entires that have +`[[http.rules]]` with various IP addresses. You will want to remove all of the `[[http.rules]]` entries that have `action = "deny"`. Then save the file and relaunch Minecraft (Server). Here's what it should look like after removing: @@ -54,7 +54,7 @@ ## Minecraft 1.13 and later, CC:T 1.86.2 and earlier {#cc-1.86.2} ```toml #A list of wildcards for domains or IP ranges that cannot be accessed through the "http" API on Computers. #If this is empty then all whitelisted domains will be accessible. Example: "*.github.com" will block access to all subdomains of github.com. -#You can use domain names ("pastebin.com"), wilcards ("*.pastebin.com") or CIDR notation ("127.0.0.0/8"). +#You can use domain names ("pastebin.com"), wildcards ("*.pastebin.com") or CIDR notation ("127.0.0.0/8"). blacklist = ["127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fd00::/8"] ``` @@ -65,7 +65,7 @@ ## Minecraft 1.13 and later, CC:T 1.86.2 and earlier {#cc-1.86.2} ```toml #A list of wildcards for domains or IP ranges that cannot be accessed through the "http" API on Computers. #If this is empty then all whitelisted domains will be accessible. Example: "*.github.com" will block access to all subdomains of github.com. -#You can use domain names ("pastebin.com"), wilcards ("*.pastebin.com") or CIDR notation ("127.0.0.0/8"). +#You can use domain names ("pastebin.com"), wildcards ("*.pastebin.com") or CIDR notation ("127.0.0.0/8"). blacklist = [] ``` diff --git a/projects/common-api/src/main/java/dan200/computercraft/api/turtle/TurtleUpgradeDataProvider.java b/projects/common-api/src/main/java/dan200/computercraft/api/turtle/TurtleUpgradeDataProvider.java index 841c92a8e..bb8d30b7d 100644 --- a/projects/common-api/src/main/java/dan200/computercraft/api/turtle/TurtleUpgradeDataProvider.java +++ b/projects/common-api/src/main/java/dan200/computercraft/api/turtle/TurtleUpgradeDataProvider.java @@ -98,7 +98,7 @@ public ToolBuilder craftingItem(Item craftingItem) { * get the final damage. * * @param damageMultiplier The damage multiplier. - * @return The tool builder, for futher use. + * @return The tool builder, for further use. */ public ToolBuilder damageMultiplier(float damageMultiplier) { this.damageMultiplier = damageMultiplier; diff --git a/projects/common-api/src/main/java/dan200/computercraft/api/upgrades/UpgradeDataProvider.java b/projects/common-api/src/main/java/dan200/computercraft/api/upgrades/UpgradeDataProvider.java index 1e572b7db..9c04cd38a 100644 --- a/projects/common-api/src/main/java/dan200/computercraft/api/upgrades/UpgradeDataProvider.java +++ b/projects/common-api/src/main/java/dan200/computercraft/api/upgrades/UpgradeDataProvider.java @@ -144,7 +144,7 @@ public final R existingSerialiser(ResourceLocation id) { } public List getGeneratedUpgrades() { - if (upgrades == null) throw new IllegalStateException("Upgrades have not beeen generated yet"); + if (upgrades == null) throw new IllegalStateException("Upgrades have not been generated yet"); return upgrades; } diff --git a/projects/common/src/main/java/dan200/computercraft/shared/network/client/UpgradesLoadedMessage.java b/projects/common/src/main/java/dan200/computercraft/shared/network/client/UpgradesLoadedMessage.java index 9fb86890e..65dd0f5d1 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/network/client/UpgradesLoadedMessage.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/network/client/UpgradesLoadedMessage.java @@ -82,10 +82,10 @@ private , T extends UpgradeBase> void t var serialiser = entry.getValue().serialiser(); @SuppressWarnings("unchecked") - var unwrapedSerialiser = (UpgradeSerialiser) serialiser; + var unwrappedSerialiser = (UpgradeSerialiser) serialiser; buf.writeResourceLocation(Objects.requireNonNull(registry.getKey(serialiser), "Serialiser is not registered!")); - unwrapedSerialiser.toNetwork(buf, entry.getValue().upgrade()); + unwrappedSerialiser.toNetwork(buf, entry.getValue().upgrade()); buf.writeUtf(entry.getValue().modId()); } diff --git a/projects/common/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java b/projects/common/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java index 3381fd482..fc5dfeaaf 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java @@ -136,7 +136,7 @@ public final MethodResult down() { } /** - * Rotate the turtle 90 degress to the left. + * Rotate the turtle 90 degrees to the left. * * @return The turtle command result. * @cc.treturn boolean Whether the turtle could successfully turn. @@ -148,7 +148,7 @@ public final MethodResult turnLeft() { } /** - * Rotate the turtle 90 degress to the right. + * Rotate the turtle 90 degrees to the right. * * @return The turtle command result. * @cc.treturn boolean Whether the turtle could successfully turn. @@ -652,7 +652,7 @@ public final Object getFuelLimit() { * previous upgrade is removed and placed into the turtle's inventory. If there is no item in the slot, the previous * upgrade is removed, but no new one is equipped. * - * @return Whether an item was equiped or not. + * @return Whether an item was equipped or not. * @cc.treturn [1] true If the item was equipped. * @cc.treturn [2] false If we could not equip the item. * @cc.treturn [2] string The reason equipping this item failed. @@ -671,7 +671,7 @@ public final MethodResult equipLeft() { * previous upgrade is removed and placed into the turtle's inventory. If there is no item in the slot, the previous * upgrade is removed, but no new one is equipped. * - * @return Whether an item was equiped or not. + * @return Whether an item was equipped or not. * @cc.treturn [1] true If the item was equipped. * @cc.treturn [2] false If we could not equip the item. * @cc.treturn [2] string The reason equipping this item failed. diff --git a/projects/common/src/main/java/dan200/computercraft/shared/util/WorldUtil.java b/projects/common/src/main/java/dan200/computercraft/shared/util/WorldUtil.java index 348a64d73..726ca3cfa 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/util/WorldUtil.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/util/WorldUtil.java @@ -178,8 +178,8 @@ private static class ContextlessClipContext extends ClipContext { } @Override - public VoxelShape getBlockShape(BlockState state, BlockGetter levle, BlockPos pos) { - return block.get(state, levle, pos, CollisionContext.empty()); + public VoxelShape getBlockShape(BlockState state, BlockGetter level, BlockPos pos) { + return block.get(state, level, pos, CollisionContext.empty()); } } } diff --git a/projects/core/src/main/java/dan200/computercraft/core/apis/RedstoneAPI.java b/projects/core/src/main/java/dan200/computercraft/core/apis/RedstoneAPI.java index 350d37ec4..8be6b8418 100644 --- a/projects/core/src/main/java/dan200/computercraft/core/apis/RedstoneAPI.java +++ b/projects/core/src/main/java/dan200/computercraft/core/apis/RedstoneAPI.java @@ -117,7 +117,7 @@ public final boolean getInput(ComputerSide side) { * * @param side The side to set. * @param value The signal strength between 0 and 15. - * @throws LuaException If {@code value} is not betwene 0 and 15. + * @throws LuaException If {@code value} is not between 0 and 15. * @cc.since 1.51 */ @LuaFunction({ "setAnalogOutput", "setAnalogueOutput" }) diff --git a/projects/core/src/main/java/dan200/computercraft/core/apis/handles/EncodedWritableHandle.java b/projects/core/src/main/java/dan200/computercraft/core/apis/handles/EncodedWritableHandle.java index c465e475c..1f62c6fa6 100644 --- a/projects/core/src/main/java/dan200/computercraft/core/apis/handles/EncodedWritableHandle.java +++ b/projects/core/src/main/java/dan200/computercraft/core/apis/handles/EncodedWritableHandle.java @@ -51,7 +51,7 @@ public final void write(IArguments args) throws LuaException { } /** - * Write a string of characters to the file, follwing them with a new line character. + * Write a string of characters to the file, following them with a new line character. * * @param args The value to write. * @throws LuaException If the file has been closed. diff --git a/projects/core/src/main/resources/data/computercraft/lua/bios.lua b/projects/core/src/main/resources/data/computercraft/lua/bios.lua index 175d1dfbc..65b0620b2 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/bios.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/bios.lua @@ -700,7 +700,7 @@ settings.define("motd.path", { settings.define("lua.warn_against_use_of_local", { default = true, - description = [[Print a message when input in the Lua REPL starts with the word 'local'. Local variables defined in the Lua REPL are be inaccessable on the next input.]], + description = [[Print a message when input in the Lua REPL starts with the word 'local'. Local variables defined in the Lua REPL are be inaccessible on the next input.]], type = "boolean", }) settings.define("lua.function_args", { diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/apis/help.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/apis/help.lua index f347b13d2..f86b72a57 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/apis/help.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/apis/help.lua @@ -16,7 +16,7 @@ function path() return sPath end ---- Sets the colon-seperated list of directories where help files are searched +--- Sets the colon-separated list of directories where help files are searched -- for to `newPath` -- -- @tparam string newPath The new path to use. diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/apis/parallel.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/apis/parallel.lua index 170e7f4dc..f18475e4b 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/apis/parallel.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/apis/parallel.lua @@ -1,6 +1,6 @@ --[[- A simple way to run several functions at once. -Functions are not actually executed simultaniously, but rather this API will +Functions are not actually executed simultaneously, but rather this API will automatically switch between them whenever they yield (e.g. whenever they call @{coroutine.yield}, or functions that call that - such as @{os.pullEvent} - or functions that call that, etc - basically, anything that causes the function diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/apis/textutils.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/apis/textutils.lua index e88548fa2..fd16f965f 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/apis/textutils.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/apis/textutils.lua @@ -157,7 +157,7 @@ function pagedPrint(text, free_lines) -- Removed the redirector term.redirect(oldTerm) - -- Propogate errors + -- Propagate errors if not ok then error(err, 0) end diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md index e29a85425..a27d730a5 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md @@ -261,7 +261,7 @@ # New features in CC: Tweaked 1.97.0 And several bug fixes: * Fix NPE when using a treasure disk when no treasure disks are available. -* Prevent command computers discarding command ouput when certain game rules are off. +* Prevent command computers discarding command output when certain game rules are off. * Fix turtles not updating peripherals when upgrades are unequipped (Ronan-H). * Fix computers not shutting down on fatal errors within the Lua VM. * Speakers now correctly stop playing when broken, and sound follows noisy turtles and pocket computers. @@ -271,32 +271,6 @@ # New features in CC: Tweaked 1.97.0 * Correctly render the transparent background on pocket/normal computers. * Don't apply CraftTweaker actions twice on single-player worlds. -# New features in CC: Tweaked 1.97.0 - -* Update several translations (Anavrins, Jummit, Naheulf). -* Add button to view a computer's folder to `/computercraft dump`. -* Allow cleaning dyed turtles in a cauldron. -* Add scale subcommand to `monitor` program (MCJack123). -* Add option to make `textutils.serialize` not write an indent (magiczocker10). -* Allow comparing vectors using `==` (fatboychummy). -* Improve HTTP error messages for SSL failures. -* Allow `craft` program to craft unlimited items (fatboychummy). -* Impose some limits on various command queues. -* Add buttons to shutdown and terminate to computer GUIs. -* Add program subcompletion to several programs (Wojbie). -* Update the `help` program to accept and (partially) highlight markdown files. -* Remove config option for the debug API. -* Allow setting the subprotocol header for websockets. - -And several bug fixes: -* Fix NPE when using a treasure disk when no treasure disks are available. -* Prevent command computers discarding command ouput when certain game rules are off. -* Fix turtles not updating peripherals when upgrades are unequipped (Ronan-H). -* Fix computers not shutting down on fatal errors within the Lua VM. -* Speakers now correctly stop playing when broken, and sound follows noisy turtles and pocket computers. -* Update the `wget` to be more resiliant in the face of user-errors. -* Fix exiting `paint` typing "e" in the shell. - # New features in CC: Tweaked 1.96.0 * Use lightGrey for folders within the "list" program. @@ -348,7 +322,7 @@ # New features in CC: Tweaked 1.95.1 # New features in CC: Tweaked 1.95.0 * Optimise the paint program's initial render. -* Several documentation improvments (Gibbo3771, MCJack123). +* Several documentation improvements (Gibbo3771, MCJack123). * `fs.combine` now accepts multiple arguments. * Add a setting (`bios.strict_globals`) to error when accidentally declaring a global. (Lupus590). * Add an improved help viewer which allows scrolling up and down (MCJack123). @@ -388,7 +362,7 @@ # New features in CC: Tweaked 1.93.0 * Update Swedish translations (Granddave). * Printers use item tags to check dyes. -* HTTP rules may now be targetted for a specific port. +* HTTP rules may now be targeted for a specific port. * Don't propagate adjacent redstone signals through computers. And several bug fixes: @@ -508,7 +482,7 @@ # New features in CC: Tweaked 1.87.0 - Add `utf8` lib. - Mirror Lua's behaviour of tail calls more closely. Native functions are no longer tail called, and tail calls are displayed in the stack trace. - `table.unpack` now uses `__len` and `__index` metamethods. - - Parser errors now include the token where the error occured. + - Parser errors now include the token where the error occurred. * Add `textutils.unserializeJSON`. This can be used to decode standard JSON and stringified-NBT. * The `settings` API now allows "defining" settings. This allows settings to specify a default value and description. * Enable the motd on non-pocket computers. @@ -516,7 +490,7 @@ # New features in CC: Tweaked 1.87.0 * Add Danish and Korean translations (ChristianLW, mindy15963) * Fire `mouse_up` events in the monitor program. * Allow specifying a timeout to `websocket.receive`. -* Increase the maximimum limit for websocket messages. +* Increase the maximum limit for websocket messages. * Optimise capacity checking of computer/disk folders. And several bug fixes: diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/io.txt b/projects/core/src/main/resources/data/computercraft/lua/rom/help/io.txt index 8da72cbd1..ed8e2cc18 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/io.txt +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/io.txt @@ -1,2 +1,2 @@ -io is a standard Lua5.1 API, reimplemented for CraftOS. Not all the features are availiable. +io is a standard Lua5.1 API, reimplemented for CraftOS. Not all the features are available. Refer to http://www.lua.org/manual/5.1/ for more information. diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/programming.txt b/projects/core/src/main/resources/data/computercraft/lua/rom/help/programming.txt index 4a14fb2e3..c82b2e36a 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/programming.txt +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/programming.txt @@ -7,5 +7,5 @@ To terminate a program stuck in a loop, hold Ctrl+T for 1 second. To quickly shutdown a computer, hold Ctrl+S for 1 second. To quickly reboot a computer, hold Ctrl+R for 1 second. -To learn about the programming APIs availiable, type "apis" or "help apis". +To learn about the programming APIs available, type "apis" or "help apis". If you get stuck, visit the forums at http://www.computercraft.info/ for advice and tutorials. diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/turtle.txt b/projects/core/src/main/resources/data/computercraft/lua/rom/help/turtle.txt index aad6cf5d4..0827f3317 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/turtle.txt +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/turtle.txt @@ -1,4 +1,4 @@ -turtle is an api availiable on Turtles, which controls their movement. +turtle is an api available on Turtles, which controls their movement. Functions in the Turtle API: turtle.forward() turtle.back() diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/advanced/paint.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/advanced/paint.lua index 044b12116..555bab4bd 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/advanced/paint.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/advanced/paint.lua @@ -163,7 +163,7 @@ local function save(path) end --[[ - Draws colour picker sidebar, the pallette and the footer + Draws colour picker sidebar, the palette and the footer returns: nil ]] local function drawInterface() diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/adventure.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/adventure.lua index d13f2cf60..639b5307f 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/adventure.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/adventure.lua @@ -100,11 +100,11 @@ local items = { ["some wood"] = { aliases = { "wood" }, material = true, - desc = "You could easilly craft this wood into planks.", + desc = "You could easily craft this wood into planks.", }, ["some planks"] = { aliases = { "planks", "wooden planks", "wood planks" }, - desc = "You could easilly craft these planks into sticks.", + desc = "You could easily craft these planks into sticks.", }, ["some sticks"] = { aliases = { "sticks", "wooden sticks", "wood sticks" }, @@ -255,7 +255,7 @@ local items = { ["some pork"] = { aliases = { "pork", "porkchops" }, food = true, - desc = "Delicious and nutricious.", + desc = "Delicious and nutritious.", }, ["some chicken"] = { aliases = { "chicken" }, @@ -1144,7 +1144,7 @@ function commands.help() local sText = "Welcome to adventure, the greatest text adventure game on CraftOS. " .. "To get around the world, type actions, and the adventure will " .. - "be read back to you. The actions availiable to you are go, look, inspect, inventory, " .. + "be read back to you. The actions available to you are go, look, inspect, inventory, " .. "take, drop, place, punch, attack, mine, dig, craft, build, eat and exit." print(sText) end diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/gps.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/gps.lua index 3e0590e9b..d8a050edc 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/gps.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/gps.lua @@ -66,7 +66,7 @@ elseif sCommand == "host" then print("Opening channel on modem " .. sModemSide) modem.open(gps.CHANNEL_GPS) - -- Serve requests indefinately + -- Serve requests indefinitely local nServed = 0 while true do local e, p1, p2, p3, p4, p5 = os.pullEvent("modem_message") diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/pocket/falling.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/pocket/falling.lua index 62e8e7eae..baec3840f 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/pocket/falling.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/pocket/falling.lua @@ -446,7 +446,7 @@ local function playGame() end end end - --now remove the rows and drop everythign else + --now remove the rows and drop everything else term.setBackgroundColor(colors.black) for r = 1, #rows do r = rows[r] diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/turtle/excavate.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/turtle/excavate.lua index 1bb0488fe..277fb068e 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/turtle/excavate.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/turtle/excavate.lua @@ -93,13 +93,13 @@ local function collect() return true end -function refuel(ammount) +function refuel(amount) local fuelLevel = turtle.getFuelLevel() if fuelLevel == "unlimited" then return true end - local needed = ammount or xPos + zPos + depth + 2 + local needed = amount or xPos + zPos + depth + 2 if turtle.getFuelLevel() < needed then for n = 1, 16 do if turtle.getItemCount(n) > 0 then diff --git a/projects/core/src/test/resources/test-rom/data/json-parsing/README.md b/projects/core/src/test/resources/test-rom/data/json-parsing/README.md index d0d801887..3f643e4c8 100644 --- a/projects/core/src/test/resources/test-rom/data/json-parsing/README.md +++ b/projects/core/src/test/resources/test-rom/data/json-parsing/README.md @@ -1,7 +1,7 @@ # JSON Parsing Test Suite This is a collection of JSON test cases from [nst/JSONTestSuite][gh]. We simply -determine whether an object is succesfully parsed or not, and do not check the +determine whether an object is successfully parsed or not, and do not check the contents. See `LICENSE` for copyright information.