From 55e1611692a277113457520328b62d57578183ad Mon Sep 17 00:00:00 2001 From: Aaron Veden Date: Tue, 12 Mar 2019 17:55:01 -0700 Subject: [PATCH] see changelog --- changelog.txt | 2 +- prototypes/utils/BiterUtils.lua | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2e90ab7..df3f9d1 100755 --- a/changelog.txt +++ b/changelog.txt @@ -116,7 +116,7 @@ Date: 2. 18. 2019 --------------------------------------------------------------------------------------------------- Version: 0.16.41 Date: 2. 18. 2019 -Note: + Note: - Enemy level maxes have changed what was 10 is now roughly equal to 8 Tweaks: - Added energy thief crystal and pylon physical resistance 25% diff --git a/prototypes/utils/BiterUtils.lua b/prototypes/utils/BiterUtils.lua index 4e18ac9..5a09a37 100755 --- a/prototypes/utils/BiterUtils.lua +++ b/prototypes/utils/BiterUtils.lua @@ -206,7 +206,7 @@ function biterFunctions.makeBiter(name, biterAttributes, biterAttack, biterResis resistances[#resistances+1] = v end -- print(name .. " " .. biterAttributes.health) - return { + local entity = { type = "unit", name = name .. "-rampant", icon = "__base__/graphics/icons/small-biter.png", @@ -235,8 +235,13 @@ function biterFunctions.makeBiter(name, biterAttributes, biterAttack, biterResis dying_explosion = biterAttributes.explosion, dying_sound = make_biter_dying_sounds(1.0), working_sound = make_biter_calls(0.7), - run_animation = biterrunanimation(biterAttributes.scale, biterAttributes.tint1, biterAttributes.tint2) + run_animation = biterrunanimation(biterAttributes.scale, biterAttributes.tint1, biterAttributes.tint2), + biter_ai_settings = { destroy_when_commands_fail = true, allow_try_return_to_spawner = true } } + if biterAttributes.collisionMask then + entity.collision_mask = biterAttributes.collisionMask + end + return entity end function biterFunctions.makeSpitter(name, biterAttributes, biterAttack, biterResistances) @@ -246,7 +251,7 @@ function biterFunctions.makeSpitter(name, biterAttributes, biterAttack, biterRes resistances[#resistances+1] = v end -- print(name .. " " .. biterAttributes.health) - return { + local entity = { type = "unit", name = name .. "-rampant", icon = "__base__/graphics/icons/small-spitter.png", @@ -276,8 +281,13 @@ function biterFunctions.makeSpitter(name, biterAttributes, biterAttack, biterRes dying_explosion = biterAttributes.explosion, dying_sound = make_spitter_dying_sounds(0.8), working_sound = make_biter_calls(0.7), - run_animation = spitterrunanimation(biterAttributes.scale, biterAttributes.tint) + run_animation = spitterrunanimation(biterAttributes.scale, biterAttributes.tint), + biter_ai_settings = { destroy_when_commands_fail = true, allow_try_return_to_spawner = true } } + if biterAttributes.collisionMask then + entity.collision_mask = biterAttributes.collisionMask + end + return entity end function biterFunctions.makeUnitSpawner(name, biterAttributes, biterResistances, unitSet)