aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.h
AgeCommit message (Collapse)Author
2022-05-29Add API function to invoke player respawnsfan5
closes #12272
2022-03-26Add API to control shadow intensity from the game/mod (#11944)x2048
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-05Allow get_sky to return a table (#11963)Zughy
2020-10-22Clean up l_object.cpp (#10512)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-13Add ObjectRef:get_children() (#10480)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-04Minimap as HUD element with API controlPierre-Yves Rollo
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
2020-10-04Deprecate get_player_velocity and add_player_velocity (#10173)rubenwardy
2020-03-05set_sky improvements, set_sun, set_moon and set_starsJordach
2019-09-19Add support for per-player FOV overrides and multipliersAnand S
2019-08-10Implement adding velocity to player from Luasfan5
The intended usecase is knockback, but there's potential for more.
2019-04-28Force send a mapblock to a player (#8140)sofar
* 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.
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* 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).
2018-07-01Log deprecated Lua function calls (#7491)SmallJoker
2018-04-06Add player:get_meta(), deprecate player attributes (#7202)rubenwardy
* Add player:get_meta(), deprecate player attributes
2018-03-31ObjectRef: Add add_velocity() (#3208)you
Allow changing the velocity of objects relatively to their current velocity
2018-03-28Add formspec theming using prepended stringsAndrew Ward
2017-09-01Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier
* 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
2017-08-19Code modernization: subfolders (#6283)Loïc Blot
* 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
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-06-19C++11 cleanup on constructors (#6000)Vincent Glize
* C++11 cleanup on constructors dir script
2017-05-02Set sky API: Add bool for clouds in front of custom skyboxparamat
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-04-30Add clouds APIBen Deutsch
2017-04-17Sneak: Add option for old move codeparamat
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.
2017-04-08Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat ↵Loïc Blot
(#5541) We are bundling Lua5.1 which has same macro
2017-01-27Implement player attribute backend (#4155)Loïc Blot
* 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).
2017-01-21Add Entity get_texture_mod() to Lua APIsapier
Send texture modifier to clients connecting later too
2017-01-16Rename ObjectRef methods to be consistent and predictablerubenwardy
2016-10-08Move RemotePlayer code to its own cpp/headerLoic Blot
2016-10-08Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot
* 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())
2016-10-08Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)Loic Blot
* 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
2016-06-24Player: New get_look, set_look APIraymoo
Deprecate get_look / set_look pitch / yaw
2015-07-20Added get_player_velocity() method. Fixes #1176Elia Argentieri
2015-06-22Fix some issues with animations, and allow non-looped animations to be definedMirceaKitsune
2015-05-28Add some missing getter functions to the lua APITeTpaAka
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
2015-05-15Generalize core.get/set_nametag_color into core.get/set_nametag_attributesTeTpaAka
2015-05-15Add get and set functions for the nametag colorTeTpaAka
2015-05-12is_player() is no player-only functionest31
2015-03-22Revert "Add a Lua call to do damages / heals" ok @ShadowNinjaLoic Blot
This reverts commit 467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.
2015-03-18Add a Lua call to do damages / healsLoic Blot
2014-05-07Fix heart + bubble bar size on different texture packssapier
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-04-12Add player:set_eye_offset() by @MirceaKitsune and clean upBlockMen
2014-04-12Add third person viewBlockMen
2014-02-01Add player:override_day_night_ratio() for arbitrarily controlling sunlight ↵Perttu Ahola
brightness
2014-02-01Add player:set_sky() with simple skybox supportPerttu Ahola
2013-12-03Add sneak and sneak_glitch to set_physics_override()PilzAdam
2013-11-17Fix issue #1009 (minetest.get_connected_players() returns non-existing players)kwolekr
2013-09-05Use player:set_hotbar_image() instead of hardcoded hotbar.pngPilzAdam
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-07-20Add set_breath and get_breath to lua API.RealBadAngel
2013-05-26Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAMKahrl