Page 2 of 2

Re: [Mod] Skylayer [0.5]

Posted: Fri Jul 31, 2020 04:40
by Grigor
Hi Xeranas, been playing around with your mod. I have limited experience doing Minetest-type programming. I was wondering if you could tell me please:

a) Which command(s) might I use to change the default sky colors (using the method in your demo6)
b) Which file do I put the command in? (init.lua?)

I use my own sun and moon textures and "weather_pack" (Copyright (c) 2017 Artūras Norkus)

I know I could just run the game and type in "/sl_demo6_on" but is there a way to automate it, and make it default?

Re: [Mod] Skylayer [0.5]

Posted: Fri Jul 31, 2020 08:51
by xeranas
Hi Grigor,
If you want default sky probably it's best is to define callback when a player joins the server (minetest.register_on_joinplayer). You can check callback and combine skylayer API add layer call (skylayer.add_layer).

Here minimalistic sample which sets default sky for the server (with changed moon and sun textures):
https://gitlab.com/rautars/skylayer_demo

Re: [Mod] Skylayer [0.5]

Posted: Sat Aug 01, 2020 22:17
by Grigor
Thanks, Xeranas... will try that out. Thanks for the lead (and for all your mods!)

...That works just as needed. This is the green light for me to embrace Mintest 5.3X. Didn't like the default sky color at all.