simple-shooter-game/mods/mtg/controls
a-bad-dev 3728e0d29e
i pushed to the wrong repo ._. (#5)
* Hide crafting grid in player inventory

* Put all the MTG stuff in a modpack

---------

Co-authored-by: CrazyladMT <crazyladttd@outlook.com>
2025-12-09 17:42:04 -04:00
..
.github/workflows i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
.luacheckrc i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
debug.lua i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
init.lua i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
license i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
mod.conf i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
readme.md i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00
settingtypes.txt i pushed to the wrong repo ._. (#5) 2025-12-09 17:42:04 -04:00

Controls [controls]

luacheck ContentDB

Utility library for control press/hold/release events.

Rewritten and maintained version of Arcelmi/minetest-controls.

API

Callbacks are supported for all keys in player:get_player_control().

controls.register_on_press(function(player, key)
	-- Called when a key is pressed
	-- player: player object
	-- key: key pressed
end)

controls.register_on_hold(function(player, key, length)
	-- Called every globalstep while a key is held
	-- player: player object
	-- key: key pressed
	-- length: length of time key has been held in seconds
end)

controls.register_on_release(function(player, key, length)
	-- Called when a key is released
	-- player: player object
	-- key: key pressed
	-- length: length of time key was held in seconds
end)