1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-03 00:20:21 +02:00
Commit Graph

1152 Commits

Author SHA1 Message Date
4c8c649779 Mainmenu game-related changes (#11887)
fixes:
* Switching between games does not immediately hide creative mode / damage buttons if so specified
* World creation menu has a game selection list even though the menu already provides a gamebar
* Showing gameid in world list is unnecessary
* Choice of mapgen parameters in menu persists between games (and was half-broken)
2022-01-09 21:15:35 +01:00
5eb45e1ea0 Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
2022-01-09 18:46:36 +01:00
bf22569019 Use a database for mod storage (#11763) 2022-01-07 20:28:49 +02:00
b81948a14c Fix damage wraparound if very high damage (#11872) 2022-01-06 21:16:35 +01:00
b2409b14d0 Refactor trusted mod checking code 2021-12-18 20:37:13 +01:00
f405459548 Remove setlocal and setupvalue from debug table whitelist
It's likely that these could be used trick mods into revealing the insecure
environment even if they do everything right (which is already hard enough).
2021-12-18 20:37:13 +01:00
8c99f2232b Don't let HTTP API pass through untrusted function
This has been a problem since the first day, oops.
2021-12-18 20:37:13 +01:00
8472141b79 Restructure devtest's unittests and run them in CI (#11859) 2021-12-18 20:36:43 +01:00
413be76c63 Implemented disconnect_player (#10492)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-26 19:19:40 +00:00
87ab97da2a Fix find_nodes_in_area misbehaving with out-of-map coordinates (#11770)
This ensures that no overflows (side-effects) happen within the find_nodes_in_area function by limiting coordinates like done in the map generation code.
2021-11-26 19:32:41 +01:00
b9051386ae Add Lua bitop library (#9847) 2021-11-26 19:31:05 +01:00
cbf658f83d Lua API: Add rmdir, cpdir and mvdir (#9638)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-10 19:10:20 +01:00
6910c8d920 Fix number of tool uses being off by 1..32767 (#11110) 2021-10-31 22:33:33 +00:00
660e63dbae Fix item duplication if player dies during interact callback (alternative) (#11662) 2021-10-25 20:30:27 +02:00
ecc6f4ba25 Remove a few unused functions reported by callcatcher (#11658) 2021-10-12 20:12:20 +02:00
6de8d77e17 Move instead of copy during content install if possible 2021-10-07 00:20:01 +02:00
2b5075f0e2 Move archive extraction in content store to async job 2021-10-07 00:20:01 +02:00
2d5b7b5fb4 Make fs::extractZipFile thread-safe 2021-10-07 00:20:01 +02:00
9fab5d594c Add "MINETEST_MOD_PATH" environment variable (#11515)
This adds an environment variable MINETEST_MOD_PATH.
When it exists, Minetest will look there for mods in addition to ~/.minetest/mods/.
2021-10-07 00:19:41 +02:00
bc71622d21 Fix crash when calling remove/kick/ban_player on start (#11672) 2021-10-05 21:53:47 +02:00
5aa95fef10 Make MetaDataRef:get return nil instead of nothing (#11666) 2021-10-05 15:38:33 +03:00
4fca601e0c Add get_server_max_lag() (#11671) 2021-10-05 15:35:55 +03:00
21113ad410 Split liquid_viscosity to liquid_viscosity and move_resistance (#10810) 2021-10-01 16:21:24 +02:00
e0529da5c8 Fix trivial typos 2021-09-19 13:54:20 +02:00
75bf9b75ca Make sure relevant std::stringstreams are set to binary 2021-09-11 21:06:57 +02:00
766e885a1b Clean up/improve some scriptapi error handling code 2021-09-10 23:16:46 +02:00
bbfae0cc67 Dynamic_Add_Media v2 (#11550) 2021-09-09 16:51:35 +02:00
6a1424f2b1 Async-related script cleanups 2021-08-28 12:15:12 +02:00
3f1adb49ae Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
1d69a23ba4 Joystick sensitivity for player movement (#11262)
This commit deprecates the forward, backward, left, and right binary
inputs currently used for player movement in the PlayerControl struct.
In their place, it adds the movement_speed and movement_direction
values, which represents the player movement is a polar coordinate
system.

movement_speed is a scalar from 0.0 to 1.0. movement_direction is
an angle from 0 to +-Pi:

	       FWD
	        0
	        _
	 LFT   / \   RGT
	-Pi/2 |   | +Pi/2
	       \_/
	       +-Pi
	       BCK

Boolean movement bits will still be set for server telegrams and
Lua script invocations to provide full backward compatibility.
When generating these values from an analog input, a direction is
considered active when it is 22.5 degrees away from either
orthogonal axis.

Co-authored-by: Markus Koch <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
2021-08-27 20:24:24 +02:00
0c1e9603db HUD: Reject and warn on invalid stat types (#11548)
This comes into play on older servers which do not know the "stat" type.
Warnings are only logged once to avoid spam within globalstep callbacks
2021-08-21 20:04:04 +02:00
e7b05beb7d Validate staticdata and object property length limits (#11511)
Some games provide users with enough freedom to create items
with metadata longer than 64KB, preventing this from causing
issues is on them but we'll still do the minimum not to abort
the server if this happens.
2021-08-19 20:14:22 +02:00
80d12dbedb Add a simple PNG image encoder with Lua API (#11485)
* Add a simple PNG image encoder with Lua API
Add ColorSpec to RGBA converter
Make a safety wrapper for the encoder
Create devtest examples

Co-authored-by: hecktest <>
Co-authored-by: sfan5 <sfan5@live.de>
2021-07-29 05:10:10 +02:00
6e8aebf432 Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
1d25d1f7ad Refactor video driver name retrieval (#11413)
Co-authored-by: hecktest <>
2021-07-11 09:50:34 +02:00
52128ae11e Add API for mods to hook liquid transformation events (#11405)
Add API for mods to hook liquid transformation events

Without this API, there is no reliable way for mods to be
notified when liquid transform modifies nodes and mods are
forced to poll for changes.  This allows mods to detect
changes to flowing liquid nodes and liquid renewal using
event-driven logic.
2021-07-09 09:08:40 -04:00
062fd2190e Auth API: Error when accessed prior to ServerEnv init (#11398) 2021-06-30 20:42:26 +02:00
f2fd443262 Inventory: Make addList() consistent (#11382)
Fixes list clearing for inv:set_list() using same size, since 2db6b07.
addList() now clears the list in all cases. Use setSize() to resize without clearing.
2021-06-30 20:39:38 +02:00
2db6b07de1 Inventory: show error on invalid list names (#11368) 2021-06-20 17:21:50 +02:00
b10091be9b Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)
This check can be used by ABM to reduce CPU usage.
2021-06-20 17:21:35 +02:00
edf098db63 Drop --videomodes, fullscreen_bpp and high_precision_fpu settings
These have been pointless for a while.
2021-06-16 17:41:34 +02:00
DS
8f085e02a1 Add metatables to lua vectors (#11039)
Add backwards-compatible metatable functions for vectors.
2021-06-04 21:22:33 +02:00
c9144ae5e2 Add core.compare_block_status function (#11247)
Makes it possible to check the status of the mapblock in a future-extensible way.
2021-05-30 20:24:12 +02:00
a0047d6edc script: Replace calls to depreated luaL_openlib 2021-05-30 11:40:14 +02:00
b56a028d6b Fix curl_timeout being ignored for Lua HTTP fetches 2021-05-17 17:12:30 +02:00
225d4541ff fix: extractZipFile is not part of Client but more generic.
This solve a crash from mainmenu while extracting the zip
2021-05-06 16:01:52 +02:00
de85bc9227 fix: some code tidy about includes & irr namespaces 2021-05-03 19:49:19 +02:00
48d5abd5be refacto: remove get_gui_env & draw_load_screen from RenderingEngine singleton 2021-05-03 19:49:19 +02:00
ccdd886e27 refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
2021-05-03 19:49:19 +02:00
258101a910 refacto: RenderingEngine is now better hidden
* No more access to the singleton instance from everywhere (RenderingEngine::get_instance dropped)
* RenderingEngine::get_timer_time is now non static
* RenderingEngine::draw_menu_scene is now non static
* RenderingEngine::draw_scene is now non static
* RenderingEngine::{initialize,finalize} are now non static
* RenderingEngine::run is now non static
* RenderingEngine::getWindowSize now have a static helper. It was mandatory to hide the global get_instance access
2021-05-03 19:49:19 +02:00