Page 1 of 1

isPeaceful

PostPosted: Thu Oct 09, 2014 11:20
by napodan
Hi everyone,

I'm news in minetest and I try to understand how mobs mods work. I saw that in minetest.conf we can set only_peaceful_mobs to have only peaceful mobs or not. I looked into the C++ code and found that if it's true, the program calls isPeaceful on every ServerActiveObject. I found that isPeaceful always return true. Is there a way to override this method in lua script (every mob may override this method) ?

Re: isPeaceful

PostPosted: Thu Oct 09, 2014 17:05
by rubenwardy
Don't look into the C++ code to work out how they work, mobs mods are free standing. isPeacefull will be an outdated piece of code.

Re: isPeaceful

PostPosted: Thu Oct 09, 2014 17:57
by napodan
So if I understand correctly, every mobs mods needs to treat "only_peaceful_mobs" themselves (like in simple mobs for example).