Time |
Nick |
Message |
00:12 |
|
behalebabo joined #minetest |
00:13 |
kurtzmusch |
hey guise, is there a way to run a func when a nearby node gets updated?( like dug, or placed ) if not, would it be sane to make every node onPlace and afterDestruct call update() on nearby nodes(6 adjacent) ? thanks in advance |
00:14 |
|
paramat joined #minetest |
00:16 |
p_gimeno |
well, punching a block next to a block of sand that has air below, makes the sand fall |
00:16 |
p_gimeno |
maybe look at that code to see how it's done? |
00:16 |
|
kaeza joined #minetest |
00:17 |
kurtzmusch |
yeah, thats the kind of thing i want, but in this case the falling behaviour is done by the engine, right? i dont think theres a callback for updates |
00:17 |
p_gimeno |
I'm not sure, I haven't looked at that part myself |
00:18 |
kurtzmusch |
also, i wanted to know if its possible to change any of the node fields... i know that param1 and 2 are mutable, but i wonder if i could, for example change its walkable, lightsource, or nodebox |
00:21 |
paramat |
not in-game, you need a node for each desired state |
00:22 |
|
benrob0329 joined #minetest |
00:22 |
kurtzmusch |
huuum, thanks |
00:22 |
paramat |
it's actually optimum to use multiple nodes, evem though it doesn't seem so at first |
00:22 |
paramat |
*even |
00:24 |
paramat |
optimum in terms of simplicity and performance |
00:24 |
kurtzmusch |
i supose registering thousends of nodes is meaningless in terms of performance? |
00:25 |
kurtzmusch |
ignoring the time for initializing the mod |
00:25 |
paramat |
correct |
00:26 |
paramat |
but you can only have 32768 nodes ^_^ |
00:26 |
|
LevierMRQ joined #minetest |
00:26 |
kurtzmusch |
huum |
00:28 |
rubenwardy |
craft items and tools don't count towards the limit |
00:28 |
kurtzmusch |
ok, i guess 32k should be enough |
00:29 |
rubenwardy |
the technical reason is because nodes are identified using a "content ID". This content ID is 16 bits, which gives 65536 possible values. Half of that is reserved for unknown nodes, leaving 32768 |
00:29 |
rubenwardy |
it would probably be better to reserve a lot less of that for unknown |
00:29 |
rubenwardy |
and use a system like in operating systems: unknown grows down, known grows up |
00:29 |
paramat |
with the multiple node approach, each node has a different content ID (it's name) which makes them super fast to process in lua voxel manipulators etc. |
00:29 |
LevierMRQ |
I just installed a new minetest release. Pipeworks does not seem to work. Plus: i fall in a 404 not found at Pipeworks link in "List of mods" page. |
00:30 |
rubenwardy |
https://gitlab.com/VanessaE/pipeworks |
00:30 |
rubenwardy |
is the correct URL |
00:30 |
LevierMRQ |
thx alot :) |
00:30 |
kurtzmusch |
is there a way for nodes of drawtype nodebox to not propagate artificial light? |
00:30 |
kaeza |
<_< |
00:30 |
rubenwardy |
also, warning: the pipes in pipeworks don't work properly. But the tubes do |
00:31 |
rubenwardy |
(the pipes don't support finite amounts of liquid, only renewable liquids) |
00:31 |
kurtzmusch |
i saw theres a bool for sunlight_propagates, but nothing about light in general ... |
00:31 |
LevierMRQ |
rubenwardy: i believe i can figure. Means as usual. Right? |
00:32 |
rubenwardy |
it's expected behaviour, not a bug |
00:33 |
p_gimeno |
LevierMRQ: what list of mods? I've searched here and I don't see Pipeworks: https://wiki.minetest.net/List_of_Mods |
00:35 |
LevierMRQ |
Here: https://minetest-mods.github.io/mods.html Is that up to date? Is this good? |
00:35 |
LevierMRQ |
p_gimeno: ^ |
00:36 |
rubenwardy |
LevierMRQ: that's only for mods in minetest-mods |
00:36 |
rubenwardy |
better to use this: https://content.minetest.net |
00:38 |
p_gimeno |
also @VanessaE: https://forum.minetest.net/viewtopic.php?id=2538 has broken links to the zips |
00:38 |
LevierMRQ |
rubenwardy: Thanks. Looking at all that. |
00:38 |
LevierMRQ |
p_gimeno: on it |
00:39 |
LevierMRQ |
p_gimeno: 2012 |
00:39 |
rubenwardy |
it's still active |
00:39 |
rubenwardy |
ish |
00:40 |
p_gimeno |
LevierMRQ: that was not for you, I pinged the current maintainer because the forum links are broken |
00:40 |
rubenwardy |
https://github.com/minetest-mods/technic/commits/master |
00:42 |
p_gimeno |
well, the Pipeworks one is broken |
00:44 |
LevierMRQ |
Well. Im feeling as if the best shall be to install a clean minetest then choose the mods; instead to update what i have. |
00:44 |
LevierMRQ |
Any advice? |
00:44 |
LevierMRQ |
Didnt use since 3 years |
00:45 |
rubenwardy |
after that amount of time, probably a good idea |
00:46 |
p_gimeno |
probably better to reinstall mods, but if you had any worlds you want to preserve, you can copy the worlds to the new one |
00:46 |
LevierMRQ |
rubenwardy: will. Thanks. New Minetest seems to run perfectly. I just have to clean mods folder and get the new ones. Right? |
00:46 |
p_gimeno |
or that |
00:46 |
|
cddepppp256 joined #minetest |
00:47 |
LevierMRQ |
Nice. But my worlds dont really matter |
00:47 |
p_gimeno |
don't forget to update minetest_game, it's easy to miss :) |
00:47 |
|
ANAND joined #minetest |
00:48 |
LevierMRQ |
p_gimeno: on it |
00:55 |
|
paramat joined #minetest |
00:58 |
paramat |
kurtzmusch see https://github.com/minetest/minetest/issues/3554 |
01:01 |
p_gimeno |
ahh, that explains why there's no door that blocks light as I asked some weeks ago |
01:02 |
paramat |
also, the lua voxel manipulator can set light levels in nodes, but as soon as there is a nearby node change a lighting update will happen that will undo what was done, possibly in a weird way |
01:06 |
kurtzmusch |
yea, my idea was to use paramtype=light to receive light but light_propagates=false... aparently this is not exposed to the api |
01:08 |
kurtzmusch |
but the issue is open, so theres still hope lol |
01:08 |
kurtzmusch |
thanks for the replies |
01:12 |
|
MistahDarcy joined #minetest |
01:12 |
|
Lone-Star joined #minetest |
01:21 |
|
LevierMRQ joined #minetest |
01:26 |
|
norkle joined #minetest |
01:30 |
|
LevierMRQ joined #minetest |
01:46 |
|
argyle77 joined #minetest |
01:50 |
|
necaremus joined #minetest |
02:01 |
|
FrostRanger joined #minetest |
02:05 |
|
LevierMRQ joined #minetest |
02:32 |
|
FrostRanger joined #minetest |
02:32 |
|
Hawk777 joined #minetest |
02:45 |
|
milkt joined #minetest |
02:59 |
|
benrob0329 joined #minetest |
04:38 |
|
Ruslan1 joined #minetest |
05:24 |
|
gorilla_ joined #minetest |
06:21 |
|
Darcidride joined #minetest |
07:42 |
|
Volgaar joined #minetest |
07:42 |
|
Volgaar left #minetest |
07:59 |
|
aheinecke joined #minetest |
08:05 |
|
FrostRanger joined #minetest |
08:08 |
|
Darcidride joined #minetest |
08:30 |
|
karamel joined #minetest |
08:42 |
|
jluc joined #minetest |
08:51 |
|
kaeza joined #minetest |
08:54 |
|
YuGiOhJCJ joined #minetest |
08:55 |
|
jluc joined #minetest |
09:13 |
|
CWz joined #minetest |
09:46 |
|
Elon_Satoshi joined #minetest |
09:50 |
|
proller joined #minetest |
09:51 |
|
melicerte joined #minetest |
10:02 |
|
Fixer joined #minetest |
10:20 |
|
MarisaG-laptop joined #minetest |
10:50 |
|
proller joined #minetest |
11:17 |
|
riff-IRC joined #minetest |
11:20 |
|
proller joined #minetest |
11:37 |
|
kurtzmusch joined #minetest |
12:14 |
|
calcul0n joined #minetest |
12:15 |
|
twoelk joined #minetest |
13:06 |
|
calcul0n joined #minetest |
13:16 |
|
est31 joined #minetest |
14:02 |
|
BigCaballito joined #minetest |
14:59 |
|
LevierMRQ joined #minetest |
15:00 |
|
amenji joined #minetest |
15:02 |
|
YuGiOhJCJ joined #minetest |
15:09 |
|
epod joined #minetest |
15:15 |
|
nri joined #minetest |
15:51 |
|
kaeza joined #minetest |
15:56 |
|
milkt joined #minetest |
15:57 |
|
Megaf joined #minetest |
16:08 |
|
calcul0n_ joined #minetest |
16:10 |
|
Megaf_ joined #minetest |
16:12 |
|
Edroen_ joined #minetest |
16:12 |
Edroen_ |
Hello |
16:12 |
Edroen_ |
Anyone there? |
16:12 |
Edroen_ |
:) |
16:12 |
BigCaballito |
i'm there |
16:13 |
Emerald2 |
Hey Edroen. What can we do for you this fine day? |
16:14 |
Edroen_ |
Hello |
16:15 |
Edroen_ |
I've recently known of Minetest and wanted to use it in Mac Os X and Suse |
16:15 |
Edroen_ |
then, when trying to do so (suse as minetest server and Mac Os X as client) I saw that the available versions were the old ones, not 5.x |
16:16 |
Emerald2 |
There's also a flatpak for linux if you use those. |
16:16 |
|
kaeza joined #minetest |
16:17 |
Edroen_ |
I wanted to use the 5.x series so I have eventually compiled it for Mac os X (full version, stable and master branches) and the server version for Suse (master I think) |
16:17 |
Emerald2 |
Good. :) |
16:17 |
Edroen_ |
I'll try to also build the full version (stable) for Suse |
16:18 |
Emerald2 |
What version of SUSE? According to the downloads page, they have 5.0 for openSUSE tumbleweed. |
16:18 |
Edroen_ |
The matter is that I've seen that in the downloads section in main minetest website does not include neither of these last versions ... and I think that could be interesting if I provide both, so that people with those systems can use it |
16:18 |
Edroen_ |
Suse Leap |
16:19 |
Edroen_ |
I'm a long time debian user but wanted to play with Suse, so I compiled it there :) |
16:20 |
Emerald2 |
Hey that's cool. :) |
16:20 |
Edroen_ |
MacOs is Sierra, but in my Mac Desktop I think I have High Sierra ... and works fine too |
16:21 |
nri |
Hey guys |
16:21 |
|
GreenDimond joined #minetest |
16:21 |
Edroen_ |
I will try to build the full stable and master branches in Suse too (the server I compiled runs fine) |
16:21 |
Emerald2 |
Hi nri. |
16:21 |
Edroen_ |
Also have a considerable set of mods that the server loaded fine (i.e. they are compatible) so I could perhaps build a package with those |
16:22 |
nri |
does anyone play on the RedCat server here? |
16:22 |
Edroen_ |
Nri: No, not me |
16:23 |
nri |
oh ok |
16:23 |
Emerald2 |
Don't think I've ever been to RedCat. |
16:23 |
Edroen_ |
I was trying to get in touch with developers in minetest-dev but seems that I can't write there (currently using web irc, could install a real irc client to try) |
16:23 |
|
FrostRanger joined #minetest |
16:23 |
* rubenwardy |
does |
16:23 |
Emerald2 |
Some of the channels require being voiced to talk. |
16:24 |
Emerald2 |
Good timing ruben. |
16:24 |
nri |
I use AdiIRC |
16:24 |
nri |
hey rubenwardy |
16:24 |
Emerald2 |
I use hexchat. |
16:24 |
Edroen_ |
I've read something about it ... yes ... so I decided to ask here |
16:24 |
rubenwardy |
Edroen_: that channel doesn't allow web chat due to historic spamming |
16:24 |
rubenwardy |
this channel is the better one any way |
16:24 |
Edroen_ |
ah, spam, ok |
16:25 |
Edroen_ |
Then, I'd like to know how I could publish the binaries (do I create a git account for it?) and how to point to them from the main maintest download page |
16:25 |
Edroen_ |
... or if there are some testers that could get my binaries and test them too :) |
16:27 |
kurtzmusch |
i dont think minetest forks are published in the mt page |
16:27 |
Edroen_ |
Its not a fork. It's the stable and master branches compiled for Mac os X |
16:27 |
Edroen_ |
:) |
16:27 |
Emerald2 |
It's minetest in different package formats, not a fork. |
16:28 |
Emerald2 |
Presumably the devs built the available ones. |
16:28 |
Edroen_ |
No, the stable and master branches (5.x series) are not compiled for Mac nor for SuSE |
16:29 |
Edroen_ |
Now, I've compiled them, and would like to make them available ... you know, the "Get Involved" :) |
16:30 |
Edroen_ |
I could try asking in the forum but via IRC seemed to be faster |
16:30 |
Emerald2 |
Yo rubenwardy |
16:34 |
Edroen_ |
and yes, 5.0.0 is available for tumbleweed, but not for Leap. The one I've built is for Leap |
16:41 |
* Emerald2 |
nods. |
16:43 |
Edroen_ |
so, any suggestions of how should I proceed? |
16:43 |
Edroen_ |
to make them public, I mean |
16:43 |
rubenwardy |
I'd create a forum thread in the builds section |
16:43 |
Emerald2 |
People have been asking for a Mac build, so having one available will be good. |
16:44 |
|
Ruslan1 joined #minetest |
16:51 |
|
Ruslan1_ joined #minetest |
16:53 |
|
proller joined #minetest |
16:53 |
Ruslan1_ |
nick Ruslan1 |
16:53 |
Ruslan1_ |
Oops |
16:56 |
|
Ruslan1 joined #minetest |
16:57 |
|
Edroen joined #minetest |
16:57 |
Emerald2 |
Gotta run. Later folks! |
16:58 |
Edroen |
Ok. I'll check how create a thread in the forums. Have to leave now. Have a nice day :) |
17:01 |
|
JDCodeIt joined #minetest |
17:01 |
|
twoelk left #minetest |
17:12 |
JDCodeIt |
Hi All, do we know if minetest.swap_node() is invalid to call during a node's on_construct() callback? |
17:13 |
rubenwardy |
I suspect that the change will be lost if you don't return false or whatever to cancel it |
17:13 |
|
jexi joined #minetest |
17:14 |
|
jexi joined #minetest |
17:18 |
JDCodeIt |
false means - something else has been put in that spot - true means proceed as normal? |
17:23 |
p_gimeno |
is there a way to hide warnings but see actions? |
17:24 |
|
tzh joined #minetest |
17:26 |
JDCodeIt |
would it be better to sawp_node in the callback after_place_node? |
17:27 |
JDCodeIt |
I tried returning false from on_construct but the engine seems to ignore swap_node call anyway |
17:28 |
|
nri joined #minetest |
17:40 |
LevierMRQ |
Hi. I would want to test Windows Minetest on my server that déjà local network. Sure i installed additions and local network looks perfect. |
17:41 |
LevierMRQ |
The problem is certainly a windows something i didnt catch as usual. |
17:43 |
LevierMRQ |
I am using Virtual Box with healty Windows 98v2(and spaks or something like that); Win98 freshly installed. |
17:43 |
|
roben1430 joined #minetest |
17:44 |
JDCodeIt |
Is Sokomine still maintaining xconnected? |
17:45 |
LevierMRQ |
I need help to choose a network access mode (ex:NAT) as we were always connected as Ethernet does, for example. |
17:45 |
|
ensonic joined #minetest |
17:48 |
LevierMRQ |
Then if possible tell my windows to connect. I destroyed alot of unfortune computers in Windows |
17:51 |
LevierMRQ |
plz remember that the goal is to test Windows Minetest client on my server that is working well. Then right after i will not pronounce Windows for how long possible. Excuse my english; im from Québec, a french country in Canada. |
17:52 |
roben1430 |
https://youtu.be/6vn43k8S7sc Finishing The Tunnel - Ayums - Episode 2 |
17:56 |
p_gimeno |
LevierMRQ: sounds like a VirtualBox issue, not a Minetest issue - not sure anyone here can help |
17:58 |
|
LevierMRQ1 joined #minetest |
17:59 |
|
makayabou joined #minetest |
18:00 |
makayabou |
Hello! I find https://dev.minetest.net/Settings a bit confusing, it leads to think that syntax is minetest.Settings() or minetest.settings() in place of Settings() |
18:00 |
makayabou |
is Settings(filename):write() supposed to work? |
18:05 |
p_gimeno |
makayabou: I can't assure but it seems to me that using upper case S is a typo, see the example at the bottom |
18:08 |
makayabou |
with minetest.settings I get : editor.lua:78 : attempt to call field 'settings' (a userdata value) |
18:08 |
|
nowhere_man joined #minetest |
18:08 |
makayabou |
l78 : minetest.settings(level_dir..base_def.name..".conf"):get("basepoint") |
18:09 |
rubenwardy |
Settings(filename):write() is correct |
18:09 |
rubenwardy |
uppercase S, and a global |
18:09 |
rubenwardy |
it's a class |
18:10 |
makayabou |
thank you. Then I found wiki dev page confusing |
18:10 |
p_gimeno |
no wonder, I was confused by it too |
18:11 |
rubenwardy |
!rtfm |
18:11 |
MinetestBot |
Someone thinks you should read the manual. The development wiki is at http://dev.minetest.net, the regular wiki is at http://wiki.minetest.net. |
18:11 |
rubenwardy |
heh |
18:11 |
rubenwardy |
that's not the manual! |
18:11 |
rubenwardy |
grrr |
18:11 |
rubenwardy |
the official lua api reference docs are https://www.minetest.net/lua_api/ |
18:11 |
makayabou |
I did read lua_api.txt, then I saw the page on wiki and I came here to say that maybe something was confusing |
18:12 |
rubenwardy |
minetest.settings is basically minetest.settings = Settings("/path/to/minetest/dir/minetest.conf") |
18:12 |
JDCodeIt |
...then I better sync these in a hurry |
18:12 |
rubenwardy |
so it's an instance of Settings() |
18:13 |
makayabou |
rubenwardy: clear, that's what I thought I understood |
18:15 |
|
Fixer_ joined #minetest |
18:15 |
makayabou |
JDCodeIt: thanks |
18:25 |
BigCaballito |
is it possible to make a node that will update (minetest.check_for_falling) all surrounding nodes when you step on it? like a pressure plate. |
18:30 |
makayabou |
I guess you would have to register a globalstep... https://dev.minetest.net/minetest.register_globalstep |
18:32 |
JDCodeIt |
dev wiki page updated, hopefully more clear now : https://dev.minetest.net/Settings |
18:35 |
makayabou |
example at the end? |
18:36 |
BigCaballito |
kinda new at modding :/ how would i use this on a node? in understand that you replace minetest.chat_send_all("MInetest") with minetest.check_for_falling(), but how do i add this to a node? |
18:39 |
makayabou |
compare pos of player with pos of node |
18:39 |
makayabou |
but I don't know if it will be very heavy or not |
18:40 |
p_gimeno |
JDCodeIt: I don't think Settings is available as a global |
18:40 |
makayabou |
It's not a method called on a node, it's a function that is called at init and keeps going all the time the game is on |
18:43 |
p_gimeno |
JDCodeIt: my bad, it IS a global. And it's a function, not an object, so I assume it's a constructor. |
18:45 |
|
emacsomancer joined #minetest |
18:49 |
p_gimeno |
why is "Client side scripting is disabled by client" a warning? |
18:50 |
p_gimeno |
about every warning I get is bogus |
18:52 |
sfan5 |
wish i knew |
18:54 |
|
DI3HARD139 joined #minetest |
19:01 |
JDCodeIt |
Settings - an interface that returns an instance to an object? Or would it be better stated as a global function that... |
19:02 |
JDCodeIt |
returns an instance of an object |
19:03 |
p_gimeno |
hard to say |
19:04 |
p_gimeno |
the Settings object does not exist with that name in Lua, it's a global constructor |
19:04 |
p_gimeno |
The Settings interface can be used to read config files... |
19:04 |
JDCodeIt |
.. how about : global function that returns an instance of an object, providing an interface to read config files... |
19:05 |
p_gimeno |
that would work I guess |
19:06 |
makayabou |
that seems clear to me |
19:12 |
|
puzzlecube joined #minetest |
19:20 |
BigCaballito |
@makayabou thanks for your help |
19:26 |
|
LMD joined #minetest |
19:26 |
JDCodeIt |
makayabou: does the pyramids mod have an example of this already? have a look |
19:31 |
makayabou |
it uses only get_bool . get (get_key, get_bool, to_table) methods work well, it's the Settings(file):write I can't make work.. |
19:32 |
makayabou |
you were speaking of https://github.com/BlockMen/pyramids ? |
19:33 |
JDCodeIt |
makayabou: yes, seems to have something like what you are talking about - step on the wrong block, it falls |
19:35 |
|
ensonic joined #minetest |
19:36 |
|
FreeFull joined #minetest |
19:37 |
p_gimeno |
cleaning up sRGB profiles in the textures of installed mods is so fun... /s |
19:39 |
makayabou |
oups |
19:39 |
makayabou |
JDCodeIt: Sorry I thought you were speaking of Settings stuff .. |
19:40 |
makayabou |
BigCapabllito: so, sayed JDCodeIt, you should find something like you're trying in pyramids mod |
19:41 |
makayabou |
*like what |
19:42 |
JDCodeIt |
makaybou: is there maybe a permissions issue with write() - did it return true? |
19:42 |
makayabou |
BigCaballito: https://github.com/BlockMen/pyramids |
19:43 |
makayabou |
yes it returns true... |
19:45 |
makayabou |
Correct me if i'm wrong: 1/ I create a .conf file in my modpath 2/ I use Settings("my.conf"):set("key1","value1") 3/ Settings("my.conf"):write() |
19:47 |
BigCaballito |
thank you that is a lot more like what i was looking for |
19:48 |
|
Ruslan1 joined #minetest |
19:48 |
makayabou |
you're welcome, JDCodeIt found it |
19:48 |
makayabou |
So is it using globalstep? |
19:50 |
JDCodeIt |
makayabou: you don't get the message like : Settings: writing " + o->m_filename + " not allowed with mod security on."); |
19:51 |
makayabou |
nope. local success = Settings(level_dir..base_def.name..".conf"):write() is true |
19:51 |
BigCaballito |
i don't think its using globalstep, it seems to be detecting if there is something on it, then if that thing is a player it nodeupdates() |
19:52 |
BigCaballito |
which needs to be changed to check_for_falling, obviously |
19:57 |
JDCodeIt |
makayabou: there is a call to updateConfigObject(is, os, ""); which is checking if anything changed - but strangely it passes only 3 arguments when the function has 4... |
19:58 |
JDCodeIt |
if this returns true, then the write() would return true without actually writing anything |
20:01 |
JDCodeIt |
if this returns *false, then... |
20:02 |
JDCodeIt |
...4th argument has a default=0... |
20:04 |
makayabou |
it is u32 tab_depth=0 ? |
20:06 |
makayabou |
I don't understand all that |
20:07 |
makayabou |
BigCaballito: i don't see where nodeupdates() is defined.. it uses on_timer in register node, and check all the time if playerObj is in radius |
20:08 |
makayabou |
I think that is the good solution for you. And I'll surely make something with it me too someday! |
20:09 |
BigCaballito |
line 21 in nodes.lua |
20:09 |
BigCaballito |
yes, thank you |
20:10 |
makayabou |
that's where it's called no? but the definition? I don't think there is. set_node should have been a replacement for it |
20:11 |
BigCaballito |
isn't it defined by minetest? and been replaced with minetest.check_for_falling in 5.x? |
20:12 |
makayabou |
if it was a global it would be called with minetest.updatenodes() |
20:13 |
BigCaballito |
idk, like i said i'm new to modding |
20:13 |
makayabou |
or maybe it was different before I don't know but I would be surprised |
20:13 |
makayabou |
me too |
20:13 |
makayabou |
!book |
20:13 |
MinetestBot |
makayabou: Minetest Modding Book - https://rubenwardy.com/minetest_modding_book/ |
20:16 |
BigCaballito |
I'll check it out, thanks again! |
20:20 |
makayabou |
you're welcome |
20:22 |
makayabou |
JDCodeIt: Settings(f):write() returns also true if f is outside modpath.. |
20:24 |
BigCaballito |
just tested rewritten code, it is exactly what i wanted |
20:26 |
|
Nutty8 joined #minetest |
20:30 |
|
nri joined #minetest |
20:33 |
JDCodeIt |
makayabou: maybe gdb is the only way to find out for sure what is going on in there. The call to safeWriteToFile() will attempt to write a temp file (suffix .~mt) and rename it with overwrite to the target filename. |
20:36 |
|
Nutty8 left #minetest |
20:54 |
|
dvere joined #minetest |
20:57 |
|
Fusl joined #minetest |
21:22 |
|
kaeza joined #minetest |
21:26 |
|
riff-IRC joined #minetest |
21:29 |
makayabou |
with gdb, where to put mod I want to test ? it's in $MINETEST_DEBUG_FOLDER/mods/mymod but it's not shown by client. Games also are not from $MINETEST_DEBUG_FOLDER/games but from all minetests installed.. |
21:31 |
kurtzmusch |
ive been reading https://dev.minetest.net/minetest.register_biome ... it seems that a point in space can only belong to 1 biome? theres no 90% tundra, 10% desert kind of thing? also it seems to not be possible to define biomes from any other parameter other than heat and humidity? |
21:31 |
p_gimeno |
makayabou: gdb can't be used with Lua code, but you can use it with C++ code |
21:33 |
makayabou |
I won't be able to do that.. |
21:36 |
p_gimeno |
makayabou: are the settings correctly preserved? if so, maybe the file path is not the one you expect |
21:37 |
makayabou |
I had to put it in my .minetest folder. |
21:50 |
makayabou |
JDCodeIt: with debug (5.1.0-dev-debug-ad75dba), I have ServerError: AsyncErr: ServerThread::run Lua: Settings: writing /home/makayabou/.minetest/games/level_editor_game/mods/level_editor/levels/deplacements.conf not allowed with mod security on. |
21:51 |
makayabou |
but filepath was defined using minetest.get_modpath |
21:57 |
clavi |
is there a newsletter for new releases? |
21:58 |
makayabou |
don't hink so |
21:58 |
makayabou |
*think |
22:13 |
makayabou |
JDCodeIt: If I deactivate security, Settings(f):write() returns true, and still nothing written in file, and no info in verbose debug. |
22:14 |
p_gimeno |
makayabou: I think you may be misunderstanding how it's used |
22:14 |
makayabou |
I do think so also.. |
22:14 |
p_gimeno |
you do e.g. local mysettings = Settings(f) |
22:15 |
makayabou |
Correct me if i'm wrong: 1/ I create a .conf file in my modpath 2/ I use Settings("my.conf"):set("key1","value1") 3/ Settings("my.conf"):write() |
22:15 |
p_gimeno |
then: mysettings:set("setting", "value") then mysettings:write() |
22:16 |
p_gimeno |
I think that the problem is that in your step 3, you're creating a new object that doesn't contain the value you set in step 2 |
22:16 |
p_gimeno |
the trick is to create one single object, set values in it, then write it back |
22:17 |
makayabou |
On init, i do local conf = Settings(level_dir..v):to_table() |
22:18 |
makayabou |
and it works, I get the table I want.. |
22:19 |
makayabou |
ah .. I have to "enclose" Settings(f) in a variable, and then call the variable rather than Settings(f) anew? |
22:19 |
p_gimeno |
exactly |
22:19 |
makayabou |
ah...let's try |
22:19 |
p_gimeno |
every time you call Settings(f), a new settings object is created which contains the current contents |
22:20 |
p_gimeno |
which means that you lose the previous value |
22:40 |
kaeza |
Greetings. |
22:42 |
|
Cornelia joined #minetest |
22:45 |
makayabou |
p_gimeno: oh yes it works now!! thank you a lot! |
22:46 |
p_gimeno |
my pleasure :) |
22:46 |
makayabou |
JDCodeIt: Sorry for bothering, was on me (that was for sure).. at least I did use gdb first time! |
22:48 |
makayabou |
p_gimeno: it is a bit the same with tables isn't it ?Often I don't grab the value I want in recursive tables. it's because I have to "kind of instantiate" all branches.. ? |
22:51 |
p_gimeno |
well... for some interpretation of your words, yes :) If you do a = { x = 1 }; b = a; b.x = 2; print(a.x) you get 2. |
22:52 |
p_gimeno |
If you want two independent nested tables, you need to deep-copy the source table. |
22:52 |
p_gimeno |
table.copy performs a deep copy |
22:53 |
p_gimeno |
(a deep copy is a "nested" copy, as opposed to a shallow copy which only copies the outermost table) |
23:04 |
makayabou |
table.copy ? I thought it did not exist after having read http://lua-users.org/wiki/CopyTable |
23:06 |
p_gimeno |
makayabou: it's implemented by minetest |
23:06 |
p_gimeno |
it's in lua_api.txt |
23:07 |
makayabou |
arrghh.. i never saw that and I'm always struggling with my tables!! But it's over now! Thanks! |
23:07 |
p_gimeno |
:) |
23:07 |
makayabou |
I did not ever think on looking for table.stuff in lua_api... |
23:17 |
|
Lone-Star joined #minetest |
23:27 |
|
kurtzmusch joined #minetest |
23:43 |
|
SmugLeaf joined #minetest |
23:47 |
|
swift110 joined #minetest |
23:47 |
kaeza |
Ideally, Minetest shouldn't be adding custom stuff to Lua modules, but things like string.trim and string.split are very useful. |
23:47 |
|
Copenhagen_Bram joined #minetest |