mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
[CSM] add on_item_use
(#5544)
This commit is contained in:
@@ -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 =
|
||||
|
Reference in New Issue
Block a user