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
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 amount = (int) (component.MaxSpawnAmount * args.Severity + 0.5f);
var xform = Transform(uid); 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) private void OnSupercritical(EntityUid uid, EntitySpawnAnomalyComponent component, ref AnomalySupercriticalEvent args)
{ {
var xform = Transform(uid); 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); 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()) if (!component.Spawns.Any())
return; return;
@@ -76,7 +79,7 @@ public sealed class EntityAnomalySystem : EntitySystem
if (!valid) if (!valid)
continue; continue;
amountCounter++; 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) if (amountCounter >= amount)
return; return;
} }

View File

@@ -157,7 +157,8 @@
tags: tags:
- Flesh - Flesh
- type: Kudzu - type: Kudzu
growthTickChance: 0.3 growthTickChance: 0.1
spreadChance: 0.4
# Heals each time it manages to do a growth tick: # Heals each time it manages to do a growth tick:
damageRecovery: damageRecovery:
types: types:
@@ -175,7 +176,7 @@
- type: Barotrauma - type: Barotrauma
damage: damage:
types: 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 - type: Flammable
fireSpread: true fireSpread: true
damage: damage: