1
0
Fork 0

Add FIXME notes to slime mob code.

Missing features:
* Slimes should not only spawn in caves, but also at night in swamps.
* Slimes should only spawn on 10% of the map ("slime chunks").
* There are no spawn eggs registered for small and tiny slimes and magma
  cubes.
This commit is contained in:
kabou 2022-12-22 02:06:56 +01:00 committed by Gitea
parent ea19f02e14
commit 8279dcb3dd
1 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,12 @@
--License for code WTFPL and otherwise stated in readmes
-- FIXME: Slimes should spawn not only in underground caves, but also
-- during the night in Swampland and MangroveSwamp biomes, with a spawn
-- chance proportional to the phase of the moon
-- FIXME: Slimes should spawn only in "slime chunks" which make up only
-- 10% of the map.
--
local S = minetest.get_translator("mobs_mc")
-- Returns a function that spawns children in a circle around pos.
@ -44,10 +51,9 @@ local spawn_children_on_die = function(child_mob, spawn_distance, eject_speed)
-- If mother was murdered, children attack the killer after 1 second
if self.state == "attack" then
minetest.after(1.0, function(children, enemy)
local child, le
local le
for c = 1, #children do
child = children[c]
le = childdren[c]:get_luaentity()
le = children[c]:get_luaentity()
if le then
le.state = "attack"
le.attack = enemy
@ -452,3 +458,5 @@ mmax)
mcl_mobs.register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "#350000", "#fcfc00")
mcl_mobs.register_egg("mobs_mc:slime_big", S("Slime"), "#52a03e", "#7ebf6d")
-- FIXME: add spawn eggs for small and tiny slimes and magma cubes