mirror of
https://github.com/veden/Rampant.git
synced 2024-12-26 20:54:12 +02:00
FACTO-109: Fixed spawner spawns and wasp drones being included in kill stats
This commit is contained in:
parent
46e970e7b3
commit
9487323843
@ -36,6 +36,7 @@ Version: 3.0.0
|
||||
- Fixed base recycling on invalid surfaces
|
||||
- Fixed base chunk count not being decremented when chunks are removed
|
||||
- Fixed base iterator processing being nil
|
||||
- Fixed spawner spawns and wasp drones being included in kill stats
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.2.0
|
||||
|
@ -937,14 +937,14 @@ if settings.startup["rampant--waspEnemy"].value then
|
||||
type = "drone",
|
||||
attackAttributes = {"spit", "acid"},
|
||||
name = "spitter-wasp",
|
||||
attributes = {"followsPlayer"},
|
||||
attributes = {"followsPlayer", "skipKillCount"},
|
||||
drops = {}
|
||||
},
|
||||
{
|
||||
type = "drone",
|
||||
attackAttributes = {"stream", "acid"},
|
||||
name = "worm-wasp",
|
||||
attributes = {"stationary"},
|
||||
attributes = {"stationary", "skipKillCount"},
|
||||
drops = {}
|
||||
},
|
||||
{
|
||||
@ -1008,21 +1008,21 @@ if settings.startup["rampant--spawnerEnemy"].value then
|
||||
type = "biter",
|
||||
attackAttributes = {"melee"},
|
||||
name = "spawn",
|
||||
attributes = {"fragile", "unstable", "smallest"},
|
||||
attributes = {"fragile", "unstable", "smallest", "skipKillCount"},
|
||||
drops = {}
|
||||
},
|
||||
{
|
||||
type = "drone",
|
||||
attackAttributes = {"touch", "acid"},
|
||||
name = "spitter-egg",
|
||||
attributes = {"stationary", "bigger", {"clusterDeath", "spawn"}},
|
||||
attributes = {"stationary", "bigger", {"clusterDeath", "spawn"}, "skipKillCount"},
|
||||
drops = {}
|
||||
},
|
||||
{
|
||||
type = "drone",
|
||||
attackAttributes = {"touch", "acid"},
|
||||
name = "worm-egg",
|
||||
attributes = {"stationary", "bigger", {"clusterDeath", "spawn"}},
|
||||
attributes = {"stationary", "bigger", {"clusterDeath", "spawn"}, "skipKillCount"},
|
||||
drops = {}
|
||||
},
|
||||
{
|
||||
|
@ -818,6 +818,11 @@ local function fillEntityTemplate(entity)
|
||||
}
|
||||
elseif (attribute == "highestHealth") then
|
||||
entity["health"] = entity["health"] * 2
|
||||
elseif (attribute == "skipKillCount") then
|
||||
if not entity["appendFlags"] then
|
||||
entity["appendFlags"] = {}
|
||||
end
|
||||
entity["appendFlags"]["not-in-kill-statistics"] = true
|
||||
elseif type(attribute) == "table" then
|
||||
if (attribute[1] == "clusterDeath") then
|
||||
entity.deathGenerator = function (attack)
|
||||
|
@ -302,6 +302,11 @@ function biterUtils.makeBiter(attributes)
|
||||
if attributes.collisionMask then
|
||||
entity.collision_mask = attributes.collisionMask
|
||||
end
|
||||
if attributes.appendFlags then
|
||||
for flag in pairs(attributes.appendFlags) do
|
||||
entity.flags[#entity.flags+1] = flag
|
||||
end
|
||||
end
|
||||
return entity
|
||||
end
|
||||
|
||||
@ -357,6 +362,11 @@ function biterUtils.makeSpitter(attributes)
|
||||
if attributes.collisionMask then
|
||||
entity.collision_mask = attributes.collisionMask
|
||||
end
|
||||
if attributes.appendFlags then
|
||||
for flag in pairs(attributes.appendFlags) do
|
||||
entity.flags[#entity.flags+1] = flag
|
||||
end
|
||||
end
|
||||
return entity
|
||||
end
|
||||
|
||||
@ -503,6 +513,11 @@ function biterUtils.makeUnitSpawner(attributes)
|
||||
if attributes.autoplace then
|
||||
o["autoplace"] = enemy_spawner_autoplace(attributes.autoplace)
|
||||
end
|
||||
if attributes.appendFlags then
|
||||
for flag in pairs(attributes.appendFlags) do
|
||||
o.flags[#o.flags+1] = flag
|
||||
end
|
||||
end
|
||||
return o
|
||||
end
|
||||
|
||||
@ -609,6 +624,11 @@ function biterUtils.makeWorm(attributes)
|
||||
|
||||
if attributes.autoplace then
|
||||
o["autoplace"] = enemy_worm_autoplace(attributes.autoplace)
|
||||
end
|
||||
if attributes.appendFlags then
|
||||
for flag in pairs(attributes.appendFlags) do
|
||||
o.flags[#o.flags+1] = flag
|
||||
end
|
||||
end
|
||||
return o
|
||||
|
||||
|
@ -33,7 +33,7 @@ function droneUtils.makeDrone(attributes)
|
||||
localised_name = biterUtils.getLocalisedName(attributes),
|
||||
icon = "__base__/graphics/icons/defender.png",
|
||||
icon_size = 32,
|
||||
flags = {"placeable-off-grid", "not-on-map", "not-repairable", "breaths-air", "hidden"},
|
||||
flags = attributes.flags or {"placeable-off-grid", "not-on-map", "not-repairable", "breaths-air", "hidden"},
|
||||
subgroup="capsule",
|
||||
order="e-a-a",
|
||||
max_health = attributes.health or 60,
|
||||
@ -210,7 +210,11 @@ function droneUtils.makeDrone(attributes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if attributes.appendFlags then
|
||||
for flag in pairs(attributes.appendFlags) do
|
||||
drone.flags[#drone.flags+1] = flag
|
||||
end
|
||||
end
|
||||
return drone
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user