Flesh Anomaly spawns a lot more kudzu (#16800)

This commit is contained in:
Tom Leys 2023-06-04 07:31:10 +12:00 committed by GitHub
parent e4670a0636
commit 4cc988b668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -31,17 +31,20 @@ public sealed class EntityAnomalySystem : EntitySystem
var amount = (int) (component.MaxSpawnAmount * args.Severity + 0.5f);
var xform = Transform(uid);
SpawnMonstersOnOpenTiles(component, xform, amount, range);
SpawnMonstersOnOpenTiles(component, xform, amount, range, component.Spawns);
}
private void OnSupercritical(EntityUid uid, EntitySpawnAnomalyComponent component, ref AnomalySupercriticalEvent args)
{
var xform = Transform(uid);
SpawnMonstersOnOpenTiles(component, xform, component.MaxSpawnAmount, component.SpawnRange);
// A cluster of monsters
SpawnMonstersOnOpenTiles(component, xform, component.MaxSpawnAmount, component.SpawnRange, component.Spawns);
// And so much meat (for the meat anomaly at least)
Spawn(component.SupercriticalSpawn, xform.Coordinates);
SpawnMonstersOnOpenTiles(component, xform, component.MaxSpawnAmount, component.SpawnRange, new List<string>(){component.SupercriticalSpawn});
}
private void SpawnMonstersOnOpenTiles(EntitySpawnAnomalyComponent component, TransformComponent xform, int amount, float radius)
private void SpawnMonstersOnOpenTiles(EntitySpawnAnomalyComponent component, TransformComponent xform, int amount, float radius, List<string> spawns)
{
if (!component.Spawns.Any())
return;
@ -76,7 +79,7 @@ public sealed class EntityAnomalySystem : EntitySystem
if (!valid)
continue;
amountCounter++;
Spawn(_random.Pick(component.Spawns), tileref.GridIndices.ToEntityCoordinates(xform.GridUid.Value, _map));
Spawn(_random.Pick(spawns), tileref.GridIndices.ToEntityCoordinates(xform.GridUid.Value, _map));
if (amountCounter >= amount)
return;
}

View File

@ -157,7 +157,8 @@
tags:
- Flesh
- type: Kudzu
growthTickChance: 0.3
growthTickChance: 0.1
spreadChance: 0.4
# Heals each time it manages to do a growth tick:
damageRecovery:
types:
@ -175,7 +176,7 @@
- type: Barotrauma
damage:
types:
Blunt: 0.15 #per second, scales with pressure and other constants.
Blunt: 0.10 #per second, scales with pressure and other constants.
- type: Flammable
fireSpread: true
damage: