mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-06 18:25:21 +01:00
Remove some unnecessary spaces
This commit is contained in:
@@ -560,12 +560,12 @@ Call these functions only at load time!
|
||||
* `minetest.serialize(table)`: returns a string
|
||||
* Convert a table containing tables, strings, numbers, booleans and `nil`s
|
||||
into string form readable by `minetest.deserialize`
|
||||
* Example: `serialize({foo='bar'})`, returns `'return { ["foo"] = "bar" }'`
|
||||
* Example: `serialize({foo='bar'})`, returns `'return {["foo"] = "bar"}'`
|
||||
* `minetest.deserialize(string)`: returns a table
|
||||
* Convert a string returned by `minetest.deserialize` into a table
|
||||
* `string` is loaded in an empty sandbox environment.
|
||||
* Will load functions, but they cannot access the global environment.
|
||||
* Example: `deserialize('return { ["foo"] = "bar" }')`, returns `{foo='bar'}`
|
||||
* Example: `deserialize('return {["foo"] = "bar"}')`, returns `{foo='bar'}`
|
||||
* Example: `deserialize('print("foo")')`, returns `nil` (function call fails)
|
||||
* `error:[string "print("foo")"]:1: attempt to call global 'print' (a nil value)`
|
||||
* `minetest.compress(data, method, ...)`: returns `compressed_data`
|
||||
|
||||
@@ -5669,7 +5669,7 @@ Call these functions only at load time!
|
||||
* `minetest.string_to_privs(str[, delim])`:
|
||||
* Converts string representation of privs into table form
|
||||
* `delim`: String separating the privs. Defaults to `","`.
|
||||
* Returns `{priv1 = true, ... }`
|
||||
* Returns `{priv1 = true, ...}`
|
||||
* `minetest.privs_to_string(privs[, delim])`:
|
||||
* Returns the string representation of `privs`
|
||||
* `delim`: String to delimit privs. Defaults to `","`.
|
||||
@@ -6682,7 +6682,7 @@ Variables:
|
||||
* `minetest.serialize(table)`: returns a string
|
||||
* Convert a table containing tables, strings, numbers, booleans and `nil`s
|
||||
into string form readable by `minetest.deserialize`
|
||||
* Example: `serialize({foo="bar"})`, returns `'return {["foo"] = "bar" }'`
|
||||
* Example: `serialize({foo="bar"})`, returns `'return {["foo"] = "bar"}'`
|
||||
* `minetest.deserialize(string[, safe])`: returns a table
|
||||
* Convert a string returned by `minetest.serialize` into a table
|
||||
* `string` is loaded in an empty sandbox environment.
|
||||
@@ -6693,7 +6693,7 @@ Variables:
|
||||
* This function should not be used on untrusted data, regardless of the
|
||||
value of `safe`. It is fine to serialize then deserialize user-provided
|
||||
data, but directly providing user input to deserialize is always unsafe.
|
||||
* Example: `deserialize('return {["foo"] = "bar" }')`,
|
||||
* Example: `deserialize('return {["foo"] = "bar"}')`,
|
||||
returns `{foo="bar"}`
|
||||
* Example: `deserialize('print("foo")')`, returns `nil`
|
||||
(function call fails), returns
|
||||
@@ -7424,8 +7424,8 @@ child will follow movement and rotation of that bone.
|
||||
* **Deprecated:** Use `get_bone_override` instead.
|
||||
* `set_bone_override(bone, override)`
|
||||
* `bone`: string
|
||||
* `override`: `{ position = property, rotation = property, scale = property }` or `nil`
|
||||
* `property`: `{ vec = vector, interpolation = 0, absolute = false}` or `nil`;
|
||||
* `override`: `position = property, rotation = property, scale = property}` or `nil`
|
||||
* `property`: `{vec = vector, interpolation = 0, absolute = false}` or `nil`;
|
||||
* `vec` is in the same coordinate system as the model, and in degrees for rotation
|
||||
* `property = nil` is equivalent to no override on that property
|
||||
* `absolute`: If set to `false`, the override will be relative to the animated property:
|
||||
@@ -7651,7 +7651,7 @@ child will follow movement and rotation of that bone.
|
||||
`"type"` (or the deprecated `"hud_elem_type"`).
|
||||
* `hud_get(id)`: gets the HUD element definition structure of the specified ID
|
||||
* `hud_get_all()`:
|
||||
* Returns a table in the form `{ [id] = HUD definition, [id] = ... }`.
|
||||
* Returns a table in the form `{ [id] = HUD definition, [id] = ...}`.
|
||||
* A mod should keep track of its introduced IDs and only use this to access foreign elements.
|
||||
* It is discouraged to change foreign HUD elements.
|
||||
* `hud_set_flags(flags)`: sets specified HUD flags of player.
|
||||
@@ -8189,7 +8189,7 @@ Player properties need to be saved manually.
|
||||
collide_with_objects = true,
|
||||
-- Collide with other objects if physical = true
|
||||
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, -- default
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- default
|
||||
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5, rotate = false},
|
||||
-- {xmin, ymin, zmin, xmax, ymax, zmax} in nodes from object position.
|
||||
-- Collision boxes cannot rotate, setting `rotate = true` on it has no effect.
|
||||
@@ -10213,11 +10213,11 @@ degradation in older clients).
|
||||
vector.new(0,0,0),
|
||||
|
||||
-- vec3 ranges
|
||||
{min = vector.new(0,0,0), max = vector.new(0,0,0), bias = 0 },
|
||||
{min = vector.new(0,0,0), max = vector.new(0,0,0), bias = 0 },
|
||||
{min = vector.new(0,0,0), max = vector.new(0,0,0), bias = 0},
|
||||
{min = vector.new(0,0,0), max = vector.new(0,0,0), bias = 0},
|
||||
|
||||
-- mixed
|
||||
0, {min = vector.new(0,0,0), max = vector.new(0,0,0), bias = 0 },
|
||||
0, {min = vector.new(0,0,0), max = vector.new(0,0,0), bias = 0},
|
||||
},
|
||||
}
|
||||
```
|
||||
@@ -10433,7 +10433,7 @@ Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
|
||||
-- Optional, if specified replaces the default minetest user agent with
|
||||
-- given string
|
||||
|
||||
extra_headers = {"Accept-Language: en-us", "Accept-Charset: utf-8" },
|
||||
extra_headers = {"Accept-Language: en-us", "Accept-Charset: utf-8"},
|
||||
-- Optional, if specified adds additional headers to the HTTP request.
|
||||
-- You must make sure that the header strings follow HTTP specification
|
||||
-- ("Key: Value").
|
||||
|
||||
@@ -80,7 +80,7 @@ each player's language:
|
||||
The reason why `NS` exists is for cases like this: Sometimes, you want to define a list of
|
||||
strings to they can be later output in a function. Like so:
|
||||
|
||||
local fruit = { "Apple", "Orange", "Pear" }
|
||||
local fruit = {"Apple", "Orange", "Pear"}
|
||||
local function return_fruit(fruit_id)
|
||||
return fruit[fruit_id]
|
||||
end
|
||||
@@ -90,7 +90,7 @@ If you want to translate the fruit names when `return_fruit` is run, but have th
|
||||
It will show the script the string without Minetest translating it. The script could be made
|
||||
translatable like this:
|
||||
|
||||
local fruit = { NS("Apple"), NS("Orange"), NS("Pear") }
|
||||
local fruit = {NS("Apple"), NS("Orange"), NS("Pear")}
|
||||
local function return_fruit(fruit_id)
|
||||
return S(fruit[fruit_id])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user