Time Nick Message 00:35 hisforever Hi after a advtrain gets an atC comand is there a way to over ide it? 00:35 hisforever Ide =ride 00:45 ar10ch I'm not sure what you're trying to achieve by using atc 02:32 cheapie Well, this might just be the most confusing floor layout I've made in a building in MT so far, thanks to various split-level stuff going on... 02:33 cheapie 4 floors - LD, 1, R1, and R2, in that order. R1 is only 1m above 1. 02:34 cheapie But then the stairs (due to their unusual layout) reach R1 *before* 1, so if you're on the stairs the order of the floors appears different from if you take one of the elevators... 02:35 cheapie Making things *even worse*, LD and 1 open on the rear side of the elevators, so they get an "R" suffix in there... so the buttons have two adjacent floors labeled "1R" and "R1" 02:51 MTDiscord <05e​xe_virus> yuck 02:51 MTDiscord <05e​xe_virus> Could do full descriptive names 06:14 MTDiscord <03f​atalerror420 (seared)> "Hi after a advtrain gets an atC comand is there a way to over ide it? Ide =ride" should i call 911? 15:51 mazes_81 Hi, just a small remind about lua, when I print some boolean it says" false", however the test "if this_guy == true" is positive, when "if this_guy" is negative 15:53 mazes_81 it's seems weird to me. This behavior was detected in 3d_armor_flyswim mod, and leads to not being able to apply correctly settingstype.txt 15:54 pgimeno if you print type(this_guy), does it print boolean? 15:54 mazes_81 I fixed locally but still hesitate to open bug upstream 15:55 LoneWolfHT If you want to check whether or not a number is positive do >=0, don't compare it with a boolean 15:59 pgimeno I don't believe it is like you've described, mazes_81. You must have made a mistake. 15:59 mazes_81 this_guy is initialised by minetest.setting_getbool (deprecated so weird for recent mod), maybe it does not guarantee bool 16:00 mazes_81 that's why I say something is eird 16:00 mazes_81 weird* 16:00 rubenwardy please show example code 16:00 rubenwardy because I don't know what you mean 16:01 pgimeno 'if this_guy == true' can ONLY be true ("positive" as you say) when the variable contains the boolean value true 16:01 pgimeno however, 'if this_guy' can be true whenever this_guy is something other than false or nil 16:01 pgimeno are you sure you didn't swap those? 16:02 mazes_81 type(this_guy) is nil 16:03 mazes_81 value this_guy is false 16:03 pgimeno if it's nil, it means that 'if this_guy == true' can NEVER match 16:03 LoneWolfHT minetest.settings:get_bool("this_guy", true) 16:03 LoneWolfHT If you want true to be the default setting value 16:03 mazes_81 yes, I think new function will guarantee return type 16:03 deltanedas[m] nil is a falsy value 16:04 mazes_81 so I can prepare my pr, thanks 16:05 pgimeno nil is always a valid return value. get_bool is documented to return nil when the configuration variable does not exist. 16:05 mazes_81 or even just fill a bug without pr, as it is really "easy fix" 16:06 mazes_81 so better to test only "this_guy" instead of "this_guy == true" 16:06 mazes_81 and update code to classes call also 16:07 mazes_81 the 3d_armor_flyswim code is full of "those_guys == true" test 16:08 deltanedas[m] is there a defined way to see if a blocks inventories should be accessible? 16:09 deltanedas[m] e.g. for a furnace the fuel and input should be fully accessible, but the output is take-only 16:09 pgimeno unfortunately it's very common to see novel programmers comparing booleans to true or false instead of just checking them, which doesn't work so well for languages with dynamic types like Lua 16:10 pgimeno anyway, it's unclear to me what the purpose really is 16:10 mazes_81 another question about settingstype.txt: can we have it per world (I just see game and mod on the wiki, so I guess it's not possible) 16:10 pgimeno if this_guy is nil, then neither 'if this_guy == true' nor 'if this_guy' will be true 16:11 mazes_81 no this guy is good value, however type(this_guy) is nil 16:12 pgimeno well, if type(this_guy) is "nil", then neither 'if this_guy == true' nor 'if this_guy' will be true 16:13 pgimeno http://www.formauri.es/personal/pgimeno/temp/lua-this_guy.txt 16:14 mazes_81 if this_guy succeeds, when if this_guy == true fails. I guess "if this_guy" <==> if "not empty(this_guy)" 16:14 MTDiscord <08a​ppguru> lua ain 16:14 pgimeno in Lua, values are always true except when they are either false or nil 16:14 MTDiscord <08a​ppguru> 't PHP 16:15 MTDiscord <08a​ppguru> truthy* 16:15 MTDiscord <08a​ppguru> if you want to check for truthiness or nil, you can do value == true or value == nil 16:15 mazes_81 this_guy is not nil, only type this_guy 16:15 pgimeno the only value with type "nil" is nil 16:16 pgimeno there are no other values with type "nil" 16:16 MTDiscord <08a​ppguru> ^ 16:16 mazes_81 this_guy = minetest.setting_getbool("this_guy") 16:16 MTDiscord <08a​ppguru> I already expected that 16:16 MTDiscord <08a​ppguru> see https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L6775 16:16 MTDiscord <08a​ppguru> get_bool expects a default value 16:17 MTDiscord <08a​ppguru> you are passing nil 16:17 pgimeno https://github.com/minetest/minetest/blob/0.4.14/doc/lua_api.txt#L1946 16:17 MTDiscord <08a​ppguru> so it will return nil if the setting is not passed 16:17 pgimeno * `minetest.setting_getbool(name)`: returns boolean or `nil` 16:17 MTDiscord <08a​ppguru> s/passed/present 16:17 mazes_81 ok, that seems enough to me, update functions, and do not test with == true 16:17 MTDiscord <08a​ppguru> oof I linked the wrong thing 16:17 MTDiscord <08a​ppguru> pgimeno is right 16:17 MTDiscord <08a​ppguru> but you should use minetest.settings:get_bool(name, default) 16:18 MTDiscord <08a​ppguru> owait, this is MT 0.4? 16:19 mazes_81 appguru, the mod initialises default value, a bit after, testing == nil case 16:19 pgimeno I assume the mod is made for 0.4 because it uses setting_getbool instad of settings:get_bool 16:19 mazes_81 so another thing to fix 16:20 pgimeno mazes_81: it seems to me you're not on the right path, but if you don't show the code, there isn't much we can do to understand where the problem actually is and give better advice 16:20 mazes_81 this_guy = minetest.setting_getbool("this_guy"); if this_guy == nil then this_guy = true; 16:21 mazes_81 https://github.com/sirrobzeroone/3d_armor_flyswim/blob/main/init.lua 16:21 pgimeno what line? 16:21 pgimeno there is no 'this_guy' in that page 16:22 mazes_81 line 68 16:23 mazes_81 those_guys, are all minetest.setting_getbool in fact 16:23 mazes_81 sorry, I thought it was clear that 'this_guy' was just a sample 16:24 pgimeno so, when the setting does not exist, it is overridden with true 16:25 mazes_81 it always exist, unless someone edit settingstype.txt from mod 16:26 pgimeno no, it doesn't exist unless someone adds it to minetest.conf 16:26 deltanedas[m] settings is like a table 16:26 deltanedas[m] its nil by default 16:26 deltanedas[m] thats it 16:27 deltanedas[m] use settings:get("key") and default_value if you want a default 16:31 mazes_81 wait, settingstype.txt, from the mod directory is not parsed ? 16:31 pgimeno they are not settings, they are definitions of settings 16:31 deltanedas[m] it is 16:32 deltanedas[m] how else does the game know what settings should be? 16:32 deltanedas[m] engine* 16:33 mazes_81 ok, pgimeno, deltanedas[m] it is not properly parsed, but the setting interface still parses it 16:35 mazes_81 "settings interface will show default value from settingtypes.txt but minetest.settings:get will return nil". (from the wiki), I also missed this part 16:36 mazes_81 deltanedas[m]: the game do not care about settingstype.txt (I thought like you, my bad for this question). 16:36 deltanedas[m] engine does 16:37 deltanedas[m] its parsed for types, description and name 16:37 deltanedas[m] how else can you configure it 16:37 mazes_81 only interface not engine 16:38 pgimeno the settings themselves are in minetest.conf, not in settingtypes.txt 16:38 pgimeno settingtypes.txt contains the types for each setting, as the name implies 16:40 mazes_81 so I should read wiki more accurately before asking questions (still the exact reason only appears on the new functions page) 17:34 MTDiscord <10L​apis Lazuli Wolf> This mod always crashes. 18:47 MinetestBot 02[git] 04Wuzzy2 -> 03minetest/minetest: Fix world-aligned node rendering at bottom (#10742) 13e441ab9 https://git.io/JtyhQ (152021-02-19T18:45:36Z) 19:00 MinetestBot 02[git] 04Wuzzy2 -> 03minetest/minetest: Fail gracefully if main_menu_script has bad value (#10938) 13c12e9cd https://git.io/Jtyjj (152021-02-19T18:59:48Z) 20:09 w0wbagg3r Hi. Can somebody help me? I installed Minetest and followed this guide to install mobs_redo... https://forum.minetest.net/viewtopic.php?t=9917 20:09 w0wbagg3r but when I create a game it does not show any animal 20:12 sfan5 did you install mobs_animal? 20:12 sfan5 and enable it? 20:21 w0wbagg3r yes 20:21 w0wbagg3r in the mods folder of minetest I have: mob_horse/ mobs_animal/ mobs_monster/ mobs_npc/ and mobs_redo/ 20:36 w0wbagg3r never mind, I found the issue...thanks anyway 21:23 Swift110-mobile hello all