[MOD] Callback API for key and mousebutton[1.0][controls]

User avatar
Arcelmi
Member
 
Posts: 68
Joined: Mon Dec 28, 2015 16:24
Location: Germany
GitHub: Arcelmi
IRC: Arcelmi
In-game: Arcelmi

[MOD] Callback API for key and mousebutton[1.0][controls]

by Arcelmi » Thu Sep 14, 2017 13:09

Description:


This mod adds callbacks when a player press, hold or release a button.

Download Information:


Latest version: 1.0
Download
GitHub
License: GNU Lesser General Public License v2.1

API:


+ controls.register_on_press


+ controls.register_on_hold


+ controls.register_on_release
Last edited by Arcelmi on Tue Dec 12, 2017 16:44, edited 1 time in total.
I don't speak very good English... | My mods

I've got a signature!
 

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [MOD] Callback API for key and mousebutton[controls][1.0

by DS-minetest » Thu Sep 14, 2017 14:08

I have already done something like this: https://forum.minetest.net/viewtopic.php?t=17780
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Arcelmi
Member
 
Posts: 68
Joined: Mon Dec 28, 2015 16:24
Location: Germany
GitHub: Arcelmi
IRC: Arcelmi
In-game: Arcelmi

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by Arcelmi » Thu Sep 14, 2017 14:10

Sorry I didn't see this...
Because I don't searched after something like this, because I wanted to update this with my bow mod.
I don't thought that somebody had make something like this.
I don't speak very good English... | My mods

I've got a signature!
 

User avatar
Arcelmi
Member
 
Posts: 68
Joined: Mon Dec 28, 2015 16:24
Location: Germany
GitHub: Arcelmi
IRC: Arcelmi
In-game: Arcelmi

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by Arcelmi » Thu Sep 14, 2017 14:14

Does your mod also handle key releases? I didn't see anything like this in your code.
I don't speak very good English... | My mods

I've got a signature!
 

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by DS-minetest » Thu Sep 14, 2017 14:55

Arcelmi wrote:Does your mod also handle key releases? I didn't see anything like this in your code.

I think, I forgot that.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [MOD] Callback API for key and mousebutton[controls][1.0

by DS-minetest » Thu Sep 14, 2017 16:29

azekill_DIABLO wrote:
DS-minetest wrote:I have already done something like this: https://forum.minetest.net/viewtopic.php?t=17780

it was CSM, this one is server side: a big improvement

No, it was (and is) both.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

User avatar
Wuzzy
Member
 
Posts: 3241
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by Wuzzy » Mon Nov 06, 2017 15:10

Care to suggest to include this functionality into core Minetest, or at least builtin?
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by azekill_DIABLO » Mon Nov 06, 2017 15:45

Wuzzy wrote:include this functionality into core


Including a functionnality in the core... What it's possible?
 

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by DS-minetest » Mon Nov 06, 2017 17:40

azekill_DIABLO wrote:
Wuzzy wrote:include this functionality into core


Including a functionnality in the core... What it's possible?

Minetest has some builtin lua stuff, someone could add this mod's functionality there as helper and make a pull request to the minetest github repository.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by azekill_DIABLO » Mon Nov 06, 2017 17:42

was ironic :D a builtin function would be simpler normally... but idk about the server connection... with builtin lua...
 

User avatar
Arcelmi
Member
 
Posts: 68
Joined: Mon Dec 28, 2015 16:24
Location: Germany
GitHub: Arcelmi
IRC: Arcelmi
In-game: Arcelmi

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by Arcelmi » Tue Dec 12, 2017 16:44

License changed to GNU Lesser General Public License v2.1
I don't speak very good English... | My mods

I've got a signature!
 

User avatar
RSLRedstonier
Member
 
Posts: 443
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [MOD] Callback API for key and mousebutton[1.0][controls

by RSLRedstonier » Tue Jan 16, 2018 18:02

wow this will save me a lot of time with an ultimate armor suit which has tons of special ability's which each need key binds
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 


Return to WIP Mods



Who is online

Users browsing this forum: Bing [Bot], gpcf and 5 guests