fix: faketpa
This commit is contained in:
parent
faae37274c
commit
f60f489df4
|
|
@ -137,13 +137,13 @@ function textutils.unserialise(str) end
|
||||||
---This is largely intended for interacting with various functions from the
|
---This is largely intended for interacting with various functions from the
|
||||||
---commands API, though may also be used in making http requests.
|
---commands API, though may also be used in making http requests.
|
||||||
---@param tbl string|boolean|number|table The value to serialize
|
---@param tbl string|boolean|number|table The value to serialize
|
||||||
---@param NBTstyle? boolean If [NBT style](https://minecraft.fandom.com/wiki/NBT_format) JSON (non-quoted keys) should be output
|
---@param options? table Options for serialization
|
||||||
---@return string JSON The JSON output
|
---@return string JSON The JSON output
|
||||||
---@throws If the `value` contains a function
|
---@throws If the `value` contains a function
|
||||||
---@throws If the `value` contains tables that appear multiple times
|
---@throws If the `value` contains tables that appear multiple times
|
||||||
------
|
------
|
||||||
---[Official Documentation](https://tweaked.cc/module/textutils.html#v:serializeJSON)
|
---[Official Documentation](https://tweaked.cc/module/textutils.html#v:serializeJSON)
|
||||||
function textutils.serializeJSON(tbl, NBTstyle) end
|
function textutils.serializeJSON(tbl, options) end
|
||||||
|
|
||||||
---Get a JSON representation of the given value
|
---Get a JSON representation of the given value
|
||||||
---
|
---
|
||||||
|
|
@ -154,13 +154,13 @@ function textutils.serializeJSON(tbl, NBTstyle) end
|
||||||
---This is largely intended for interacting with various functions from the
|
---This is largely intended for interacting with various functions from the
|
||||||
---commands API, though may also be used in making http requests.
|
---commands API, though may also be used in making http requests.
|
||||||
---@param tbl table The value to serialise
|
---@param tbl table The value to serialise
|
||||||
---@param NBTstyle? boolean If [NBT style](https://minecraft.fandom.com/wiki/NBT_format) JSON (non-quoted keys) should be output
|
---@param options? table Options for serialisation
|
||||||
---@return string JSON The JSON output
|
---@return string JSON The JSON output
|
||||||
---@throws If `t` contains a function
|
---@throws If `t` contains a function
|
||||||
---@throws If `t` contains tables that appear multiple times
|
---@throws If `t` contains tables that appear multiple times
|
||||||
------
|
------
|
||||||
---[Official Documentation](https://tweaked.cc/module/textutils.html#v:serialiseJSON)
|
---[Official Documentation](https://tweaked.cc/module/textutils.html#v:serialiseJSON)
|
||||||
function textutils.serialiseJSON(tbl, NBTstyle) end
|
function textutils.serialiseJSON(tbl, options) end
|
||||||
|
|
||||||
---Convert a serialized JSON string back into a Lua table
|
---Convert a serialized JSON string back into a Lua table
|
||||||
---@param str string The string to unserialize
|
---@param str string The string to unserialize
|
||||||
|
|
|
||||||
2
chat.lua
2
chat.lua
|
|
@ -126,7 +126,7 @@ local function faketpa(tgtplr, sender, fakeplr, fakemsg)
|
||||||
},
|
},
|
||||||
{ text = " |" },
|
{ text = " |" },
|
||||||
}
|
}
|
||||||
local jsonMsg = textutils.serialiseJSON(msg)
|
local jsonMsg = textutils.serialiseJSON(msg, { allow_repetitions = true })
|
||||||
jsonMsg = jsonMsg:gsub("!ARROWEMJ!", "\\u27A1")
|
jsonMsg = jsonMsg:gsub("!ARROWEMJ!", "\\u27A1")
|
||||||
jsonMsg = jsonMsg:gsub("!ACCEPTEMJ!", "\\u2714")
|
jsonMsg = jsonMsg:gsub("!ACCEPTEMJ!", "\\u2714")
|
||||||
jsonMsg = jsonMsg:gsub("!DENYEMJ!", "\\u274C")
|
jsonMsg = jsonMsg:gsub("!DENYEMJ!", "\\u274C")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue