In compiler design especially, leaving behavior as "undefined" is a _strong_ condition that basically states that all possible integrity is violated; it's the kind of thing that happens when, say, dereferencing a pointer with unknown provenance, and most typically leads to a crash, but can result in all sorts of spectacular errors--thus, "it is undefined" how your program will melt down.
The pure-Lua implementation of `key_value_swap` does not permit UB _per se_ (assuming the implementation of Lua itself is sound), but does deterministically choose the value to which a key is mapped (the last in visitation order wins--since visitation order is arbitrary, _some_ value _will_ be chosen). Most importantly, the program won't do something wildly unexpected.
set_sky: New feature, keep note about the old syntax
get_us_time: Document overflow
localplayer: Document "nil" behaviour before initialization
collision_box: Safe limit of "1.45"
Formspec element to display models, written by @kilbith, rebased and tweaked.
Co-authored-by: Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Co-authored-by: sfan5 <sfan5@live.de>
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday).
Co-authored-by: rubenwardy <rw@rubenwardy.com>
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
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.
Allows catching a chatcommand call just after the command and the
parameters are parsed but before its existence is checked and before the
corresponding function is run. Returning `true` from a callback function
will prevent default handling of the command leaving mods to handle the
command manually.
"Predicts" whether something will be swapped for allow callbacks, then calls callbacks a second time with swapped properties.
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>