Commit Graph

660 Commits (e98d421aff046a2d9a9b87516779603dc170b209)

Author SHA1 Message Date
MoNTE48 e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
number Zero 347a09a612 Fix narrow/utf8 difference in incoming/outcoming messages 2018-06-10 17:18:11 +02:00
SmallJoker 31b863a7f2 Fix crash in log_deprecated when triggered from no function
Based on commit a1598e1b
2018-06-10 17:18:11 +02:00
Loic Blot 8474e543a0 More C++03 fixes 2018-06-03 17:32:00 +02:00
paramat c307b0ae1d Find nodes in area (under air): Raise volume limit and document it 2018-06-03 17:32:00 +02:00
sfan5 588b02948b Check argument types inside MetaDataRef Lua API (#7045) 2018-06-03 17:32:00 +02:00
red-001 c0eeec2b1a Move `setlocale` from Lua to C++. 2018-06-03 17:32:00 +02:00
Pedro Gimeno 1cd770e812 Fix buffer parameter not working in LuaPerlinNoiseMap::l_getMapSlice() 2018-06-03 17:32:00 +02:00
rubenwardy a7be7716f8 Fix rounding error in g/set_node caused by truncation to float 2018-06-03 17:32:00 +02:00
sfan5 bae4de48c6 Hint at problematic code when logging deprecated calls 2018-06-03 17:32:00 +02:00
sfan5 2f2a775590 Add minetest.safe_write_file() to script API 2018-06-03 17:32:00 +02:00
Rob Blanckaert c9e758408d Add sha1 to lua utils. (#6563) 2018-06-03 17:32:00 +02:00
SmallJoker 483f0e27ca Unkown nodes: Provide position on interact (#6505)
* Unkown nodes: Provide position on interact
2018-06-03 17:31:59 +02:00
DTA7 1219f8ef7b Set placer to nil instead of a non-functional one in item_OnPlace (#6449)
* Set placer to nil instead of a non-functional one

This requires nil checks in core.rotate_node and core.rotate_and_place.
2018-06-03 17:31:59 +02:00
sfan5 8e3a110314 ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
2018-06-03 17:31:59 +02:00
Dániel Juhász 4836612b9f Automatic item and node colorization (#5640)
* Automatic item and node colorization

Now nodes with a palette yield colored item stacks, and colored items
place colored nodes by default. The client predicts the colorization.

* Backwards compatibility

* Use nil

* Style fixes

* Fix code style

* Document changes
2018-06-03 17:31:59 +02:00
SmallJoker a766044a0c find_nodes_in_area: Extend maximal count to U32_MAX (#5277)
Extend documentation, limit area volume
Remove u16 count limitation

* Prevent integer overflow, replace minp/maxp with pos1/pos2
2018-06-03 17:31:59 +02:00
sfan5 7632cb29a5 Disable CSM at compile-time (#78) 2017-07-09 23:37:40 +03:00
Maksim Gamarnik 35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
Loic Blot 4cda1263f5 Minetest for C++11 (CMakeLists + Travis)
* Move GCC to GCC 6 & GCC 7
* Move Clang to Clang 3.6 & Clang 4.0
* LINT moves from Clang 3.9 to Clang 4.0
* Move XCode 7.3 to 8.0
* Use more travis tricks to install compilers instead of adding complexity to our build script
* Clang format fixes on checked files (compat Cpp11 instead of Cpp03)
* Mingw GCC update from 4.8.4 to 5.3 (Ubuntu Xenial)
* Drop mingw cmake generated files and add them to gitignore
2017-06-04 09:57:08 +02:00
Loïc Blot bee06e6a53 Enhance ABM performance a little bit by removing two std::set copy (#5815)
* Enhance ABM performance a little bit by removing two std::set copy

* ActiveBlockModifier::getTriggerContents now returns a const ref
* ActiveBlockModifier::getRequiredNeighbors now returns a const ref
* ActiveBlockModifier::getRequiredNeighbors is now purely virtual

* Little code style fix
2017-05-25 16:43:55 +02:00
Loic Blot c8fc6d9c0d Fix wrong return value in get_sky Lua call since ad9fcf859ec2347325830e09504ae96968b51ea8
Fix #5803
2017-05-23 19:59:47 +02:00
Loic Blot 30a5ff4c09 LINT fix & check all files with clang-format
Seems the diff mode doesn't work well, PR are detected as working whereas in master it's shown it's problematic (and really problematic). Use same check everywhere
2017-05-22 07:28:35 +02:00
Pierre-Adrien Langrognet 69f19f1af7 [CSM] Add send_chat_message and run_server_chatcommand API functions (#5747)
* [CSM] Add send_chat_message and run_server_chatcommand API functions

* Add client-side chat message rate limiting

* Limit out chat queue size

* [CSM] Add minetest.clear_out_chat_queue API function and .clear_chat_queue chatcommand

* Last fixes/cleanups before merge
2017-05-21 23:06:51 +02:00
Loic Blot 353db2e4a0 Fix LINT broken by dfa0c15ce045705f05487d623dc7beca6c945b4b 2017-05-21 17:30:00 +02:00
bigfoot547 004f49298c [CSM] Add function to get the definition of items (#5732)
Add node def and item def documentation.

Please be ready for merge!
2017-05-21 14:40:55 +02:00
SmallJoker 1dd555ebd4 [CSM] Correct the log destination of print() (#5784) 2017-05-20 16:46:12 +02:00
red-001 c39d110208 Fix CSM crash (#5779)
Caused by dc5bc6c and them made worse by 5ebf8f9
2017-05-20 16:45:49 +02:00
Loïc Blot 8fa097e102 When minimap is disabled in configuration, really disable it (#5771)
* When minimap is disabled in configuration, really disable it
2017-05-19 07:25:27 +02:00
Loic Blot 2ffea9f1e8 Fix a warning pointed by GCC 7.1
lua_tonumber overflow in snprintf (12 bytes and only 10 can be written)
2017-05-18 20:55:27 +02:00
sfan5 100a6036d8 Private nodemeta (#5702)
* Private node metadata that isn't sent to the client
2017-05-10 15:29:21 +02:00
Loïc Blot 289f26ef4a read_schematic_replacements: ensure fields are strings (#5726)
* read_schematic_replacements: ensure fields are strings

add a type check before reading strings on read_schematic_replacements deserializer

* throw LuaError instead of asserting the whole client
2017-05-08 20:43:03 +02:00
Loïc Blot 86253bb961 Player attrs: permits to remove an attribute by setting value to nil (#5716)
* Player attrs: permits to remove an attribute by setting value to nil

When doing player:set_attribute("attr", nil) remove attribute

Also remove a useless check on C++ API part (already done by checkplayer)

Fix #5709
2017-05-07 12:13:15 +02:00
Loic Blot 698e5b2ff1 LINT fix since d0678948165768472fc940c03e78cba787f49ea5 2017-05-07 11:07:17 +02:00
T0ny2 d71a4b4586 Replace occurrence of luaL_reg in l_camera.cpp
Related to commit 41c5483. Replace an occurrence of luaL_reg in
src/script/lua_api/l_camera.cpp (added by commit de028fc).
2017-05-07 06:09:30 +01:00
ShadowNinja 35d2f88f51 Clean up numeric.h and split FacePositionCache from it
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
2017-05-06 16:09:45 -04:00
ShadowNinja dfb4074a5a Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2017-05-06 15:33:19 -04:00
Loic Blot 2a01ec3fdd Fix codestyle since CSM Camera API 2017-05-06 21:30:27 +02:00
red-001 67be889162 [CSM] add `on_item_use` (#5544) 2017-05-06 21:12:44 +02:00
bigfoot547 4a0dcb8788 [CSM] Add camera API (#5609)
* [CSM] Add camera API
roper rebase & squash

* Address nerzhul's review
2017-05-05 22:07:36 +02:00
red-001 845f1beccc Add option to also check the center to `find_node_near` (#5255)
* Add option to also check the center to `find_node_near`
2017-05-04 22:52:58 +02:00
red-001 c1cbc9b991 Add function to get server info. 2017-05-04 04:25:45 +01:00
paramat ad2e38e257 Set sky API: Add bool for clouds in front of custom skybox
Default true.
Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API.
Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of
'm_visible' (whether normal sky is visible).
2017-05-02 20:42:35 -07:00
SmallJoker 1b21a680f0 Sneak: Improve and fix various things
Remove useless `got_teleported`.
Fix jitter when walking against the sneak limits.
Fix damage evading on sneak ladders.
2017-05-03 03:16:20 +01:00
Brandon 893c2dfb5e Sound API: Add fading sounds 2017-05-03 03:12:45 +01:00
Ben Deutsch 4236cf8e5e Add clouds API 2017-04-30 00:06:13 +01:00
shivajiva101 f290d3c66d Fix visual slide issue with set_detach, fixes #5620 2017-04-29 18:18:46 +02:00
Vincent Glize aa2fb725a0 [CSM] Add event on_place_node API lua (#5548)
* [CSM] Add event on_place_node API lua
2017-04-29 12:08:16 +02:00
Vincent Glize 8b9f88a170 [CSM] add screenshot api lua (#5674)
* [CSM] add screenshot api lua
2017-04-29 09:16:06 +02:00
Loïc Blot 0c74031aab Don't permit to copy Scripting classes (Client,Server,Mainmenu) 2017-04-27 11:52:44 +02:00