Commit Graph

87 Commits

Author SHA1 Message Date
SmallJoker ccfc252728
Builtin: Forward old return values
Was forgotten in 69bf964.
2022-05-21 16:17:07 +02:00
SmallJoker b7d341848b
Add /help formspec for commands and privileges (#8385)
* Trigger for 'all' as well
* Add description textarea, double-click to copy
2022-05-21 16:17:04 +02:00
HybridDog c8730d2591
Use vector.dot and vector.cross in vector.angle 2022-05-21 16:17:03 +02:00
HybridDog 7f7140bae1
Add vector.dot and vector.cross
Mostly copied from MarkuBu's code
2022-05-21 16:17:03 +02:00
Desour aa0ee4cc03
Optimize core.after in a simple way (#8351) 2022-05-21 16:16:58 +02:00
ANAND a07575bd51
core.after: Improve assertion message (#8388) 2022-05-21 16:16:56 +02:00
ANAND 6cf1909254
Builtin: Add vector.angle(). Returns the angle between 2 vectors (#7738) 2022-05-21 16:16:56 +02:00
HybridDog 744d7a14b4
Add math.factorial (#8298) 2022-05-21 16:16:54 +02:00
Pierre-Yves Rollo a1bcc6ba94
Fix string.split returning an empty table if string starts with sepearator (#7827)
Calling string.split(":A:B:C:D", ":") returns an empty array.
This is due to first empty string not making repeat loop decreasing max_split which has a 0 value when reaching until.
Changing max_splits default value from -1 to -2 fixes that issue.
2022-05-21 16:16:23 +02:00
paramat 39398b9ed6
Builtin//misc_helpers: Various fixes (#7737)
Remove unused variable 'seplen'.
Fix 'cparam2'->'param2'.
Do not initialise variable 'p' twice.
2022-05-21 16:16:18 +02:00
paramat cbc774df86
Pointed_thing_to_face_pos: Avoid crash when player is inside a node (#7342)
Avoid crash in some situations when player is inside a node, causing
'above' to equal 'under'.
In this situation return 'under' which is the node position very close
to the face position that would normally be returned.
2022-05-21 16:15:58 +02:00
rubenwardy b744f1d46f
Add online content repository
Replaces mods and texture pack tabs with a single content tab
2022-05-21 16:15:57 +02:00
SmallJoker f2628f1eb4
core.rotate_node: Do not trigger after_place_node (#6900) 2022-05-21 16:15:54 +02:00
HybridDog 0a429927a9
Allow dumping userdata (#7012) 2022-05-21 16:15:47 +02:00
paramat dd112ad6ea
Vector functions: Fix vector.direction() function, improve documentation (#6801)
vector.direction() now returns a normalised vector with direction p1 to p2.
2022-05-21 16:15:39 +02:00
Ezhh 5849b6fc97
Give subgames the ability to disallow specific mapgens (#6792) 2022-05-21 16:15:38 +02:00
paramat c6d98a56e7
Pointed thing to face pos: Use 'eye height' object property (#6754) 2022-05-21 16:15:36 +02:00
SmallJoker b06a8d6016
core.rotate_node: Run callbacks like with any regular placed node (#6648) 2022-05-21 16:15:32 +02:00
DTA7 9b0e13f582
Set placer to nil instead of a non-functional one in item_OnPlace (#6449)
* Set placer to nil instead of a non-functional one

This requires nil checks in core.rotate_node and core.rotate_and_place.
2022-05-21 16:15:23 +02:00
tenplus1 2a3112ab78
Fix Rotate Node Placement (#6424)
This properly checks for creative mode or privilege when using fixed rotate_node() function.
2022-05-21 16:15:22 +02:00
sfan5 10fbc96971
Fix core.wrap_text and make its behaviour consistent with the docs
Code based on initial implementation by @dsohler.
2022-05-21 16:15:19 +02:00
Nathanaël Courant 2a8c81c50e
Add '@n' escape sequences and some documentation on translated strings. 2022-05-21 16:15:12 +02:00
Nathanaël Courant 54fc7afb7e
Add clientside translations. 2022-05-21 16:15:11 +02:00
Gael-de-Sailly dd12312b58
Add minetest.rgba function that returns ColorString from RGBA or RGB values 2022-05-21 16:14:57 +02:00
Ezhh 4bd4d2b3b7
Improve chatcommand params consistency (#5985)
* Fix and improve params consistency

* Move parenthesis requirement to descriptions
2022-05-21 16:14:56 +02:00
red-001 0aaa633975
Fix sending color codes to clients that don't support them. (#5950)
Also remove `disable_escape_sequences` since it's not needed anymore.
2022-05-21 16:14:54 +02:00
red-001 2f8ebed7cc
Add function to get player privileges (#5933)
* [CSM] Add function to get player privileges + move related help functions to common

* Added @Zeno- const
2022-05-21 16:14:52 +02:00
SmallJoker 3fe2935a57
Builtin: Fix subgame mod selection (#5367) 2022-05-21 16:14:48 +02:00
SmallJoker 7b4120ee9f
CSM: Document forgotten functions 2022-05-21 16:14:47 +02:00
SmallJoker 88c24db1a7
minetest.deserialize: Throw error when argument not string (#5738) 2022-05-21 16:14:46 +02:00
ShadowNinja 5030ce5f4b
Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2022-05-21 16:14:45 +02:00
MarkuBu a99d95ee92
Pointed thing to face pos: Fix crash if opening door with slab or stair
Avoids crash caused when 'pointed thing -under' and '-above' are not
face-neighbours, for example in the case of pointing to the top half
of a door.
2022-05-21 16:14:41 +02:00
red-001 089bca3f7f
Use more gettext (#5553) 2022-05-21 16:14:39 +02:00
Auke Kok 9d9c4cc91f
minetest.after(): simplify further, pause in singleplayer (#5500)
Using the `dtime` value entirely, this will stop the clock
if the game is paused in singleplayer. Since most of the
clocks were fixed a long time ago, this should again be
safe to use.
2022-05-21 16:14:34 +02:00
MarkuBu 61efcfec7d
First commit for fine pointed (#5485) 2022-05-21 16:14:34 +02:00
Diego Martínez 67ca4f86c5
Add functions to strip color information. (#5472) 2022-05-21 16:14:34 +02:00
Loïc Blot 1bbcceb65c
Fix a type bug in colorize function
This bug was introduced by dd2f1d7551bfd70357ad4f3fb180704194272147 and reported by @kilbith
2022-05-21 16:14:33 +02:00
red-001 5943ad8975
Change command prefix to "." and add "help" command. 2022-05-21 16:14:32 +02:00
Loïc Blot f436404054
Typo fix 2022-05-21 16:14:32 +02:00
red-001 acb03dc956
Add multiline support to colorize. (#5444) 2022-05-21 16:14:31 +02:00
red-001 52662dfcce
Block access to the `io` library 2022-05-21 16:14:31 +02:00
red-001 d210b6d2cf
Give CSM access to use `core.colorize()` (#5113) 2022-05-21 16:14:30 +02:00
red-001 fb042da4a5
Improve security for client-sided mods (#5100) 2022-05-21 16:14:28 +02:00
red-001 0412d35355
Add local formspecs. (#5094) 2022-05-21 16:14:27 +02:00
Loïc Blot b38c00d90f
sound_play & sound_stop support + client_lua_api doc (#5096)
* squashed: CSM: Implement register_globalstep
  * Re-use fatal error mechanism from server to disconnect client on CSM error
  * Little client functions cleanups

* squashed: CSM: add core.after function
  * core.after is shared code between client & server
  * ModApiUtil get_us_time feature enabled for client
2022-05-21 16:14:27 +02:00
red-001 33b76809dd
Add client-sided chat commands (#5092) 2022-05-21 16:14:27 +02:00
Auke Kok 944e5ca4e9
Vector: Add vector.sort(a, b): return box edges
This function returns the box corners of the smallest box
that includes the two given coordinates.
2022-05-21 16:14:17 +02:00
sfan5 a75a5eb3eb
Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2022-05-21 16:14:01 +02:00
Foghrye4 cfa39937f9
Adding particle blend, glow and animation (#4705) 2022-05-21 16:14:01 +02:00
Auke Kok f5336937c7
Core.rotate_and_place: Remove unused call to get_look_pitch() 2022-05-21 16:13:58 +02:00