Minetest logo

IRC log for #minetest, 2024-08-13

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

All times shown according to UTC.

Time Nick Message
00:01 MTDiscord <exe_virus> But to do it without direct window focus... That's a bit harder...
00:09 liceDibrarian joined #minetest
01:01 YuGiOhJCJ joined #minetest
02:00 Markow joined #minetest
02:13 amfl2 joined #minetest
02:13 peterz joined #minetest
02:18 peterz joined #minetest
03:10 boingman joined #minetest
04:00 MTDiscord joined #minetest
04:06 kamdard joined #minetest
04:20 Guest35 joined #minetest
04:41 stormchaser3000 joined #minetest
05:36 gregon joined #minetest
06:23 oneeyedalien joined #minetest
07:14 gregon joined #minetest
07:35 PoochInquisitor joined #minetest
07:59 fling_ joined #minetest
09:15 bodiccea_ joined #minetest
09:16 Glaedr joined #minetest
09:34 Talkless joined #minetest
09:40 mrkubax10 joined #minetest
09:45 Furi0us_mat joined #minetest
09:52 gregon joined #minetest
09:53 Furi0us_mat hi everyone, as you know i'm currently developing Mark Survival Ascended an ARK inspired game for minetest, i recently asked for help following the implementation of inventory to creatures and dinos, but I got a saving problem (when I unloaded the entity or left the game the entity lost all its inventory) I corrected this problem but another
09:53 Furi0us_mat problem occurred and I don't understand why, the entity saves its inventory now but completely forgets all these things: Its life points, the order given, whether it's tamed or not, its mood, its attacks, its gender (male/female), when an egg hatches the dino suddenly grows, all this happens when I disconnect from the game or unload the entity,
09:53 Furi0us_mat except what I don't understand is that normally there's the "paleotest" function. on_activate" which saves all this data but it seems that the entity loses this data because of the inventory, so I think that one of the lines must indirectly delete the "paleotest.on_activate" I confess I do not understand at all, and help is requested, moreover I
09:53 Furi0us_mat will create the topic on the forum in case of need, here is the code that poses big problem to the game (and yes on ark the inventory is an essential thing): https://paste.sqt.wtf/67fe6a@raw
09:59 PoochInquisitor joined #minetest
10:15 ireallyhateirc joined #minetest
10:30 sfan5 well. mobkit or paleotest normally uses the staticdata on its own to store such things
10:30 sfan5 but you're overriding get_staticdata and on_activate so it just isn't happening anymore
10:31 sfan5 two unrelated things: 1) serializing the inventory with , as delimiter is not safe. since you're already using minetest.serialize better use just keep it a list
10:31 sfan5 2) you should indent and format your code consistently. it's hard to read and follow like this
10:33 Furi0us_mat okay, and how do you change the code so that the inventory is saved differently?
10:33 sfan5 to expand on the first point: you're calling mobkit.statfunc(self) which is a step in the right direction, but it returns a value and you're not doing anything with it
10:34 sfan5 you need to save it alongside your inventory and inside on_activate take it out of the structure and pass it to paleotest.on_activate
10:34 sfan5 want me to show you the required changes?
10:37 Furi0us_mat yes, because I'm a bit confused =L
10:38 PoochInquisitor joined #minetest
10:43 sfan5 https://dpaste.com/9E5WDEVK3 here
10:54 Furi0us_mat thank you, it worked well
10:58 sfan5 deserialize_inventory should have i = 1, ... btw
10:58 sfan5 tables start from 1 in lua
10:59 MacroFaxSax joined #minetest
11:17 Furi0us_mat indeed, I know, but if I don't set 0, the items are removed one by one for no reason
11:22 TheSilentLink joined #minetest
11:24 Furi0us_mat here is the inventory with 0 (when I go away or disconnect it stays like that) https://ibb.co/st0kxW2
11:24 Furi0us_mat here's the inventory with i = 1 (when I go far away or disconnect it changes) https://ibb.co/bF75prz
11:41 Juri2 joined #minetest
11:41 Niklp joined #minetest
12:59 sfan5 change the i - 0 to i - 1 then
13:27 alguien joined #minetest
13:29 alguien Does formspec's `listring[<inventory location>;<list name>]` not work (at least with a "nodemeta:<X>,<Y>,<Z>" inventory location)? I can't get the same functionality I get with `listring[]` (with no arguments)
13:40 MacroFaxSax joined #minetest
13:58 peterz joined #minetest
14:26 peterz joined #minetest
14:31 peterz joined #minetest
14:34 SFENCE joined #minetest
14:34 SFENCE joined #minetest
14:35 alguien joined #minetest
14:41 luk3yx joined #minetest
15:08 SFENCE joined #minetest
15:11 SFENCE joined #minetest
15:14 SFENCE joined #minetest
15:23 SFENCE joined #minetest
15:31 Desour joined #minetest
15:32 peterz joined #minetest
15:37 peterz joined #minetest
15:38 Hanicef joined #minetest
15:47 gregon joined #minetest
15:57 SFENCE joined #minetest
16:00 fluxionary_ joined #minetest
16:17 peterz joined #minetest
16:19 boingman joined #minetest
16:20 jaca122 joined #minetest
16:28 peterz joined #minetest
16:32 peterz joined #minetest
16:39 MinetestBot [git] kno10 -> minetest/minetest: Add `vector.random_direction()` (#14784) e6f77b9 https://github.com/minetest/minetest/commit/e6f77b95f3d419fecb2bc7ac9f5c6099660ac791 (2024-08-13T16:38:07Z)
16:39 MinetestBot [git] grorp -> minetest/minetest: Add setting to disable smooth scrolling 0fb67cc https://github.com/minetest/minetest/commit/0fb67ccb340fd223339810f6fc2f62799fbc6c6f (2024-08-13T16:38:34Z)
16:39 MinetestBot [git] AMDmi3 -> minetest/minetest: Include unistd.h for getpid() when _IRR_COMPILE_WITH_X11_ a677d33 https://github.com/minetest/minetest/commit/a677d33bdffa110fe611e49e346c0bd99dafb5ca (2024-08-13T16:38:59Z)
16:41 MinetestBot [git] Emojigit -> minetest/minetest: Add `table.keyof()` (#14910) dc7a7a0 https://github.com/minetest/minetest/commit/dc7a7a0ed98e10f80c7ca5ce071300ada7922eab (2024-08-13T16:39:50Z)
16:49 mrkubax10 joined #minetest
16:50 Desour_ joined #minetest
17:05 kamdard joined #minetest
17:11 kamdard joined #minetest
17:20 SFENCE joined #minetest
18:22 mrkubax10 joined #minetest
18:52 boingman joined #minetest
18:53 Pexin joined #minetest
19:16 jaca122 joined #minetest
19:21 Pexin joined #minetest
19:50 ireallyhateirc joined #minetest
20:10 fluxionary joined #minetest
20:45 jaca122 joined #minetest
21:04 erstazi joined #minetest
21:06 khimaros joined #minetest
21:14 Verticen joined #minetest
21:43 kamdard joined #minetest
22:33 panwolfram joined #minetest
22:55 swift110-mobile joined #minetest
22:57 hook54321 joined #minetest
23:05 Eragon joined #minetest
23:06 doseijin- joined #minetest
23:08 tel4 joined #minetest
23:08 jadedctrl joined #minetest

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