Minetest logo

IRC log for #minetest, 2017-06-18

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

All times shown according to UTC.

Time Nick Message
00:22 Puka joined #minetest
00:30 paramat left #minetest
00:33 Guest10514 joined #minetest
00:33 proller joined #minetest
00:59 all|knowing joined #minetest
01:02 bigfoot547 joined #minetest
01:10 lumidify_ joined #minetest
01:10 Tmanyo joined #minetest
01:11 comradmax joined #minetest
01:35 all|knowing joined #minetest
02:20 pozzoni joined #minetest
02:21 KrimZon_2 joined #minetest
02:56 slemonide joined #minetest
03:06 nalkri joined #minetest
03:06 all|knowing joined #minetest
03:23 Pie-jacker875 joined #minetest
03:33 all|knowing joined #minetest
04:11 all|knowing joined #minetest
04:17 all|knowing joined #minetest
04:18 AntumDeluge joined #minetest
04:26 QwertyDragon joined #minetest
04:38 Joee joined #minetest
04:38 Joee hi
04:38 Joee anyone here could help me Vehicle_mash mod?
04:46 Weedy joined #minetest
04:48 can-ned_food not I, sorry
04:48 Joee okay
04:55 Menche joined #minetest
05:20 tiwake cheapie: hi
05:25 Pie-jacker875 joined #minetest
05:51 Alcyone2 joined #minetest
05:57 * cheapie waves to tiwake
06:08 Raven262 joined #minetest
07:14 CWz joined #minetest
07:15 WSDguy2014 joined #minetest
07:17 proller joined #minetest
07:17 WSDguy2014_ joined #minetest
07:43 slemonide joined #minetest
07:45 Telesight joined #minetest
08:04 nac joined #minetest
08:08 IhrFussel joined #minetest
08:20 Krock joined #minetest
08:35 ensonic joined #minetest
08:44 X704 joined #minetest
08:45 Krock ensonic ~~~~>  #minetest-de
08:46 IhrFussel Why is damage NIL in on_punchplayer() ?
08:50 Jordach joined #minetest
08:54 IhrFussel I'm trying to get the TOTAL damage from a hit and want to add to it based on a table value ... but damage is nil it seems
08:56 IhrFussel The Lua API also doesn't mention anything about the "damage" parameter
09:10 IhrFussel WAIT...are you telling me that you cannot register when a player punches an entity??
09:22 cx384 joined #minetest
09:22 calcul0n joined #minetest
09:25 WSDguy2014 joined #minetest
09:31 Krock IhrFussel, huh? there's "on_punch"
09:33 IhrFussel Krock, I meant a general way to get the total damage a player did to an entity but I guess there isn't...doesn't matter now I modified the Mobs Redo mod in a way that it directly calculates the table value inside the damage handler
09:34 Krock you can clculate the damage using tool_capabilities
09:36 IhrFussel Yes but I thought I wouldn't have to calculate the damage between entities and players separately
09:36 IhrFussel register_on_punchplayer() doesn't fire when a player hits an entity AFAIK
09:36 Krock the mobs redo already calculates the damage here: https://github.com/tenplus1/mobs_redo/blob/master/api.lua#L2052
09:37 Krock yes, they're handled seperately
09:37 Krock but you could write a generic wrapper to redirect both callbacks into your own function
09:37 Krock which then could handle players and entities the same way
09:38 Krock on_punchplayer only differs from the entity on_punch by its damage param
09:41 Darcidride joined #minetest
09:45 Darcidride_ joined #minetest
09:50 IhrFussel Setting the nametag text only won't affect its color right? Like this plo:set_nametag_attributes({ text = "L."..level[pn].."\n"..pn })
09:52 Krock depends if the color can be specified seperately
09:52 Krock because you couldn't do this with chat messages, as they're colored in-text
09:54 IhrFussel I will try it I guess
09:58 IhrFussel Krock, it works, the color is unaffected
10:09 Tux[Qyou] joined #minetest
10:12 Krock great
10:52 numzero joined #minetest
10:59 IhrFussel Krock, well actually I'm not so sure...the player I asked seemed to be a bit confused when I asked him if my name is still colored
11:01 Krock outdated client
11:02 Krock or a very sophisticated one - as you can read his mimics to see if he's confused
11:04 IhrFussel That's pretty simple... "Umm...?" is enough to see that the person is confused :P
11:22 Menche joined #minetest
11:41 DS-minetest joined #minetest
11:51 DI3HARD139 joined #minetest
11:59 nowhere_man joined #minetest
12:15 ungali joined #minetest
12:15 DI3HARD139 joined #minetest
12:16 Krock joined #minetest
12:16 agaran joined #minetest
12:36 Fixer joined #minetest
12:43 YuGiOhJCJ joined #minetest
12:53 Tuxedo[Qyou] joined #minetest
12:59 octacian joined #minetest
12:59 Tux[Qyou] joined #minetest
13:11 WSDguy2014 I saw at the end of the changelog for 0.4.16, why is there a "Minetest Game changes"? It's empty here. It's still work in progress?
13:12 sfan5 nobody has taken the work of writing the changelog yet
13:13 grumble joined #minetest
13:23 jin_xi joined #minetest
13:37 red-001 ^
14:01 numzero joined #minetest
14:02 cx384 joined #minetest
14:11 Pie-jacker875 joined #minetest
14:23 lisac joined #minetest
14:29 CWz joined #minetest
14:31 Brackston joined #minetest
14:33 FreeFull joined #minetest
15:02 Tux[Qyou] joined #minetest
15:04 red-001 left #minetest
15:07 WSDguy2014 joined #minetest
15:19 red-001 joined #minetest
15:19 IhrFussel If a file exists but is empty Lua sees it as NIL?
15:20 IhrFussel I mean the file handler doesn't return nil but read() does
15:27 calcul0n IhrFussel, it's normal, read returns nil on EOF
15:28 agaran hi IhrFussel
15:28 IhrFussel That's still weird...it caused many server crashes cause I honestly didn't expect a NIL when a file is empty
15:29 Menche_ joined #minetest
15:29 IhrFussel Hello agaran
15:31 calcul0n why is it weird ? if it's empty you just reach eof immediatly
15:31 IhrFussel calcul0n, but empty != nil
15:31 IhrFussel local bla = nil is also not the same as local bla = "" AFAIK
15:32 calcul0n yes, but as read() reads line by line, you wouldn't be able to make the difference between eof and an empty line
15:32 agaran IhrFussel: it is not, but "" takes memory, returning 'nil' takes less..
15:33 agaran zero byte string needs to be returned as unique copy of such object, nil can be singleton, you won't be appending to it.. (and operator can be overloaded to return valid stuff if you do anyway)
15:33 agaran well it is lua.. expect unexpected :)
15:33 IhrFussel Yes but my point is: Why does read() handle it so different from the rest of Lua? That is confusing
15:35 sfan5 read returns "" for empty files
15:35 sfan5 you are doing something wrong
15:35 calcul0n it returns nil here
15:36 Fixer Can't attach anything on github issues... pics/gifs/etc... newest Firefox. Is it only me?
15:37 Fixer for quite long time
15:37 Fixer is broken since some time
15:37 agaran sfan5: could you please show your test code maybe it is lua version related?
15:37 sfan5 it does not https://a.uguu.se/XnM38acSQDRx_Bildschirmfoto_2017-06-18_17-36-48.png
15:38 Alcyone2 joined #minetest
15:38 agaran sfan5: on 5.2 that example does not work..
15:38 agaran > content = f:read("a*")
15:38 agaran stdin:1: bad argument #1 to 'read' (invalid option)
15:38 agaran stack traceback:
15:39 sfan5 it's *a
15:40 agaran right, my bad
15:40 calcul0n same here, "*a" works in 5.3 but not in the minetest version
15:40 calcul0n which is 5.1 iirc
15:40 sfan5 you're right tho it returns nil in 5.2
15:40 calcul0n here it returns "" with "*a" but nil with no argument
15:41 IhrFussel It returns nil on my PC too "echo -n "" > test.txt in Bash then local lch = (io.open("/home/emmanuel/test.txt", "r")); print(lch:read()) >>> nil
15:41 agaran sfan5: it just screams, we need regresion testing.. for LUA dev..
15:41 sfan5 you are not supposed to call read without arguments https://www.lua.org/pil/21.1.html
15:42 sfan5 it seems like lua changed this behaviour with 5.3
15:42 IhrFussel The point is read() is supposed to READ the file contents...and an empty string is STILL content IMO
15:43 calcul0n This pattern is the default for read, so io.read() has the same effect as io.read("*line").
15:43 agaran IhrFussel: it is just lua weirdness.. you can only prepare your code to be resitant to this..
15:43 calcul0n but yes, 5.3 seems very different
15:44 IhrFussel My PC has Lua 5.2.4 btw
15:44 agaran and what lua version you used to compile minetest with?
15:44 sfan5 minetest can only use lua5.1 or luajit
15:44 IhrFussel MT uses 5.1 or not?
15:46 Calinou IhrFussel: Minetest supports only Lua 5.1
15:46 Calinou don't use 5.2 or 5.3-specific features
15:46 Calinou (this is also because LuaJIT supports only 5.1 at most)
15:48 IhrFussel Calinou, I didn't use any 5.3 features...it simply confused me that Lua wants to try to tell me that an empty EXISTING string can be "nil"
15:48 sfan5 it doesnt return an empty string
15:49 IhrFussel But it READS an empty string, so I expect it to return an empty string ... it's bad behavior that it doesn't
15:50 calcul0n as i said how would you tell if you reached eof or just read an empty line ?
15:50 calcul0n if the file is empty it just contains nothing, that makes sense to me
15:51 IhrFussel Yes it contains nothing but nil means "not initialized" or not?
15:52 calcul0n well, it means "nothing"
15:52 IhrFussel NIL = non-existent usually
15:52 Pie-jacker875 joined #minetest
15:52 calcul0n so, you're reading non_existent datas, what's wrong ?
15:53 IhrFussel I was told that empty != non-existent in Lua here recently ... so this behavior is unexpected
15:57 DuCake joined #minetest
15:57 IhrFussel But it doesn't matter now...this stupid behavior crashed my server quite a few times today and NOW I know that read() will be nil if the file has no contents
16:27 xerox123 joined #minetest
16:36 YuGiOhJCJ joined #minetest
16:54 Joel___ joined #minetest
17:22 ensonic joined #minetest
17:35 Tux[Qyou] joined #minetest
17:37 numzero joined #minetest
17:44 QwertyDragon joined #minetest
17:48 stormchaser3000 joined #minetest
17:56 kaeza joined #minetest
17:56 MinetestBot [git] nerzhul -> minetest/minetest: Cpp11 patchset 11: continue working on constructor style migration (#… 4faaadc https://git.io/vHjGu (2017-06-18T17:55:15Z)
18:07 Joel___ Hi
18:12 Tux[Qyou] joined #minetest
18:25 Taoki joined #minetest
18:30 Fixer joined #minetest
18:49 Hawk777 joined #minetest
18:52 corvus_ joined #minetest
18:52 lisac_ joined #minetest
18:55 Hijiri IhrFussel: read without any specifiers means "read a line"
18:56 Hijiri not "read the file"
18:56 Hijiri there are no more lines, so it returns nil
18:56 Hijiri I don't see how this goes against convention
18:58 Hijiri oh wait no, it returns empty string for reading a line of empty file at first
18:58 Hijiri but that is because the file follows the convention of having a newline before EOF
19:00 Hijiri When I remove the newline before EOF it returns nil on first read()
19:03 sfan5 Hijiri: read("*a") returns nil for empty files
19:03 sfan5 whether it should do that is a matter of definiton
19:15 X704 joined #minetest
19:16 slemonide joined #minetest
19:37 ensonic joined #minetest
19:57 all|knowing joined #minetest
20:04 numzero joined #minetest
20:06 all|knowing joined #minetest
20:16 slemonide joined #minetest
20:20 QwertyDragon_ joined #minetest
20:20 QwertyDragon__ joined #minetest
20:40 slemonide joined #minetest
20:45 kupi joined #minetest
20:50 all|knowing joined #minetest
20:56 Trinity211 joined #minetest
21:07 lastly joined #minetest
21:08 Trinity211 joined #minetest
21:09 lastly its been a few years and versions since I've played MT, but just installed again and unified-inventory is not allowing me to use the sethome, gohome, day and night buttons in the inventory formspec. Anyone know a quick fix for this or am I doing something wrong?
21:26 MarioBranco joined #minetest
21:30 all|knowing joined #minetest
21:34 erstazi joined #minetest
21:38 Pie-jacker875 joined #minetest
21:39 Joel___ i need help with vehicle_mash
21:40 Fixer lastly: you probably don't have needed privs
21:40 Fixer lastly: if in singleplayer: /grantme all
21:40 Joel___ Fixer can u help me with vehicle_mash mod?
21:40 Fixer nope
21:40 Fixer no idea
21:42 lastly yeah, tried /grantme all.. still not working
21:43 Fixer lastly: rejoin
21:44 lastly thank you very much.. that worked.. I feel kinda dumb now... when something isn't working, turn it off and back on
21:44 lastly how simple
22:02 agaran left #minetest
22:02 Fixer !next
22:02 MinetestBot Another satisfied customer. Next!
22:03 numzero =)
22:03 numzero oh well, that bot may be funny)
22:03 numzero !btc
22:03 MinetestBot 1 BTC = 2488.0500 $
22:03 MinetestBot [git] nerzhul -> minetest/minetest: Client::makeScreenshot: remove device param 8f2e60a https://git.io/vHjEL (2017-06-18T22:00:55Z)
22:05 red-001 !USD
22:05 red-001 !usd
22:21 Joel___ how to set up vehicles mash??
22:28 kaeza !rainbow numzero
22:28 MinetestBot 4nu7mz8er3o
22:28 FreeFull joined #minetest
22:28 numzero =)
22:28 kaeza <3 MinetestBot
22:28 MinetestBot <3 kaeza
22:39 Dumbeldor <3 MinetestBot
22:39 MinetestBot <3 Dumbeldor
22:58 bigfoot547 joined #minetest
23:16 X704 joined #minetest
23:16 bigfoot547 joined #minetest
23:19 bigfoot547 joined #minetest
23:22 vincent joined #minetest
23:30 vincent_ joined #minetest
23:34 slemonide joined #minetest
23:50 Jordach coool
23:51 kaeza ¿
23:51 Jordach fiddling with some python
23:53 kaeza blender?
23:53 Jordach no
23:53 Jordach trying to make my keyboards RGB LEDs do a full day night cycle in real time
23:53 kaeza heh
23:54 Jordach using python to script it all
23:54 Jordach is the moon up? is it AM? put moon to the right, if PM, put the moon on the left
23:57 Jordach wait, invert that
23:57 Jordach i'm legit a retard

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