mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-24 01:30:22 +01:00
exploding mobs diffuse range is set using 'reach'
This commit is contained in:
parent
28dc0d8be5
commit
7bb3cd8d85
6
api.lua
6
api.lua
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
mobs.version = "20180328"
|
mobs.version = "20180331"
|
||||||
|
|
||||||
|
|
||||||
-- Intllib
|
-- Intllib
|
||||||
@ -1845,10 +1845,10 @@ local do_states = function(self, dtime)
|
|||||||
mob_sound(self, self.sounds.fuse)
|
mob_sound(self, self.sounds.fuse)
|
||||||
-- print ("=== explosion timer started", self.explosion_timer)
|
-- print ("=== explosion timer started", self.explosion_timer)
|
||||||
|
|
||||||
-- stop timer if out of blast radius or direct line of sight
|
-- stop timer if out of reach or direct line of sight
|
||||||
elseif self.allow_fuse_reset
|
elseif self.allow_fuse_reset
|
||||||
and self.v_start
|
and self.v_start
|
||||||
and (dist > max(self.reach, entity_damage_radius) + 0.5
|
and (dist > self.reach
|
||||||
or not line_of_sight(self, s, p, 2)) then
|
or not line_of_sight(self, s, p, 2)) then
|
||||||
self.v_start = false
|
self.v_start = false
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
|
2
api.txt
2
api.txt
@ -46,8 +46,6 @@ functions needed for the mob to work properly which contains the following:
|
|||||||
in e.g. "air" or "default:water_source".
|
in e.g. "air" or "default:water_source".
|
||||||
'runaway' if true causes animals to turn and run away when hit.
|
'runaway' if true causes animals to turn and run away when hit.
|
||||||
'view_range' how many nodes in distance the mob can see a player.
|
'view_range' how many nodes in distance the mob can see a player.
|
||||||
'reach' how many nodes in distance a mob can attack a player while
|
|
||||||
standing.
|
|
||||||
'damage' how many health points the mob does to a player or another
|
'damage' how many health points the mob does to a player or another
|
||||||
mob when melee attacking.
|
mob when melee attacking.
|
||||||
'knock_back' when true has mobs falling backwards when hit, the greater
|
'knock_back' when true has mobs falling backwards when hit, the greater
|
||||||
|
Loading…
Reference in New Issue
Block a user