summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.h
Commit message (Collapse)AuthorAge
* Clean up l_object.cpp (#10512)Zughy2020-10-22
| | | Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
* Add ObjectRef:get_children() (#10480)Zughy2020-10-13
| | | Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
* Minimap as HUD element with API controlPierre-Yves Rollo2020-10-04
| | | | | | | Features: * Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes() * New HUD elements for displaying minimap with custom size and placing * New minimap mode for displaying a texture instead of the map
* Deprecate get_player_velocity and add_player_velocity (#10173)rubenwardy2020-10-04
|
* set_sky improvements, set_sun, set_moon and set_starsJordach2020-03-05
|
* Add support for per-player FOV overrides and multipliersAnand S2019-09-19
|
* Implement adding velocity to player from Luasfan52019-08-10
| | | | The intended usecase is knockback, but there's potential for more.
* Force send a mapblock to a player (#8140)sofar2019-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Force send a mapblock to a player. Send a single mapblock to a specific remote player. This is badly needed for mods and games where players are teleported into terrain which may be not generated, loaded, or modified significantly since the last player visit. In all these cases, the player currently ends up in void, air, or inside blocks which not only looks bad, but has the effect that the player might end up falling and then the server needs to correct for the player position again later, which is a hack. The best solution is to send at least the single mapblock that the player will be teleported to. I've tested this with ITB which does this all the time, and I can see it functioning as expected (it even shows a half loaded entry hallway, as the further blocks aren't loaded yet). The parameter is a blockpos (table of x, y, z), not a regular pos. The function may return false if the call failed. This is most likely due to the target position not being generated or emerged yet, or another internal failure, such as the player not being initialized. * Always send mapblock on teleport or respawn. This avoids the need for mods to send a mapblock on teleport or respawn, since any call to `player:set_pos()` will pass this code.
* Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter2018-11-28
| | | | * Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
* Log deprecated Lua function calls (#7491)SmallJoker2018-07-01
|
* Add player:get_meta(), deprecate player attributes (#7202)rubenwardy2018-04-06
| | | | * Add player:get_meta(), deprecate player attributes
* ObjectRef: Add add_velocity() (#3208)you2018-03-31
| | | | Allow changing the velocity of objects relatively to their current velocity
* Add formspec theming using prepended stringsAndrew Ward2018-03-28
|
* Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier2017-09-01
| | | | | * Fix animation frame_speed and blend loosing precision due to incorrect data type Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start
* Code modernization: subfolders (#6283)Loïc Blot2017-08-19
| | | | | | | | | | | | | * Code modernization: subfolders Modernize various code on subfolders client, network, script, threading, unittests, util * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Make connection.cpp readable in a pointed place + typo
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* C++11 cleanup on constructors (#6000)Vincent Glize2017-06-19
| | | | * C++11 cleanup on constructors dir script
* Set sky API: Add bool for clouds in front of custom skyboxparamat2017-05-02
| | | | | | | 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).
* Add clouds APIBen Deutsch2017-04-30
|
* Sneak: Add option for old move codeparamat2017-04-17
| | | | | | Temporary option for the old move code for specific old sneak behaviour. Enabled by setting the added 'new move' physics override to false. By default 'new move' is true.
* Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat ↵Loïc Blot2017-04-08
| | | | | (#5541) We are bundling Lua5.1 which has same macro
* Implement player attribute backend (#4155)Loïc Blot2017-01-27
| | | | | | | | | | | | | | | * This backend permit mods to store extra players attributes to a common interface. * Add the obj:set_attribute(attr, value) Lua call * Add the obj:get_attribute(attr) Lua call Examples: * player:set_attribute("home:home", "10,25,-78") * player:get_attribute("default:mana") Attributes are saved as a json in the player file in extended_attributes key They are saved only if a modification on the attributes occurs and loaded when emergePlayer is called (they are attached to PlayerSAO).
* Add Entity get_texture_mod() to Lua APIsapier2017-01-21
| | | | Send texture modifier to clients connecting later too
* Rename ObjectRef methods to be consistent and predictablerubenwardy2017-01-16
|
* Move RemotePlayer code to its own cpp/headerLoic Blot2016-10-08
|
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot2016-10-08
| | | | | | | * Server/Client Environments now have an helper to cast Player object in the right type to use it * Server: use RemotePlayer everywhere and remove previous added casts * Client: use LocalPlayer where needed * Environment: remove unused functions (getPlayers(), getRandomConnectedPlayer(), getNearestConnectedPlayer())
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)Loic Blot2016-10-08
| | | | | | | | | | | * LocalPlayer take ownership of maxHudId as it's the only caller * RemotePlayer take ownership of day night ratio as it's the only user * Pass getPlayerControl as const reference to prevent object copy on each call (perf improvement in ObjectRef::l_get_player_control call) * getPlayerSAO is now only RemotePlayer call * get/setHotbarItemCount is now RemotePlayer owned * Server: Use RemotePlayer instead of Player object on concerned call to properly fix the object type * PlayerSAO now uses RemotePlayer instead of Player because it's only server side * ObjectRef::getplayer also returns RemotePlayer as it's linked with PlayerSAO
* Player: New get_look, set_look APIraymoo2016-06-24
| | | | Deprecate get_look / set_look pitch / yaw
* Added get_player_velocity() method. Fixes #1176Elia Argentieri2015-07-20
|
* Fix some issues with animations, and allow non-looped animations to be definedMirceaKitsune2015-06-22
|
* Add some missing getter functions to the lua APITeTpaAka2015-05-28
| | | | | | | | | | | | | | | | | | | | | | | ObjectRef: get_properties get_armor_groups get_animation get_attach get_bone_position Players: get_physics_override hud_get_hotbar_itemcount hud_get_hotbar_image hud_get_hotbar_selected_image get_sky get_day_night_ratio get_local_animation get_eye_offset Global: minetest.get_gen_notify minetest.get_noiseparams
* Generalize core.get/set_nametag_color into core.get/set_nametag_attributesTeTpaAka2015-05-15
|
* Add get and set functions for the nametag colorTeTpaAka2015-05-15
|
* is_player() is no player-only functionest312015-05-12
|
* Revert "Add a Lua call to do damages / heals" ok @ShadowNinjaLoic Blot2015-03-22
| | | | This reverts commit 467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.
* Add a Lua call to do damages / healsLoic Blot2015-03-18
|
* Fix heart + bubble bar size on different texture packssapier2014-05-07
| | | | | | | 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
* Add player:set_eye_offset() by @MirceaKitsune and clean upBlockMen2014-04-12
|
* Add third person viewBlockMen2014-04-12
|
* Add player:override_day_night_ratio() for arbitrarily controlling sunlight ↵Perttu Ahola2014-02-01
| | | | brightness
* Add player:set_sky() with simple skybox supportPerttu Ahola2014-02-01
|
* Add sneak and sneak_glitch to set_physics_override()PilzAdam2013-12-03
|
* Fix issue #1009 (minetest.get_connected_players() returns non-existing players)kwolekr2013-11-17
|
* Use player:set_hotbar_image() instead of hardcoded hotbar.pngPilzAdam2013-09-05
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Add set_breath and get_breath to lua API.RealBadAngel2013-07-20
|
* Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAMKahrl2013-05-26
|
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
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)