[Discussion] Log after loading mods [Closed]

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

[Discussion] Log after loading mods [Closed]

by PilzAdam » Sat Sep 29, 2012 12:28

Hello everyone!
Should mods print some message after loading?
Example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.log("action", "[modname] loaded")


We should decide wether all mods should use this.

Result:
If "log_mods" in minetest.conf is set to true the mods will log that they have loaded.
Example code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if minetest.setting_get("log_mods") then
    minetest.log("action", "default loaded")
end
Last edited by PilzAdam on Sun Oct 07, 2012 17:28, edited 1 time in total.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Sat Sep 29, 2012 12:40

As some of you have probably seen, I use this line, because it requires no editing between modules. Just paste at the bottom of your init.lua and it works:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- loaded from "..minetest.get_modpath(minetest.get_current_modname()))


We probably don't need to show the path, but its nice when you have loads of modpacks to see which one actually loaded.

I am +1 for a standard between all modders with this.
Last edited by cornernote on Sat Sep 29, 2012 12:41, edited 1 time in total.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sat Sep 29, 2012 14:43

IMO: we need an unified way of doing so. If a mod's init.lua contains "no_print_on_load = true" (or, there is a file named no_print_on_load.txt, in a similar way to modpack.txt), nothing is printed in the console when loaded, else "[<modname>] loaded." prints into console.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Oct 07, 2012 17:18

Maybe
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
log_mods = true
in minetest.conf?
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 12 guests

cron