forked from VoxeLibre/VoxeLibre
Added some comments
This commit is contained in:
parent
69ddb61a7e
commit
15c2565f14
|
@ -151,7 +151,12 @@ mobs.spawning_mobs = {}
|
|||
|
||||
|
||||
|
||||
-- register mob entity
|
||||
-- This method registers a mob entity, The internal logic of the function is basically
|
||||
-- to account for collision boxes and then account for the world difficulty.
|
||||
-- After that, the minetest.register_entity method is called.
|
||||
-- An object called 'def' is sent to the method, which contains all of
|
||||
-- the possible attributes that a mob entity can have.
|
||||
|
||||
function mobs:register_mob(name, def)
|
||||
|
||||
local collisionbox = def.collisionbox or {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}
|
||||
|
@ -174,6 +179,7 @@ function mobs:register_mob(name, def)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
minetest.register_entity(name, {
|
||||
description = def.description,
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
|
@ -408,6 +414,7 @@ function mobs:register_mob(name, def)
|
|||
|
||||
on_step = mobs.mob_step,
|
||||
|
||||
|
||||
--do_punch = def.do_punch,
|
||||
|
||||
on_punch = mobs.mob_punch,
|
||||
|
@ -430,6 +437,7 @@ function mobs:register_mob(name, def)
|
|||
--harmed_by_heal = def.harmed_by_heal,
|
||||
})
|
||||
|
||||
|
||||
if minetest_get_modpath("doc_identifier") then
|
||||
doc.sub.identifier.register_object(name, "basics", "mobs")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue