Time Nick Message 00:38 Sokomine great..placed building spawner instead of chest.... 09:31 Krock I think Minetest is haunted. http://krock-works.16mb.com/u/selecting_the_right_server.mp4 11:12 nerzhul Krock: nice bug 11:54 IhrFussel If I set a global table of another mod that I depend on to something in a certain callback ... will the other mod 100% read my table value before it runs the same callback?? 11:55 IhrFussel Example: mod2 sets table[name] = 1 in a callback ... mod2 checks content of table[name] in the same callback ... will mod1 have the 1 mod2 set? 11:56 IhrFussel mod1 checks* 11:59 IhrFussel And if so will it *always* have the value mod2 sets when reading the table value? 12:00 sfan5 callback order is not guaranteed 12:05 IhrFussel Is there anything I can do make it guaranteed? Maybe minetest.after() in mod1 callback? 12:06 Krock Not guaranteed but in practice, if you depend mod2 on mod1, then it'll work 12:06 IhrFussel Krock, but it can fail? rarely? 12:06 Krock since new callbacks are inserted at the end of the table (using the official API functions) 12:07 Krock it's a thing of when the callbacks are registered. mod1 which defines the global table for mod2 must register the callback first 12:07 Krock which means that mod2 must depend on mod1 so that mod1 is loaded before mod2 12:08 rubenwardy You can use table.insert 12:08 Krock it will work, but nobody guarantees that it doesn't break in a new Minetest release 12:08 IhrFussel So depending on the mod does guarantee the the order of callbacks between those 2 mods? 12:08 Krock if both use the official callback register function, yes. 12:09 Krock otherwise, table.insert(core.registered_something, 1, whatever_function) 12:10 Krock doing the same with my Lua mapgen so that other Lua mods can rely on that the terrain is generated when they load 12:11 IhrFussel Well I'm thinking about adding death reasons to 0.4.17.1 and I know that it is hacky but I *could* just depend on mods that cause player deaths and set the reason there for my 'deathreason' mod to read and display in chat 12:11 Krock damage reasons (including death) is already available in 5.0-dev 12:11 IhrFussel I know that but 5.0.0 is next year...maybe 12:12 rubenwardy Cherry pick 12:14 Krock oh well, the side-effect of my exploit tests is now that default chests never close 12:14 Krock digging them seems to be impossible to in 0.4.17 12:15 IhrFussel Cannot dig opened chests, correct 12:16 IhrFussel Which is why I always hope that player don't log off while moving stuff in chests 12:16 IhrFussel Not sure if logging off still causes it...one sec 12:17 IhrFussel It seems that was fixed 12:18 IhrFussel Or it only happens when I kill the client via kill -9 12:20 IhrFussel Nope seems fixed...maybe it could still happen when the server crashes while moving stuff in chests, but that should be relatively rare 13:47 rubenwardy !seen ShadowNinja 13:47 MinetestBot rubenwardy: shadowninja was last seen at 2018-05-30 14:09:21 UTC on #minetest-hub 14:53 rubenwardy IcyDiamond: #7469 merged 14:53 ShadowBot https://github.com/minetest/minetest/issues/7469 -- Formspecs: Add tooltip element for area by rubenwardy 14:56 ANAND :hooray: 14:57 * rubenwardy kicks ANAND 14:57 rubenwardy this aint Discord 14:57 rubenwardy y'know 14:57 * ANAND yays 14:57 ANAND better? :) 15:06 rubenwardy don't let paramat catch you 15:48 IhrFussel So there is no way to damage players directly in 0.4.17.1 when they are attached to something? Maybe I could add in the punch function of mobs to check for get_luaentity().driver and cause the damage that way...could that work? 15:58 Krock attached entities cannot be damaged in 0.4.x by a Lua function call 15:59 Krock if working around, then you'd have to call set_hp 15:59 Krock also: get_attach() is more general than just .driver 16:00 IhrFussel I just need it to work for cars on my server and all cars have .driver and .passenger 16:01 IhrFussel Krock, this should work I think https://pastebin.com/NyZuvFwH 16:03 IhrFussel That code is right before self.attack:punch() of api.lua (mobs redo) 16:05 Krock my eyes hurt. where are the indents? :( 16:06 Krock I don't know what kind of API you're using there but I guess 20 should be replaced by get_hp 16:07 IhrFussel No cause I use custom HP...the 20 never changes (unless the player dies) 16:12 Fixer "The Web Monkey Academy" lel 16:12 Fixer literally 16:21 IhrFussel It works 16:21 IhrFussel Now I have to code the same hack for PvP 16:24 paramat oi, language :) 16:33 IhrFussel So this should work in the defininition of the cars I guess https://pastebin.com/f8BtWyEu 16:33 IhrFussel Oops...is_player() is missing 16:41 IhrFussel What happens if a player dies while attached to something? 16:41 IhrFussel Could it crash in 0.4.X? 16:54 Krock maybe. 16:55 IhrFussel Nope 16:56 IhrFussel Bones appear inside the car but that's it 17:39 IhrFussel How can I do a "contains_item" on a detahced inv? is the list name "main" then? 17:39 IhrFussel detached* 17:40 rubenwardy the list name is what you make it 17:40 IhrFussel I want to check if the detached 3d_armor inv contains a certain armor 17:40 rubenwardy there's nothing special about main, except it's the list name that the engine uses for players 17:40 rubenwardy then you need to check how 3d armor is coded 17:41 IhrFussel I found local dinv = minetest.get_inventory({type="detached", name=name.."_armor"}) 17:41 rubenwardy that's the inventory name 17:41 rubenwardy not the list name 17:41 rubenwardy there will be a set_size() somewhere 17:43 IhrFussel So dinv:contains_item("armor",stackname) I guess 17:51 IhrFussel Is it slow to check a detached inventory on every attack (mostly once per sec)? 17:54 Krock do some profiling, but I wouldn't think so 19:34 Krock aww.. Sokomine! You really disappointed me. I thought your mod would also include Pirate NPCs 19:35 Krock just kidding. It looks amazing :) 19:38 IhrFussel YES!! I implemented attached player damage in 0.4.17.1 19:38 IhrFussel Works both with monsters and players 19:38 Krock Since when do monsters ride carts or cars? 19:39 IhrFussel I mean monsters attacking players in cars...that didn't work in 0.4.X 19:40 IhrFussel Entities can only punch the parent of the player when attached...and if that parent has no HP defined then the player is basically invincible 19:59 Sokomine Krock: the pirates are busy stealing blocks from other ships so that the new flotilla can be built. that's why you can't see them 20:00 Sokomine besides...you need to complain to aspiremint :) his one is the pirate ship. mine is a peaceful trader :) (crew currently...er...missing, somehow) 20:00 Krock hah :) 20:30 paramat IhrFussel halting vehicles now fixed in engine 23:22 garywhite welcome e-mail 23:27 Bobr lol