1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-02 02:27:56 +00:00

Use standard Markdown link syntax for references

References are now written using normal links: You now use [`print`] or
[print a string][`print`]) instead of @{print} or @{print|print a
string}.
This commit is contained in:
Jonathan Coates
2023-08-24 10:48:30 +01:00
parent 2055052a57
commit 52b78f92cd
85 changed files with 489 additions and 488 deletions

View File

@@ -13,7 +13,7 @@ include standard Lua functions.
As it waits for a fixed amount of world ticks, `time` will automatically be
rounded up to the nearest multiple of 0.05 seconds. If you are using coroutines
or the @{parallel|parallel API}, it will only pause execution of the current
or the [parallel API][`parallel`], it will only pause execution of the current
thread, not the whole program.
> [!TIP]
@@ -23,10 +23,10 @@ thread, not the whole program.
> [!WARNING]
> Internally, this function queues and waits for a timer event (using
> @{os.startTimer}), however it does not listen for any other events. This means
> [`os.startTimer`]), however it does not listen for any other events. This means
> that any event that occurs while sleeping will be entirely discarded. If you
> need to receive events while sleeping, consider using @{os.startTimer|timers},
> or the @{parallel|parallel API}.
> need to receive events while sleeping, consider using [timers][`os.startTimer`],
> or the [parallel API][`parallel`].
@tparam number time The number of seconds to sleep for, rounded up to the
nearest multiple of 0.05.
@@ -114,7 +114,7 @@ function read(replaceChar, history, completeFn, default) end
--- Stores the current ComputerCraft and Minecraft versions.
--
-- Outside of Minecraft (for instance, in an emulator) @{_HOST} will contain the
-- Outside of Minecraft (for instance, in an emulator) [`_HOST`] will contain the
-- emulator's version instead.
--
-- For example, `ComputerCraft 1.93.0 (Minecraft 1.15.2)`.

View File

@@ -15,27 +15,27 @@ variables and functions exported by it will by available through the use of
@deprecated When possible it's best to avoid using this function. It pollutes
the global table and can mask errors.
@{require} should be used to load libraries instead.
[`require`] should be used to load libraries instead.
]]
function loadAPI(path) end
--- Unloads an API which was loaded by @{os.loadAPI}.
--- Unloads an API which was loaded by [`os.loadAPI`].
--
-- This effectively removes the specified table from `_G`.
--
-- @tparam string name The name of the API to unload.
-- @since 1.2
-- @deprecated See @{os.loadAPI} for why.
-- @deprecated See [`os.loadAPI`] for why.
function unloadAPI(name) end
--[[- Pause execution of the current thread and waits for any events matching
`filter`.
This function @{coroutine.yield|yields} the current process and waits for it
This function [yields][`coroutine.yield`] the current process and waits for it
to be resumed with a vararg list where the first element matches `filter`.
If no `filter` is supplied, this will match all events.
Unlike @{os.pullEventRaw}, it will stop the application upon a "terminate"
Unlike [`os.pullEventRaw`], it will stop the application upon a "terminate"
event, printing the error "Terminated".
@tparam[opt] string filter Event to filter for.
@@ -69,7 +69,7 @@ function pullEvent(filter) end
--[[- Pause execution of the current thread and waits for events, including the
`terminate` event.
This behaves almost the same as @{os.pullEvent}, except it allows you to handle
This behaves almost the same as [`os.pullEvent`], except it allows you to handle
the `terminate` event yourself - the program will not stop execution when
<kbd>Ctrl+T</kbd> is pressed.
@@ -89,7 +89,7 @@ the `terminate` event yourself - the program will not stop execution when
]]
function pullEventRaw(filter) end
--- Pauses execution for the specified number of seconds, alias of @{_G.sleep}.
--- Pauses execution for the specified number of seconds, alias of [`_G.sleep`].
--
-- @tparam number time The number of seconds to sleep for, rounded up to the
-- nearest multiple of 0.05.
@@ -109,12 +109,12 @@ arguments.
This function does not resolve program names like the shell does. This means
that, for example, `os.run("edit")` will not work. As well as this, it does not
provide access to the @{shell} API in the environment. For this behaviour, use
@{shell.run} instead.
provide access to the [`shell`] API in the environment. For this behaviour, use
[`shell.run`] instead.
If the program cannot be found, or failed to run, it will print the error and
return `false`. If you want to handle this more gracefully, use an alternative
such as @{loadfile}.
such as [`loadfile`].
@tparam table env The environment to run the program with.
@tparam string path The exact path of the program to run.