mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-29 22:33:46 +01:00
Update monster spawner docs
parent
097de371b6
commit
64ec1fd03d
@ -4,5 +4,14 @@ Monsters will appear around the monster spawner in semi-regular intervals.
|
||||
This mod is originally based on the mob spawner from Mobs Redo by TenPlus1
|
||||
but has been modified quite a lot to fit the needs of MineClone 2.
|
||||
|
||||
Players can get a monster spawner by `giveme` and is initially empty after
|
||||
placing.
|
||||
|
||||
## Programmer notes
|
||||
To set the mob spawned by a monster spawner, first place the monster spawner
|
||||
(e.g. with `minetest.set_node`), then use the function
|
||||
`mcl_monster_spawner.setup_spawner` to set its attributes. See the comment
|
||||
in `init.lua` for more info.
|
||||
|
||||
## License (code and texture)
|
||||
MIT License
|
||||
|
@ -50,7 +50,7 @@ All the following arguments are optional!
|
||||
* YOffset: Y offset to spawn mobs; 0 to disable (default: 0)
|
||||
]]
|
||||
|
||||
function mobs.setup_spawner(pos, Mob, MinLight, MaxLight, MaxMobsInArea, PlayerDistance, YOffset)
|
||||
function mcl_monster_spawner.setup_spawner(pos, Mob, MinLight, MaxLight, MaxMobsInArea, PlayerDistance, YOffset)
|
||||
-- Activate monster spawner and disable editing functionality
|
||||
if MinLight == nil then MinLight = 0 end
|
||||
if MaxLight == nil then MinLight = 15 end
|
||||
@ -144,7 +144,7 @@ minetest.register_node("mcl_monster_spawner:spawner", {
|
||||
and pla and pla >=0 and pla <= 20
|
||||
and yof and yof > -10 and yof < 10 then
|
||||
|
||||
mobs.setup_spawner(pos, mob, mlig, xlig, num, pla, yof)
|
||||
mcl_monster_spawner.setup_spawner(pos, mob, mlig, xlig, num, pla, yof)
|
||||
else
|
||||
minetest.chat_send_player(name, S("Mob Spawner settings failed!"))
|
||||
minetest.chat_send_player(name,
|
||||
|
Loading…
Reference in New Issue
Block a user