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

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects.Components;
using Content.Shared.Ghost;
@@ -27,8 +27,8 @@ public abstract class SharedGravityAnomalySystem : EntitySystem
private void OnAnomalyPulse(EntityUid uid, GravityAnomalyComponent component, ref AnomalyPulseEvent args)
{
var xform = Transform(uid);
var range = component.MaxThrowRange * args.Severity;
var strength = component.MaxThrowStrength * args.Severity;
var range = component.MaxThrowRange * args.Severity * args.PowerModifier;
var strength = component.MaxThrowStrength * args.Severity * args.PowerModifier;
var lookup = _lookup.GetEntitiesInRange(uid, range, LookupFlags.Dynamic | LookupFlags.Sundries);
var xformQuery = GetEntityQuery<TransformComponent>();
var worldPos = _xform.GetWorldPosition(xform, xformQuery);
@@ -61,8 +61,8 @@ public abstract class SharedGravityAnomalySystem : EntitySystem
var tiles = tileref.Select(t => (t.GridIndices, Tile.Empty)).ToList();
_mapSystem.SetTiles(xform.GridUid.Value, grid, tiles);
var range = component.MaxThrowRange * 2;
var strength = component.MaxThrowStrength * 2;
var range = component.MaxThrowRange * 2 * args.PowerModifier;
var strength = component.MaxThrowStrength * 2 * args.PowerModifier;
var lookup = _lookup.GetEntitiesInRange(uid, range, LookupFlags.Dynamic | LookupFlags.Sundries);
var xformQuery = GetEntityQuery<TransformComponent>();
var physQuery = GetEntityQuery<PhysicsComponent>();