Alchemy furnace integration (#1489)

* furnace integration + fix gates

* fix

* d
This commit is contained in:
Red
2025-06-29 13:38:05 +03:00
committed by GitHub
parent 42841d93d7
commit af0a502dab
22 changed files with 65 additions and 41 deletions

View File

@@ -14,7 +14,7 @@ public sealed partial class CP14SpellThrowFromUser : CP14SpellEffect
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
if (args.Target is null || args.User is null)
return;
var targetEntity = args.Target.Value;
@@ -22,12 +22,6 @@ public sealed partial class CP14SpellThrowFromUser : CP14SpellEffect
var throwing = entManager.System<ThrowingSystem>();
var xform = entManager.System<SharedTransformSystem>();
if (!entManager.TryGetComponent<TransformComponent>(args.User, out var userTransform))
return;
if (!entManager.TryGetComponent<TransformComponent>(targetEntity, out var targetTransform))
return;
var worldPos = xform.GetWorldPosition(args.User.Value);
var foo = Vector2.Normalize(xform.GetWorldPosition(args.Target.Value) - worldPos);