Commit Graph

1016 Commits

Author SHA1 Message Date
Auke Kok a3d0df7466
Convert nodeupdate to non-recursive
This took me a while to figure out. We no longer visit all 9 block
around and with the touched node, but instead visit adjacent plus
self. We then walk -non- recursively through all neigbors and if
they cause a nodeupdate, we just keep walking until it ends. On
the way back we prune the tail.

I've tested this with 8000+ sand nodes. Video result is here:

  https://youtu.be/liKKgLefhFQ

Took ~ 10 seconds to process and return to normal.
2022-05-21 16:13:31 +02:00
Rui914 8850a2a73f
Mainmenu: Refactor tab UI code
- Use local variables for tabs in place of globals
 - Merge together if statements where possible
 - Replace manual table searching code with indexof where possible
2022-05-21 16:13:30 +02:00
Rui914 d86bc91f4b
Mainmenu: Move description.txt textbox down
Additionally, fix misc. code style issues
2022-05-21 16:13:30 +02:00
paramat 60e3898c22
Mgv7: Decrease cliff steepness 2022-05-21 16:13:29 +02:00
tenplus1 b6b49f9cc9
stop falling.lua error
2016-03-27 15:47:01: ERROR[Main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): Node name is not set or is not a string!
2016-03-27 15:47:01: ERROR[Main]: stack traceback:
2016-03-27 15:47:01: ERROR[Main]: 	[C]: in function 'add_node'
2016-03-27 15:47:01: ERROR[Main]: 	/usr/share/minetest/builtin/game/falling.lua:96: in function </usr/share/minetest/builtin/game/falling.lua:43>
2022-05-21 16:13:29 +02:00
Rui 215e71efad
Falling: Set acceleration on step again
Commit

65c09a96f41705bb8e75fc5ff4276342be91ed11 "Set acceleration only once in falling node"

has made the acceleration being set only once.
But this has introduced a regression.

Fix #3884.
2022-05-21 16:13:28 +02:00
Rui 3f4c1bb7b8
Credits: Make that easy to add/remove 2022-05-21 16:13:28 +02:00
Auke Kok 400c4dda7a
Make `options` local here.
Undoubtably this may cause problems later if unchecked.

```
2016-03-22 21:57:52: WARNING[Server]: Assignment to undeclared global "options" inside a function at .../sofar/git/minetest/bin/../builtin/game/chatcommands.lua:862.
```
2022-05-21 16:13:28 +02:00
paramat b12c539595
Builtin/game/falling: Re-add comma removed by recent commit 2022-05-21 16:13:27 +02:00
Rui914 8760d15445
Set acceleration only once in falling node 2022-05-21 16:13:27 +02:00
Auke Kok 2f45f007f4
Allow NodeTimer, ABM and block mgmt interval changes.
ABM's are hardcoded to run every 1.0s, NodeTimers are hard coded to
run at every 1.0s. Block mgmt is running every 2.0sec.

However, these timers can be better tuned for both higher and lower
values by server owners. Some server owners want to, and have the
resources to send more packets per second to clients, and so they
may wish to send smaller updates sooner. Right now all ABM's are
coalesced into 1.0 second intervals, resulting in large send queues
to all clients. By reducing the amount of possible timers, one can
get a far better response rate and lower the perception of lag.

On the other side of the camp, some servers may want to increase
these values, which again isn't easily doable.

The global settings abm_interval and nodetimer_interval are set to
current values by default. I've tested with 0.2/0.5 type values
and noticed a greatly improved response and better scattering of
nodetimers, as well as enjoying not faceplanting into doors with
pressure plates anymore.
2022-05-21 16:13:26 +02:00
est31 eaab9d5586
Add option to not send pre v25 init packet
The legacy init packet (pre v25) sends information about the client's
password that a server could use to log in to other servers if the
username and password are the same. All the other benefits of SRP of
protocol v25 are missed if the legacy init packet is still sent during
connection creation.

This patch adds an option to not send the v25 init packet. Not sending
the v25 packet means breaking compat with pre v25 servers, but as the
option is not enabled by default, no servers are affected unless the
user explicitly flips the switch. More than 90% of the servers on the
serverlist support post v25 protocols.

The patch also fixes a bug with greying out of non compliant servers
being done wrongly, the min and max params were mixed.
2022-05-21 16:13:26 +02:00
Diego Martínez 79667b4dc6
Add options for screenshot format and quality 2022-05-21 16:13:26 +02:00
paramat 7f85241781
Documentation: Clarify global and mapgen-specific mapgen flags 2022-05-21 16:13:25 +02:00
Auke Kok 9e994e0e39
Introduce "protection_bypass" privilege.
This privilege allows map protection bypassing for server operators
and world moderators.

Initially I had thought that bypassing protection mods would have been
something that could entirely be done inside mods and minetest_game,
but the concept of protection is defined in core, in the code of
core.is_protected().

I don't feel that it would be logical to introduce a protection
concept in core, but not some way around that for server operators
to maintain map parts that need fixing, de-griefing or cleanup.

Others had noticed the same problems, and proposed a patch to
minetest_game. That patch is fine by itself, but it fails to add
protection bypass functionality for digging normal nodes and placing
nodes.

So, instead, we indroduce the new priv "protection_bypass" in core,
and modify 'on_place_node' and 'node_dig' to allow bypassing node
protections if the player holds this priv.

This priv was tested with protector redo by tenplus1.

A followup patch to Minetest Game will include allowing special checks
for doors, trapdoors, chests in Minetest Game.

Protection mods will likely want to mimic the changes in their relevant
code sections.
2022-05-21 16:13:25 +02:00
Auke Kok da5a169a45
Add consistent monotonic day counter - get_day_count()
I've written several experimental bits of code that revolve around the
need for a consistent calendar, but implementing one is extremely hard
in mods due to time changes and mods overriding core.get_timeofday(),
which will conflict.

The second part of the problem is that doing this from a mod requires
constant maintenance of a settings file.

An implementation in core is trivial, however, and solves all of
these problems at virtually no cost: No extra branches in server
steps, and a single branch when minetest.set_time_of_day(), which is
entirely reasonable.

We store the day_count value in env_meta.txt.

The use case is obvious: This change allows mods to create an actual
virtual calendar, or properly account for seasonal changes, etc..

We add a "/days" chatcommand that displays the current day count. No
permissions are needed. It can only retrieve the day count, not
modify it.
2022-05-21 16:13:24 +02:00
ShadowNinja 96b86f8440
Add AreaStore custom ID API 2022-05-21 16:13:24 +02:00
est31 d1e698f4fb
Add minetest.register_lbm() to run code on block load only 2022-05-21 16:13:23 +02:00
Jean-Patrick Guerrero 7d23793e05
Settings Tab: Regroup dropdown datas in tables 2022-05-21 16:13:23 +02:00
Rui914 32752d2bc5
Faster insertion into table 2022-05-21 16:13:23 +02:00
srfqi 8660983a8e
Add forgotten valleys mapgen in mapgen name
Missing `valleys` in `settingtypes.txt` and `minetest.conf.example`.
2022-05-21 16:13:22 +02:00
Jean-Patrick Guerrero 9f6730de09
Update settings tab + some misc. clean-up 2022-05-21 16:13:22 +02:00
est31 250f67bf2f
Don't generate trailing spaces in minetest.conf.example
If the default value of a setting was empty,
it previously generated a trailing space.
2022-05-21 16:13:21 +02:00
RealBadAngel 3cb36ba9ac
Mapblock mesh: Allow to use VBO 2022-05-21 16:13:21 +02:00
RealBadAngel 362d382289
Remove new_style_water 2022-05-21 16:13:20 +02:00
Jeija d0a7fe455e
Add Lua interface to HTTPFetchRequest
This allows mods to perform both asynchronous and synchronous HTTP
requests. Mods are only granted access to HTTP APIs if either mod
security is disabled or if they are whitelisted in any of the
the secure.http_mods and secure.trusted_mods settings.

Adds httpfetch_caller_alloc_secure to generate random, non-predictable
caller IDs so that lua mods cannot spy on each others HTTP queries.
2022-05-21 16:13:20 +02:00
RealBadAngel 6817425d4d
Camera: remove auto tune FPS, single view range setting 2022-05-21 16:13:20 +02:00
RealBadAngel e0bf406bea
Remove preload_item_visuals code
Closes #3748
2022-05-21 16:13:19 +02:00
BlockMen ae7b3ec177
Restore simple settings tab and add advanced settings as dialog 2022-05-21 16:13:19 +02:00
paramat 41bef56c82
Documentation: Remove now unused 'vertical spawn range' 2022-05-21 16:13:18 +02:00
Diego Martínez 60a5b2ac4d
Initialize facedir and wallmounted tables only once.
This makes the functions a bit faster since they don't
have to recreate the tables every invocation, and makes
the code more readable.

Also, document `wallmounted_to_dir`.

The function was implemented but not documented in `lua_api.txt`.
2022-05-21 16:13:18 +02:00
Kahrl c4db9d23ff
Log /clearobjects mode 2022-05-21 16:13:17 +02:00
Kahrl ed493305e4
Add '/clearobjects quick' 2022-05-21 16:13:17 +02:00
RealBadAngel d8c9c7deac
Filmic HDR tone mapping 2022-05-21 16:13:17 +02:00
RealBadAngel e942240abf
Cleanup selection mesh code, add shaders for halo and selection boxes 2022-05-21 16:13:16 +02:00
Diego Martínez 6dc6ea419e
builtin: Fix `print` crashing on nil "holes".
The engine implementation of `print` packs the varargs into a
table and passes the table directly to `table.concat`. If you
pass any value not supported by `table.concat` (particularly
`nil`), the server crashes. This is unexpected behavior, as
`print` is supposed to be able to work with anything.

This patch changes the implementation so it first converts
all arguments using `tostring`, which fixes the issue and
makes the custom `print` function compatible with the stock
Lua behavior.
2022-05-21 16:13:16 +02:00
RealBadAngel 204f43d9c9
Use meshes to display inventory items 2022-05-21 16:13:15 +02:00
Splizard 35bae38ca3
Add admin command which says who the administator is for the server. 2022-05-21 16:13:15 +02:00
Duane Robertson 3a9235fc1c
Mgvalleys: use standard caves
Replace simple caves with V5 caves, adding unpredictable water and lava
settings and massive caves based on subterrain. Remove fast terrain mode
and accompanying settings. Remove superfluous temperature/humidity
settings. Remove lava/water height setting. Fix errors in humidity
handling and remove humidity_break_point setting. Move cave noises to
generateCaves. Fix minor formatting/naming issues and use
MYMAX/MYMIN/myround.
2022-05-21 16:13:14 +02:00
Auke Kok 3cef28e731
New timer design.
I could honestly not make much sense of the timer implementation
that was here. Instead I've implemented the type of timer algorithm
that I've used before, and tested it instead.

