Minetest logo

IRC log for #minetest-dev, 2015-11-17

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

All times shown according to UTC.

Time Nick Message
00:34 kahrl joined #minetest-dev
00:40 luizrpgluiz left #minetest-dev
00:44 thePalindrome joined #minetest-dev
00:46 thePalindrome How hard should I try to avoid creating new interfaces? I know I should avoid removing/changing old ones at all costs, but what about adding them?
01:21 hmmmm not sure what you're referring to
01:22 hmmmm it's quite case dependent
01:23 thePalindrome I'm working on issue #1548
01:23 thePalindrome I'm adding an on_rightclick for items
01:23 thePalindrome Alas, interact wants a pointedThing
01:24 thePalindrome I'd fake one, but the handleCommand_Interact uses parts of it
01:24 thePalindrome So I'm thinking I either make a new packet type, or I add another action value
01:26 hmmmm probably the latter
01:27 thePalindrome Alright, because PointedTypeNothing will bypass most of the code, but the code that handles action 3 (rightclick node) pokes the pointed thing
01:53 Supertanker2 joined #minetest-dev
02:10 Supertanker2 joined #minetest-dev
02:24 leat joined #minetest-dev
02:27 thatgraemeguy joined #minetest-dev
02:27 thatgraemeguy joined #minetest-dev
02:39 Player2 joined #minetest-dev
02:55 thePalindrome Alright, finally finished on_rightclick
02:55 thePalindrome Just mentioning it in here so people know about it/can critique it while I'm still at my keyboard
03:30 thePalindrome Someone commented on my request simply saying "space." What do you mean by that?
03:32 est31 joined #minetest-dev
03:32 est31 thePalindrome, hi there!
03:32 thePalindrome Ah, heya
03:32 est31 I've commented "space" because there is a space mistake there
03:33 est31 minor issue only
03:33 est31 "if(!lua_isnil(L, -1)) {" should be "if (!lua_isnil(L, -1)) {"
03:33 est31 and if you call a method, add a space after each comma
03:33 thePalindrome Ah, I see that now
03:33 est31 "client->interact(5, fauxPointed);"
03:34 est31 have you seen the other comment with the idea to merge it into on_place?
03:34 thePalindrome I saw that
03:34 thePalindrome I thought about it, but didn't want to go through too much of the existing code
03:35 thePalindrome I've heard that you always change the minimum you have to
03:35 thePalindrome I take it you would still reccommend changing on_rightclick to on_right_click?
03:36 est31 if its kept yes
03:36 est31 well, I am thinking
03:36 est31 about whether its better to have it inside on_place
03:36 est31 or if most of lua code is smart enough to check for the type of pointed_thing
03:37 thePalindrome Most of it is, it's just action 3 that causes issues
03:38 est31 well, to use your words, most of the code inside on_place expects "action 3"
03:38 est31 it reads pointed_thing.below right away
03:38 thePalindrome network/serverpackethandler.cpp:1609 calls on_place
03:38 est31 as it would be the only true thing in the world
03:39 est31 well okay then
03:40 est31 let's keep it separate
03:40 est31 just one thing
03:40 est31 https://github.com/minetest/minetest/pull/3382/files#diff-1305560bd8befb32862f0feeefabd02eR3306
03:41 est31 can you document the third param?
03:41 est31 you also pass pointed_thing
03:41 thePalindrome on_rightclick has only two arguments
03:41 thePalindrome I phrased that weird
03:41 thePalindrome I'm saying it doesn't use a pointedThing
03:41 est31 no it has three https://github.com/minetest/minetest/pull/3382/files#diff-fa972960897c9e4bc3a67e650231e6a8R126
03:41 est31 and its even a good thing
03:42 est31 this way you can put on_right_click and the on_place handler to one function
03:42 est31 as a modder
03:42 thePalindrome Oh I see
03:42 thePalindrome the pointed on that line is faked
03:42 thePalindrome Lua would crash if I didn't have that line there
03:42 est31 ?
03:43 thePalindrome Oh, is it because the pcall line says 3?
03:44 thePalindrome Alright, so are you suggesting that I remove the pointed reference and change line 127 to say 2 instead of 3, or shall I try and integrate on_right_click with on_place?
03:49 est31 neither
03:49 est31 keep it that way
03:49 est31 just document you also pass pointed_thing
03:49 est31 and write something like
03:49 thePalindrome I don't pass pointed_thing
03:49 est31 "pointed_thing : always { type = "nothing" }"
03:50 thePalindrome Oh, I see
03:50 thePalindrome Because pointed_thing is pushed, lua can see it, even though it doesn't use it
03:52 est31 it doesnt have to
03:52 est31 it can, if it wanrs
03:52 thePalindrome I see, that's cool
03:54 thePalindrome pushed
03:54 misprint joined #minetest-dev
03:54 est31 wants*
03:55 est31 I dunno if that design idea is stupid, but I +1 it that way, and if sb else doesn't like it they can say it
03:56 thePalindrome It's pointless to have now, but it would allow us to later merge on_place and on_right_click, to make it easier for newer modders
03:59 thePalindrome uh oh
03:59 thePalindrome The one spot I forgot to update was items.lua
04:00 est31 hrmmm now you said that mobs have on_rightclick...
04:01 est31 hmmmm, what do you think, should it be called on_right_click like it should be properly, or should it be called on_rightclick like the same function for the mobs API?
04:02 thePalindrome I would say on_rightclick since nodes define the same
04:02 est31 you mean mobs?
04:02 thePalindrome both, iirc
04:02 thePalindrome lemme check
04:04 thePalindrome lua_api.txt:3452
04:04 kahrl joined #minetest-dev
04:04 thePalindrome There's the definition of on_rightclick for nodes
04:04 thePalindrome entities use on_rightclick as well
04:05 est31 aww there is a problem
04:05 est31 thePalindrome, nodes have an on_rightclick function already
04:06 est31 so it gets overwritten or something by what you do
04:06 thePalindrome shouldn't
04:06 thePalindrome items don't have an on_rightclick
04:06 est31 but nodes do
04:06 est31 it must be called differently
04:06 est31 one is for nodes placed into the world
04:06 est31 right clicking them
04:07 thePalindrome Oh crap, that's right
04:07 thePalindrome nodes are items until they get placed
04:07 est31 the other is for right clicking when wielding some items
04:07 est31 yeah
04:07 thePalindrome so on_right_click it is then
04:07 est31 no
04:07 est31 thats too close
04:07 est31 it would just cause confusion
04:08 est31 some farther away name needed
04:08 thePalindrome on_activate is something different, so I can't use that
04:08 est31 yeah, some better term is needed as well
04:09 est31 than activate
04:09 est31 I've seen it in the comments
04:11 thePalindrome on_activate is an entity function, on_use is for items doing a left click
04:11 est31 that person in the issue report had "secondary use"
04:13 thePalindrome That could work
04:24 thePalindrome There
04:26 thePalindrome This *should* be the end of it
04:26 thePalindrome Er, wait
04:26 thePalindrome *facepalm*
04:27 thePalindrome I define core.item_rightclick and I forgot to replace that
04:29 thePalindrome Oh, I see
04:29 thePalindrome lemme make the final final final (tm)(r)(c) release
04:31 est31 there are some parts in the protocol where it says "activate"
04:31 est31 can you change it to secondary use as well?
04:31 est31 and squash it?
04:31 thePalindrome squash?
04:31 thePalindrome Ah, I see it
04:31 est31 https://github.com/minetest/minetest/pull/3382/files#diff-34f48ad91ac6c202ac60b0348ae90e30R949
04:31 est31 https://github.com/minetest/minetest/pull/3382/files#diff-34f48ad91ac6c202ac60b0348ae90e30R949
04:32 est31 https://github.com/minetest/minetest/pull/3382/files#diff-ac9ac0a3a5e432320dd8784aaeeef672R1663
04:32 est31 Here "secondary use" sounds dumb.
04:32 est31 probably activates is ok here
04:34 thePalindrome How about "perform secondary action of item" for the definition of action 5?
04:35 est31 okay
04:35 est31 but change the "of" to "on"
04:36 est31 or probably of is fine too
04:36 est31 whatever
04:36 thePalindrome Welp, commited
04:36 thePalindrome and pushed
04:36 thePalindrome :P
04:38 est31 you seem to have missed this https://github.com/minetest/minetest/pull/3382/files#diff-7b4242351dd3cf5b2a70c8aa9d12149bR271
04:39 thePalindrome There
04:40 * thePalindrome should go to be soon :P
04:41 est31 okay, +1ed it
04:41 est31 now sb else has to +1 it too, and it can get merged
04:41 est31 ofc squashed first
04:41 thePalindrome squashed?
04:41 est31 yes
04:41 est31 otherwise it pollutes history
04:41 thePalindrome Oh yeah :P
04:41 est31 better to have a clean history
04:42 thePalindrome I don't know, it only took me 6 commits to clean it up :P
04:43 est31 well I gotta go
04:43 thePalindrome Have a good night /)
04:43 est31 you seem to learn fast
04:43 est31 bye
04:43 thePalindrome Thanks
04:57 ShadowNinja joined #minetest-dev
04:59 Taoki_1 joined #minetest-dev
05:02 Icedream joined #minetest-dev
05:04 hmmmm [11:01 PM] <est31> hmmmm, what do you think, should it be called on_right_click like it should be properly, or should it be called on_rightclick like the same function for the mobs API?
05:04 hmmmm on_rightclick for consistency
05:18 Icedream- joined #minetest-dev
05:19 deltib__ joined #minetest-dev
05:35 Wayward_One joined #minetest-dev
05:52 JohnnyComeL8ly joined #minetest-dev
06:01 jin_xi joined #minetest-dev
06:15 hmmmm joined #minetest-dev
06:26 Megal joined #minetest-dev
07:20 nrzkt joined #minetest-dev
07:58 paramat joined #minetest-dev
08:01 paramat hmmmm sorry to bother you, any comments on the implementation of https://github.com/minetest/minetest/pull/3381 'Find spawn pos: Get spawn search centre from mapgen' will be appreciated
08:01 hmmmm what's the purpose of it?
08:02 paramat to avoid findspawnpos failing in watershed or other very large scale mapgens
08:02 hmmmm how is that going to help?
08:03 paramat the mapgen will provide an ideal centre of search, being a coastal area
08:03 paramat we discussed on irc with c55
08:04 paramat i'll try to find it..
08:07 paramat http://irc.minetest.ru/minetest-dev/2015-11-03#i_4440155
08:08 hmmmm i just spat out an idea
08:08 hmmmm it hasn't been developed or expanded upon at all
08:09 hmmmm adding a function that returns a constant (0,0) isn't going to improve things exactly
08:09 paramat well it's only 0,0 for normal mapgens
08:09 hmmmm coming up with the correct solution is more valuable than just shooting out some random code
08:10 paramat perhaps better to have it fallback to 0,0 so that normal mapgens don't have to have that function
08:10 hmmmm yeah I think so...
08:11 paramat anyway this was my initial idea to solve the problem, this way spawning in most mapgens is unchanged, but the centre of search can be defined in more specialist mapgens
08:12 hmmmm how are you going to define it?
08:12 paramat noise params used to find a coaastal area with low land
08:12 paramat (-a)
08:13 paramat it will only need the basic base terrain level noise, easy
08:14 paramat "this should really be information provided by the mapgen" agreed
08:16 paramat i'll work on it, thanks for looking
08:16 hmmmm couldn't you do the same basic terrain level noise with all the other mapgens though?
08:19 paramat yes
08:20 paramat that could help if custom noise params are used to create a huge scale mgv7 for example
08:20 hmmmm but on mgv7 it just returns (0,0)
08:20 paramat it would also mean spawns are scattered over a smaller area
08:21 paramat oh yeah currently the PR is not intending to calculate an ideal search centre in most mapgens
08:21 paramat but we could do that
08:22 paramat the initial idea is only watershed would return a calculated value, the others fallback to 0,0
08:23 paramat i like the idea of all mapgens finding a coastal area, might work on that
08:23 hmmmm I would prefer that the PR does something useful first, to be honest
08:24 hmmmm or if this really is just an interface change to prepare for Watershed, why not include this as a second commit in the watershed PR?
08:24 hmmmm but this PR alone is kind of... eh...
08:26 paramat yeah ..
08:26 paramat i agree, i'll either make it useful or delay it
08:29 hmmmm thanks.
08:30 Hunterz joined #minetest-dev
08:40 Elinvention joined #minetest-dev
08:45 Elinvention joined #minetest-dev
08:59 Elinvention2 joined #minetest-dev
09:15 Elinvention joined #minetest-dev
09:20 paramat ugh this is a dilemma https://github.com/minetest/minetest/pull/3379 'Mapgen: Add global 'decorations' flag', but the current global 'trees' flag that only affects mgv6 is such a mess i feel it's best to ask some users to edit their map_meta.txt
09:28 paramat VanessaE do you have mgv6 worlds using the 'notrees' flag? anyone else? if so see that PR
09:34 paramat left #minetest-dev
10:03 cib0 joined #minetest-dev
10:23 Terusthebird joined #minetest-dev
10:42 Terusthebird joined #minetest-dev
11:33 rubenwardy joined #minetest-dev
11:45 cib joined #minetest-dev
11:47 twoelk joined #minetest-dev
12:08 Calinou joined #minetest-dev
12:29 firebudgy joined #minetest-dev
12:30 firebudgy left #minetest-dev
12:32 damiel joined #minetest-dev
12:52 Samson1 joined #minetest-dev
13:18 who_wants_some joined #minetest-dev
13:21 firebudgy joined #minetest-dev
13:21 firebudgy left #minetest-dev
13:51 nicoalta01 joined #minetest-dev
13:55 nicoalta01 left #minetest-dev
13:55 nicoalta01 joined #minetest-dev
13:55 nicoalta01 left #minetest-dev
13:57 luizrpgluiz joined #minetest-dev
14:05 cib0 joined #minetest-dev
14:23 misprint joined #minetest-dev
14:49 zat1 joined #minetest-dev
15:03 paramat joined #minetest-dev
15:05 paramat hmmmm and all, this is updated, tested and ready for review https://github.com/minetest/minetest/pull/3379 'Mapgen: Add global 'decorations' flag'
15:05 paramat left #minetest-dev
15:16 Ritchie joined #minetest-dev
15:30 jin_xi joined #minetest-dev
15:37 H-H-H joined #minetest-dev
15:43 CraigyDavi joined #minetest-dev
15:53 Ritchie joined #minetest-dev
16:02 hmmmm joined #minetest-dev
16:05 cib0 joined #minetest-dev
16:06 Player2 joined #minetest-dev
16:36 Darcidride joined #minetest-dev
16:43 nrzkt joined #minetest-dev
16:55 kilbith joined #minetest-dev
16:56 kilbith nrzkt remade the mainmenu using XML, it's worth a look IMO : http://gitlab.unix-experience.fr/epixel/epixel/merge_requests/101/diffs?force_show_diff=true
17:00 nrzkt kilbith, it's not finished yet but it's a little poc :p
17:02 nrzkt why did you talk about that ? :)
17:02 kilbith because we were several in the past to consider seriously XML for the menu
17:13 Krock joined #minetest-dev
17:24 Calinou "XML is crap" – Linus Torvalds
17:24 Calinou consider YAML, INI…
17:26 nrzkt YAML and INI are not structures and are not correct for interfaces.
17:27 Krock consider JSON
17:27 nrzkt json is a good thing for transactions on the web but an interface is a structured thing.
17:27 Robert_Zenz joined #minetest-dev
17:33 Darcidride joined #minetest-dev
17:51 rubenwardy joined #minetest-dev
17:59 Zeitgeist_ joined #minetest-dev
18:04 Darcidride joined #minetest-dev
18:07 cib joined #minetest-dev
18:12 damiel joined #minetest-dev
18:13 zupoman joined #minetest-dev
18:13 zupoman joined #minetest-dev
18:16 firebudgy joined #minetest-dev
18:19 firebudgy left #minetest-dev
18:26 Robert_Zenz joined #minetest-dev
18:27 twoelk XML for the main menu ? - making minetest skinnable might be an interesting feature - like XUL+css - though I must confess I don't like css much
19:06 misprint joined #minetest-dev
20:02 nicoalta01 joined #minetest-dev
20:08 cib joined #minetest-dev
20:30 nicoalta01 left #minetest-dev
20:30 FR^3 joined #minetest-dev
20:37 cmdskp joined #minetest-dev
21:04 Amaz joined #minetest-dev
21:10 cmdskp left #minetest-dev
21:14 Robert_Zenz joined #minetest-dev
21:30 Taoki joined #minetest-dev
21:35 Player2 joined #minetest-dev
22:28 cib0 joined #minetest-dev
23:20 afflatus joined #minetest-dev
23:20 afflatus I'd like to contribute to http://dev.minetest.net/
23:20 afflatus Who should I talk to about setting up an account?
23:22 sofar I'm thinking pilzadam, celeron55
23:22 sofar they have admin on the dev wiki
23:22 Amaz Maybe ask here? https://forum.minetest.net/viewtopic.php?f=3&amp;t=10473 I don't know if it applies for the dev wiki though...
23:24 thePalindrome hullo everyone
23:28 afflatus I think it will get the attention necessary thanks Amaz (missed, oh well)

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