summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.cpp
Commit message (Collapse)AuthorAge
* Allow to set maximum star opacity at daytime (#11663)Wuzzy2022-07-02
|
* Add API function to invoke player respawnsfan52022-05-29
| | | | closes #12272
* Remove unneeded ObjectRef setter return values (#12179)Lars Müller2022-04-10
|
* Add API to control shadow intensity from the game/mod (#11944)x20482022-03-26
| | | * Also Disable shadows when sun/moon is hidden. Fixes #11972.
* Readd basic_debug as a HUD flag (#12020)Lars Müller2022-03-05
|
* Allow get_sky to return a table (#11963)Zughy2022-03-05
|
* Define control(bits) as "unset" for entities (#11995)Lars Müller2022-01-27
|
* Allow resetting celestial vault elements by leaving its arguments empty (#11922)Zughy2022-01-22
|
* Restore pass-through of direction keys (#11924)sfan52022-01-09
| | | This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
* Fix number of tool uses being off by 1..32767 (#11110)Wuzzy2021-10-31
|
* Remove redundant on_dieplayer callssavilli2021-08-28
|
* Joystick sensitivity for player movement (#11262)NeroBurner2021-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* HUD: Reject and warn on invalid stat types (#11548)SmallJoker2021-08-21
| | | | 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
* Validate staticdata and object property length limits (#11511)sfan52021-08-19
| | | | | | 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.
* script: Replace calls to depreated luaL_openlibsfan52021-05-30
|
* Add nametag background setting and object property (#10937)rubenwardy2021-02-17
|
* Preserve immortal group for players when damage is disabledsfan52021-01-31
|
* ObjectRef: fix some v3f checks (#10602)Zughy2021-01-21
|
* Add on_deactivate callback for luaentities (#10723)hecks2021-01-02
|
* Fix unsafe cast in l_objectrubenwardy2020-12-23
|
* ObjectRef: Re-add legacy code for set_physics_override (#10585)SmallJoker2020-11-10
| | | 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.
* Fix ObjectRef errors due to lua_isnil() (#10564)Zughy2020-11-04
| | | Treat 'none' values as 'nil'
* Fix segfault in deprecation logging due to tail call, log by default (#10174)rubenwardy2020-10-31
|
* 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
* Add First Person Attachments (#10360)Jordan Snelling2020-10-04
| | | | | | Fixes some other third person camera specific attachments. Implements a single new flag for entities to be forced visible in first person mode. Old mods do not need to be updated to use the new flag and are fully backwards compatible.
* Deprecate get_player_velocity and add_player_velocity (#10173)rubenwardy2020-10-04
|
* Lua API: Register missing get_texture_mod function (#10338)karamel592020-08-27
|
* Allow binding dig, place actions to keys; remove LMB/RMB hardcodingANAND2020-08-15
| | | | Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
* Exposing the zoom key to Lua API (#9903)Lars Müller2020-06-13
| | | Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
* Server class code cleanups (#9769)Loïc Blot2020-05-07
| | | | | | | | | | | | | | | | | | | * Server::overrideDayNightRatio doesn't require to return bool There is no sense to sending null player, the caller should send a valid object * Server::init: make private & cleanup This function is always called before start() and loads some variables which can be loaded in constructor directly. Make it private and call it directly in start * Split Server inventory responsibility to a dedicated object This splits permit to found various historical issues: * duplicate lookups on player connection * sending inventory to non related player when a player connects * non friendly lookups on detached inventories ownership This reduce the detached inventory complexity and also increased the lookup performance in a quite interesting way for servers with thousands of inventories.
* Sky API: Rename *_tint to fog_*_tint for consistencySmallJoker2020-05-05
|
* set_fov: Add support for time-based transitions (#9705)ANAND2020-05-02
|
* Forbid object:attach(obj, ...) (#9762)Loïc Blot2020-04-27
| | | Fixes #9761
* script: Move SAO usability check so that it covers all functions (#9698)sfan52020-04-18
| | | see also 91eef646a59575bd9ae792e257bb6ad12fafc0b1
* scriptapi: Some small optimizations to value pushing (#9669)sfan52020-04-14
|
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
| | | | | | | Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
* Move PlayerSAO to dedicated filesLoic Blot2020-04-11
|
* Move serveractiveobject & unitsaoLoic Blot2020-04-11
| | | | | Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
* scriptapi: Sort out ServerEnvironment / Environment distinction properlysfan52020-04-11
| | | | | | The API implementation is shared between CSM and SSM. Functions should retrieve a plain env when they do not need any server-specific functions.
* Fix star visilibity and documentation (since 946c03c6)Jordan Snelling2020-03-08
| | | | | | | Fix memory leak (unused allocation) Fix star rendering Rename sky color struct Fix stars on android Remove extraneous .data() from android star draw
* set_sky improvements, set_sun, set_moon and set_starsJordach2020-03-05
|
* Move core.get_connected_players() implementation to C++sfan52020-02-23
| | | | | Keeping the ObjectRefs around in a table isn't ideal and this allows removing the somewhat nonsensical is_player_connected() added in 86ef7147.
* Script API: Check that SAOs are still usable before attempting to use themsfan52020-02-11
|
* Punchwear (improved) (#8959)sfan52019-09-22
|
* Wieldhand: Specify which ItemStack to use (#8961)SmallJoker2019-09-21
| | | Makes 'get_wield_item' to return the "main" ItemStack
* Add support for per-player FOV overrides and multipliersAnand S2019-09-19
|
* Inventory: Send dirty lists where appropriate (#8742)SmallJoker2019-08-24
| | | | | This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code.
* Implement adding velocity to player from Luasfan52019-08-10
| | | | The intended usecase is knockback, but there's potential for more.