sfan5
ba6fbc417e
Remove awful Mingw32 workarounds
...
Instead a warning is triggered if an affected compiler is detected.
closes #12022
2022-02-08 19:31:24 +01:00
sfan5
afb061c374
Fix broken server startup if curl is disabled ( #12046 )
2022-02-04 20:29:28 +01:00
Lars Müller
1ee37148a8
Fix types of get_mapgen_setting_noiseparams ( #12025 )
2022-02-04 20:28:43 +01:00
rubenwardy
128f6359e9
Use virtual paths to specify exact mod to enable ( #11784 )
2022-01-30 22:40:53 +00:00
Lars Müller
fe0b2d02bf
Define control(bits) as "unset" for entities ( #11995 )
2022-01-27 22:22:58 +01:00
Zughy
37d80784dd
Allow resetting celestial vault elements by leaving its arguments empty ( #11922 )
2022-01-22 12:42:49 +01:00
sfan5
9a12e4499e
Minor improvements to Lua sandbox
2022-01-15 17:45:08 +01:00
sfan5
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
sfan5
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
Jude Melton-Houghton
bf22569019
Use a database for mod storage ( #11763 )
2022-01-07 20:28:49 +02:00
Wuzzy
b81948a14c
Fix damage wraparound if very high damage ( #11872 )
2022-01-06 21:16:35 +01:00
sfan5
b2409b14d0
Refactor trusted mod checking code
2021-12-18 20:37:13 +01:00
sfan5
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
sfan5
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
sfan5
8472141b79
Restructure devtest's unittests and run them in CI ( #11859 )
2021-12-18 20:36:43 +01:00
Corey Powell
413be76c63
Implemented disconnect_player ( #10492 )
...
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-26 19:19:40 +00:00
sfan5
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
Lejo
b9051386ae
Add Lua bitop library ( #9847 )
2021-11-26 19:31:05 +01:00
Elijah Duffy
cbf658f83d
Lua API: Add rmdir
, cpdir
and mvdir
( #9638 )
...
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-10 19:10:20 +01:00
Wuzzy
6910c8d920
Fix number of tool uses being off by 1..32767 ( #11110 )
2021-10-31 22:33:33 +00:00
sfan5
660e63dbae
Fix item duplication if player dies during interact callback (alternative) ( #11662 )
2021-10-25 20:30:27 +02:00
SmallJoker
ecc6f4ba25
Remove a few unused functions reported by callcatcher ( #11658 )
2021-10-12 20:12:20 +02:00
sfan5
6de8d77e17
Move instead of copy during content install if possible
2021-10-07 00:20:01 +02:00
sfan5
2b5075f0e2
Move archive extraction in content store to async job
2021-10-07 00:20:01 +02:00
sfan5
2d5b7b5fb4
Make fs::extractZipFile thread-safe
2021-10-07 00:20:01 +02:00
emixa-d
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
Wuzzy
bc71622d21
Fix crash when calling remove/kick/ban_player on start ( #11672 )
2021-10-05 21:53:47 +02:00
Jude Melton-Houghton
5aa95fef10
Make MetaDataRef:get return nil instead of nothing ( #11666 )
2021-10-05 15:38:33 +03:00
Wuzzy
4fca601e0c
Add get_server_max_lag() ( #11671 )
2021-10-05 15:35:55 +03:00
Wuzzy
21113ad410
Split liquid_viscosity to liquid_viscosity and move_resistance ( #10810 )
2021-10-01 16:21:24 +02:00
sfan5
e0529da5c8
Fix trivial typos
2021-09-19 13:54:20 +02:00
sfan5
75bf9b75ca
Make sure relevant std::stringstreams are set to binary
2021-09-11 21:06:57 +02:00
sfan5
766e885a1b
Clean up/improve some scriptapi error handling code
2021-09-10 23:16:46 +02:00
sfan5
bbfae0cc67
Dynamic_Add_Media v2 ( #11550 )
2021-09-09 16:51:35 +02:00
sfan5
6a1424f2b1
Async-related script cleanups
2021-08-28 12:15:12 +02:00
savilli
3f1adb49ae
Remove redundant on_dieplayer calls
2021-08-28 12:14:16 +02:00
NeroBurner
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
SmallJoker
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
sfan5
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
hecks
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
sfan5
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
hecks
1d25d1f7ad
Refactor video driver name retrieval ( #11413 )
...
Co-authored-by: hecktest <>
2021-07-11 09:50:34 +02:00
Warr1024
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
SmallJoker
062fd2190e
Auth API: Error when accessed prior to ServerEnv init ( #11398 )
2021-06-30 20:42:26 +02:00
SmallJoker
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
SmallJoker
2db6b07de1
Inventory: show error on invalid list names ( #11368 )
2021-06-20 17:21:50 +02:00
sfence
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
sfan5
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
SmallJoker
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
sfan5
a0047d6edc
script: Replace calls to depreated luaL_openlib
2021-05-30 11:40:14 +02:00
sfan5
b56a028d6b
Fix curl_timeout being ignored for Lua HTTP fetches
2021-05-17 17:12:30 +02:00
Loic Blot
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
Loic Blot
de85bc9227
fix: some code tidy about includes & irr namespaces
2021-05-03 19:49:19 +02:00
Loic Blot
48d5abd5be
refacto: remove get_gui_env & draw_load_screen from RenderingEngine singleton
2021-05-03 19:49:19 +02:00
Loic Blot
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
Loic Blot
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
Loic Blot
e34d28af9f
refacto: rendering engine singleton removal step 1 (filesystem)
...
Make the RenderingEngine filesystem member non accessible from everywhere
This permits also to determine that some lua code has directly a logic to extract zip file. Move this logic inside client, it's not the lua stack role to perform a such complex operation
Found also another irrlicht <1.8 compat code to remove
2021-05-03 19:49:19 +02:00
Vincent Robinson
074e6a67de
Add minetest.colorspec_to_colorstring
( #10425 )
2021-04-23 21:37:24 +02:00
sfan5
623f0a8613
Isolate library tables between sandbox and insecure env
2021-04-18 16:06:42 +02:00
sfan5
0abc1e98ed
Fix server favorites not saving when client/serverlist/ doesn't exist already ( #11152 )
2021-04-09 22:36:10 +02:00
SmallJoker
f4118a4fde
Consistent title bar + render information in mainmenu ( #10764 )
2021-03-30 21:49:15 +02:00
Vitaliy
3b78a22371
Degrotate support for mesh nodes ( #7840 )
2021-03-30 00:25:11 +02:00
sfan5
2da1eee394
Fix broken BiomeGen
abstraction ( #11107 )
2021-03-23 15:43:26 +01:00
SmallJoker
05719913ac
Schematic: Properly deal with before/after node resolving and document ( #11011 )
...
This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration).
Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
2021-03-20 13:02:15 +01:00
sfan5
bf8fb2672e
Use place_param2 client-side for item appearance & prediction ( #11024 )
2021-03-09 00:56:53 +01:00
sfan5
ac8ac19169
Protect mg_name and mg_flags from being set by Lua ( #11010 )
2021-03-04 20:38:28 +01:00
SmallJoker
3a2f55bc19
Settings: Push groups in to_table as well
2021-03-01 12:14:41 +01:00
rubenwardy
f85e9ab925
Add nametag background setting and object property ( #10937 )
2021-02-17 19:51:28 +00:00
rubenwardy
a8f6befd39
Fix short_description fallback order ( #10943 )
2021-02-17 18:53:44 +00:00
rubenwardy
3a8c37181a
Use consistent temp folder path ( #10892 )
2021-02-07 15:27:24 +00:00
rubenwardy
fbb9ef3818
Reduce ore noise_parms error to deprecation warning ( #10921 )
...
Fixes #10914
2021-02-06 13:46:45 +01:00
sfan5
c834d2ab25
Drop wide/narrow conversion functions
...
The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
2021-02-02 20:46:08 +01:00
sfan5
40ad976753
Revise dynamic_add_media API to better accomodate future changes
2021-02-01 23:00:13 +01:00
sfan5
a01a02f7a1
Preserve immortal group for players when damage is disabled
2021-01-31 20:38:12 +01:00
sfan5
112a6adb10
Cache client IP in RemoteClient so it can always be retrieved ( #10887 )
...
specifically: after the peer has already disappeared
2021-01-31 20:36:47 +01:00
rubenwardy
6e0e0324a4
Fix minetest.dig_node returning true when node isn't diggable ( #10890 )
2021-01-31 18:49:51 +00:00
sfan5
83229921e5
Rework use_texture_alpha to provide three opaque/clip/blend modes
...
The change that turns nodeboxes and meshes opaque when possible is kept,
as is the compatibility code that warns modders to adjust their nodedefs.
2021-01-29 17:34:41 +01:00
sfan5
edd8c3c664
Drop never documented 'alpha' property from nodedef
...
Includes minimal support code for practical reasons.
We'll need it for a slightly different purpose next commit.
2021-01-29 17:34:41 +01:00
SmallJoker
2760371d8e
Settings: Purge getDefault, clean FontEngine
2021-01-29 17:32:35 +01:00
SmallJoker
37a05ec8d6
Settings: Proper priority hierarchy
...
Remove old defaults system
Introduce priority-based fallback list
Use new functions for map_meta special functions
Change groups to use end tags
Unittest changes:
* Adapt unittest to the new code
* Compare Settings objects
2021-01-29 17:32:35 +01:00
rubenwardy
4c76239818
Remove dead code ( #10845 )
2021-01-22 15:09:26 +00:00
rubenwardy
67aa75d444
Use JSON for favorites, move server list code to Lua ( #10085 )
...
Co-authored-by: sfan5 <sfan5@live.de>
2021-01-22 15:08:57 +00:00
rubenwardy
4fcd000e20
MgOre: Fix invalid field polymorphism ( #10846 )
2021-01-21 19:08:06 +00:00
Zughy
45ccfe26fb
Removed some obsolete code ( #10562 )
...
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2021-01-21 18:17:09 +00:00
Zughy
ea5d6312c1
ObjectRef: fix some v3f checks ( #10602 )
2021-01-21 18:37:38 +01:00
JDiaz
08ee9794fb
Implement on_rightclickplayer callback ( #10775 )
...
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-01-11 18:03:31 +01:00
rubenwardy
edd0836011
ContentDB: Add overwrite dialog when content is already installed ( #10768 )
2021-01-04 15:18:31 +00:00
hecks
dd5a732fa9
Add on_deactivate callback for luaentities ( #10723 )
2021-01-02 15:14:29 +01:00
Elias Fleckenstein
9250b5205a
Add minetest.get_objects_in_area ( #10668 )
2020-12-29 16:50:09 +01:00
Lars Mueller
8f72d4b294
Fix minetest.is_nan
2020-12-24 22:07:04 +01:00
sfan5
74762470b2
Fix some minor code issues all over the place
2020-12-24 13:44:54 +01:00
rubenwardy
2c3593b51e
Fix unsafe cast in l_object
2020-12-23 22:24:58 +00:00
rubenwardy
664f5ce960
Add open user data button to main menu ( #10579 )
2020-12-19 13:27:15 +00:00
SmallJoker
fca4db4184
ObjectRef: Re-add legacy code for set_physics_override ( #10585 )
...
These arguments are used at least by MTG beds and homedecor_common. A deprecation warning is shown to safely remove it in a future release.
2020-11-10 21:02:53 +01:00
Zughy
72b93ec0d7
Fix ObjectRef errors due to lua_isnil() ( #10564 )
...
Treat 'none' values as 'nil'
2020-11-04 21:43:18 +01:00
SmallJoker
9c9344ceb3
Fix incorrect deprecation hints
...
"good" and "bad" were swapped in the process, resulting in wrong deprecation messages
2020-11-01 12:52:14 +01:00
rubenwardy
89dd05fdf3
Fix segfault in deprecation logging due to tail call, log by default ( #10174 )
2020-10-31 18:19:23 +00:00
luk3yx
61a196378f
Fix CSMs on arm64 ( #10553 )
2020-10-25 18:01:39 +01:00
Zughy
33b2c5f5b1
Clean up l_object.cpp ( #10512 )
...
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-22 16:18:01 +01:00