Libraries
Named script source that scripts require, shared between plugins.
Libraries
Section titled “Libraries”Get it with Api.libraries().
get(name: string, language: string): stringadd(name: string, language: string, source: string): voidget(name: string, language: string): stringadd(name: string, language: string, source: string)string Get(string name, string language)void Add(string name, string language, string source)sal::Result<std::string_view, Wraith::LibraryError> get(std::string_view name, std::string_view language) constsal::Result<void, Wraith::LibraryError> add(std::string_view name, std::string_view language, std::string_view source) constpub fn get(&self, name: &str, language: &str) -> Result<&str, wraith::LibraryError>pub fn add(&self, name: &str, language: &str, source: &str) -> Result<(), wraith::LibraryError>fn get(self: Wraith.Libraries, name: []const u8, language: []const u8) (Wraith.LibraryError || rt.Failure)![]const u8fn add(self: Wraith.Libraries, name: []const u8, language: []const u8, source: []const u8) (Wraith.LibraryError || rt.Failure)!voiduint32_t Wraith_Libraries_get(Wraith_Libraries self, sal_string name, sal_string language, sal_string *out)uint32_t Wraith_Libraries_add(Wraith_Libraries self, sal_string name, sal_string language, sal_string source)For a language like “lua” or “js”. Good till the thread’s next call into Wraith.
Fails with LibraryError.
Until the plugin goes. The same name and language replaces it.
Fails with LibraryError.
LibraryError
Section titled “LibraryError”Names are letters, digits, _, - and ., up to 64.
What can go wrong, besides Cancelled, Unsupported and Gone.
| Code | Error | |
|---|---|---|
| 1 | InvalidName |
|
| 2 | NotFound |
|
| 3 | NoSource |
There is one, but not for that language |
| 4 | Taken |
Someone else has one by that name and language |
| 5 | TooBig |
|
| 6 | Failed |
wraith.io · Mods on the Hub · Get Wraith
Made with ♥ by Asgard
