1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-22 05:03:22 +00:00

Add a bit of version information to the bios

It's probably the lowest traffic module :p.

Also (somewhat) improve the deprecated messages in os.loadAPI. We really
need a proper article on require and converting from os.loadAPI.
This commit is contained in:
Jonathan Coates 2021-07-30 22:44:11 +01:00
parent 7b8650bbc8
commit a1821035d3
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
3 changed files with 10 additions and 6 deletions

View File

@ -7,7 +7,6 @@
}
}
dependencies {
classpath 'com.google.code.gson:gson:2.8.1'
classpath 'net.minecraftforge.gradle:ForgeGradle:5.0.24'
}
}

View File

@ -101,6 +101,9 @@ the prompt.
write("> ")
local msg = read(nil, history, function(text) return completion.choice(text, choices) end, "app")
print(msg)
@changed 1.74 Added `completeFn` parameter.
@changed 1.80pr1 Added `default` parameter.
]]
function read(replaceChar, history, completeFn, default) end
@ -108,6 +111,7 @@ function read(replaceChar, history, completeFn, default) end
--
-- For example, `ComputerCraft 1.93.0 (Minecraft 1.15.2)`.
-- @usage _HOST
-- @since 1.76
_HOST = _HOST
--[[- The default computer settings as defined in the ComputerCraft
@ -121,5 +125,6 @@ An example value to disable autocompletion:
shell.autocomplete=false,lua.autocomplete=false,edit.autocomplete=false
@usage _CC_DEFAULT_SETTINGS
@since 1.77
]]
_CC_DEFAULT_SETTINGS = _CC_DEFAULT_SETTINGS

View File

@ -2,9 +2,6 @@
--[[- Loads the given API into the global environment.
**Warning** This function is deprecated. Use of this function will pollute the
global table, use @{require} instead.
This function loads and executes the file at the given path, and all global
variables and functions exported by it will by available through the use of
`myAPI.<function name>`, where `myAPI` is the base name of the API file.
@ -12,7 +9,10 @@ variables and functions exported by it will by available through the use of
@tparam string path The path of the API to load.
@treturn boolean Whether or not the API was successfully loaded.
@deprecated Use @{require}.
@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.
]]
function loadAPI(path) end
@ -21,7 +21,7 @@ function loadAPI(path) end
-- This effectively removes the specified table from `_G`.
--
-- @tparam string name The name of the API to unload.
-- @deprecated Use @{require}.
-- @deprecated See @{os.loadAPI} for why.
function unloadAPI(name) end
--[[- Pause execution of the current thread and waits for any events matching