diff --git a/util/mt-ide-helper/classes/ObjectRef.lua b/util/mt-ide-helper/classes/ObjectRef.lua index 46f09019f..a7483efe1 100644 --- a/util/mt-ide-helper/classes/ObjectRef.lua +++ b/util/mt-ide-helper/classes/ObjectRef.lua @@ -1,6 +1,97 @@ --- @class ObjectRef ObjectRef = {} + --- @return Position function ObjectRef:get_pos() end --- @param pos Position function ObjectRef:set_pos(pos) end + +--TODO: +--* `get_velocity()`: returns the velocity, a vector. +--* `add_velocity(vel)` +--* `vel` is a vector, e.g. `{x=0.0, y=2.3, z=1.0}` +--* In comparison to using get_velocity, adding the velocity and then using +--set_velocity, add_velocity is supposed to avoid synchronization problems. +--Additionally, players also do not support set_velocity. +--* If a player: +--* Does not apply during free_move. +--* Note that since the player speed is normalized at each move step, +--increasing e.g. Y velocity beyond what would usually be achieved +--(see: physics overrides) will cause existing X/Z velocity to be reduced. +--* Example: `add_velocity({x=0, y=6.5, z=0})` is equivalent to +--pressing the jump key (assuming default settings) +--* `move_to(pos, continuous=false)` +--* Does an interpolated move for Lua entities for visually smooth transitions. +--* If `continuous` is true, the Lua entity will not be moved to the current +--position before starting the interpolated move. +--* For players this does the same as `set_pos`,`continuous` is ignored. +--* `punch(puncher, time_from_last_punch, tool_capabilities, direction)` +--* `puncher` = another `ObjectRef`, +--* `time_from_last_punch` = time since last punch action of the puncher +--* `direction`: can be `nil` +--* `right_click(clicker)`; `clicker` is another `ObjectRef` +--* `get_hp()`: returns number of health points +--* `set_hp(hp, reason)`: set number of health points +--* See reason in register_on_player_hpchange +--* Is limited to the range of 0 ... 65535 (2^16 - 1) +--* For players: HP are also limited by `hp_max` specified in object properties +--* `get_inventory()`: returns an `InvRef` for players, otherwise returns `nil` +--* `get_wield_list()`: returns the name of the inventory list the wielded item +--is in. +--* `get_wield_index()`: returns the index of the wielded item +--* `get_wielded_item()`: returns an `ItemStack` +--* `set_wielded_item(item)`: replaces the wielded item, returns `true` if +--successful. +--* `set_armor_groups({group1=rating, group2=rating, ...})` +--* `get_armor_groups()`: returns a table with the armor group ratings +--* `set_animation(frame_range, frame_speed, frame_blend, frame_loop)` +--* `frame_range`: table {x=num, y=num}, default: `{x=1, y=1}` +--* `frame_speed`: number, default: `15.0` +--* `frame_blend`: number, default: `0.0` +--* `frame_loop`: boolean, default: `true` +--* `get_animation()`: returns `range`, `frame_speed`, `frame_blend` and +--`frame_loop`. +--* `set_animation_frame_speed(frame_speed)` +--* `frame_speed`: number, default: `15.0` +--* `set_attach(parent[, bone, position, rotation, forced_visible])` +--* `parent`: `ObjectRef` to attach to +--* `bone`: default `""` (the root bone) +--* `position`: relative position, default `{x=0, y=0, z=0}` +--* `rotation`: relative rotation in degrees, default `{x=0, y=0, z=0}` +--* `forced_visible`: Boolean to control whether the attached entity +--should appear in first person, default `false`. +--* Please also read the [Attachments] section above. +--* This command may fail silently (do nothing) when it would result +--in circular attachments. +--* `get_attach()`: returns parent, bone, position, rotation, forced_visible, +--or nil if it isn't attached. +--* `get_children()`: returns a list of ObjectRefs that are attached to the +-- object. +--* `set_detach()` +--* `set_bone_position([bone, position, rotation])` +-- * `bone`: string. Default is `""`, the root bone +-- * `position`: `{x=num, y=num, z=num}`, relative, `default {x=0, y=0, z=0}` +-- * `rotation`: `{x=num, y=num, z=num}`, default `{x=0, y=0, z=0}` +--* `get_bone_position(bone)`: returns position and rotation of the bone +--* `set_properties(object property table)` +--* `get_properties()`: returns object property table +--* `is_player()`: returns true for players, false otherwise +--* `get_nametag_attributes()` +-- * returns a table with the attributes of the nametag of an object +-- * { +-- text = "", +-- color = {a=0..255, r=0..255, g=0..255, b=0..255}, +-- bgcolor = {a=0..255, r=0..255, g=0..255, b=0..255}, +-- } +--* `set_nametag_attributes(attributes)` +-- * sets the attributes of the nametag of an object +-- * `attributes`: +-- { +-- text = "My Nametag", +-- color = ColorSpec, +-- -- ^ Text color +-- bgcolor = ColorSpec or false, +-- -- ^ Sets background color of nametag +-- -- `false` will cause the background to be set automatically based on user settings +-- -- Default: false +-- } diff --git a/util/mt-ide-helper/classes/ObjectRef/Entity.lua b/util/mt-ide-helper/classes/ObjectRef/Entity.lua new file mode 100644 index 000000000..3be77a177 --- /dev/null +++ b/util/mt-ide-helper/classes/ObjectRef/Entity.lua @@ -0,0 +1,43 @@ +---@class Entity: ObjectRef +Entity = {} + +--TODO: +--* `remove()`: remove object +--* The object is removed after returning from Lua. However the `ObjectRef` +--itself instantly becomes unusable with all further method calls having +--no effect and returning `nil`. +--* `set_velocity(vel)` +--* `vel` is a vector, e.g. `{x=0.0, y=2.3, z=1.0}` +--* `set_acceleration(acc)` +--* `acc` is a vector +--* `get_acceleration()`: returns the acceleration, a vector +--* `set_rotation(rot)` +--* `rot` is a vector (radians). X is pitch (elevation), Y is yaw (heading) +--and Z is roll (bank). +--* Does not reset rotation incurred through `automatic_rotate`. +--Remove & readd your objects to force a certain rotation. +--* `get_rotation()`: returns the rotation, a vector (radians) +--* `set_yaw(yaw)`: sets the yaw in radians (heading). +--* `get_yaw()`: returns number in radians +--* `set_texture_mod(mod)` +--* Set a texture modifier to the base texture, for sprites and meshes. +--* When calling `set_texture_mod` again, the previous one is discarded. +--* `mod` the texture modifier. See [Texture modifiers]. +--* `get_texture_mod()` returns current texture modifier +--* `set_sprite(start_frame, num_frames, framelength, select_x_by_camera)` +--* Specifies and starts a sprite animation +--* Animations iterate along the frame `y` position. +--* `start_frame`: {x=column number, y=row number}, the coordinate of the +--first frame, default: `{x=0, y=0}` +--* `num_frames`: Total frames in the texture, default: `1` +--* `framelength`: Time per animated frame in seconds, default: `0.2` +--* `select_x_by_camera`: Only for visual = `sprite`. Changes the frame `x` +--position according to the view direction. default: `false`. +--* First column: subject facing the camera +--* Second column: subject looking to the left +--* Third column: subject backing the camera +--* Fourth column: subject looking to the right +--* Fifth column: subject viewed from above +--* Sixth column: subject viewed from below +--* `get_entity_name()` (**Deprecated**: Will be removed in a future version, use the field `self.name` instead) +--* `get_luaentity()` diff --git a/util/mt-ide-helper/classes/ObjectRef/Player.lua b/util/mt-ide-helper/classes/ObjectRef/Player.lua new file mode 100644 index 000000000..3b3d9e5d2 --- /dev/null +++ b/util/mt-ide-helper/classes/ObjectRef/Player.lua @@ -0,0 +1,329 @@ +---@class Player: ObjectRef +Player = {} + +---@return string +function Player:get_player_name() end +function Player:get_inventory() end + +--TODO: +--* `get_player_name()`: returns `""` if is not a player +--* `get_player_velocity()`: **DEPRECATED**, use get_velocity() instead. +-- table {x, y, z} representing the player's instantaneous velocity in nodes/s +--* `add_player_velocity(vel)`: **DEPRECATED**, use add_velocity(vel) instead. +--* `get_look_dir()`: get camera direction as a unit vector +--* `get_look_vertical()`: pitch in radians +-- * Angle ranges between -pi/2 and pi/2, which are straight up and down +-- respectively. +--* `get_look_horizontal()`: yaw in radians +-- * Angle is counter-clockwise from the +z direction. +--* `set_look_vertical(radians)`: sets look pitch +-- * radians: Angle from looking forward, where positive is downwards. +--* `set_look_horizontal(radians)`: sets look yaw +-- * radians: Angle from the +z direction, where positive is counter-clockwise. +--* `get_look_pitch()`: pitch in radians - Deprecated as broken. Use +-- `get_look_vertical`. +-- * Angle ranges between -pi/2 and pi/2, which are straight down and up +-- respectively. +--* `get_look_yaw()`: yaw in radians - Deprecated as broken. Use +-- `get_look_horizontal`. +-- * Angle is counter-clockwise from the +x direction. +--* `set_look_pitch(radians)`: sets look pitch - Deprecated. Use +-- `set_look_vertical`. +--* `set_look_yaw(radians)`: sets look yaw - Deprecated. Use +-- `set_look_horizontal`. +--* `get_breath()`: returns player's breath +--* `set_breath(value)`: sets player's breath +-- * values: +-- * `0`: player is drowning +-- * max: bubbles bar is not shown +-- * See [Object properties] for more information +-- * Is limited to range 0 ... 65535 (2^16 - 1) +--* `set_fov(fov, is_multiplier, transition_time)`: Sets player's FOV +-- * `fov`: FOV value. +-- * `is_multiplier`: Set to `true` if the FOV value is a multiplier. +-- Defaults to `false`. +-- * `transition_time`: If defined, enables smooth FOV transition. +-- Interpreted as the time (in seconds) to reach target FOV. +-- If set to 0, FOV change is instantaneous. Defaults to 0. +-- * Set `fov` to 0 to clear FOV override. +--* `get_fov()`: Returns the following: +-- * Server-sent FOV value. Returns 0 if an FOV override doesn't exist. +-- * Boolean indicating whether the FOV value is a multiplier. +-- * Time (in seconds) taken for the FOV transition. Set by `set_fov`. +--* `set_attribute(attribute, value)`: DEPRECATED, use get_meta() instead +-- * Sets an extra attribute with value on player. +-- * `value` must be a string, or a number which will be converted to a +-- string. +-- * If `value` is `nil`, remove attribute from player. +--* `get_attribute(attribute)`: DEPRECATED, use get_meta() instead +-- * Returns value (a string) for extra attribute. +-- * Returns `nil` if no attribute found. +--* `get_meta()`: Returns a PlayerMetaRef. +--* `set_inventory_formspec(formspec)` +-- * Redefine player's inventory form +-- * Should usually be called in `on_joinplayer` +-- * If `formspec` is `""`, the player's inventory is disabled. +--* `get_inventory_formspec()`: returns a formspec string +--* `set_formspec_prepend(formspec)`: +-- * the formspec string will be added to every formspec shown to the user, +-- except for those with a no_prepend[] tag. +-- * This should be used to set style elements such as background[] and +-- bgcolor[], any non-style elements (eg: label) may result in weird behavior. +-- * Only affects formspecs shown after this is called. +--* `get_formspec_prepend(formspec)`: returns a formspec string. +--* `get_player_control()`: returns table with player pressed keys +-- * The table consists of fields with the following boolean values +-- representing the pressed keys: `up`, `down`, `left`, `right`, `jump`, +-- `aux1`, `sneak`, `dig`, `place`, `LMB`, `RMB`, and `zoom`. +-- * The fields `LMB` and `RMB` are equal to `dig` and `place` respectively, +-- and exist only to preserve backwards compatibility. +-- * Returns an empty table `{}` if the object is not a player. +--* `get_player_control_bits()`: returns integer with bit packed player pressed +-- keys. +-- * Bits: +-- * 0 - up +-- * 1 - down +-- * 2 - left +-- * 3 - right +-- * 4 - jump +-- * 5 - aux1 +-- * 6 - sneak +-- * 7 - dig +-- * 8 - place +-- * 9 - zoom +-- * Returns `0` (no bits set) if the object is not a player. +--* `set_physics_override(override_table)` +-- * `override_table` is a table with the following fields: +-- * `speed`: multiplier to default walking speed value (default: `1`) +-- * `jump`: multiplier to default jump value (default: `1`) +-- * `gravity`: multiplier to default gravity value (default: `1`) +-- * `sneak`: whether player can sneak (default: `true`) +-- * `sneak_glitch`: whether player can use the new move code replications +-- of the old sneak side-effects: sneak ladders and 2 node sneak jump +-- (default: `false`) +-- * `new_move`: use new move/sneak code. When `false` the exact old code +-- is used for the specific old sneak behavior (default: `true`) +--* `get_physics_override()`: returns the table given to `set_physics_override` +--* `hud_add(hud definition)`: add a HUD element described by HUD def, returns ID +-- number on success +--* `hud_remove(id)`: remove the HUD element of the specified id +--* `hud_change(id, stat, value)`: change a value of a previously added HUD +-- element. +-- * `stat` supports the same keys as in the hud definition table except for +-- `"hud_elem_type"`. +--* `hud_get(id)`: gets the HUD element definition structure of the specified ID +--* `hud_set_flags(flags)`: sets specified HUD flags of player. +-- * `flags`: A table with the following fields set to boolean values +-- * `hotbar` +-- * `healthbar` +-- * `crosshair` +-- * `wielditem` +-- * `breathbar` +-- * `minimap`: Modifies the client's permission to view the minimap. +-- The client may locally elect to not view the minimap. +-- * `minimap_radar`: is only usable when `minimap` is true +-- * `basic_debug`: Allow showing basic debug info that might give a gameplay advantage. +-- This includes map seed, player position, look direction, the pointed node and block bounds. +-- Does not affect players with the `debug` privilege. +-- * If a flag equals `nil`, the flag is not modified +--* `hud_get_flags()`: returns a table of player HUD flags with boolean values. +-- * See `hud_set_flags` for a list of flags that can be toggled. +--* `hud_set_hotbar_itemcount(count)`: sets number of items in builtin hotbar +-- * `count`: number of items, must be between `1` and `32` +--* `hud_get_hotbar_itemcount`: returns number of visible items +--* `hud_set_hotbar_image(texturename)` +-- * sets background image for hotbar +--* `hud_get_hotbar_image`: returns texturename +--* `hud_set_hotbar_selected_image(texturename)` +-- * sets image for selected item of hotbar +--* `hud_get_hotbar_selected_image`: returns texturename +--* `set_minimap_modes({mode, mode, ...}, selected_mode)` +-- * Overrides the available minimap modes (and toggle order), and changes the +-- selected mode. +-- * `mode` is a table consisting of up to four fields: +-- * `type`: Available type: +-- * `off`: Minimap off +-- * `surface`: Minimap in surface mode +-- * `radar`: Minimap in radar mode +-- * `texture`: Texture to be displayed instead of terrain map +-- (texture is centered around 0,0 and can be scaled). +-- Texture size is limited to 512 x 512 pixel. +-- * `label`: Optional label to display on minimap mode toggle +-- The translation must be handled within the mod. +-- * `size`: Sidelength or diameter, in number of nodes, of the terrain +-- displayed in minimap +-- * `texture`: Only for texture type, name of the texture to display +-- * `scale`: Only for texture type, scale of the texture map in nodes per +-- pixel (for example a `scale` of 2 means each pixel represents a 2x2 +-- nodes square) +-- * `selected_mode` is the mode index to be selected after modes have been changed +-- (0 is the first mode). +--* `set_sky(sky_parameters)` +-- * The presence of the function `set_sun`, `set_moon` or `set_stars` indicates +-- whether `set_sky` accepts this format. Check the legacy format otherwise. +-- * Passing no arguments resets the sky to its default values. +-- * `sky_parameters` is a table with the following optional fields: +-- * `base_color`: ColorSpec, changes fog in "skybox" and "plain". +-- (default: `#ffffff`) +-- * `type`: Available types: +-- * `"regular"`: Uses 0 textures, `base_color` ignored +-- * `"skybox"`: Uses 6 textures, `base_color` used as fog. +-- * `"plain"`: Uses 0 textures, `base_color` used as both fog and sky. +-- (default: `"regular"`) +-- * `textures`: A table containing up to six textures in the following +-- order: Y+ (top), Y- (bottom), X- (west), X+ (east), Z+ (north), Z- (south). +-- * `clouds`: Boolean for whether clouds appear. (default: `true`) +-- * `sky_color`: A table used in `"regular"` type only, containing the +-- following values (alpha is ignored): +-- * `day_sky`: ColorSpec, for the top half of the sky during the day. +-- (default: `#61b5f5`) +-- * `day_horizon`: ColorSpec, for the bottom half of the sky during the day. +-- (default: `#90d3f6`) +-- * `dawn_sky`: ColorSpec, for the top half of the sky during dawn/sunset. +-- (default: `#b4bafa`) +-- The resulting sky color will be a darkened version of the ColorSpec. +-- Warning: The darkening of the ColorSpec is subject to change. +-- * `dawn_horizon`: ColorSpec, for the bottom half of the sky during dawn/sunset. +-- (default: `#bac1f0`) +-- The resulting sky color will be a darkened version of the ColorSpec. +-- Warning: The darkening of the ColorSpec is subject to change. +-- * `night_sky`: ColorSpec, for the top half of the sky during the night. +-- (default: `#006bff`) +-- The resulting sky color will be a dark version of the ColorSpec. +-- Warning: The darkening of the ColorSpec is subject to change. +-- * `night_horizon`: ColorSpec, for the bottom half of the sky during the night. +-- (default: `#4090ff`) +-- The resulting sky color will be a dark version of the ColorSpec. +-- Warning: The darkening of the ColorSpec is subject to change. +-- * `indoors`: ColorSpec, for when you're either indoors or underground. +-- (default: `#646464`) +-- * `fog_sun_tint`: ColorSpec, changes the fog tinting for the sun +-- at sunrise and sunset. (default: `#f47d1d`) +-- * `fog_moon_tint`: ColorSpec, changes the fog tinting for the moon +-- at sunrise and sunset. (default: `#7f99cc`) +-- * `fog_tint_type`: string, changes which mode the directional fog +-- abides by, `"custom"` uses `sun_tint` and `moon_tint`, while +-- `"default"` uses the classic Minetest sun and moon tinting. +-- Will use tonemaps, if set to `"default"`. (default: `"default"`) +--* `set_sky(base_color, type, {texture names}, clouds)` +-- * Deprecated. Use `set_sky(sky_parameters)` +-- * `base_color`: ColorSpec, defaults to white +-- * `type`: Available types: +-- * `"regular"`: Uses 0 textures, `bgcolor` ignored +-- * `"skybox"`: Uses 6 textures, `bgcolor` used +-- * `"plain"`: Uses 0 textures, `bgcolor` used +-- * `clouds`: Boolean for whether clouds appear in front of `"skybox"` or +-- `"plain"` custom skyboxes (default: `true`) +--* `get_sky(as_table)`: +-- * `as_table`: boolean that determines whether the deprecated version of this +-- function is being used. +-- * `true` returns a table containing sky parameters as defined in `set_sky(sky_parameters)`. +-- * Deprecated: `false` or `nil` returns base_color, type, table of textures, +-- clouds. +--* `get_sky_color()`: +-- * Deprecated: Use `get_sky(as_table)` instead. +-- * returns a table with the `sky_color` parameters as in `set_sky`. +--* `set_sun(sun_parameters)`: +-- * Passing no arguments resets the sun to its default values. +-- * `sun_parameters` is a table with the following optional fields: +-- * `visible`: Boolean for whether the sun is visible. +-- (default: `true`) +-- * `texture`: A regular texture for the sun. Setting to `""` +-- will re-enable the mesh sun. (default: "sun.png", if it exists) +-- The texture appears non-rotated at sunrise and rotated 180 degrees +-- (upside down) at sunset. +-- * `tonemap`: A 512x1 texture containing the tonemap for the sun +-- (default: `"sun_tonemap.png"`) +-- * `sunrise`: A regular texture for the sunrise texture. +-- (default: `"sunrisebg.png"`) +-- * `sunrise_visible`: Boolean for whether the sunrise texture is visible. +-- (default: `true`) +-- * `scale`: Float controlling the overall size of the sun. (default: `1`) +-- Note: For legacy reasons, the sun is bigger than the moon by a factor +-- of about `1.57` for equal `scale` values. +--* `get_sun()`: returns a table with the current sun parameters as in +-- `set_sun`. +--* `set_moon(moon_parameters)`: +-- * Passing no arguments resets the moon to its default values. +-- * `moon_parameters` is a table with the following optional fields: +-- * `visible`: Boolean for whether the moon is visible. +-- (default: `true`) +-- * `texture`: A regular texture for the moon. Setting to `""` +-- will re-enable the mesh moon. (default: `"moon.png"`, if it exists) +-- The texture appears non-rotated at sunrise / moonset and rotated 180 +-- degrees (upside down) at sunset / moonrise. +-- Note: Relative to the sun, the moon texture is hence rotated by 180°. +-- You can use the `^[transformR180` texture modifier to achieve the same orientation. +-- * `tonemap`: A 512x1 texture containing the tonemap for the moon +-- (default: `"moon_tonemap.png"`) +-- * `scale`: Float controlling the overall size of the moon (default: `1`) +-- Note: For legacy reasons, the sun is bigger than the moon by a factor +-- of about `1.57` for equal `scale` values. +--* `get_moon()`: returns a table with the current moon parameters as in +-- `set_moon`. +--* `set_stars(star_parameters)`: +-- * Passing no arguments resets stars to their default values. +-- * `star_parameters` is a table with the following optional fields: +-- * `visible`: Boolean for whether the stars are visible. +-- (default: `true`) +-- * `day_opacity`: Float for maximum opacity of stars at day. +-- No effect if `visible` is false. +-- (default: 0.0; maximum: 1.0; minimum: 0.0) +-- * `count`: Integer number to set the number of stars in +-- the skybox. Only applies to `"skybox"` and `"regular"` sky types. +-- (default: `1000`) +-- * `star_color`: ColorSpec, sets the colors of the stars, +-- alpha channel is used to set overall star brightness. +-- (default: `#ebebff69`) +-- * `scale`: Float controlling the overall size of the stars (default: `1`) +--* `get_stars()`: returns a table with the current stars parameters as in +-- `set_stars`. +--* `set_clouds(cloud_parameters)`: set cloud parameters +-- * Passing no arguments resets clouds to their default values. +-- * `cloud_parameters` is a table with the following optional fields: +-- * `density`: from `0` (no clouds) to `1` (full clouds) (default `0.4`) +-- * `color`: basic cloud color with alpha channel, ColorSpec +-- (default `#fff0f0e5`). +-- * `ambient`: cloud color lower bound, use for a "glow at night" effect. +-- ColorSpec (alpha ignored, default `#000000`) +-- * `height`: cloud height, i.e. y of cloud base (default per conf, +-- usually `120`) +-- * `thickness`: cloud thickness in nodes (default `16`) +-- * `speed`: 2D cloud speed + direction in nodes per second +-- (default `{x=0, z=-2}`). +--* `get_clouds()`: returns a table with the current cloud parameters as in +-- `set_clouds`. +--* `override_day_night_ratio(ratio or nil)` +-- * `0`...`1`: Overrides day-night ratio, controlling sunlight to a specific +-- amount. +-- * `nil`: Disables override, defaulting to sunlight based on day-night cycle +--* `get_day_night_ratio()`: returns the ratio or nil if it isn't overridden +--* `set_local_animation(idle, walk, dig, walk_while_dig, frame_speed)`: +-- set animation for player model in third person view. +-- * Every animation equals to a `{x=starting frame, y=ending frame}` table. +-- * `frame_speed` sets the animations frame speed. Default is 30. +--* `get_local_animation()`: returns idle, walk, dig, walk_while_dig tables and +-- `frame_speed`. +--* `set_eye_offset([firstperson, thirdperson])`: defines offset vectors for +-- camera per player. An argument defaults to `{x=0, y=0, z=0}` if unspecified. +-- * in first person view +-- * in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`) +--* `get_eye_offset()`: returns first and third person offsets. +--* `send_mapblock(blockpos)`: +-- * Sends an already loaded mapblock to the player. +-- * Returns `false` if nothing was sent (note that this can also mean that +-- the client already has the block) +-- * Resource intensive - use sparsely +--* `set_lighting(light_definition)`: sets lighting for the player +-- * `light_definition` is a table with the following optional fields: +-- * `saturation` sets the saturation (vividness). +-- values > 1 increase the saturation +-- values in [0,1) decrease the saturation +-- * This value has no effect on clients who have the "Tone Mapping" shader disabled. +-- * `shadows` is a table that controls ambient shadows +-- * `intensity` sets the intensity of the shadows from 0 (no shadows, default) to 1 (blackness) +-- * This value has no effect on clients who have the "Dynamic Shadows" shader disabled. +--* `get_lighting()`: returns the current state of lighting for the player. +-- * Result is a table with the same fields as `light_definition` in `set_lighting`. +--* `respawn()`: Respawns the player using the same mechanism as the death screen, +-- including calling on_respawnplayer callbacks. diff --git a/util/mt-ide-helper/classes/Player.lua b/util/mt-ide-helper/classes/Player.lua deleted file mode 100644 index 3384555d9..000000000 --- a/util/mt-ide-helper/classes/Player.lua +++ /dev/null @@ -1,6 +0,0 @@ ----@class Player : ObjectRef -Player = {} - ----@return string -function Player:get_player_name() end -function Player:get_inventory() end