1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 17:00:23 +02:00
Commit Graph

1122 Commits

Author SHA1 Message Date
7148834440 Some vector functions useful for working with rotations (#9572)
* added vector.rotate

* added vector.forward_from_rotation and vector.up_from_rotation

* added vector.forward_up_to_rotatiton

* fixed some bugs and formatting with vector functions

* shortened name of some new vector functions and added documentation

* made vector.rotate not require a unit vector as axis

* fixed crash with vector.forward_up_to_rot

* renamed new vector functions, made vector.rotate apply a rotation matrix, old vector.rotate is now called vector.rotate_around_axis

* documented vector function changes

* removed some whitespace to appease luacheck

* implemented and fixed optimization of vector.rotate_around_axis by SmallJoker

* added some unit tests for rotation vector functions

* clarified that rotation vectors are in radians and according to the left hand rule

* hopefully appeased luacheck

* renamed rotation_to_horizontal to forward_at_rotation, rotation_to_vertical to up_at_rotation

* handled cases where sin or cos are 0 in rotation vector functions

* added more comments

* clarified documentation of rotation vector functions

* added more unit tests

* changed way in which vector.rotate_around_axis is adjusted for left handed coordinate systems

* made vector.rotate_around_axis actually left handed

* unrolled matrix multiplication

* removed vector.forward_at_rotation and vector.up_at_rotation

* prettified vector.rotate_around_axis, made previous commits not break anything

* removed references to removed vector.forward_at_rotation and vector.up_at_rotation

* removed documentation of removed vector functions

* clarified documentation and fixed styling of rotation vector functions

* restyled comments minorly

* spelling fixes and some hopefully better comments

* allowed 'up' to be missing from vector.directions_to_rotation and removed requirement for unit vectors as arguments

* made vector.rotate_around_axis() right handed again for consistency

* documented previous changes

* made matrix multiplication actually multiply

* renamed vector.directions_to_rotation() to vector.dir_to_rotation()

* optimized a distance comparison

* Fixed potential false positive in unit tests.

Co-authored-by: NetherEran <nethereran@hotmail.com>
2020-06-09 19:38:39 +02:00
b16f841756 LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod

* Clean up LuaItemStack::checkobject
2020-06-09 19:37:25 +02:00
36099ba947 Fix incorrect extension used for ContentDB thumbnails 2020-06-06 18:31:39 +01:00
60bab8b2d7 Add HTTP API to main menu (#9998) 2020-06-06 17:17:08 +01:00
850af80089 Add buttons to ContentDB in game bar and configure world (#9944) 2020-06-04 21:53:26 +01:00
65a6a316d0 Add minetest.is_creative_enabled 2020-05-29 22:45:40 +02:00
9a64a9fd94 Update ContentDB dialog (#9949) 2020-05-29 00:52:48 +01:00
2fd5f38c45 Change item entity collisionbox so that they don't sink into the ground 2020-05-27 21:58:20 +02:00
03dae5fba6 Fix falling entity not falling through players 2020-05-27 21:58:20 +02:00
f90ca96c73 Make ContentDB downloads not block the UI (#9948) 2020-05-27 17:02:09 +01:00
083b285f43 Rename “Minimal development test” to “Development Test” (#9928) 2020-05-26 00:17:52 +02:00
b3c79906d4 Add engine version string to ContentDB API request (#9890) 2020-05-24 14:46:50 +01:00
a9b74f4c39 Add chat_font_size setting (#9736)
Default font sizes are used when the setting value is 0 or below (clamped by Settings).
2020-05-24 14:24:13 +02:00
a9d6be8b6f Fix documentation of emergequeue_limit settings 2020-05-24 11:48:33 +02:00
15ba75e4cf Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)
Replace on_auth_fail callback with more versatile on_authplayer
    Better clarify account login process in Lua API documentation
    Change initial timestamp for newly registered accounts to -1
2020-05-23 13:25:29 +02:00
1bcdc2d7e9 Various documentation fixes in settingtypes.txt (#9910)
Fix incorrect value of 'mgv7_floatland_density'.
Use correct spelling of 'persistence'.
Move '3d_paralax_strength' into correct section (3D mode).
Refer to 'active_object_send_range_blocks' instead of non-existent 'active_object_range'.
2020-05-22 01:32:20 +01:00
c94d37827d Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
11723cffe0 builtin: Move common/async_event.lua to mainmenu/async_event.lua
It only works in the context of the mainmenu.
2020-05-17 21:37:01 +02:00
a9c3a42323 Add core.open_url() to main menu API (#8592) 2020-05-17 19:09:10 +01:00
ab745685c7 Error msg if trying to teleport attached player (#9824) 2020-05-16 21:41:41 +02:00
af0f7ac4a2 Add new Mapgen V7 floatland implementation (#9296)
Floatland structure is vertically-compressed 3D noise.
Uses a lacunarity of 1.618 (the golden ratio) for high quality
noise.
Floatlands appear between user-settable Y limits, with smooth
tapering at each limit.
Simple user-settable density adjustment.
Shadow propagation is disabled in and just below floatlands, no
shadows are cast on the world surface.
Can be reconfigured to create a solid upper world layer between
the Y limits, lakes/seas can be optionally added to this.
2020-05-14 22:27:54 +01:00
836dd4a1e4 Add chat_log_level setting (#9223)
Log all higher levels in LogOutputBuffer
Move StreamLogOutput::logRaw to source file like LogOutputBuffer::logRaw for compiling speed
2020-05-14 19:26:15 +02:00
2d7e000cfe Item Entity: Add message to moveresult assertion (#9797) 2020-05-14 17:54:17 +02:00
6c607e2082 Allow placing auto-rotating nodes on other nodes in on_rightclick (#9859) 2020-05-13 13:57:05 +02:00
4e997e9d04 Document inf value in rollback commands (#9789) 2020-05-13 13:56:26 +02:00
7ec76e530d Add mapgen settings to world creation dialog (#9254) 2020-05-12 02:52:52 +01:00
6e1372bd89 Add support for statbar “off state” icons (#9462)
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
e8e5d282da Enable collide_with_objects for falling entities
falling nodes intentionally still fall through players
fixes #5313
2020-05-06 14:03:52 +02:00
723926a995 Rewrite falling entity to make use of collision info
fixes #4781, fixes #9293
2020-05-06 14:03:52 +02:00
ab06880525 Update num_emerge_threads description 2020-05-05 19:26:59 +02:00
66c182531c Change default keys for cam/minimap to C/V (#9779) 2020-05-04 08:45:31 +02:00
56bababcdf Add MetricsBackend with prometheus counter support 2020-04-29 07:48:08 +02:00
a36c9c3e93 Fix breath_bar scaling; delay breath_bar hiding by one second (#8271)
PLAYER_MAX_BREATH_DEFAULT was earlier set to 11, so that 10 bubbles are shown before the breath bar disappears.

Now, PLAYER_MAX_BREATH_DEFAULT is set to 10, and the breath_bar scaling code in builtin has been tweaked to show all 10 bubbles before hiding the breath_bar
2020-04-28 19:30:57 +02:00
b9377f26a1 Rewrite builtin item entity to use collision info
fixes #8967
2020-04-27 20:45:46 +02:00
3475759d1a Expose collision information to LuaEntity on_step 2020-04-27 20:45:46 +02:00
d3f50f216f builtin: Correctly indicate failure in /spawnentity 2020-04-27 06:58:34 +02:00
2fe4641c1e Add new command /revokeme <priv> (#9584) 2020-04-26 21:15:05 +02:00
5355cb1d87 minetest.serialize: Reversible number serialization (#9722)
* minetest.serialize: Reversible number to string conversion

The %a format is not supported in Lua 5.1.
This commit also adds two tests for number serialization.
2020-04-22 16:43:48 +02:00
27d611fe55 Add default stack size setting (#8873)
New setting "default_stack_max" to alter the default stack sizes of all items when desired.

Co-authored-by: Pascal Abresch <nep@packageloss.eu>
2020-04-13 10:53:10 +02:00
3833396cfa Fix delayed error message in start game tab 2020-04-12 00:12:18 +01:00
DS
c1742b0901 Allow to select en as language in settings menu (#9604)
fixes #9599
2020-04-08 22:44:52 +02:00
f45ba78a72 Allow relative directories for screenshot_path, tweak default path (#9122)
This will likely be more intuitive for users and should play better
with sandboxed distributions such as Flatpak.

In addition, the screenshot directory will now be created if it doesn't
exist already.
2020-04-06 16:54:12 +02:00
f91124a0c0 Add allowed_mapgens option in game.conf. (#9263)
The game.conf has a disallowed_mapgens option. However, some games
require a certain mapgen to be used, like the CTF plugin. This change
adds an option to specify allowed mapgens so that the setting can be
specified in a way that needn't be updated as map generators are added
to Minetest.
2020-04-06 16:06:16 +02:00
09b8f5d1be Update credits for 5.2.0 (#9593) 2020-04-05 18:30:44 +02:00
ea30b89d3f Builtin: Make item entities glow less (#9594)
minor adjustment to #9200
2020-04-04 21:27:30 +02:00
13b228513e Ignore near_plane setting on non-Android platforms (#8749)
Camera's near-plane will be hard-coded to 0.1 on all non-Android platforms. The upper-bound of this setting has been reduced to 0.25, as 0.5 is just way too high.
2020-03-28 21:53:55 +01:00
625b100593 Add comments for translators (#9510)
* Add translator comments for "special" strings

* Add translator comments for some "tricky" strings
2020-03-20 09:41:07 +01:00
1441281809 Fix some chatcommands not returning a value (#9503) 2020-03-14 15:01:22 +01:00
ce8cdc0333 Cleanup global namespace pollution in builtin (#9451) 2020-03-06 20:19:14 +00:00
8d6a0b917c Fix potential security issue(s), documentation on minetest.deserialize() (#9369)
Also adds an unittest
2020-03-05 22:03:04 +01:00