mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] add on_item_use
(#5544)
This commit is contained in:
parent
6658ad3d94
commit
5ebf8f9450
6 changed files with 34 additions and 1 deletions
|
@ -3553,7 +3553,8 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
|
|||
runData.repeat_rightclick_timer = 0;
|
||||
|
||||
if (playeritem_def.usable && isLeftPressed()) {
|
||||
if (getLeftClicked())
|
||||
if (getLeftClicked() && (!client->moddingEnabled()
|
||||
|| !client->getScript()->on_item_use(playeritem, pointed)))
|
||||
client->interact(4, pointed);
|
||||
} else if (pointed.type == POINTEDTHING_NODE) {
|
||||
ToolCapabilities playeritem_toolcap =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue