Implements a complete button and axis layout for the PS5 DualSense
controller on macOS, matching Minecraft-style controls:
- Analog sticks: Movement (left) and camera control (right)
- Face buttons: Jump (X), Sneak (Circle), Camera mode (Square),
Drop item (Triangle)
- Triggers: L2/R2 mapped as analog axes for dig/place actions
- Bumpers: L1/R1 for hotbar navigation
- Stick clicks: L3 for sprint, R3 for zoom
- D-pad: Fly mode, autoforward, minimap, fast movement
- Touchpad click opens inventory
- Options button for pause menu
The layout is automatically detected when a controller named
"DualSense" is connected, or can be manually selected with
`joystick_type = ps5`.
Note: L2/R2 triggers use negative direction (-1) due to their
analog axis range going from -32768 (released) to +32767 (pressed).
* implement 'core.scancode_to_keyname()' and use it to fix something
* fix whitespaces and fix another thing
* ._.
* lol
* rename to get_key_description
* add case for keybindings whose defaults are not bound
* apply y5nw's suggestions
* lmao I'm so dumb
1) Add `node` and `node_pos` field for the `drown` field (analog to `node_damage` type)
2) Add `custom_type` field to allow a standardized way to report more details of the HP change
3) Make `builtin` report a `custom_type` for the HP changes caused by the `/kill` command and `core.do_item_eat`
4) Move the documentation of `PlayerHPChangeReason` to its own section
5) Fill in missing information of said documentation
Large structures which are generated in on_generated callbacks
independently by Lua cannot influence decoration placement. This
change enables such a callback to assume responsibility for generating
decorations itself, presumably after structures are placed, by
disabling decorations in mg_flags and executing
core.generate_decorations.
---------
Co-authored-by: Po Lu <luangruo@yahoo.com>
* Feature: Use the builtin profiler to automatically make zones for mod callback functions.
* Doc: Basic doc for builtin profiler, and better `/profiler` chatcommand help.
* Fix: `register_functions` (table of callback register function names), and `entity_instrumentation` is no longer outdated.
* Fix: Builtin profiler output is no longer printed to debug.txt or to file in world with translation escapes.
* Fix: Entity callback name generation used `obj_def.label` (normally non-existing field), now it uses the entity name.
* Small code improvements, like use of new `Settings.get_bool` with default.