diff --git a/api.lua b/api.lua index 2de6b0b..9da2c9b 100644 --- a/api.lua +++ b/api.lua @@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20230502", + version = "20230514", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -381,7 +381,7 @@ function mob_class:set_yaw(yaw, delay) yaw = 0 end - delay = mob_smooth_rotate and (delay or 0) or 0 + delay = mob_smooth_rotate and delay or 0 -- simplified yaw clamp if yaw > 6.283185 then @@ -1161,8 +1161,8 @@ function mob_class:do_env_damage() local light - -- if min and max light set to 15 then only kill with natural sunlight - if self.light_damage_min == 15 and self.light_damage_max == 15 then + -- if max set to 16 then only kill mob with natural sunlight + if self.light_damage_max == 16 then light = minetest.get_natural_light(pos) or 0 else light = minetest.get_node_light(pos) or 0 diff --git a/api.txt b/api.txt index e00c9d9..98e72a4 100644 --- a/api.txt +++ b/api.txt @@ -90,7 +90,7 @@ functions needed for the mob to work properly which contains the following: level is between the min and max values below 'light_damage_min' minimum light value when mob is affected (default: 14) 'light_damage_max' maximum light value when mob is affected (default: 15) - When both set to 15, only kill mob with natural light. + When set to 16 then only natural light will kill mob. 'suffocation' when > 0 mobs will suffocate inside solid blocks and will be hurt by the value given every second (0 to disable). 'floats' when set to 1 mob will float in water, 0 has them sink.