Skip to content

Commit

Permalink
move: function to the correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Dec 20, 2024
1 parent 93e7da6 commit efd1d90
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions data/scripts/lib/register_monster_type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ end
registerMonsterType.name = function(mtype, mask)
if mask.name then
mtype:name(mask.name)
-- Try register hazard monsters
mtype.onSpawn = function(monster, spawnPosition)
HazardMonster.onSpawn(monster, spawnPosition)
end
end
end
registerMonsterType.description = function(mtype, mask)
Expand Down Expand Up @@ -161,11 +165,6 @@ registerMonsterType.enemyFactions = function(mtype, mask)
end
end
registerMonsterType.flags = function(mtype, mask)
-- Try register hazard monsters
mtype.onSpawn = function(monster, spawnPosition)
HazardMonster.onSpawn(monster, spawnPosition)
end

if mask.flags then
if mask.flags.attackable ~= nil then
mtype:isAttackable(mask.flags.attackable)
Expand Down

0 comments on commit efd1d90

Please sign in to comment.