Anomalies behaviours (#24683)

* Added new anomaly particle

* Add basic anomaly behaviour

* +2 parametres

* add functional to new particle

* add components to behaviours

* big content

* add shuffle, moved thing to server

* clean up

* fixes

* random pick redo

* bonjour behavioUr

* fix AJCM

* fix

* add some new behaviours

* power modifier behaviour

* rmeove timer

* new event for update ui fix

* refactor!

* fixes

* enum

* Fix mapinit

* Minor touches

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Ed
2024-04-01 11:29:13 +03:00
committed by GitHub
parent de8b788856
commit a4ec01d471
29 changed files with 832 additions and 91 deletions

View File

@@ -34,7 +34,7 @@ public sealed class TileAnomalySystem : SharedTileAnomalySystem
if (!entry.Settings.SpawnOnPulse)
continue;
SpawnTiles(component, entry, args.Stability, args.Severity);
SpawnTiles(component, entry, args.Stability, args.Severity, args.PowerModifier);
}
}
@@ -45,7 +45,7 @@ public sealed class TileAnomalySystem : SharedTileAnomalySystem
if (!entry.Settings.SpawnOnSuperCritical)
continue;
SpawnTiles(component, entry, 1, 1);
SpawnTiles(component, entry, 1, 1, args.PowerModifier);
}
}
@@ -56,7 +56,7 @@ public sealed class TileAnomalySystem : SharedTileAnomalySystem
if (!entry.Settings.SpawnOnShutdown || args.Supercritical)
continue;
SpawnTiles(component, entry, 1, 1);
SpawnTiles(component, entry, 1, 1, 1);
}
}
@@ -67,7 +67,7 @@ public sealed class TileAnomalySystem : SharedTileAnomalySystem
if (!entry.Settings.SpawnOnStabilityChanged)
continue;
SpawnTiles(component, entry, args.Stability, args.Severity);
SpawnTiles(component, entry, args.Stability, args.Severity, 1);
}
}
@@ -78,17 +78,17 @@ public sealed class TileAnomalySystem : SharedTileAnomalySystem
if (!entry.Settings.SpawnOnSeverityChanged)
continue;
SpawnTiles(component, entry, args.Stability, args.Severity);
SpawnTiles(component, entry, args.Stability, args.Severity, 1);
}
}
private void SpawnTiles(Entity<TileSpawnAnomalyComponent> anomaly, TileSpawnSettingsEntry entry, float stability, float severity)
private void SpawnTiles(Entity<TileSpawnAnomalyComponent> anomaly, TileSpawnSettingsEntry entry, float stability, float severity, float powerMod)
{
var xform = Transform(anomaly);
if (!TryComp<MapGridComponent>(xform.GridUid, out var grid))
return;
var tiles = _anomaly.GetSpawningPoints(anomaly, stability, severity, entry.Settings);
var tiles = _anomaly.GetSpawningPoints(anomaly, stability, severity, entry.Settings, powerMod);
if (tiles == null)
return;