Time Nick Message 01:11 kahrl I wonder if we can get rid of the day_night_diff mapblock flag 01:12 kahrl which would be good because calculating it requires iterating over every node in the block 01:12 kahrl these days there is only one use of this flag left in the entire codebase 01:12 kahrl which is calculating which blocks to send from the server to a client, I bet there's a way to do that without the flag 01:15 kahrl https://github.com/minetest/minetest/blob/master/src/clientiface.cpp#L308 01:39 shadowzone Still hasn't been released? 01:41 VanessaE no 01:42 est31 VanessaE: your prophecy turned out to be right, at least in my timezone. 01:43 est31 Release wont be today :-| 01:43 VanessaE heh 01:43 VanessaE wasn't my prophesy, it was the core devs' :) 01:43 shadowzone it's 7:43 PM where I am. 04:18 gregorycu est31: Good detective work on #2222 04:18 ShadowBot https://github.com/minetest/minetest/issues/2222 -- minetest.get_craft_recipe occasionally returns wrong recipes 04:18 gregorycu Are you going to fix? 04:35 est31 gregorycu: I could, but then we had two open PRs for the same file... I could open a PR to your PR though 04:35 gregorycu No, you did the right thing 04:35 gregorycu I'm going to fix this now 04:35 est31 ok great 04:36 est31 note that the line isnt the only place that comparison occurs. 04:36 est31 it can also be found in https://github.com/gregorycu/minetest/blob/master/src/craftdef.cpp#L994 04:37 gregorycu It this kind of thing which is bad 04:37 gregorycu We shouldn't be doing half-arsed textual comparisons 04:38 gregorycu So, I think I fixed getCraftRecipes 04:38 gregorycu By accident 04:40 est31 does the code in #2225 respect recipe strings like "default:torch 4"? 04:40 ShadowBot https://github.com/minetest/minetest/issues/2225 -- Speed up CCraftDefManager::getCraftRecipes by orders of magnitude by gregorycu 04:41 gregorycu Depends what you mean by respect? 04:42 gregorycu Are you asking if it will return a recipe for 4 torches? 04:42 gregorycu Or just 1? 04:43 est31 so that when you enter "default:torch" you also get recipes for "default:torch 4" 04:43 est31 seems logical 04:43 gregorycu Yes 04:43 gregorycu It will return recipes for default:torch 4 too 04:43 est31 so it respects. great 04:44 gregorycu Um... I'm not too sure what happens if you call it with a parameter of "default:torch 4" though 04:44 gregorycu If you catch my meaning 04:45 est31 ok. as long as the behaviour of the function doesn't change 04:46 gregorycu I'm thinking of getting rid of getCraftRecipe and have the lua function use getCraftRecipes 04:47 gregorycu And just return the first one 04:48 est31 ok just keep in mind that getCraftRecipe makes later craft definitions override earlier ones. so you need getCraftRecipes to output the last registered one as the first 04:48 Zeno` Does 2225 allow for multiples recipes for the same output? 04:49 gregorycu I believe getCraftRecipes inverts the order too 04:50 est31 yea seems so 04:50 est31 Zeno`: I guess so. Its a map string -> vector . 04:50 Zeno` m_output_to_craft_definition_map[output.name].push_back(def); ... output.name is stored in a std::map though 04:51 Zeno` which unless I'm missing something means that multiple recipes for the same output.name are no longer possible 04:51 est31 the push_back part of the line takes care of the vector 04:52 Zeno` ah, ok 04:52 est31 first its accessing the map at index output.name, then the returned vector * is called with push_back 04:52 Zeno` yep 04:54 gregorycu Though Zeno` raises a good point 04:55 gregorycu Do I need to think about the differences between cooking, crafting, etc. 04:56 gregorycu Where A -> B and A -> C can exist 04:56 gregorycu Should be fine though 04:56 est31 the lookup is in the other direction. you are having a B or C and searching for the A 04:56 gregorycu Yep 04:58 est31 although there is an issue even with present code. when you first add a recipe A ->B then add one A->C, then crafting A will result in C of course, but B still lists A in the recipes 04:58 * est31 is searching for the end of the rainbow again :D 04:58 RealBadAngel hi all 04:59 gregorycu You are right, that is bad 04:59 RealBadAngel sorry for being offline for so long, had some hard time 04:59 VanessaE RBA! 04:59 gregorycu VanessaE was just saying how she misses you 04:59 RealBadAngel hi VE 05:00 gregorycu est31: One bug at a time I suppose :) 05:00 RealBadAngel well im back now, with new CPU and some other stuff ;) 05:00 VanessaE wb 05:00 est31 gregorycu: yea 05:01 gregorycu It kind of annoys me that the lua API has both functions, to be honets 05:04 gregorycu est31: Do you know much about the lua c api est31? 05:05 est31 no why? 05:06 est31 what is it btw 05:06 est31 I know what the lua api is but lua c is new to me 05:06 gregorycu I'm wondering if I can genericise l_get_craft_recipe and l_get_craft_recipes 05:07 gregorycu aka. make them both call a function, just with a parameter of multiple = true/false 05:07 gregorycu So we don't have (almost) duplicated code 05:08 gregorycu The Lua C API is how C++ talks to the Lua engine 05:08 est31 yea sounds good 05:08 est31 ah ok the l_function stuff 05:09 gregorycu Problem is I Yeah 05:09 gregorycu Problem is I don't know exactly how all this shit works, so I can't be sure I'm not breaking something 05:10 est31 use a third function with a boolean param and feel safe :) 05:12 gregorycu I gotta be sure that I retain the same output 05:13 gregorycu Guess I'm learning the lua c api then 07:23 gregorycu est31: Do you have mods that use both functions? 07:23 gregorycu Or rather, if I create a PR, are you able to test for me :) 07:24 est31 yes to both questions 07:25 gregorycu Ok, thanks, I'll push a PR in a few min 07:31 gregorycu *sigh* 07:32 gregorycu get_craft_recipe returns a table when there is no recepe 07:32 gregorycu Rather than returning null 07:32 gregorycu null = there is no recipe 07:32 gregorycu a table = there is a recipe, and there are no items required 07:32 gregorycu conceptually 07:33 est31 thats current behaviour? weird 07:33 gregorycu The behaviour for get_craft_recipe isn't stipulated for when there is no recipe 07:33 gregorycu As far as I can tell 07:34 gregorycu Oh, it is, sorry 07:34 gregorycu http://dev.minetest.net/minetest.get_craft_recipe 07:35 gregorycu method is not set (behaviour), width is -1 (behaviour) and items is nil (behaviour and documentation) 07:36 est31 ok 07:43 gregorycu I have updated #2225 it is now a bugfix PR 07:43 ShadowBot https://github.com/minetest/minetest/issues/2225 -- Fixes for minetest.get_(all_)craft_recipe(s) by gregorycu 07:43 gregorycu (Can someone please retag it) 07:44 gregorycu Also, if you could test that bad-boy when you get a chance est31, that would be good 07:44 est31 yea 07:45 gregorycu Thanks mate, I appreciate it 07:46 est31 Thanks too, the issues you fix were my problems :) 08:09 est31 gregorycu: my first tests result: http://pastebin.com/W9Jxbcib 08:18 est31 TLDR: new better in most situations, but CRASHES when called with a non-existent node. 08:20 est31 gonna abide the "feedback on github only" 08:30 kilbith RBA \o/ 14:21 gregorycu est31: does a recipe with an output of "funnystone:funnystone 0" meant to kill the existing recipe? 14:26 gregorycu How do you disable a recipe? 15:05 Zeno` Does anyone with builtin/fstk/ experience have any comments on #2095? 15:05 ShadowBot https://github.com/minetest/minetest/issues/2095 -- Display (sub)game icons again by SmallJoker 15:06 Zeno` e.g. can self.buttons[i].image ever be nil? (and if it can should there be a logical AND there)? 17:58 crazyR hey guys the time in the auth file... is that updated on login or is it updated regularly whilst they are logged in 20:13 hmmmm alrighty.. 20:13 hmmmm is there simply no way to print a unicode string to logs? 20:14 hmmmm I don't like it but I'm going to have to display a MessageBox for fatal exceptions on windows :( 20:34 hmmmm or maybe not... it seems implied by MSDN that a temp filepath can never contain unicode characters 21:14 VanessaE hmmmm: wouldn't it be enough to just dump the crash data into debug.txt? 21:15 VanessaE oh wait 21:15 VanessaE misread.