| Time |
Nick |
Message |
| 00:25 |
|
Miner_48er joined #minetest-hub |
| 01:30 |
|
ANAND joined #minetest-hub |
| 04:19 |
|
hairykitty joined #minetest-hub |
| 05:18 |
|
calcul0n joined #minetest-hub |
| 05:52 |
|
BuckarooBanzai joined #minetest-hub |
| 06:05 |
|
calcul0n joined #minetest-hub |
| 07:18 |
|
nerzhul joined #minetest-hub |
| 07:26 |
|
calcul0n_ joined #minetest-hub |
| 07:31 |
|
hlqkj joined #minetest-hub |
| 07:37 |
|
CandiceSwan joined #minetest-hub |
| 07:55 |
|
tomraceror joined #minetest-hub |
| 08:00 |
|
ShadowNinja joined #minetest-hub |
| 08:11 |
|
hlqkj joined #minetest-hub |
| 08:50 |
|
Fixer joined #minetest-hub |
| 08:57 |
|
hlqkj joined #minetest-hub |
| 09:30 |
|
_Zaizen_ joined #minetest-hub |
| 11:27 |
|
calcul0n joined #minetest-hub |
| 11:35 |
|
AngelRush joined #minetest-hub |
| 13:43 |
|
tomraceror joined #minetest-hub |
| 14:04 |
|
scr267 joined #minetest-hub |
| 14:30 |
|
tomraceror joined #minetest-hub |
| 14:52 |
|
HDMI_STECKDOSE joined #minetest-hub |
| 14:53 |
|
ANAND joined #minetest-hub |
| 14:53 |
|
tomracer joined #minetest-hub |
| 15:27 |
|
nerzhul_ joined #minetest-hub |
| 15:30 |
|
HDMI_STECKDOSE joined #minetest-hub |
| 15:44 |
|
nerzhul joined #minetest-hub |
| 15:51 |
|
tomraceror joined #minetest-hub |
| 15:57 |
|
tomraceror joined #minetest-hub |
| 16:14 |
|
Lone_Wolf joined #minetest-hub |
| 16:36 |
|
Calinou joined #minetest-hub |
| 16:42 |
|
ANAND_ joined #minetest-hub |
| 16:55 |
|
tomraceror joined #minetest-hub |
| 16:55 |
|
rubenwardy joined #minetest-hub |
| 17:10 |
|
fluxflux joined #minetest-hub |
| 17:50 |
ANAND |
Hmm, lua_api.txt notes that Raycast:next() can be nil. What's the difference between nil and { type = "nothing" } ? |
| 17:51 |
Krock |
"nil" is when it reached the end |
| 17:51 |
ANAND |
Oh |
| 17:51 |
ANAND |
Then what does { type = "nothing" } signify? |
| 17:51 |
Krock |
never seen that being pushed to Lua |
| 17:52 |
ANAND |
o_O |
| 17:53 |
Krock |
push_pointed_thing c_content.cpp |
| 17:53 |
Lone_Wolf |
You got {type = "nothing"} from a raycast? |
| 17:53 |
ANAND |
I didn't |
| 17:53 |
Krock |
l_next() automatically returns nil if there's no pointed thing |
| 17:53 |
ANAND |
I got nil, while my mod checks for type == nothing |
| 17:53 |
Lone_Wolf |
Ah |
| 17:53 |
Krock |
== nothing is only needed for on_item_use, for example |
| 17:53 |
Lone_Wolf |
Yeah, you should just check for nil |
| 17:54 |
Krock |
raycast results other than the raycast API |
| 17:54 |
ANAND |
Ah |
| 17:54 |
Krock |
basically just pointed things |
| 17:54 |
ANAND |
Thought it applies to Raycast as well, thanks for clarifying. :) |
| 17:54 |
ANAND |
inb4 !next |
| 17:54 |
Krock |
!next |
| 17:54 |
MinetestBot |
Another satisfied customer. Next! |
| 17:55 |
ANAND |
Never gets old, eh? :) |
| 17:55 |
Krock |
neither does this Raycast example. https://github.com/SmallJoker/farbows/blob/bb287199788f0615f3c81969f1943a3cd0089703/init.lua#L126-L128 |
| 17:57 |
ANAND |
Yeah, I remember you referring me to this mod once earlier. |
| 17:57 |
Krock |
:3 shameless self-advertising |
| 17:58 |
ANAND |
No it's helpful to have an example |
| 17:58 |
Krock |
though I didn't bother fixing a potential crash |
| 17:58 |
Krock |
s/crash/error/ |
| 18:02 |
rubenwardy |
Krock: why don't you use a for loop? |
| 18:03 |
rubenwardy |
for thing in minetest.raycast(...) do |
| 18:03 |
rubenwardy |
it returns an iterable |
| 18:05 |
Krock |
was that added in the same commit? |
| 18:05 |
rubenwardy |
yeah, it's been there since the start |
| 18:05 |
Krock |
okay then .. til. |
| 18:06 |
rubenwardy |
documentation is here: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L6339 |
| 18:06 |
Krock |
thanks rubenwardy |
| 18:07 |
rubenwardy |
I mean, you knew that, was just pointing out where the iterator part is documented |
| 18:07 |
rubenwardy |
easy to miss \o/ |
| 18:28 |
Krock |
Lone_Wolf: https://github.com/minetest/minetest/pull/6560 |
| 18:30 |
rubenwardy |
oh gosh, I'm such an idiot |
| 18:31 |
rubenwardy |
>closes a PR for being a duplicate of the issue it fixes |
| 18:31 |
Krock |
shall I confirm or deny? |
| 18:31 |
Krock |
I confirm |
| 18:54 |
Lone_Wolf |
Yeah I figured it'd be best to just do a new PR |
| 18:55 |
|
aerozoic joined #minetest-hub |
| 19:08 |
|
Fixer_ joined #minetest-hub |
| 19:35 |
|
_shivajiva joined #minetest-hub |
| 19:41 |
|
shivajiva joined #minetest-hub |
| 20:54 |
|
LoneWolfHT joined #minetest-hub |
| 22:43 |
|
Lone_Wolf joined #minetest-hub |
| 23:50 |
|
bwarden joined #minetest-hub |
| 23:57 |
|
DaTPS joined #minetest-hub |