From de549f3e8edb0fb0267a52e695595ccfef6f85cd Mon Sep 17 00:00:00 2001 From: Qulibly Date: Mon, 31 Jul 2023 03:35:25 +0200 Subject: [PATCH] remaking the space artillery system for firing --- .../Components/SpaceArtilleryComponent.cs | 23 --------- .../SpaceArtillery/SpaceArtillerySystem.cs | 50 ------------------- 2 files changed, 73 deletions(-) delete mode 100644 Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs delete mode 100644 Content.Server/SpaceArtillery/SpaceArtillerySystem.cs diff --git a/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs deleted file mode 100644 index 266ce287aae..00000000000 --- a/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Threading; -using Content.Shared.Construction.Prototypes; -using Content.Shared.DeviceLinking; -using Robust.Shared.GameStates; -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; - -namespace Content.Server.SpaceArtillery; - -[RegisterComponent, NetworkedComponent] -public sealed class SpaceArtilleryComponent : Component -{ - - /// - /// Signal port that makes space artillery fire. - /// - [DataField("firePort", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string FirePort = "Fire"; - -} \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs deleted file mode 100644 index 71255b24f97..00000000000 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Content.Server.Storage.EntitySystems; -using Content.Shared.Containers.ItemSlots; -using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Server.PneumaticCannon; -using Content.Shared.PneumaticCannon; -using Content.Shared.Weapons.Ranged.Components; -using Content.Shared.Weapons.Ranged.Systems; -using Robust.Shared.Containers; - -namespace Content.Server.SpaceArtillery -{ - public sealed class SpaceArtillerySystem : EntitySystem - { - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnInteractHand); - //SubscribeLocalEvent>(OnGetVerb); - } - - //Idea is that when interacted, the artillery will call attempt at firing as if it was held. Will probably need to think of better way to activate it, like with linkables - private void OnInteractHand(EntityUid uid, SpaceArtilleryComponent component, InteractHandEvent args) - { - if (args.Handled) - return; - - var attemptEv = new AttemptShootEvent(uid, null); - RaiseLocalEvent(uid, attemptEv); - } - - -// private void Fire(EntityUid uid, EmitterComponent component) -// { -// if (!TryComp(uid, out var gunComponent)) -// return; -// -// var xform = Transform(uid); -// var ent = Spawn(component.BoltType, xform.Coordinates); -// var proj = EnsureComp(ent); -// _projectile.SetShooter(proj, uid); -// -// var targetPos = new EntityCoordinates(uid, new Vector2(0, -1)); -// -// _gun.Shoot(uid, gunComponent, ent, xform.Coordinates, targetPos, out _); -// } - } -}