Update readme

This commit is contained in:
cora 2021-09-27 03:23:04 +02:00
parent 5e8d8a7e9b
commit 5ad46bd9a3
1 changed files with 71 additions and 1 deletions

View File

@ -1,7 +1,77 @@
`mcl_weather`
=======================
This was largely rewritten to use particlespawners (what were you thinking !?) and an event based code flow.
-cora, 2021-09
Weathers included
-----------------------
* rain
* snow
* thunder
Commands
-----------------------
`weather <weather>`, requires `weather_manager` privilege.
Dependencies
-----------------------
Lightning has been made a hard dependency since it is included in Mineclonia.
Adding new weathers:
It's as simple as calling a mcl_weather.register_weather(weatherdef):
Weatherdef
-----------------------
{
light_factor = 1,
-- 0-1
cloudcolor= ,
--hexrgb
sound,
--A sound name (loop)
min_duration ,
-- In seconds
max_duration ,
transitions,
--The chances how likely this weather is to change into another weather.
-- e.g.
-- {
-- [65] = "none",
-- [80] = "rain",
-- [100] = "thunder",
-- }
skylayer= ,
-- a skylayer defintion (see skycolor api)
particlespawners = {},
-- a table of particlespawnerdefinitions
start ,
--A function that is run when the weather is about to start
start_player,
--A function per player that is run when the weather is about to start
clear ,
--A function that is run when the weather is about to clear/change
clear_player , -- function per player that is run on change (first argument is the playername)
at_pos ,
--A function that is run for each player with current position as argument. weather is disabled for the player when it returns false
change_at_pos,
--function that is run for each player with current position as argument. return a weather name and the weather transitions into the supplied weather for that player
}
This was the original README.md from mcl2_weather:
Weather mod for MineClone 2. Forked from the `weather_pack` mod by xeranas.