The concept is extremely simple: all timers are put in an ordered
list. We check every server tick if any of the timers have
elapsed, and execute the function associated with this timer.

We know that many timers by themselves cause new timers to be
added to this list, so we iterate *backwards* over the timer
list. This means that new timers being added while timers are
being executed, can never be executed in the same function pass,
as they are always appended to the table *after* the end of
the table, which we will never reach in the current pass over
all the table elements.

We switch time keeping to minetest.get_us_time(). dtime is
likely unreliable and we have our own high-res timer that we
can fix if it is indeed broken. This removes the need to do
any sort of time keeping.
2022-05-21 16:13:14 +02:00
Diego Martínez d10a5cfedb
Fix world config menu ignoring `name` in `mod.conf`. 2022-05-21 16:13:13 +02:00
RealBadAngel 580ea1201e
Show infotext with description for item entities 2022-05-21 16:13:13 +02:00
Rogier e577c35a3c
Fix error message in settings tab overlapping 'save' button
The save button is now fully functional again when an error message
is shown.

After an invalid value is entered in the settings tab dialog, the GUI
label for the error message that is shown was partly overlapping the
'save' button, so that the top half of the button could not be clicked
on.
2022-05-21 16:13:12 +02:00
Duane Robertson e64db54315
Add Valleys mapgen. 2022-05-21 16:13:12 +02:00
paramat bffee113cf
Mgflat: Set blank default spflags. Unhide 2022-05-21 16:13:11 +02:00
Rogier 6a3484c135
Fix the checking of flags values in the settings tab
Changes:
- Accept setting an empty flags-type value in the settings tab
  if the variable specification permits it
- Don't accept substrings of flag values
  E.g. with values: 'one,two,three', 'hree', 'w', etc. used to
  be accepted. Not any more
- Don't accept flags with random pattern-matching special characters
  E.g. with values: 'one,two,three', 'on.', '(o)[n]e*' etc. used
  to be accepted. Not any more.
2022-05-21 16:13:11 +02:00
Rogier 4e30d1bb0a
Improve parsing of setting types from settingtypes.txt for settings tab
- Accept numbers prefixed with '+'
- Accept multiple spaces instead of just a single one where spaces are expected
- Allow flags to have an empty default value
2022-05-21 16:13:10 +02:00
Dalai Felinto 2461f6d985
New 3D Mode: Pageflip
The pageflip mode requires a stereo quadbuffer, and a modern graphic
card. Patch tested with NVidia 3D Vision.

The mini-map is not drawn, but that's what is done for topbottom and
sidebyside modes as well.

Also most of the time the user would prefer the HUD to be off. That's
for the user to decide though, and toggle it manually.

