Eat/drink with rightclick

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Eat/drink with rightclick

by burli » Thu Jun 09, 2016 07:28

Eating/drinking should be activated by rightclick, not leftclick. It happens to often, that I accidently eat something if I don't need it
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Eat/drink with rightclick

by azekill_DIABLO » Thu Jun 09, 2016 10:25

yes i think it's an engine limitation....remember we can place the apples!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Eat/drink with rightclick

by rubenwardy » Thu Jun 09, 2016 10:47

Items currently use on_use. You could use on_rightclick or whatever the callback is called. But what if the food is a node that the user wants to place?
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Eat/drink with rightclick

by burli » Thu Jun 09, 2016 12:04

azekill_DIABLO wrote:remember we can place the apples!

You are right, forgot this. Then something like shift (sneak) rightclick (or left)
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: Eat/drink with rightclick

by everamzah » Thu Jun 09, 2016 12:30

Apples (default:apple) can be placed, but bread (farming:bread) can not. I think both should use on_rightclick() to eat, and both be able to place while sneaking.

OT but related: Sneaking shouldn't be equal to crouching. Walking speed is not related to direction - and they ought to be separate - meaning a new key would be needed for descend. I'm aware AUX1 ('Use', default [E]) can be used to descend, with the use of a setting, but that's the key to run.

Anyway a mod could be made to override the items and make them require right-clicking to eat.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Eat/drink with rightclick

by TenPlus1 » Thu Jun 09, 2016 13:25

Certain foods need right-click to plant in soil for crops, if you re-purpose right click then it stops you growing them... Stick with the on_use to eat, if you use a food item you eat a food item... simple.
 

Ambistic
New member
 
Posts: 2
Joined: Sun Jun 12, 2016 11:13
GitHub: Ambistic
IRC: Ambistic
In-game: Ambistic

Re: Eat/drink with rightclick

by Ambistic » Mon Jun 13, 2016 16:56

It's easy to accidentely eat one if we don't need because they're consumed even if our health is max and it's instantaneous, there is no animation that could warn you're eating the apple and not breaking a node
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 4 guests

cron