Commit Graph

205 Commits

Author SHA1 Message Date
ShadowNinja d9de29fa50 Clear inventory before setting lists 2014-06-23 15:28:48 -04:00
sapier 9a39848ba9 Remove a lot of superfluous ifndef USE_CURL checks 2014-06-19 19:05:37 +02:00
sapier 7b3602bab3 Fix regression dirt texture not beeing default in non cloud menu 2014-06-14 20:51:57 +02:00
sapier d76b8c6e7c Small cleanup of hud add/remove code 2014-05-31 22:32:44 +02:00
ShadowNinja 5bd2aea663 Fix over-poping and only push the core once 2014-05-30 19:38:11 -04:00
ShadowNinja 34d872628d Make print() NUL-safe 2014-05-15 19:09:47 -04:00
ShadowNinja c4359ff65c Use "core" namespace internally 2014-05-08 13:02:04 -04:00
ShadowNinja 1cd512913e Organize builtin into subdirectories 2014-05-07 17:14:23 -04:00
ShadowNinja fef2729fd0 Add write_json() to the async API 2014-05-07 17:05:44 -04:00
sapier d3ee617f37 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
2014-05-07 21:46:27 +02:00
sapier b5acec0a3c Add proper lua api deprecated handling 2014-04-29 22:49:04 +02:00
ShadowNinja f2b93b7bae Fix code style of async API 2014-04-27 16:15:53 -04:00
ShadowNinja 6ab3b4c838 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
2014-04-27 16:15:53 -04:00
ShadowNinja db4ea4658c Only push the Lua error handler once 2014-04-27 16:15:53 -04:00
sapier 1838a3fd69 Add support for dpi based HUD scaling
Add support for (configurable) multiline hotbar
Improved screensize handling
Add userdefined gui scale by BlockMen
2014-04-27 21:53:13 +02:00
proller 0279f32db7 Remove liquid_finite and weather 2014-04-18 21:56:48 +04:00
Sfan5 118e2ae865 Fix all warnings reported by clang 2014-04-15 21:34:53 +02:00
BlockMen 8b02a015eb Use integers instead of float values 2014-04-12 20:04:12 +02:00
BlockMen c0ab09af74 Add player:set_eye_offset() by @MirceaKitsune and clean up 2014-04-12 17:44:20 +02:00
BlockMen a1db9242ec Add third person view 2014-04-12 17:44:15 +02:00
sapier edcad09dee Add support for named threads (atm linux only) 2014-04-09 21:32:21 +02:00
sapier a88c685f02 Minor fixes for file/modlist download in mainmenu 2014-04-09 20:22:21 +02:00
sapier 142e2d3b74 Cleanup client init states by bumping protocol version
Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready
Handle clients with protocol version < 23 (almost) same way as before
Make client tell server about it's version
Add client state to not send bogus player position updates prior init complete
Add access to statistics information (peer connction time,rtt,version)
Fix clients standing stalled in world while preloading item visuals (new clients only)
Add get_player_information to read client specific information from lua
2014-04-08 21:12:20 +02:00
ShadowNinja f3d83a4516 Add more informative error messages for inventory and item method errors 2014-03-15 17:20:52 -04:00
ShadowNinja 31fe72dbac Remove lua_State parameter from LuaError::LuaError 2014-03-15 16:28:59 -04:00
ShadowNinja f8b7555558 Revert "Make sure we get a stacktrace for as many lua errors as possible"
This reverts commit 362ef5f6ce.