Finally, the interocular distance (aka eye separation) is twice as much
as the "3d_paralax_strength" settings. I find this a strange design
decision. I didn't want to chance this though, since it's how the other
3d modes interpret this settings.
2022-05-21 16:13:10 +02:00
paramat b36217f608
Liquids: Flow into and destroy 'floodable' nodes
Add new node property 'floodable', default false
Define "air" as floodable = true in C++ and lua
2022-05-21 16:13:10 +02:00
Jean-Patrick Guerrero eadd017507
Alphabetical sorting of texture packs in menu (fixes #3487) 2022-05-21 16:13:09 +02:00
HybridDog 93de351e5f
Fix missing localization for obj 2022-05-21 16:13:09 +02:00
paramat 681434bc5d
Mgfractal: Add 3D and 4D fractals
3D Mandelbrot/Mandelbar
3D Christmas Tree
3D Mandelbulb
3D Cosine Mandelbulb
4D Mandelbulb
Plus corresponding julia set for each
Add credits for formulas
Rename parameter 'formula' to 'fractal'
Speed optimisations
2022-05-21 16:13:08 +02:00
est31 111be664a8
Fix some setting documentation
* Horizontal and vertical are used wrongly. Use height and width because
	horizontal/vertical describes different things. Thanks @kilbith for pointing out.
* Update minetest.conf.example and settings_translation_file.cpp
* Correct maximum/minimum copy paste mistake.
2022-05-21 16:13:08 +02:00
Alex Ford 8341ca836e
Add on_secondary_use when right clicking an item in the air 2022-05-21 16:13:07 +02:00
Robert Zenz e7bc7c6857
Simplify regex used in check_modname_prefix and other improvements.
Simplified the regex used, added comments and changed the error message
to contain the correct mod name.
2022-05-21 16:13:07 +02:00
paramat 90edce95c3
Mgfractal: Move julia set selection into formula parameter
Improve default parameters
Update and improve documentation
Unhide mapgen, but is still unstable
2022-05-21 16:13:06 +02:00
paramat 93356f96df
Mapgen: Add global 'decorations' flag
Flag is set by default in MapgenParams
The global 'trees' flag remains but is now
undocumented and unset by default in MapgenParams
Add mgv6_spflag 'trees' set by default in
defaultsettings.cpp to affect new worlds only
This is automatically backwards
compatible for existing worlds
2022-05-21 16:13:06 +02:00
Rui aedf15826c
Log static_spawn error only once 2022-05-21 16:13:05 +02:00
paramat 78d2dee49e
Mgfractal: Revert unnecessary duplication of parameters 2022-05-21 16:13:05 +02:00
paramat dfce6ebd28
Mgfractal: Create a choice of 4 mandelbrot formulas 2022-05-21 16:13:04 +02:00
paramat 86b75dbdfa
Mgv6: Move global mapgen flag 'flat' into mgv6 spflags
Add mgv6 spflag 'flat'
Global flag is kept for backwards compatibility but is now undocumented
2022-05-21 16:13:04 +02:00
Robert Zenz 4662b21222
Add the player name to dropped items
The player name is now added in the field "dropped_by" on the created
entity.
2022-05-21 16:13:04 +02:00
paramat d35da6cac9
Mapgen: Add flat mapgen in hidden form 2022-05-21 16:13:03 +02:00
est31 bf7ed56ddd
Settings tab: add v3f type
Add the v3f type, currently is just a nice placeholder for string.
Currently undocumented, on wish of @PilzAdam, to support future changes.
2022-05-21 16:13:03 +02:00
kwolekr f9e25279e1
Improve LuaVoxelManip documentation 2022-05-21 16:13:02 +02:00
paramat 5bc192a744
Conf.example, settingtypes: Improve mgfractal documentation 2022-05-21 16:13:02 +02:00
est31 d70090cc51
Add server side ncurses terminal
This adds a chat console the server owner can use for administration
or to talk with players.
It runs in its own thread, which makes the user interface immune to
the server's lag, behaving just like a client, except timeout.
As it uses the same console code as the f10 console, things like nick
completion or a scroll buffer basically come for free.
The terminal itself is written in a general way so that adding a
client version later on is just about implementing an interface.

Fatal errors are printed after the console exists and the ncurses
terminal buffer gets cleaned up with endwin(), so that the error still
remains visible.

The server owner can chose their username their entered text will
have in chat and where players can send PMs to.
Once the username is secured with a password to prevent anybody to
take over the server, the owner can execute admin tasks over the
console.

This change includes a contribution by @kahrl who has improved ncurses
library detection.
2022-05-21 16:13:01 +02:00
paramat 3d92807282
Settingtypes: Correct documentation for mgfractal
Use type 'string' for v3fs and add comments
2022-05-21 16:13:01 +02:00
paramat 272541a8bb
Mgfractal: Add documentation to conf.example and settingtypes 2022-05-21 16:13:00 +02:00
kwolekr 0b80c8c114
Add callback parameter for core.emerge_area() 2022-05-21 16:13:00 +02:00
Rui914 9bca5b37c4
minetest. to core. 2022-05-21 16:13:00 +02:00
paramat e532e69c98
findSpawnPos: Add setting for max height above water level
Increase default from 6 to 16 to help with mgv7 and mgfractal
Large-scale or alternative mapgens can result in a lowland spawn point not
being found, causing a spawn at (0, 0, 0) possibly buried underground
The max height is now settable to allow correct player spawn
in any mapgen or when using custom noise parameters
2022-05-21 16:12:59 +02:00
PilzAdam 7e69f86aa5
Fix parameter passing to gettext call 2022-05-21 16:12:59 +02:00
BlockMen 1f21ad4da2
Check if hitter has inventory when punching item
Fixes #3280
2022-05-21 16:12:58 +02:00
Rui c0297ebcbe
Credits: Remove my name 2022-05-21 16:12:58 +02:00
PilzAdam 2f0e5a075d
Escape " in generated settings_translation_file.cpp 2022-05-21 16:12:58 +02:00
PilzAdam 4067cf06c3
Fix setting comments 2022-05-21 16:12:57 +02:00
PilzAdam b7a3bf1e30
Don't allow games or mods to add secure. settings 2022-05-21 16:12:57 +02:00
est31 bd43e63b83
Better gettext support for protocol version mismatch messages
Previously, xgettext failed to resolve the dynamic call.
Thanks to @JakubVanek for pointing this out.
2022-05-21 16:12:56 +02:00
PilzAdam c391792fca
Improve Lua settings menu
* Add key settings to setting table and ignore them later
  This way they are added to the auto-generated minetest.conf.example
* Add flags type
* Add input validation for int, float and flags
* Break in-game graphic settings into multiple sections
* Parse settingtpes.txt in mods and games
* Improve description for a lot of settings
* Fix typos and wording in settingtypes.txt
* Convert language setting to an enum
2022-05-21 16:12:56 +02:00
Robert Zenz 9ad5562efb
Add more ways to pass data to check_player_privs
The callback can now be invoked with either the player object or name as
the first parameter, and with either a table or a list of strings, like
this:

    minetest.check_player_privs(player_name, { shout = true, fly = true })
    minetest.check_player_privs(player_name, "shout", "fly")
    minetest.check_player_privs(player, { shout = true, fly = true })
    minetest.check_player_privs(player, "shout", "fly")
2022-05-21 16:12:55 +02:00
est31 b29666b49a
Display sane output for empty descriptions
According to its man page, the function gettext(3)
"may return a nonempty string" when msgid is "".

This commit fixes a bug where the comment ""
for some settings caused gettext to return a
"nonempty string", in this case header info of the
po file.
2022-05-21 16:12:55 +02:00
PilzAdam 86c317e796
New settings tab contain all possible settings
Settings are automatically parsed from builtin/settingtypes.txt
The edit dialog automatically adjust based on the type of setting
2022-05-21 16:12:55 +02:00
ShadowNinja 8fc9b3b9cb
Refactor logging
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
2022-05-21 16:12:54 +02:00
Rui f3c5e76d9a
Localize digprop_err function 2022-05-21 16:12:54 +02:00
Jean-Patrick Guerrero e55a5a1c24
Add viewing range GUI setting 2022-05-21 16:12:53 +02:00
Fernando Carmona Varo 095cfc2c70
Added minetest.wallmounted_to_dir 2022-05-21 16:12:53 +02:00
est31 e1b5a8789e
Some map border related fixes
1. Check for entity addition success in spawn_item implementation
2. Check for success in item_drop callback, so that the player
doesn't lose the item if they are outside bounds and try to drop it.
3. When existing player joins game, check that their position is inside
map bounds. If not, set their position to the return value of findSpawnPos().
4. Make findSpawnPos() respect the border

2 fixes a lua crash if a player drops an item outside map bounds.
3 fixes an assertion crash if a player leaves when being outside map bounds,
and then rejoins.
2022-05-21 16:12:52 +02:00
kwolekr 37a94ffa9d
Add /emergeblocks command and core.emerge_area() Lua API 2022-05-21 16:12:52 +02:00
est31 7feed28ef0
Replace "self program" with "this program" in fstk boilerplates
... and remove trailing whitespace.
2022-05-21 16:12:51 +02:00
Rui914 39001fe1f5
Minor tweaks handle_settings_buttons 2022-05-21 16:12:51 +02:00
Rui914 ffffe22f15
Change my email 2022-05-21 16:12:50 +02:00
Rui 55ccf6bce8
Small fixes of minetest.has_feature 2022-05-21 16:12:50 +02:00
Rui 4c9302c8a2
Minor tweaks __builtin:falling_node 2022-05-21 16:12:49 +02:00
est31 4a83767d37
Credits tab: fix accidental merger of two contributors
Fixes #3125
2022-05-21 16:12:49 +02:00
Rui914 5ef81a0e15
Use gettext to "None" of texture pack list 2022-05-21 16:12:49 +02:00
kwolekr 8cda9256e1
Remove some emails from credits tab 2022-05-21 16:12:48 +02:00
kwolekr f6393ae381
Update credits tab 2022-05-21 16:12:48 +02:00
est31 1da33c4586
Client: disable mmdb modstore
The service isn't online, and on the long term, mmdb will likekly be
replaced with other services from the modding community.
2022-05-21 16:12:47 +02:00
est31 e21528442c
Don't do formspec escaping twice for loading description 2022-05-21 16:12:47 +02:00
kwolekr 3120d9e8e2
SAPI: Track last executed mod and include in error messages 2022-05-21 16:12:46 +02:00
Jean-Patrick Guerrero 777a203e5f
Fix FSAA dropdown option reset after changing another dropdown option 2022-05-21 16:12:46 +02:00
Jean-Patrick Guerrero 10557bce20
Remove drivers dropdown in the settings tab 2022-05-21 16:12:45 +02:00
Nathanaël Courant a0a5a74b4e
Update my name 2022-05-21 16:12:45 +02:00
est31 fbc95ae055
Optional reconnect functionality
Enable the server to request the client to reconnect.

This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
2022-05-21 16:12:44 +02:00
sfan5 7a1854f798
Fix crash in mainmenu when loaded subgame does not have a "menu" directory 2022-05-21 16:12:44 +02:00
sfan5 22c20ffd4d
Allow random menu images for subgames 2022-05-21 16:12:43 +02:00
Mark Schreiber 4e8e0fdff1
Add antialiasing UI setting
The Irrlicht engine supports antialiasing, and Minetest already supports
saving an antialiasing setting in its configuration file.  However,
Minetest lacked UI elements to set this setting, and previously the only
way to enable the feature was by hand-editing the configuration file.

Add a drop-down menu that can enable antialiasing.
2022-05-21 16:12:43 +02:00
Marcin e235a42346
Add ability to specify coordinates for /spawnentity 2022-05-21 16:12:42 +02:00
ExcaliburZero b7d559dafe
Change texture pack description file name
Change the name for texture pack description files from "info.txt" to "description.txt" in order to keep the naming consistent between description files for both mods and texture packs.

Also add backwards compatibility for texture packs that use "info.txt", and note in the log that "info.txt" is depreciated.
2022-05-21 16:12:42 +02:00
Jean-Patrick Guerrero f00186f204
Fix remnant bugs on mainmenu
- Stop attempting to start a world when no world's created/selected in server tab
- Better world's indexes handling between subgames lists
2022-05-21 16:12:41 +02:00
RealBadAngel 23e4c70d72
Add new leaves style - simple (glasslike drawtype) 2022-05-21 16:12:41 +02:00
Jean-Patrick Guerrero 5707f97a05
Fix attempt to start a world when no world is selected/created 2022-05-21 16:12:40 +02:00
Sokomine afdd384f40
Set server_announce to world.mt and respect modes when changing subgame 2022-05-21 16:12:40 +02:00
Sokomine 7345adbbb5
Fix world.mt not written when selecting mode 2022-05-21 16:12:39 +02:00
est31 06cedfb052
Fix single click world select 2022-05-21 16:12:39 +02:00
Jean-Patrick Guerrero 2c8a161000
Fix bugs in mainmenu 2022-05-21 16:12:38 +02:00
rubenwardy f17181e748
Add Lua errors to error dialog 2022-05-21 16:12:38 +02:00
est31 d375d875a1
Update credits tab 2022-05-21 16:12:37 +02:00
Wuzzy 4917a66e19
Don't highlight entries in credits 2022-05-21 16:12:37 +02:00
Craig Davison 406b5bf810
Remove reference to deprecated privilege 2022-05-21 16:12:36 +02:00
TeTpaAka 77c2bf43c3
Add minetest.register_on_player_hpchange 2022-05-21 16:12:36 +02:00
HybridDog c1853e2893
More reliable serverlist behaviour
-> remember the previously loaded serverlist, and use if new one failed
-> show a "loading" serverlist
2022-05-21 16:12:35 +02:00
HybridDog 80e032e167
Decrease minetest.after globalstep lag
* abort if theres no active timer
* only reduce the timer.time of all timers when its necessary
* move updating timers_to_add into a seperate function
2022-05-21 16:12:35 +02:00
est31 e648a40cec
Nicer time setting logging
Now logs

ACTION[ServerThread]: player sets time to 6:03

instead of

ACTION[ServerThread]: player sets time to 6:3
2022-05-21 16:12:35 +02:00
est31 fea38f3780
Fix wrong replace from previous commit 2022-05-21 16:12:34 +02:00
est31 1c971d206e
Localize inside whole misc_helpers.lua 2022-05-21 16:12:34 +02:00
ShadowNinja 6afcc26bac
Add core.get_dir_list 2022-05-21 16:12:33 +02:00
LeMagnesium de7cd53f41
Added hour:minute format to time command
* The time command now accepts parameters in the form <hour>:<minute>,
    and if invoked with no parameters returns the current time in said format.
2022-05-21 16:12:33 +02:00
Brandon d564d4d2b8
Add minetest.register_on_punchplayer 2022-05-21 16:12:32 +02:00
tenplus1 e172295337
Don't crash if an item gets dropped into unloaded space
Items dropped into unloaded map space will crash game so here's a fix...
2022-05-21 16:12:32 +02:00
est31 e50a93d25a
Item entity merging refactor
Don't ident too much, and add a comment.
2022-05-21 16:12:32 +02:00
Nathanaël Courant 2f8a628334
Add code to support raillike group names 2022-05-21 16:12:31 +02:00
Tomas Brod c1f7c3a378
Fix minetest.clear_* creating new LOCAL table instead of clearing the existing one.
On calling clear_redistered_biomes the registered_biomes table is cleared
by creating a new empty table, but the pointer is not updated to point to
the new one. So after calling more register_biome, the registered_biome
table always contains 0 items, which is an error. Instead, the table is
cleared by removing all its items so the pointer (minetest.registered_*)
remains valid.
2022-05-21 16:12:31 +02:00
srfqi 75f9ff161a
Remove fly mode in simple main menu
As the fly mode option is avaiable in-game, this is not used anymore.
2022-05-21 16:12:30 +02:00
ShadowNinja 6e61c7d92a
Add minetest.global_exists() 2022-05-21 16:12:30 +02:00
est31 c2dcb45bf8
Add reason to kicked log message and use present tense 2022-05-21 16:12:29 +02:00
Zeno- efeec55ab8
Let main menu scale (non-Android)
This fixes main menu not fitting for 800x600 (and lower resolutions) on PC builds
2022-05-21 16:12:29 +02:00
Zeno- ca83a3ab72
Update credits 2022-05-21 16:12:29 +02:00
Loïc Blot afa56e9c91
Remove duplicate code since 8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a 2022-05-21 16:12:28 +02:00
fz72 3f6d3e066a
Save creative_mode and enable_damage setting for each world in world.mt
Create Parameters on world initialisation and set settings of old worlds
2022-05-21 16:12:28 +02:00
est31 bc5ae25d1a
Android: Fix auto-entry of server address and port in mainmenu
Fixes #2497.
2022-05-21 16:12:27 +02:00
SmallJoker 6d524e3940
Radius parameter for /deleteblocks here 2022-05-21 16:12:27 +02:00
est31 944e67af37
Add /setpassword and /clearpassword logging 2022-05-21 16:12:27 +02:00
ShadowNinja 53f255dbc9
Fix serialization of floating point numbers 2022-05-21 16:12:26 +02:00
Nathanaël Courant b7db67f168
Add modname convention checking
Fixes #2037
2022-05-21 16:12:26 +02:00
est31 5a662882bf
Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist
Client now informs about incompatible servers from the list, this permits to prevent the protocol movements.
Server announces its supported protocol versions to master server
2022-05-21 16:12:25 +02:00
Perttu Ahola 352b5c8a72
Use fixed size for builtin menus on non-android platforms 2022-05-21 16:12:25 +02:00
Loïc Blot b6c7b01e45
Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable) ok @ShadowNinja 2022-05-21 16:12:24 +02:00
fz72 de358b6b55
Fix map_seed not changed when creating a new world after login to another 2022-05-21 16:12:24 +02:00
rubenwardy aabe33eea2
Fix minetest.item_eat's replace_with_item, fixes #2292 2022-05-21 16:12:24 +02:00
Loïc Blot 223b4c09ca
Fix issue #2278, Connection sent before address data loading 2022-05-21 16:12:23 +02:00
est31 1052201620
Fix crash on passing false as value in table to table.copy(t)
Fixes #2293.
2022-05-21 16:12:23 +02:00
ngosang 4bd260afbd
Minor fixes in translations 2022-05-21 16:12:22 +02:00
Rui 04904a1ab8
Fix store.lua bug: default screenshot 2022-05-21 16:12:22 +02:00
Rui 914d344a97
Fix tab_mods.lua: default screenshot patch
https://forum.minetest.net/viewtopic.php?f=6&t=11201
Fixed this bug.
2022-05-21 16:12:22 +02:00
ngosang 10ab4608f8
Fix 'Download complete' dialog in the mods store 2022-05-21 16:12:21 +02:00
kwolekr 201f783d75
Hud: Modify Y-positioning of health/breath starbars to prevent overlapping with Hotbar 2022-05-21 16:12:21 +02:00
rubenwardy bd42a0c92e
Change assignment to global in a function to warning 2022-05-21 16:12:20 +02:00
kwolekr a4bc5e525e
Prevent null concatenation when /deleteblocks is provided an incorrect format 2022-05-21 16:12:20 +02:00
ShadowNinja 32911a2064
Fix imprecise serialization of large numbers 2022-05-21 16:12:19 +02:00
Zeno- 4ff1574c23
Allow filter and mipmap drop down menues to be translated 2022-05-21 16:12:19 +02:00
kwolekr 02fb28a2a9
Reorganize supported video driver query mechanisms 2022-05-21 16:12:19 +02:00
kwolekr a48bf4ad0b
Revert "Fix style on settings tab"
This reverts commit 7b17b9059e30cef384ecca37feec87cdcdfd39b8.
2022-05-21 16:12:18 +02:00
Jean-Patrick Guerrero 75b18a7b37
Fix style on settings tab 2022-05-21 16:12:18 +02:00
kwolekr 5d9c758b13
Simplify deleteblocks chat command argument parsing
Add optional core.pos_to_string decimal place rounding
Move core.string_to_pos to builtin/common/misc_helpers.lua for consistency
2022-05-21 16:12:17 +02:00
kwolekr b18ccd0056
Add ability to delete MapBlocks from map
Also add a Lua API and chatcommand for this
2022-05-21 16:12:17 +02:00
Diego Martínez d6acaced3f
Fix typo in `serialize.lua`. 2022-05-21 16:12:17 +02:00
Jean-Patrick Guerrero b04cd996b9
Add missing return value for filter/mipmap dropdown in mainmenu 2022-05-21 16:12:16 +02:00
Jean-Patrick Guerrero b7c595f5ea
Small tweaking (alignement - client tab) 2022-05-21 16:12:16 +02:00
Jean-Patrick Guerrero 618dd99293
Reorganizing client and server tabs 2022-05-21 16:12:15 +02:00
kwolekr f18dcb6ee8
builtin: Unify register wrapper functions and wrap clear_registered_* functions too 2022-05-21 16:12:15 +02:00
paramat 7e7ae1390b
Remove builtin_biome.lua from builtin and add simple biome minimal 2022-05-21 16:12:14 +02:00
sapier ec52d6dc7a
Remove automatic consistent formspec size <-> font size (now has to be done manually) Set builtin formspecs to autoscale in order to get consistent formspec look and feel Uncouple label positioning from font size (May break some formspecs but is required to allow manual font adjustment) 2022-05-21 16:12:14 +02:00
ShadowNinja 43ee012597
Add registered_ores and registered_decorations 2022-05-21 16:12:14 +02:00
Diego Martínez c2450727a1
Fix off-by-one error in `string:split` implementation. 2022-05-21 16:12:13 +02:00
sapier 4bf651e1b8
Fix forgotten favourite list image update of simple menu 2022-05-21 16:12:13 +02:00
sapier b35dfcaefa
Re-add lost way to debug simple menu on PC 2022-05-21 16:12:12 +02:00
kwolekr e12164adb2
Add core.get_mapgen_names() to Main Menu API (and use it)
Also rewrite mapgen registration for static initialization
2022-05-21 16:12:12 +02:00
kwolekr c06d3f19e4
Expose mapgen parameters on scripting init
Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
2022-05-21 16:12:12 +02:00
Kahrl 5ee1b776ba
Ignore downloaded public serverlist if public_serverlist is false
Fixes #1807: When the server list finishes downloading, the local server
list resets in certain conditions
2022-05-21 16:12:11 +02:00
Diego Martínez a88e2f410b
Faster string.split implementation. 2022-05-21 16:12:11 +02:00
fz72 5d11429074
MainMenu: Save 'hide gamemods' and 'hide modpack contents' checkbox state (fixes #1960) 2022-05-21 16:12:10 +02:00
kwolekr 06d67db3cc
Temporarily set default biome in builtin
This should probably be removed when minetest_game has proper biomes.
If I hear "the whole map is just stone!" again after this, I am going to detonate.
2022-05-21 16:12:10 +02:00
Kahrl a5032d9c3b
Remove vertlabels from main menu and relayout a bit 2022-05-21 16:12:09 +02:00
Kahrl 96b6aa6e4b
Display serverlist flags as icons 2022-05-21 16:12:09 +02:00
Zeno- 64bc547162
Revert "Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly"
This reverts commit 9878e8de4fdf232ebb77b396766c339786c01218.

See: https://github.com/minetest/minetest/issues/1939 and IRC log for discussion
2022-05-21 16:12:09 +02:00
paramat 1adec0e3c5
Fix undeclared globals in functions and shorten lines in misc_helpers.lua. 2022-05-21 16:12:08 +02:00
SmallJoker e98bb3edcc
Ignore .name directories and files
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2022-05-21 16:12:08 +02:00
Kahrl 9806ede6a3
Always escape user provided data in mainmenu fields 2022-05-21 16:12:07 +02:00
SmallJoker 2dba3fd295
Add Lua helper functions vector.apply(v) math.sign(x, tolerance) 2022-05-21 16:12:07 +02:00
Calinou 493521898f
Make dropped items larger and rotate faster
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2022-05-21 16:12:07 +02:00
SmallJoker 7fa045415f
Add minetest.copy_table(table) To get rid off the "table references"
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2022-05-21 16:12:06 +02:00
Craig Davison 8ed639715a
Fix some undeclared global variables 2022-05-21 16:12:06 +02:00
Kodexky 0a6a8ab23b
Fix Android main menu crash, and user data directory check.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2022-05-21 16:12:05 +02:00
dvere 694e0d0781
Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly
According to doc/lua_api.txt if paramtype2 == "facedir" the two least significant bits of parm2 orient the texture around the axis. For dirs1 (looking at a wall) these would be 0, 1, 2, 3 and for dirs2 (looking at the ceiling) 2, 1, 0, 3
2022-05-21 16:12:05 +02:00
ShadowNinja 4bc849b059
Make duplicate warning checks file and line specific 2022-05-21 16:12:04 +02:00
sapier 7b55a9a5cd
Fix console spaming by debug function on mod checking for global variable to exist. 2022-05-21 16:12:04 +02:00
ShadowNinja f57278fe5a
Update credits menu 2022-05-21 16:12:04 +02:00
ShadowNinja 041d9e5417
Simplify loading of Android version of menu 2022-05-21 16:12:03 +02:00
ShadowNinja d92c59d47d
Fix leaking global in texture pack menu 2022-05-21 16:12:03 +02:00
ShadowNinja adf3454250
Add strict module
Also fix leaking globals found by it.
2022-05-21 16:12:02 +02:00
ShadowNinja 5805e555cf
Tweak core.serialize
This adds proper support for nested tables and improves performance a bit.
2022-05-21 16:12:02 +02:00
Wouters Dorian d5b1f42ef1
Improved VoxelArea variable locality, thus performance
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2022-05-21 16:12:02 +02:00
Wuzzy 7999b22a29
Add tooltips to main menu subgames button bar 2022-05-21 16:12:01 +02:00
paramat 00a13badea
Add mgv5. New noise code, uses biome API. Eased 3d noise for terrain, caves, blobs 2022-05-21 16:12:01 +02:00
ShadowNinja d9875f12f2
Fix dump() indentation with non-tab indents 2022-05-21 16:12:00 +02:00
Ryan Newell c8a29cc3b7
Add last_login field to auth.txt
Also shortens some related code and adds more parameters to string.split.
2022-05-21 16:12:00 +02:00
rubenwardy 18473c4ed7
Add notice when only minimal is installed 2022-05-21 16:11:59 +02:00
Kahrl 5d3435cbfa
Change topleft text when switching subgames, fixes #1728 2022-05-21 16:11:59 +02:00
LeMagnesium 2a038ee038
Add a better error message when trying to teleport another player without bring privileges 2022-05-21 16:11:59 +02:00
BlockMen 450048b470
Add optional framed glasslike drawtype 2022-05-21 16:11:58 +02:00
SmallJoker 6fb306753d
Use round if falling node is misplaced
Fixes: http://i.imgur.com/arAWw1i.png (middle-right)
2022-05-21 16:11:58 +02:00
ShadowNinja f32731396b
Make dump's output prettier
Changes:
  * Indentation with tabs by default.
  * Array keys dumped without "[i] = " prefix.
  * String keys that are valid identifiers aren't enclosed in '[""]'.
  * Basic support for multiple references (as specified in the comment).
2022-05-21 16:11:57 +02:00
SmallJoker f445d7a0f3
Fix wrong video_driver setting when changing in mainmenu
Fixes issue with direct3d(8|9)
2022-05-21 16:11:57 +02:00
sapier 266fe0cdf7
Fix retval of entity.get_staticdata beeing lost while profiling is enabled 2022-05-21 16:11:57 +02:00
sapier bc4f8c8979
Add video driver selection to settings menu (based uppon idea from webdesigner97) 2022-05-21 16:11:56 +02:00
Casimir adeb452c4a
Remove buildable_to nodes without dropping item when replaced by a falling node 2022-05-21 16:11:56 +02:00
sapier c98969fa39
Fix caption of config mods button (simple menu) 2022-05-21 16:11:55 +02:00
sapier b92b8a51ce
Mod profiling support
Config settings:
profiling = true/false (gather statistics)
detailed_profiling = true/false (break mod times to callbacks)

Chat commands:
save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
2022-05-21 16:11:55 +02:00
BlockMen 2d346ed082
Fix mainmenu game initialisation 2022-05-21 16:11:54 +02:00
ShadowNinja 3637581db5
Formspec escape fixed seen in world creation menu 2022-05-21 16:11:54 +02:00
sfan5 b0be73b638
Rework texture generating code, add texture grouping via ( ... ) 2022-05-21 16:11:54 +02:00
ShadowNinja 21f38e1fcb
Remove vector assertions
These were initially added to get tracebacks for invalid vector errors, but it
didn't work and tracebacks have since been properly fixed in the core.
2022-05-21 16:11:53 +02:00
Zefram e5c4318f4e
Fix indexing error in timer processing 2022-05-21 16:11:53 +02:00
sapier dd0e0e019f
Add srollbar formspec element 2022-05-21 16:11:52 +02:00
Nathanaël Courant 79490bfcdc
Fix crash reported here: https://forum.minetest.net/viewtopic.php?f=6&t=9726 2022-05-21 16:11:52 +02:00
proller 1dd3ac8929
Remove proller from credits 2022-05-21 16:11:51 +02:00
proller 3250c781d2
Remove indev mapgen 2022-05-21 16:11:51 +02:00
proller 6b0f33e73a
Remove math mapgen 2022-05-21 16:11:51 +02:00
sapier c2ddc480de
Add support for Android 2.3+
There have been plenty of ppl involved in creating this version.
I don't wanna mention names as I'm sure I'd forget someone so I
just tell where help has been done:
- The partial android versions done by various ppl
- Testing on different android devices
- reviewing code (especially the in core changes)
- testing controls
- reviewing texts

A big thank you to everyone helping this to be completed!
2022-05-21 16:11:50 +02:00
sapier 37f07818ca
Fix menu crash due to lack of favourites list 2022-05-21 16:11:50 +02:00
sapier 3fa5f247c2
Support for scalable font and gui elements Fix positioning of tabheader in order to be usable for scaling GUIs WARNING: this changes position of current tabheaders, mods have to adjust! 2022-05-21 16:11:49 +02:00
sapier 40cd31db20
Fix broken serverdescription in multiplayer tab 2022-05-21 16:11:49 +02:00
sapier 4689018071
Fix bounding rect for formspec elements label vertlabel and checkboxes 2022-05-21 16:11:48 +02:00
sapier 5b6f7286a2
Fix regression main_menu_script setting not working any longer 2022-05-21 16:11:48 +02:00
sapier d8335372ca
Fix regression dirt texture not beeing default in non cloud menu 2022-05-21 16:11:48 +02:00
sapier 5ad41abbdd
Add support for exiting formspecs by doubleclicking outside 2022-05-21 16:11:47 +02:00
Lord James d87cb5ab42
New feature: drop a item instead a stack while...
sneaking
2022-05-21 16:11:47 +02:00
sfan5 29bc03cf5c
Allow custom liquids to have drops 2022-05-21 16:11:46 +02:00
RealBadAngel 11fceda9b6
Re-add missing shaders setting. (Generate normalmaps) 2022-05-21 16:11:46 +02:00
ShadowNinja 2fafe8b464
Add success and output return values to chat commands 2022-05-21 16:11:45 +02:00
rubenwardy 68ed7cbe50
Add item eat callback 2022-05-21 16:11:45 +02:00
Diego Martínez 86071c16d0
Sort commands and privs alphabetically in '/help'.
Also make a stray variable local.
2022-05-21 16:11:44 +02:00
ShadowNinja 3164569a22
Rework dumping functions
Changes:
  * Add comments to explain the dumping code
  * Add support for dumping values of any type (as '<' <type> '>')
  * Add support for tables as keys in dump2()
  * Make dump2() return it's result (like dump()) rather than printing it
  * Simplify and optimize function serialization via serialize()
2022-05-21 16:11:44 +02:00
sapier bb671de29d
Fix a bunch of small bugs due to mainmenu cleanup Fix doubleclick not working in singleplayer Fix of by one issue on accessing raw list Fix this->self Fix copy&paste error for scroll button 2022-05-21 16:11:44 +02:00
RealBadAngel 4cd0c9843a
Item entity stacks merge on the ground.
Add TTL to item entities.
2022-05-21 16:11:43 +02:00
sapier b72cf8726e
Fix singleplayer dialogs missing game customization 2022-05-21 16:11:43 +02:00
sapier c2df20263f
Add formspec toolkit and refactor mainmenu to use it Fix crash on using cursor keys in client menu without selected server Add support for non fixed size tabviews 2022-05-21 16:11:42 +02:00
sapier 157d239550
Fix old client showing duplicated health bar on new server Fix client not showing hearts and bubbles on connecting to old server Fix server not remembering hud flags correctly 2022-05-21 16:11:42 +02:00
sapier 026083e1a8
Fix healthbar not beeing hidden on disabled damage 2022-05-21 16:11:41 +02:00
ShadowNinja 37c32c715f
Use "core" namespace internally 2022-05-21 16:11:41 +02:00
ShadowNinja 148b74312e
Organize builtin into subdirectories 2022-05-21 16:11:40 +02:00
sapier 4f1adce2b2
Fix heart + bubble bar size on different texture packs Add DPI support for statbar Move heart+bubble bar to Lua HUD Add statbar size (based upon an idea by blue42u) Add support for customizing breath and statbar 2022-05-21 16:11:40 +02:00
sapier d5afcc908e
Fix usage of deprecated functions in builtin 2022-05-21 16:11:39 +02:00
sapier 1db1cc0a68
Add proper lua api deprecated handling 2022-05-21 16:11:39 +02:00
ShadowNinja 811a1412e9
Add support for function serialization to minetest.serialize 2022-05-21 16:11:38 +02:00
ShadowNinja cc78050568
Remove dependency on marshal and many other async changes
This makes a number of changes:
  * Remove the dependency on marshal by using string.dump and loadstring.
  * Use lua_tolstring rather than having Lua functions pass string lengths to C++.
  * Move lua_api/l_async_events.* to cpp_api/s_async.*, where it belongs.
  * Make AsyncWorkerThread a child of ScriptApiBase, this removes some duplicate functionality.
  * Don't wait for async threads to shut down.  (Is this safe?  Might result in corruption if the thread is writing to a file.)
  * Pop more unused items from the stack
  * Code style fixes
  * Other misc changes
2022-05-21 16:11:38 +02:00
ShadowNinja 87e7000acc
Revert "Add backtrace to error function"
This reverts commit 5b518ed2feff28c9bf21ad940c1b211b72d71bd1.

This caused duplicate tracebacks and tracebacks when unwanted.
It also ignored the level argument to error() and didn't pass the message (or level) to debug.traceback().
Use xpcall() or lua_pcall()'s errorhandler argument instead.
2022-05-21 16:11:38 +02:00
proller 90e3c67beb
Remove liquid_finite and weather 2022-05-21 16:11:37 +02:00
ShadowNinja 0f8b70ca47
Add checks for nil in minetest.after 2022-05-21 16:11:37 +02:00
BlockMen be5374a983
Fix crash when teleporting near unknown node 2022-05-21 16:11:36 +02:00
Nathanaël Courant d583bca3ab
Fix "ghost stacks" created when a player clicks an item on the ground: since the object is not immediately removed, any other code may still think an object is there, therefore leading to item duplication. This code therefore sets the itemstring to '' after the object is picked up to avoid such issues 2022-05-21 16:11:36 +02:00
RealBadAngel 9b967e9d60
Normal maps generation on the fly. Parallax mapping with slope information. Overriding normal maps. 2022-05-21 16:11:35 +02:00
ShadowNinja 614c5f96c3
Fix error when calling minetest.node_punch without a pointed_thing 2022-05-21 16:11:35 +02:00
sapier 742dba559f
Replace pause and message menu by formspec ones 2022-05-21 16:11:34 +02:00
ShadowNinja aea32fa3c1
Remove "Server -!- " prefix from player messages 2022-05-21 16:11:34 +02:00
ShadowNinja a04aed990e
Add the option to bind to a specific address 2022-05-21 16:11:33 +02:00
ShadowNinja 5318fb3a94
Escape texture pack names 2022-05-21 16:11:33 +02:00
sapier 2b1dff8cb7
Add minetest.kick_player(name, reason) 2022-05-21 16:11:33 +02:00
ShadowNinja 98631ce021
Fix error on mod download failure 2022-05-21 16:11:32 +02:00
ShadowNinja f24746cb6d
Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacks 2022-05-21 16:11:32 +02:00
ShadowNinja 3818e6c9b5
Add pointed_thing to minetest.register_on_placenode
As suggested by qwrwed.
2022-05-21 16:11:31 +02:00
PilzAdam 49d8888924
Fix minetest.rotate_and_place() calling on_rightclick() with nil/random param for node 2022-05-21 16:11:31 +02:00
Dániel Varga 58339707b9
Fixed mainmenu lua errors because of changes in get_textlist_index
Fixed lua error when none of the worlds or servers selected are and connect,
delete or configure buttons used.
2022-05-21 16:11:31 +02:00
ShadowNinja 6154aa6365
Fix spelling of "attempt" 2022-05-21 16:11:30 +02:00
ShadowNinja 7e24d1ec9c
Add minetest.override_item 2022-05-21 16:11:30 +02:00
Kahrl c5acb54340
Add formspec table 2022-05-21 16:11:29 +02:00
Nathanaël Courant 56525d21d2
Fix doc and forceloading crash. 2022-05-21 16:11:29 +02:00
Nathanaël Courant 67d99a67be
Add forceloading 2022-05-21 16:11:28 +02:00
Nathanaël Courant 0d4128330e
Deepcopy pointed_thing for after_place_node, give it to on_rightclick too. 2022-05-21 16:11:28 +02:00
ShadowNinja d36ae912e7
Pass pointed_thing to after_place_node 2022-05-21 16:11:28 +02:00
ShadowNinja a9ec22e545
Add protection support to auto-rotated nodes 2022-05-21 16:11:27 +02:00
ShadowNinja 175ab58ef2
Prevent auto-rotated nodes replacing the nodes they are placed on 2022-05-21 16:11:27 +02:00
PilzAdam 2ee07fca1e
Escape error messages in error dialog 2022-05-21 16:11:26 +02:00
Perttu Ahola 7a0b6ae3da
Fix main menu error message dialog: Now multi-line messages aren't cut at half of second line 2022-05-21 16:11:26 +02:00
Ilya Zhuravlev 9e386551a8
Fix absence of images when compiled with RUN_IN_PLACE=0. 2022-05-21 16:11:26 +02:00
Nathanaël Courant a78d69d445
Revert "Fix minetest.facedir_to_dir when param2 is 5 or 7."
This reverts commit 4e5760a5416cbca6945b1b4484cbd96bea7b250c.
2022-05-21 16:11:25 +02:00
Diego Martínez d072d6424d
Add 'on_prejoinplayer' callback 2022-05-21 16:11:25 +02:00
sapier 41deb26bb3
Implement search tab and version picker 2022-05-21 16:11:24 +02:00
ShadowNinja 8c2244886f
Move script_run_callbacks to Lua 2022-05-21 16:11:24 +02:00
ShadowNinja 067f8abc4c
Only create one alias metatable 2022-05-21 16:11:23 +02:00
RealBadAngel 10cff23151
Shaders rework. 2022-05-21 16:11:23 +02:00
0gb.us 41be943528
Assume a selection box for fences
Similar to assuming a selection box for the nodebox drawtype, minetest.register_item() now assumes a selection box for the fencelike drawtype.
2022-05-21 16:11:23 +02:00
kwolekr 9ddac46bd9
Change default value of is_ground_content to true
Most modders would otherwise forget to explicitly define this, and generated nodes aliased from mods would wall-off caves
2022-05-21 16:11:22 +02:00
sapier 4bb6a41c04
Fix modstore/favourites hang by adding asynchronous lua job support 2022-05-21 16:11:22 +02:00
sapier d79c9afa5b
Split server/client port setting to avoid port number clashes in mainmenu 2022-05-21 16:11:21 +02:00
ShadowNinja 150c8bb108
Rollback fixes and get_node_actions 2022-05-21 16:11:21 +02:00
sapier 121b4af913
Temporary disable local install button due to irrlicht dialog breaking localization 2022-05-21 16:11:20 +02:00
Nathanaël Courant 142890c7d8
Fix my name (doesn't display correctly because of utf8 characters) 2022-05-21 16:11:20 +02:00
sfan5 8003c74dc1
Fix rename modpack button not working, fixes #1019 2022-05-21 16:11:20 +02:00
sfan5 0fb659387f
Prevent enabling Shaders if Direct3D is used 2022-05-21 16:11:19 +02:00
ShadowNinja a5613e43c8
Fix usage of 'minetest' where 'engine' was intended 2022-05-21 16:11:19 +02:00
BlockMen 2ec6146212
Fix modmanager screenshot path 2022-05-21 16:11:18 +02:00
kwolekr 674da5f290
Fix issue #1009 (minetest.get_connected_players() returns non-existing players) 2022-05-21 16:11:18 +02:00
PilzAdam 207a6dff9f
Replace print()s with minetest.log() in builtin 2022-05-21 16:11:18 +02:00
sapier 5238e747f4
Fix "TODO read modinfo" in modmanager to improve ui usability 2022-05-21 16:11:17 +02:00
PilzAdam 7219622b7a
Add BlockMen to core dev list 2022-05-21 16:11:17 +02:00
sapier 47e416eab2
Fix game buttons not beeing 48x48 2022-05-21 16:11:16 +02:00
sapier ac7789908a
Fix crash updating gametype without game 2022-05-21 16:11:16 +02:00
4Evergreen4 f85e27a92e
Add wrapper for minetest.rotate_and_place. 2022-05-21 16:11:15 +02:00
whatever ade4d38cdc
Don't assert scalars must be vectors. 2022-05-21 16:11:15 +02:00
Vanessa Dannenberg e3e3597d62
Fix orient_flags to be optional. 2022-05-21 16:11:15 +02:00
Vanessa Dannenberg 5f7e684d94
Add 6d facedir rotation prediction routine 2022-05-21 16:11:14 +02:00
kwolekr 8a862c2591
Add seed entry to world creation dialog 2022-05-21 16:11:14 +02:00
BlockMen 103766d511
Reworked formspecs and kahrl's hexcolor parser 2022-05-21 16:11:13 +02:00
ShadowNinja a78ef8d3a0
Add basic protection support to builtin 2022-05-21 16:11:13 +02:00
Nathanaël Courant f435c5211e
Move the sapling growing and grass adding/removing ABMs to Lua 2022-05-21 16:11:13 +02:00
ShadowNinja 083219e4e3
Add my email address to the main menu credits 2022-05-21 16:11:12 +02:00
ShadowNinja 9cad75342a
Add more checks to vector functions 2022-05-21 16:11:12 +02:00
BlockMen 0092022c14
Don't remove background of games in submenus 2022-05-21 16:11:11 +02:00
0gb.us 07e6b6e8d6
Fixed ignoring of "diggable" property of nodes. 2022-05-21 16:11:11 +02:00
Nathanaël Courant 2f36d25eeb
Add a callback: minetest.register_on_craft(itemstack, player, old_craft_grid, craft_inv) and minetest.register_craft_predict(itemstack, player, old_craft_grid, craft_inv) 2022-05-21 16:11:10 +02:00
ShadowNinja a137bfd011
Made unknown nodes stop falling nodes properly and shorten lines 2022-05-21 16:11:10 +02:00
Nathanaël Courant 9c171de1c7
Move new core devs to the "Core Developpers" section of mainmenu. 2022-05-21 16:11:10 +02:00
ShadowNinja 4f80ec59c0
Add sanity checks to vector functions 2022-05-21 16:11:09 +02:00
ShadowNinja 3a631b4cee
Remove vector metatable setting
This not only makes the vector functions faster, but also makes them more
consistent with other functions.
2022-05-21 16:11:09 +02:00
Nathanaël Courant 179ab675ee
Add tool callback 2022-05-21 16:11:08 +02:00
Nathanaël Courant 8d7e928523
Fix minetest.facedir_to_dir when param2 is 5 or 7. 2022-05-21 16:11:08 +02:00
fairiestoy 1b90a938c9
Optimized minetest.get_connected_players()
Instead of collecting all objects within a huge radius (which could be
a big value), just register each player that connects and give back the
current hold list.
2022-05-21 16:11:08 +02:00
PilzAdam 8319ca0fa4
Allow to manually specify param2 in minetest.item_place() and return success 2022-05-21 16:11:07 +02:00
Kahrl 8cfbc4cd0b
Change mainmenu texture handling + small misc changes
Texture names must now be escaped in formspec elements image[],
background[], image_button[], image_button_exit[].

Instead of special-case handling of texture loading (and unloading
which was missing) in guiFormSpecMenu.cpp, use the newly created
ISimpleTextureSource interface which is a minimal subset of
ITextureSource. There is an implementation of this interface
used by GUIEngine (MenuTextureSource).

Fix an off-by-one bug in unescape_string; it caused requests for a
texture called "\0".
2022-05-21 16:11:07 +02:00
sapier e666842219
Fix bug: texture pack not overriding default menu textures 2022-05-21 16:11:06 +02:00
PilzAdam 4b683f9296
Use engine.is_yes() in mainmenu 2022-05-21 16:11:06 +02:00
PilzAdam af38ec53d8
Use the Settings Lua interface to read world.mt 2022-05-21 16:11:05 +02:00
sfan5 e459fb8b81
Prevent ModMgr from deleting backend setting in world.mt 2022-05-21 16:11:05 +02:00
sapier af89f4a900
Add sanity check to sort function 2022-05-21 16:11:05 +02:00
sapier 019f1b3fd6
Add backtrace to error function 2022-05-21 16:11:04 +02:00
Ilya Zhuravlev 84615ffdd5
Add escaping to world list in main menu (fixes #896). 2022-05-21 16:11:04 +02:00
Kahrl ec8e09a1f9
World config dialog: Use engine determined path for game mods 2022-05-21 16:11:03 +02:00
Kahrl 2eb584e221
GUIFormSpecMenu focus fixes 2022-05-21 16:11:03 +02:00
Kahrl 73a3347a85
Fix trailing nils being dropped by deprecated minetest.env handler 2022-05-21 16:11:03 +02:00
sapier 243ff49bf2
Add translation for main menu Add engine.gettext() and remove gettext() calls in guiFormspecMenu.cpp 2022-05-21 16:11:02 +02:00
Nathanaël Courant e9cadb712e
Fix modstore pagecount 2022-05-21 16:11:02 +02:00
Nathanaël Courant 41463d3871
Use get_texturepath() instead of get_gamepath()/../textures 2022-05-21 16:11:01 +02:00
PilzAdam 9529de9b53
Sort modlist alphabetically 2022-05-21 16:11:01 +02:00
PilzAdam e95f47a818
Add ability to activate mods with doubleclick (remove old_style_mod_selection) 2022-05-21 16:11:00 +02:00
Nathanaël Courant 4f2c21b25d
Fix formspec escaping, add escaping to info.txt for texture packs. 2022-05-21 16:11:00 +02:00
Kahrl 88e3c9e930
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2022-05-21 16:11:00 +02:00
Ilya Zhuravlev 4ce777f98d
Fix my name. 2022-05-21 16:10:59 +02:00
PilzAdam 65d6cb2aa3
Dont download modstore info if its isnt needed 2022-05-21 16:10:59 +02:00
Nathanaël Courant 130ebcb5e6
Simplify code of mainmenu world sort 2022-05-21 16:10:58 +02:00
BlockMen e113e3d1dd
Add support for different drowning damage and allow drowning in other nodetypes 2022-05-21 16:10:58 +02:00
PilzAdam e142c50d59
Fix worldlist in servertab being filtered by selected game 2022-05-21 16:10:58 +02:00
Nathanaël Courant 063036dfd0
Add minetest.registered_biomes 2022-05-21 16:10:57 +02:00
PilzAdam 45babc32a3
Dont show gamefilter in TP tab 2022-05-21 16:10:57 +02:00
Nathanaël Courant ab5646888b
Add texture pack selection to main menu 2022-05-21 16:10:56 +02:00
Perttu Ahola a69aed8dea
Allow mods to listen to cheat detections using minetest.register_on_cheat() 2022-05-21 16:10:56 +02:00
PilzAdam 7f3cd9bacc
Play sounds/main_menu.ogg in menu 2022-05-21 16:10:55 +02:00
proller 1b052ca0e3
Better snow fall, finite liquid transform, leveled nodes api 2022-05-21 16:10:55 +02:00
proller 68eb740730
Weather support 2022-05-21 16:10:55 +02:00
sapier f177a87516
Show portnumber for ip adresses only 2022-05-21 16:10:54 +02:00
hdastwb 05ee748813
added (optional) support for 6d facedir in dir_to_facedir and added facedir_to_dir 2022-05-21 16:10:54 +02:00
sapier 52a6e2c483
Fix enable mod/enable button not shown on entering world config dialog 2022-05-21 16:10:53 +02:00
sapier 559cda3eff
Fix bug in world creation Add old style mod selection in worldconfig dialog 2022-05-21 16:10:53 +02:00
sapier 277d85063e
Add missing header/footer for singleplayer tab 2022-05-21 16:10:52 +02:00
sapier 453cdb6d13
Remove debug output 2022-05-21 16:10:52 +02:00
sapier 4cec612448
Fix Bug in modname guessing resulting in undefined modname 2022-05-21 16:10:52 +02:00
sapier 1d24485ee9
merge mainmenu_helper.lua to misc_helpers.lua 2022-05-21 16:10:51 +02:00
sapier ed6ecbaa29
Fix background/overlay/footer/header handling Add missing file headers 2022-05-21 16:10:51 +02:00
sapier 6f906b4b81
Add playernumber to favorites list 2022-05-21 16:10:50 +02:00
sapier 625443d3da
filterlist api cleanup 2022-05-21 16:10:50 +02:00
sapier b55441026c
Add port to favorites if not 30000 Major modmgr overhaul Add missing formspec checkbox doc 2022-05-21 16:10:50 +02:00
sapier 47388da94f
Replace worldlist by generic filterlist implementation 2022-05-21 16:10:49 +02:00
sapier d0930da047
Add support for modstore screenshots Add error output on invalid mmdb entries 2022-05-21 16:10:49 +02:00
sapier beffeef6c9
Swap name/password <-> server description 2022-05-21 16:10:48 +02:00
sapier 04af68e39e
Revert "Fix serverdescription and name not beeing saved to local serverlist"
This reverts commit 7dbbbfc665e285cc9eb9d750c3a449d7da178d4f.
(was added twice)
2022-05-21 16:10:48 +02:00
sapier 9f84e7fa1b
Remove unused required by list in worldconfig 2022-05-21 16:10:47 +02:00
PilzAdam b3262b84fd
Add an option to disable object <-> object collision for Lua entities 2022-05-21 16:10:47 +02:00
sapier b4d6ffd39c
Don't show flags in local favorites 2022-05-21 16:10:47 +02:00
sapier 652fcba2a0
Fix bug server name set to address field when using up/down keys Show server description above connect button instead of in favorites list 2022-05-21 16:10:46 +02:00
sapier c7974fc6fd
Add missing server flags in public serverlist 2022-05-21 16:10:46 +02:00
sapier 14ee46e7cf
Remove lots of debug output from modmgr Fix RUN_IN_PLACE=0 mod install (now mods are saved in user folder in that case) Fix text of field element not unescaped correctly 2022-05-21 16:10:45 +02:00
sapier afba78a47f
Fix serverdescription and name not beeing saved to local serverlist 2022-05-21 16:10:45 +02:00
Kahrl cc9155334d
Add VoxelArea:position, VoxelArea:iter and VoxelArea:iterp 2022-05-21 16:10:44 +02:00
sapier 046dcff30e
Worldlist fixes Add alphabeticaly sorted worldlists Select world after creation Move worldlist handling to separate file Merge world selection of singleplayer/server tab Remove some useless code 2022-05-21 16:10:44 +02:00
sapier 0e66db8f95
Fix serverlist 2022-05-21 16:10:44 +02:00
proller 47d555563a
Public server checkbox 2022-05-21 16:10:43 +02:00
kwolekr 97c03436f6
Revert "Fix serverlist not beeing escaped correctly"
This reverts commit 39d03148e5d98ef5f9a31b131a79ff2bbd71a877.
2022-05-21 16:10:43 +02:00
sapier 6a3d716bf7
Fix header not beeing shown except on singleplayer tab 2022-05-21 16:10:42 +02:00
sapier 32cf551e9d
Fix serverlist not beeing escaped correctly Always use address for server Fix first (empty) element beeing selected after deleting last world 2022-05-21 16:10:42 +02:00
sapier c82ccfcf2d
fix crash on play/start with empty world list make enter button work in create world dialog 2022-05-21 16:10:41 +02:00
PilzAdam 65702a45bb
Make sure that coordinates passed to /teleport are actual numbers 2022-05-21 16:10:41 +02:00
ShadowNinja 0d12f10568
Move math.hypot() to misc_helpers.lua and fix zero-division error 2022-05-21 16:10:41 +02:00
kwolekr 356c2b5def
Lua main menu: Fix world creation dialog 2022-05-21 16:10:40 +02:00
PilzAdam 08d7219736
Set numeric locale in Lua in main menu 2022-05-21 16:10:40 +02:00
sapier 8b89cf28fa
Fix many formspec menu bugs 2022-05-21 16:10:39 +02:00
sfan5 7ecd865028
Fix parseColor, change remaining colorkeys to new format, fix Contributor list 2022-05-21 16:10:39 +02:00
ShadowNinja c95567ac55
Handle 0 vectors in vector.normalize() 2022-05-21 16:10:39 +02:00
ShadowNinja b8071a74f1
Add vector helpers 2022-05-21 16:10:38 +02:00
sfan5 5d8ea4dc07
Use hexadecimal RRGGBB instead of colorkeys, rename getColor to parseColor 2022-05-21 16:10:38 +02:00
kwolekr 5864868a03
Lua main menu: Fix crash on init lua error, mapgen dropdown index, and new worlds not saving index 2022-05-21 16:10:37 +02:00
sapier eb5a9131cc
Replace C++ mainmenu by formspec powered one 2022-05-21 16:10:37 +02:00
PilzAdam 3cb4de50b5
Remove unnecessary debug output in node_dig() 2022-05-21 16:10:36 +02:00
Lord James e4f0c69a53
Infinite tools in creative mode 2022-05-21 16:10:36 +02:00
kwolekr c982b18d74
Add Lua VoxelArea methods: contains, containsp, containsi 2022-05-21 16:10:36 +02:00
kwolekr 1c7092eee6
Add voxelarea.lua helper to builtin 2022-05-21 16:10:35 +02:00
kwolekr 1a2db073d5
Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2022-05-21 16:10:35 +02:00
Diego Martínez 93b7336c01
Restore old output format of dump() 2022-05-21 16:10:34 +02:00
khonkhortisan 99f845852a
Fix crash in dump() when index is a table 2022-05-21 16:10:34 +02:00
sapier 85ae766dcb
Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2022-05-21 16:10:34 +02:00
PilzAdam db27434100
Fix minetest.features 2022-05-21 16:10:33 +02:00
sfan5 eba3824cb4
Add a Way of checking for specific Feature with Lua Adds minetest.get_feature() and minetest.has_feature() 2022-05-21 16:10:33 +02:00
ShadowNinja 98bf5d2d81
Add option to not prepend "Server -!- " to messages sent with minetest.chat_send_player() 2022-05-21 16:10:32 +02:00
RealBadAngel c1cbc596e4
Use system wide LuaJIT if aviable. 2022-05-21 16:10:32 +02:00
PilzAdam dda94512be
Only enqueue falling nodes if they really want to fall 2022-05-21 16:10:31 +02:00
khonkhortisan 93ce8191b1
unkn own block -> unkn own node 2022-05-21 16:10:31 +02:00
ShadowNinja 308902af73
Add private messaging with /msg 2022-05-21 16:10:31 +02:00
Diego Martínez 6dfa35ea48
Use the nodebox as selection box if it's not set manually 2022-05-21 16:10:30 +02:00
PilzAdam de38f0be50
Add a delay to nodeupdate() 2022-05-21 16:10:30 +02:00
PilzAdam b3bbf4a068
Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it 2022-05-21 16:10:29 +02:00
0gb.us 11f86d1def
Don't grant priveleges to non-existent players.
When accidentally misspelling a name, privileges are sometimes granted to non-existent players, leaving them with the extra privileges, but without the default privileges, if they ever join the server. This corrects that by disallowing /grant from working with invalid players. For completeness, it does the same for /revoke.
2022-05-21 16:10:29 +02:00
0gb.us 1c5c5dde8e
Fix node replacement in not-quite-loaded chunks
When first entering an area, sometimes placing nodes replaces other nodes that are not buildable_to. This seems to be caused by the fact that nodes in unloaded map blocks are treated as ignore, a node that is buildable_to. This fixes that, by using get_node_or_nil() instead of the previously-used get_node(), then checking to see if the nodes were actually loaded before replacing.
2022-05-21 16:10:29 +02:00
Splizard 8bddbb6381
Allow falling nodes to pass through solid "buildable_to" nodes. 2022-05-21 16:10:28 +02:00
PilzAdam b573ff1e73
Prevent passing nil to unpack() in minetest.after 2022-05-21 16:10:28 +02:00
Jeija c9a7b492b5
Allow minetest.after to take a variable number of arguments 2022-05-21 16:10:27 +02:00
kwolekr cf03131c13
Allow any character in formspec strings with escape char 2022-05-21 16:10:27 +02:00
PilzAdam dc253e3127
Fix pickup of dropped items when the player only takes a part of them 2022-05-21 16:10:26 +02:00
PilzAdam 21830e51a8
Drop nodes as items when dugged and no room in inventory and dont remove dropped items when no room in inventory 2022-05-21 16:10:26 +02:00
PilzAdam 5b6085743e
Dont drop tools on rightclick 2022-05-21 16:10:26 +02:00
Ilya Zhuravlev 577381e132
Set numeric locale for Lua 2022-05-21 16:10:25 +02:00
PilzAdam b611857ef5
Fix minetest.item_place_node() and minetest.item_drop() to always return an ItemStack 2022-05-21 16:10:25 +02:00
RealBadAngel eb7274214f
Fix to on_rightclick not able to change wielded_item 2022-05-21 16:10:24 +02:00
PilzAdam 049b8638c1
Dont call on_rightclick() if sneak is pressed 2022-05-21 16:10:24 +02:00
PilzAdam 279833455c
Fix spread of items in falling code 2022-05-21 16:10:24 +02:00
PilzAdam 42e67c79c1
Add on_rightclick(pos, node, clicker) callback for nodes 2022-05-21 16:10:23 +02:00
PilzAdam f264cf9833
Add ability to change the itemstack in placenode callbacks 2022-05-21 16:10:23 +02:00
jordan4ibanez 3fe947a986
Fix item entity's collision with nodeboxes 2022-05-21 16:10:22 +02:00
PilzAdam f8946b1dc0
Only fly through walls in noclip mode wich requires the noclip privilege 2022-05-21 16:10:22 +02:00
Ilya Zhuravlev f834e7cbad
Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s). 2022-05-21 16:10:21 +02:00
PilzAdam ee0d38b5a6
Only check attachment for nodes with group attached_node 2022-05-21 16:10:21 +02:00
PilzAdam fd6ec68aab
Add the group attached_node Nodes in this group will be dropped as items if the node under them or the node in the wallmounted direction is not walkable. 2022-05-21 16:10:21 +02:00
DannyDark 0fabe42737
Log /grant and /revoke command usage 2022-05-21 16:10:20 +02:00
Matthew I f171cb855f
Add shutdown hook interface to Lua API
Scripts can call minetest.register_on_shutdown() to register a
shutdown hook.

Document that minetest.register_on_shutdown() callbacks may not be run

If the server crashes, it is unlikely that callbacks registered using
minetest.register_on_shutdown() will be called.
2022-05-21 16:10:20 +02:00
Perttu Ahola 2d07416f38
Revert "Use wielditem drawtype for all nodes in item_entity"
This reverts commit ffad18e42442fed10c312adc989fc62b74e05896.
2022-05-21 16:10:19 +02:00
PilzAdam 6417609dec
Use wielditem drawtype for all nodes in item_entity 2022-05-21 16:10:19 +02:00
Anthony a0f937099e
Fix server crash on /clearpassword
According to #253, using `/clearpassword` without an argument causes the server to crash from an assertion failure. I've resubmitted matttpt's patch as a pull request to aid in merging.
2022-05-21 16:10:19 +02:00
PilzAdam b646e953b6
Make air and ignore drop nothing 2022-05-21 16:07:53 +02:00
PilzAdam ff098bc4bb
Fix a bug in falling code where entities get stuck 2022-05-21 16:07:53 +02:00
PilzAdam 4742943383
Remove a useless comment 2022-05-21 16:07:52 +02:00
PilzAdam 0f873a3beb
Move falling to builtin 2022-05-21 16:07:52 +02:00
Perttu Ahola 7d6ff32d8c
Statically store always_collect field of __builtin:item 2022-05-21 16:07:51 +02:00
Perttu Ahola 38506bfbe6
Add overridable function for handling dropped items from nodes 2022-05-21 16:07:51 +02:00
Perttu Ahola fb96b0f99e
Fix github issue #213: Dropping unknown items crashes the game
The items will now just disappear when dropped.
2022-05-21 16:07:50 +02:00
Matthew I a70919257c
Move chat commands to Lua and remove servercommand.{cpp,h}
Commands moved:
 /me
 /status
 /time
 /shutdown
 /ban
 /clearobjects
2022-05-21 16:07:50 +02:00
Matthew I 3b4219b79f
Allow digging of unknown nodes
This allows the removal of nodes with unknown types.
get_item_callback() (C++) would fail if a node has an unknown type.  Now it
will try using the callback from minetest.nodedef_default in this case.
Also, minetest.node_dig() (Lua) was altered to always allow digging when
the node definition is empty (i.e. unknown node).
2022-05-21 16:07:50 +02:00
Perttu Ahola 02416dc628
Make the rollback system VERY FUCKING GOD DAMN POWERFUL 2022-05-21 16:07:49 +02:00
Perttu Ahola ebe1842d0b
Don't track liquids for rollback because of too much log 2022-05-21 16:07:49 +02:00
Perttu Ahola 5fbf87d54d
Experimental-ish rollback functionality 2022-05-21 16:07:48 +02:00
Perttu Ahola 2df90c2bf0
Deprecate minetest.add_to_creative_inventory and use group not_in_creative_inventory instead 2022-05-21 16:07:48 +02:00
Perttu Ahola e6ec4258db
Remove special handling of creative mode 2022-05-21 16:07:47 +02:00
Perttu Ahola a87451a0fe
Detached inventory callbacks and reworked node metadata callbacks 2022-05-21 16:07:47 +02:00
Perttu Ahola 47a9ab6fb0
builtin/item.lua: callbacks with copies of positions and nodes rather than recycle the same ones, which callbacks can modify 2022-05-21 16:07:46 +02:00
Perttu Ahola eb9b1ffc15
Add oldnode parameter to minetest.register_on_placenode callback 2022-05-21 16:07:46 +02:00
Perttu Ahola ea97707ef2
Fix building on top of (pointable && buildable_to) nodes 2022-05-21 16:07:45 +02:00
Perttu Ahola 66a549d9ea
Move /give, /giveme, /spawnentity and /pulverize to builtin/chatcommands.lua 2022-05-21 16:07:44 +02:00
Perttu Ahola dbaef1b2c6
minetest.register_on_player_receive_fields() 2022-05-21 16:07:43 +02:00
Matthew I 9a002ec0b7
Add "/mods" command to list mods to client 2022-05-21 16:07:43 +02:00
Perttu Ahola db3d37aaa8
Actually fix facedir-rotated nodes placed using minetest.env:place_node() 2022-05-21 16:07:42 +02:00
Perttu Ahola 05b928da0a
Check whether node is known before reading definition in __builtin:item:on_step() 2022-05-21 16:07:42 +02:00
Calinou 64a2c71b95
Message cleanups (consistency) and prevent /me when not allowed to shout 2022-05-21 16:07:41 +02:00
darkrose af6f80ba63
Handle nil placer as it might occur when using minetest.env:place_node. (Uberi) 2022-05-21 16:07:41 +02:00
Perttu Ahola 299ce58169
Fix /setpassword and /clearpassword 2022-05-21 16:07:41 +02:00
Perttu Ahola a8b475d195
Remove tiles and special_tiles from node definition prototype because otherwise the old names can't be used 2022-05-21 16:07:40 +02:00
Perttu Ahola 7f37a08eba
Update field names to non-deprecated ones in node definition prototype 2022-05-21 16:07:40 +02:00
Perttu Ahola 15213d8768
Node placement client-side prediction 2022-05-21 16:07:39 +02:00
Perttu Ahola 70b13374d6
Don't deprecate minetest.register_on_placenode and minetest.register_on_dignode 2022-05-21 16:07:39 +02:00
Perttu Ahola 361a4d575c
Add minetest.serialize() and minetest.deserialize() 2022-05-21 16:07:38 +02:00
Perttu Ahola 3519373773
place_node, dig_node and punch_node; an in-game tester tool; remove old code 2022-05-21 16:07:38 +02:00
darkrose 28d4194f24
Add can_dig callback 2022-05-21 16:07:38 +02:00
Perttu Ahola 7b4cdba449
Add ObjRef:is_player() and modify ObjRef:get_player_name() to always return a string to aid better inter-object compatibility of code that assumes objects to be players 2022-05-21 16:07:37 +02:00
Perttu Ahola 157b198e0f
Implement locked chest; add after_place_node and after_dig_node node callbacks 2022-05-21 16:07:37 +02:00
Perttu Ahola c8727f8c5a
on_metadata_inventory_{move,offer,take} 2022-05-21 16:07:36 +02:00
Perttu Ahola 1656cbdaa2
Random node metadata things 2022-05-21 16:07:36 +02:00
Perttu Ahola 1bd4c6b208
Attempt to begin to implement chests and furnace in Lua (with problems) 2022-05-21 16:07:35 +02:00
Perttu Ahola 235ac5dae5
Take out the "Privileges of foo are hidden from you." response of /privs 2022-05-21 16:07:34 +02:00
Perttu Ahola e50d7926d6
Fix executing register_chatcommand-defined commands even in the middle of a chat line 2022-05-21 16:07:33 +02:00
Perttu Ahola e7654568ed
basic_privs to allow granting/revoking interact_extra too 2022-05-21 16:07:33 +02:00
Perttu Ahola 2f0ed0382e
Support static_spawnpoint setting 2022-05-21 16:07:32 +02:00
Perttu Ahola 596cd078dd
Allow redefining minetest.item_place and the like 2022-05-21 16:07:32 +02:00
Perttu Ahola 3f3c06761a
Add basic_privs privilege 2022-05-21 16:07:32 +02:00
Perttu Ahola 3a248a56d3
Improve doc/lua_api.txt and add minetest.get_item_group(name, group) 2022-05-21 16:07:31 +02:00
Perttu Ahola 5c484429fe
Fix unable to join server first time with a password 2022-05-21 16:07:31 +02:00
Perttu Ahola ed35ccceb4
minetest.get_node_group(name, group) 2022-05-21 16:07:30 +02:00
Perttu Ahola 7d9d0bc397
Fix super-small size of regular item entities 2022-05-21 16:07:30 +02:00
Perttu Ahola 8e7ebf59d9
Fix dropped nodeitem visuals 2022-05-21 16:07:29 +02:00
Perttu Ahola 3b5d2c97d5
Implement dropped items as LuaEntities; leave the old ones as is for compatibility 2022-05-21 16:07:29 +02:00
Perttu Ahola e0acbf54dd
Remplement and improve /setting in Lua, now called /set 2022-05-21 16:07:29 +02:00
Perttu Ahola aefc412901
Don't allow /granting unknown privileges 2022-05-21 16:07:28 +02:00
Perttu Ahola 397bd5fc83
Split builtin.lua to multiple files 2022-05-21 16:07:28 +02:00
Perttu Ahola 6cd6c4c224
granting and revoking of all privileges at once 2022-05-21 16:07:27 +02:00
Perttu Ahola b54f7b1d3f
Fix authentication handler reporting failed password change while it isn't 2022-05-21 16:07:27 +02:00
Perttu Ahola bee8b5b5c9
Improve /grant and /revoke output, add /auth_reload 2022-05-21 16:07:26 +02:00
Perttu Ahola 79b596716f
Add 'fly' and 'fast' privileges and the underlying privileges-to-client system 2022-05-21 16:07:26 +02:00
Perttu Ahola b09dbe99c7
More documentation in doc/lua_api.txt 2022-05-21 16:07:26 +02:00
Perttu Ahola bcbfcfeb13
Allow group:groupname in ABM definition and implement minetest.hash_node_position() 2022-05-21 16:07:25 +02:00
Perttu Ahola f09a3a427e
Fix handling of missing auth.txt in the new handler 2022-05-21 16:07:25 +02:00
Perttu Ahola def7434226
Fix admin password handling in minetest.builtin_auth_handler.get_auth 2022-05-21 16:07:24 +02:00
Perttu Ahola 53ad7f2719
Improved teleport command 2022-05-21 16:07:24 +02:00
Perttu Ahola 79413a0d4e
Reimplement authentication handler in Lua; now we have 1) infinite privilege names, 2) minetest.register_authentication_handler() 2022-05-21 16:07:23 +02:00
Perttu Ahola 9045011c10
Add minetest.get_connected_players() 2022-05-21 16:07:23 +02:00
Perttu Ahola 54cc862b37
minetest.register_chatcommand(cmd, def) 2022-05-21 16:07:23 +02:00
Kahrl 0f0dec675b
on_joinplayer + on_leaveplayer + scriptapi_run_callbacks + bugfix
Add minetest.register_on_joinplayer and minetest.register_on_leaveplayer,
make adding new callbacks to scriptapi.cpp easier by adding
scriptapi_run_callbacks, also fix a minor bug with PlayerSAO <->
singleplayer mode interaction
2022-05-21 16:07:22 +02:00
Perttu Ahola 11a58333a1
Fix and extend minetest.after(time, func, param) 2022-05-21 16:07:22 +02:00
Perttu Ahola 71ea13a924
Add minetest.after(time, func) 2022-05-21 16:07:21 +02:00
Perttu Ahola 7db4d9d77e
Flatten share/ and user/ in the source and for the RUN_IN_PLACE build 2022-05-21 16:07:21 +02:00