Minetest logo

IRC log for #minetest, 2017-02-08

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:11 nowhereman joined #minetest
00:11 betterthanyou710 joined #minetest
00:28 swift110 joined #minetest
00:44 fling joined #minetest
01:25 DI3HARD139 joined #minetest
01:30 PsychoVision joined #minetest
01:39 Taose joined #minetest
01:42 swift110 joined #minetest
01:56 Pie-jacker875 joined #minetest
02:00 Sickleroyy joined #minetest
02:01 TheInformer joined #minetest
02:01 TheInformer Where is the code for the android controls located?
02:11 Tmanyo joined #minetest
02:15 noordinaryspide1 joined #minetest
02:15 diemartin joined #minetest
02:21 TheInformer I need help with a mod now
02:24 TheInformer when i try to do local idx = player:hud_add({...}) it returns "Attempt to index a local 'player' (a nil value)
02:25 VanessaE if the place in your code that you're doing that command doesn't have player defined (e.g. passed along as part of a callback), well..you get the idea. :)
02:25 Menche joined #minetest
02:25 VanessaE look in lua_api.txt, you'll be able to tell (it'll be "placer", "digger", "puncher", or whatever, but they're all just the player object)
02:27 TheInformer i had this aswell local player = minetest.get_player_by_name()
02:27 TheInformer and then the above code
02:28 VanessaE pastebin the full code
02:29 VanessaE and, for that ^^ call, you have to supply a player name
02:29 VanessaE (which you almost never want to make up)
02:29 TheInformer http://pastebin.com/WzBr9N4V
02:29 TheInformer so "username"?
02:29 VanessaE no, you can't do that.
02:29 VanessaE you have to get the player name from a call back or something
02:30 thePalindrome Most callbacks just give you the player object anyhow
02:30 VanessaE for example, the above code would probably be best run from within minetest.register_on_prejoinplayer(func(name, ip))
02:30 VanessaE er, on_joinplayer rather
02:31 TheInformer do i need the local player = ...?
02:31 troller joined #minetest
02:32 VanessaE you're not listening :P
02:32 TheInformer Sorry
02:32 VanessaE you have to get the player object from a callback
02:33 VanessaE from there, get the player name if you need it, but in the case of your code there, player would BE the player object (not the name)
02:33 TheInformer minetest:player?
02:33 VanessaE so you need to run your code from inside on_joinplayer or something, and get the player object from there.
02:34 TheInformer ok
02:34 TheInformer i tried
02:34 VanessaE (the lua_api doesn't make it perfectly clear, but on_joinplayer passes along a single item: the player object
02:35 TheInformer something like this?
02:35 TheInformer http://pastebin.com/wyC2eUGf
02:35 VanessaE I'm not sure, but that's close
02:36 TheInformer that returns unexpected symbol near 'local' on line 2
02:37 VanessaE http://pastebin.ubuntu.com/23951881/
02:37 diemartin TheInformer: do you have any programming experience?
02:37 VanessaE this is how it's used in cheapie's newplayer mod
02:38 diemartin also greetings
02:38 VanessaE hi
02:38 * cheapie peeks in for a second and returns to working on his hand dryer mod
02:38 VanessaE you can see in that paste basically what you wanna do
02:39 TheInformer diemartin: i have programming experience just not very much in lua
02:41 Miner_48er joined #minetest
02:42 TheInformer i did it, for now
02:43 TheInformer thanks for the help and i might need more later
02:47 noordinaryspide1 joined #minetest
03:04 TheInformer how do i get the name of a node?
03:05 TheInformer that the player is pointing at
03:09 VanessaE minetest.get_node(pos).name
03:09 VanessaE where pos is taken from pointed_thing
03:10 VanessaE (there's an API call for that, too)
03:10 VanessaE get_pointed_thing_pos or some such
03:11 cheapie VanessaE: https://github.com/cheapie/handdryer
03:11 VanessaE wait what?
03:11 VanessaE :P
03:11 cheapie Adds hand dryers (normal and automatic). Screenshot: https://cheapiesystems.com/media/images/screenshot_20170207_210934.png
03:11 VanessaE heh
03:11 cheapie [19:08:19] <VE-Creative> <cheapie> We need some hand dryers to go with these sinks :P
03:11 cheapie [19:09:02] <VE-Creative> <bulldog1> I agree.
03:11 VanessaE well, you know lezzy and I were considering renaming Home Decor to "Building Decor"...
03:11 VanessaE maybe the time has come to do that :P
03:13 cheapie Maybe.
03:19 TheInformer does minetest.get_node(pos).name return a string?
03:20 VanessaE yes
03:20 TheInformer ok
03:20 TheInformer thought so
03:20 VanessaE but generally you want to do something like,  local node = minetest.get_node(pos)  and then reference node.name later on as needed
03:25 noordinaryspide1 joined #minetest
03:32 ssieb joined #minetest
03:33 ektor_ joined #minetest
03:34 TheInformer i keep getting this same error "Attempted to index local 'node' (a nil value)
03:36 TheInformer pastebin.com/xWpPm3cz this is my current code
03:37 VanessaE does {pos} point to a node that's currently loaded?
03:37 VanessaE e.g. the mapblock it's in has been loaded t
03:37 VanessaE -t
03:38 TheInformer I assume
03:38 VanessaE don't assume
03:38 VanessaE where are you getting {pos} from?
03:38 TheInformer good point...
03:47 TheInformer so could i use something like this "local pos = minetest.get_pointed_thing_position(pointed, under)"
03:48 VanessaE if pointed_thing is passed along to your code from the engine, that may work
03:48 VanessaE you always have to start from the notion of the engine passing things to your code, whether it's the player object, the position of a node, or whatever
03:48 TheInformer what do you mean?
03:49 TheInformer oh
03:49 VanessaE whatever callback it is you run your code from, that's what determines what the engine gives you to work with
03:50 TheInformer what callback should i use?
03:50 VanessaE depends on what your code needs to do
03:51 TheInformer find the name of the block the player is pointed at, for now anyways
03:51 VanessaE and where, in your code, is the player at when you do that?
03:51 VanessaE are you running an on_punch?  on_joinplayer?
03:51 TheInformer on_joinplayer
03:51 TheInformer which wont work
03:51 TheInformer i think
03:52 VanessaE what exactly are you trying to do?
03:52 VanessaE why do you need to know what the player's pointing at?
03:53 TheInformer So I can display some things on the screen
03:53 VanessaE so you have what, a node that you need to punch to cause a formspec to open?
03:53 TheInformer that have to do with the node
03:53 TheInformer No
03:53 TheInformer No formspecs
03:54 VanessaE well whatever it is
03:54 TheInformer i want it to be automatic where you dont have to punch the node
03:54 VanessaE so you want to show something to the player as soon as he or she joins?
03:55 VanessaE or more like if the user walks over a special node or something?
03:55 thePalindrome Seems to be when they point at the note
03:55 thePalindrome *node
03:56 VanessaE you can't just randomly point at a node.  there needs to be some action taken to trigger the event
03:57 cheapie globalstep :P
03:57 VanessaE globalstep doesn't return anything useful except dtime
03:58 cheapie But then you can get a list of players, loop through that, and do whatever.
04:01 VanessaE true, but that's horribly hacky, slow, and you still don't know where the player is and can't determine what they're pointing at, since the latter is client-side
04:01 VanessaE (that's why there needs to be an event that passes pointed_thing or pos to the code)
04:02 VanessaE actually I'm wrong
04:02 VanessaE https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L2931-L2932
04:03 VanessaE so you CAN see what the player's pointed at, maybe
04:03 VanessaE or at least which way they're looking
04:03 VanessaE then you'll have to calculate which node positions are along that vector, read those, and see if one of them should elicit the "display whatever"
04:03 VanessaE but globalstep runs only every 1/10th second
04:04 VanessaE so too slow to catch fast player movements, plus that sort of code would be a CPU hog
04:04 TheInformer i think on_punch will work fine for now
04:04 Menche joined #minetest
04:05 TheInformer Thanks Very Much for all the help
04:05 TheInformer If i ever release this mod I will give credit
04:05 VanessaE good luck
04:05 TheInformer Thanks
04:05 TheInformer bye
04:24 ektor_ joined #minetest
05:10 Menche joined #minetest
05:17 Out`Of`Control joined #minetest
05:37 Freejack joined #minetest
05:42 Hawk777 joined #minetest
06:49 MinetestBot [git] nerzhul -> minetest/minetest: Fix android build 607dab2 https://github.com/minetest/minetest/commit/607dab2b0dff3ca5bf59263e18f8eaab3c21b946 (2017-02-08T06:47:56Z)
06:52 Baffy[m] does anyone know how to adjust the spawn rate on Mobs Redo
06:52 Baffy[m] i see the setting, but what's 1000? what metric is it using?
06:53 Baffy[m] or is there a more popular mob addon?
06:53 Baffy[m] i never see animals anywhere with the default settings
06:55 Baffy[m] plz ping me if you know, i might sleep soonish
07:32 Not_a_Robot joined #minetest
07:40 CWz joined #minetest
08:05 PureTryOut[m] is there no official mob API? not planned either?
08:14 AntumDeluge joined #minetest
08:24 sofar PureTryOut[m]: there is no consensus on any API right now, and none have been submitted for inclusion
08:25 PureTryOut[m] so it's not that it's not wanted, it's just that none has been submitted as of yet?
08:25 PureTryOut[m] seeing as there are some API's in the form of mods, I wonder why none of those authors have submitted a core API yet
08:28 ruskie joined #minetest
08:33 Someguy123 joined #minetest
08:41 grumble joined #minetest
08:53 PureTryOut[m] Mobs are quite an essential aspect of any game like Minetest, strange that there is no API for it yet
09:15 JamesTait joined #minetest
09:17 JamesTait Good morning all! Happy Wednesday, and happy Kite Flying Day! 😃
09:36 DFeniks_ joined #minetest
09:39 kimitux joined #minetest
09:40 frostsno1 joined #minetest
09:40 Kray_ joined #minetest
09:41 dzho_ joined #minetest
09:41 rumble joined #minetest
09:41 Calinou_ joined #minetest
09:43 erstazi_ joined #minetest
09:44 Azelphur_ joined #minetest
09:44 agrecascino_ joined #minetest
09:44 cheapie_ joined #minetest
09:51 bulldozer joined #minetest
09:51 mystik joined #minetest
09:56 nowhereman joined #minetest
10:08 passant[m] baffy: well one way is the documented way - manually for each mob or just increase the check radius ... a function somewhere in the api.lua ... i guess default is 16
10:13 passant[m] i guess it was moved to line 45 some days ago - line 2429 in my case
10:13 passant[m] i changed it to 64 which gave the general mob spawn a quite good balance
10:15 bousket joined #minetest
10:30 troller joined #minetest
10:47 e1z0 joined #minetest
10:52 Fritigern joined #minetest
10:58 Darcidride joined #minetest
10:59 nowhereman joined #minetest
11:11 nowhereman joined #minetest
11:14 nowhereman joined #minetest
11:38 DuCake joined #minetest
11:43 CWz joined #minetest
11:44 Jordach joined #minetest
11:47 shangul joined #minetest
11:49 bousket joined #minetest
11:55 mangul joined #minetest
12:01 Fixer joined #minetest
12:06 shangul joined #minetest
12:11 Krock joined #minetest
12:11 Krock joined #minetest
12:13 troller joined #minetest
12:17 Beerholder joined #minetest
12:31 nowhereman joined #minetest
12:39 YuGiOhJCJ joined #minetest
12:40 betterthanyou710 joined #minetest
13:11 fabian_ joined #minetest
13:11 fabian_ left #minetest
13:12 enricom joined #minetest
13:13 Markow joined #minetest
13:19 rubenwardy joined #minetest
13:20 nowhereman joined #minetest
13:26 Derr If I were a smarter man I'd turn land rush land claims into battle rush arena claims
13:47 Krock joined #minetest
13:47 Krock joined #minetest
13:52 TitiMoby joined #minetest
14:23 shangul joined #minetest
14:31 STHGOM joined #minetest
14:31 STHGOM joined #minetest
14:34 lumidify joined #minetest
14:42 STHGOM_ joined #minetest
14:46 octacian joined #minetest
14:46 octacian joined #minetest
15:03 Kray joined #minetest
15:06 STHGOM joined #minetest
15:14 troller joined #minetest
15:18 whitephoenix joined #minetest
15:24 DonBatman joined #minetest
15:36 dabbill joined #minetest
15:37 lumidify joined #minetest
15:43 twoelk joined #minetest
15:50 rdococ ...
15:54 red-014 left #minetest
15:56 red-001 joined #minetest
15:56 red-001 joined #minetest
16:00 thefamilygrog66 joined #minetest
16:07 diemartin greetings
16:09 Krock red-001, srsly
16:09 Krock hi kaeza
16:09 red-001 hi Krock
16:09 Krock hi red-001
16:10 SylvieLorxu joined #minetest
16:12 lumidify joined #minetest
16:12 diemartin o/ Krock
16:16 Krock \o/
16:16 Jordach \o/
16:19 red-001 joined #minetest
16:19 red-001 joined #minetest
16:19 red-001 joined #minetest
16:23 troller joined #minetest
16:33 Alcyone joined #minetest
16:34 red-001 joined #minetest
16:34 red-001 joined #minetest
16:34 DuCake joined #minetest
16:37 diemartin \o/?
16:39 agaran Hi diemartin
16:43 diemartin o/ agaran
16:55 Tux[Qyou] joined #minetest
16:56 twoelk|2 joined #minetest
16:59 Menche joined #minetest
17:01 Alcyone joined #minetest
17:16 ElectronLibre joined #minetest
17:22 troller joined #minetest
17:24 Tuxedo[Qyou] joined #minetest
17:27 Alcyone joined #minetest
17:42 Alcyone joined #minetest
17:45 Zonzaki joined #minetest
17:48 turtleman joined #minetest
17:54 shangul joined #minetest
18:04 STHGOM joined #minetest
18:04 STHGOM joined #minetest
18:09 mati1 joined #minetest
18:09 mati1 left #minetest
18:26 PsychoVision joined #minetest
18:28 STHGOM joined #minetest
18:29 enricom joined #minetest
18:39 ssieb joined #minetest
18:56 Alcyone joined #minetest
19:04 ungali joined #minetest
19:04 ungali joined #minetest
19:06 enricom joined #minetest
19:07 troller joined #minetest
19:11 bousket_ joined #minetest
19:14 bousket left #minetest
19:16 bousket joined #minetest
19:18 bousket joined #minetest
19:21 ishanyx joined #minetest
19:21 STHGOM joined #minetest
19:21 STHGOM joined #minetest
19:24 STHGOM joined #minetest
19:26 enricom joined #minetest
19:28 Pie-jacker875 joined #minetest
19:29 STHGOM joined #minetest
19:29 STHGOM joined #minetest
19:34 luizrpgluiz joined #minetest
19:35 luizrpgluiz Hi :)
19:35 Krock hi
19:36 luizrpgluiz Some Brazilian here besides me?
19:41 ishanyx joined #minetest
19:54 diemartin uruguayan at chui counts? :p
19:55 GW1 joined #minetest
19:56 diemartin he's gone i guess
20:01 luizrpgluiz joined #minetest
20:14 garywhite joined #minetest
20:16 Menche_ joined #minetest
20:18 davisonio joined #minetest
20:18 Szkodnix joined #minetest
20:21 nasuga diemartin: he returned
20:26 garywhite joined #minetest
20:38 betterthanyou710 joined #minetest
20:51 Fixer !seen grambuduts
20:51 MinetestBot Fixer: Sorry, I haven't seen grambuduts around.
20:57 ThomasJaguar1212 joined #minetest
21:22 STHGOM joined #minetest
21:22 STHGOM joined #minetest
21:36 Spidergirl321 joined #minetest
21:36 noordinaryspider joined #minetest
21:36 Spidergirl321 left #minetest
21:36 nowhereman joined #minetest
21:36 noordinaryspider left #minetest
21:37 Nobody joined #minetest
21:46 emunand joined #minetest
22:05 Fixer !seen deaco
22:05 MinetestBot Fixer: Sorry, I haven't seen deaco around.
22:09 TheInformer joined #minetest
22:10 TheInformer Could i use the code from this mod https://forum.minetest.net/viewtopic.php?f=9&amp;t=10086 as long as i left a link to the source?
22:11 TheInformer And gave credit to the creator ofc
22:12 DMackey joined #minetest
22:13 sfan5 as you can see in the post it's "Code: LGPL"
22:13 sfan5 so you need to follow the license terms of the LGPL
22:14 TheInformer Ok
22:15 TheInformer So I just have to link the source code?
22:17 rubenwardy you also have to license your code under LGPL
22:21 nasuga TheInformer: This might help, [ What are the GPL and LGPL and how do they differ? ] https://www.youtube.com/watch?v=JlIrSMzF8T4
22:21 TheInformer Ok thanks
22:22 octacian joined #minetest
22:22 octacian joined #minetest
22:30 Darcidride joined #minetest
22:30 SylvieLorxu joined #minetest
22:31 troller joined #minetest
23:00 wilkgr joined #minetest
23:01 Szkodnix joined #minetest
23:06 FreeFull joined #minetest
23:07 lfgr joined #minetest
23:20 dabbill joined #minetest
23:38 STHGOM joined #minetest
23:41 troller joined #minetest
23:43 lordfingle joined #minetest

| Channels | #minetest index | Today | | Google Search | Plaintext