Stack tracebacks couldn't be generated in LuaError::LuaError anyway and this
caused a second, empty traceback in most cases.  In cases where there wasn't
annother traceback the stack had already unwound and the traceback was empty.
2014-03-15 16:01:06 -04:00
Sfan5 362ef5f6ce Make sure we get a stacktrace for as many lua errors as possible 2014-03-15 14:51:00 +01:00
Selat 7cac34c807 Pass arguments by reference 2014-03-12 17:34:48 -04:00
Ciaran Gultnieks 5ce3f8f7b7 Correct misleading detached inventory error message
Looks like a bit of hasty copying and pasting from s_item.cpp.
2014-03-09 11:16:09 +01:00
kwolekr 28d6326bd4 Update set_mapgen_params and set_gen_notify Lua API to use new flag format 2014-03-08 11:35:04 -05:00
ShadowNinja 9a3b7715e2 Remove "Server -!- " prefix from player messages 2014-02-27 00:00:22 -05:00
Sfan5 d9d06ad920 Fix g_settings not being included 2014-02-16 08:25:53 +01:00
kwolekr c163859057 Schematic: Add force_placement parameter to minetest.place_structure API 2014-02-15 19:46:57 -05:00
kwolekr 3570f3e396 Add minetest.set_noiseparam_defaults() Lua API 2014-02-15 19:13:14 -05:00
kwolekr a0683b811c Define strlcpy on platforms that do not have it 2014-02-09 13:57:29 -05:00
kwolekr 2a01050a0c Add capability to read table flag fields from Lua API 2014-02-09 12:44:31 -05:00
kwolekr 83bafbe08b Make flag strings clear specified flag with 'no' prefix
Remove flagmask field from set_mapgen_params table
Add small bits of needed documentation
2014-02-08 17:50:59 -05:00
sapier 3670f5a37b Fix invalid check for fread error on extracting zip 2014-02-07 21:29:31 +01:00
kwolekr 5a34f40d80 Huge overhaul of the entire MapgenParams system
MapgenParams is no longer a polymorphic class, eliminating the need for messy and bug-prone reallocations.
Separation between the common and mapgen-specific parameters is now strongly defined.
Mapgen parameters objects are now properly encapsulated within the proper subsystems.
2014-02-03 22:50:14 -05:00
ShadowNinja 458045d49f Fix crash when a error occurs in a globalstep callback 2014-02-03 18:15:03 -05:00
sapier 857a49e081 Add minetest.kick_player(name, reason) 2014-02-03 17:33:59 -05:00
Perttu Ahola 6a3fa9df12 Add player:override_day_night_ratio() for arbitrarily controlling sunlight brightness 2014-02-01 18:38:21 +01:00
Perttu Ahola 86a6cca3cf Add player:set_sky() with simple skybox support 2014-02-01 18:34:26 +01:00
RealBadAngel 21f1bec724 New HUD element - waypoint. 2014-01-26 21:31:59 +01:00
ShadowNinja 76d4396fa1 Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacks 2014-01-23 19:21:56 -05:00
kwolekr bafc4ac6a1 LuaVoxelManip: Add get_param2_data and set_param2_data 2014-01-19 02:55:59 -05:00
kwolekr 21c96249fa Schematic: Read slice probability table from schematic descriptors 2014-01-19 02:44:45 -05:00
Kahrl 8966c16ad2 Add formspec table 2014-01-13 18:11:08 -05:00
khonkhortisan 2b1eff7725 Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way.

separate particles(pawner) definition, add default values, work with no
arguments
2014-01-13 17:34:56 -05:00
Ilya Zhuravlev a4c5f10ecf Fix some errors reported by clang static analyzer. 2014-01-13 03:29:12 +04:00
ShadowNinja a3586cd18d Add maximum recursion depth to read_json_value 2014-01-11 14:08:02 -05:00
ShadowNinja a9df87ede0 Rename get_json_value to read_json_value 2014-01-11 13:52:26 -05:00
ShadowNinja bd8ddf1a52 Add InvRef::get/set_lists() 2014-01-11 13:52:26 -05:00
Novatux 84b94eb198 Add forceloading 2014-01-11 17:54:00 +01:00
Ilya Zhuravlev b8c3221d55 Fix absence of images when compiled with RUN_IN_PLACE=0. 2014-01-05 12:43:40 +02:00
kaeza 767b2e7b17 Fix enum element name in Lua HUD code (position vs. pos) 2013-12-31 06:13:54 +01:00
ShadowNinja 829426c714 Fix InventoryList reading order
Lua does not guarantee that the indexes of a table will be in numerical order.
2013-12-30 14:00:05 -05:00
RealBadAngel 7ae0b90ff7 Bugfix to get_all_craft_recipes.
Indexes for empty slots shall not be skipped.
2013-12-21 23:03:51 +01:00
ShadowNinja e1f9ba435f Don't throw a error when writing JSON fails 2013-12-18 18:18:43 -05:00
Kahrl ba8fa0bd42 Log guilty node name when allow_metadata_inventory_move/put/take fails 2013-12-18 23:04:13 +01:00
ShadowNinja 1ed90c90c3 Add 'minetest.write_json' 2013-12-18 16:46:53 -05:00
ShadowNinja 49cec3f782 Handle LuaErrors in Lua -> C++ calls on LuaJIT 2013-12-18 16:35:55 -05:00
kwolekr c3708b456e Add map feature generation notify Lua API 2013-12-14 01:52:24 -05:00
stujones11 d9ef072305 Make line_of_sight return blocking node position 2013-12-12 16:11:00 -05:00
kaeza 33de69a173 Add 'on_prejoinplayer' callback 2013-12-12 13:42:14 -05:00
sapier 4ccaa6d0af Implement search tab and version picker 2013-12-11 23:07:38 +01:00
kwolekr 3cc45fd8ad Fix leak and possible segfault in minetest.set_mapgen_params 2013-12-08 01:37:41 -05:00
ShadowNinja a0dce51af6 Move script_run_callbacks to Lua 2013-12-07 22:03:07 -05:00
PilzAdam e51ad5337f Use a table in set_physics_override() 2013-12-03 23:20:00 +01:00
PilzAdam 15be2659ea Add sneak and sneak_glitch to set_physics_override() 2013-12-03 23:20:00 +01:00
RealBadAngel 2330267d22 Shaders rework. 2013-12-03 18:55:25 +01:00
sapier 5004f31575 Fix broken async locking in release build 2013-12-03 17:50:00 +02:00
Sfan5 6fa3892a71 Fix MinGW build 2013-12-01 20:58:46 +01:00
sapier 04e9a9d541 Cleanup jthread and fix win32 build 2013-12-01 16:25:46 +01:00
kwolekr 20e3d550fa Decoration: Add schematic Y-slice probability support 2013-12-01 01:24:59 -05:00
ShadowNinja 4696c59a5f Add error handler to async step 2013-11-30 13:05:13 -05:00
ShadowNinja 4594ba6522 Optimize table creation 2013-11-30 13:05:13 -05:00
Novatux d879a539cd Add minetest.swap_node 2013-11-30 18:37:56 +01:00
Ilya Zhuravlev 752e11e114 Fix MSVC build. 2013-11-30 21:00:18 +04:00
kwolekr ff7d7080e3 LuaVoxelManip: Add area parameters back to calc_lighting and set_lighting, made optional this time; also fixed a slight bug with night values being ignored 2013-11-30 00:27:39 -05:00
kwolekr 769b2d7c05 LuaVoxelManip: Add get_light_data() and set_light_data() 2013-11-30 00:01:43 -05:00
MetaDucky 5be786c804 Fixed potential NULL pointer and leak when setting node metadata 2013-11-29 23:35:16 -05:00
sapier d19a69cd0d Fix broken thread stop handling 2013-11-30 02:15:31 +01:00
sapier d02ce1cf4d Fix old gcc build 2013-11-29 23:36:18 +01:00
sapier 2e66aca357 Fix modstore/favourites hang by adding asynchronous lua job support 2013-11-29 22:09:14 +01:00
ShadowNinja 7433d65d3e Rollback fixes and get_node_actions 2013-11-27 18:13:06 -05:00
sapier 4f246f0e22 Fix line_of_sight (AGAIN) 2013-11-25 00:04:05 +01:00
kwolekr 5323d800cc Fix possible implicit conversion of NULL to std::string 2013-11-21 00:49:32 -05:00
kwolekr 98e4e2b373 LuaVoxelManip: Update parameter index of set_lighting() 2013-11-21 00:45:17 -05:00
kwolekr 86ef7147b6 Fix issue #1009 (minetest.get_connected_players() returns non-existing players) 2013-11-17 15:15:59 -05:00
kwolekr cca4f09ba1 Decoration: Stop DecoSimple::resolveNodeNames from complaining about no node name if decolist is used
Fix warning message for spawnby nodes

Prevent type-punning warning caused by casting enum to int
2013-11-17 02:22:24 -05:00
sapier 90e7832408 Fix invalid listname and listsize not handled correctly in set_size 2013-11-16 15:52:41 +01:00
MetaDucky 35606cfb67 fixed array limit check when reading Lua specialtiles table 2013-11-16 15:31:17 +01:00
ShadowNinja 371b39a09a Pass a errfunc to lua_pcall to get a traceback 2013-11-15 14:13:31 -05:00
sapier a935d81053 Fix invalid usage of temporary object in mainmenu json conversion 2013-11-11 23:23:58 +01:00
Novatux bd6d4666ab 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)
2013-11-01 15:55:34 +01:00
PilzAdam a9c0961e0c Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStack 2013-09-28 23:46:48 +02:00
Kahrl 8bc7ea61b9 Show git hash in version string at top left corner of window 2013-09-28 21:30:17 +02:00
kwolekr fb6a789991 Re-fix hud_change stat argument retrieval
Conflicts:
	src/script/lua_api/l_object.cpp
2013-09-26 04:39:10 +02:00
kwolekr c0398224ef Fix some warnings and other minor details 2013-09-16 23:52:42 -04:00