From 8000b29fa919b66871d05142bfe3fc517a131f75 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Thu, 27 Jul 2023 03:21:26 +0200 Subject: [PATCH 01/32] Got basic space artillery structure working --- .../Entities/Structures/space_artillery.yml | 61 ++++++++++++++++++ .../Structures/space_artillery.rsi/meta.json | 15 +++++ .../space_artillery.rsi/space_artillery.png | Bin 0 -> 3046 bytes 3 files changed, 76 insertions(+) create mode 100644 Resources/Prototypes/Entities/Structures/space_artillery.yml create mode 100644 Resources/Textures/Structures/space_artillery.rsi/meta.json create mode 100644 Resources/Textures/Structures/space_artillery.rsi/space_artillery.png diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml new file mode 100644 index 00000000000..b6a5b113387 --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -0,0 +1,61 @@ +- type: entity + id: Space_Artillery + name: space artillery + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: Structures/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + - type: Appearance + - type: Storage + capacity: 120 + - type: UserInterface + interfaces: + - key: enum.StorageUiKey.Key + type: StorageBoundUserInterface + - type: ContainerContainer + containers: + storagebase: !type:Container + ents: [] + - type: ContainerAmmoProvider + container: storagebase + - type: PneumaticCannon + gasUsage: 0 + baseProjectileSpeed: 25 + toolModifyPower: Screwing + throwItems: false + - type: Gun + fireRate: 10 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg \ No newline at end of file diff --git a/Resources/Textures/Structures/space_artillery.rsi/meta.json b/Resources/Textures/Structures/space_artillery.rsi/meta.json new file mode 100644 index 00000000000..798889e4759 --- /dev/null +++ b/Resources/Textures/Structures/space_artillery.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da354ba4e28fcaf73002d25cab0da4815808be60", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "space_artillery", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Structures/space_artillery.rsi/space_artillery.png b/Resources/Textures/Structures/space_artillery.rsi/space_artillery.png new file mode 100644 index 0000000000000000000000000000000000000000..ef59df7509c1a832925042e37cd12703e0288049 GIT binary patch literal 3046 zcmVPx=ph-kQRCt{2ntNx=E&YhOdUPHTRWW&7Okp6_waJ?EbD9hhT|Uo;w}3+?Ug|4lnm;^4u9BEat5 zyEStE<*-;RvgPyd#en+ydQq>>9GBY!|_{JNQ-$xLt zs;Z=}KQ=a|No+7z~p0spwZj!bjlDx^)2e+yg{W7G#U+NvsslPiTEjdfZ~hLci(-7+wBHm`SRsbc}YnLIXO8L6ck9#WoKstFgiMl z)9I92z~}SfbUGOs8Bt}79HCGsr5@1H(Ls56IRHQW@I%u26$9XMxinU*Rea!q2c)u+ zk`l(p$LZ{oUGBPqK zDJcQMFE(-w0C#5tH6(l$jsyY1z2K8iK0&9`QB+h!US3{|tjFV_p`n4jd-rnw{CNOI zMn>-2d97AUAP|t8A0HoQVq#)OBV=c1V>BAE+wBw-6fiI_Kw4T_()v}e1$ujXF_}z2 zcu<;{n3y3`R8$1O`t|GCw{M@?sui(Xt>Tg;OQcudXs08s9$|EJl+n>qDl02#ZEcmx zZ8n?O*x0Dp2&w|m-QA7ZY-VC&0znX{tgHm!=+UD9)YQ}f(AwHcdU`r0lZl3g2DN_5 zVzpYuRjXDpJv|MC8z4VFpVHD&ApAJS53t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y1Ki&rQZ>f*%k~2$;!%-e2QnrBOnL@&$qS3 zl=*x(;H4K59|AM`;F-v(4x8#mGG0))tdliZG)GghC-U0(-q) z1VNy`zn{#^Ok6G(BO@bH#qkQF2?m4G_4pQ3L;O8HpD(7)c%p3@8XA&p?(gqM5Cptl zFB^gFQDa(!83Ay)TpBDE@%r`aEM2;kJ$v?GHk)xeow!`Cq$jna5d=XxFQgW^d(`S1 z8yh1hCkLz5N_BNL-QC^1^2#exj?v|EX;i%lo+W%RqNJpRLx&D=^5jW;J|BgJg$Ykv zL_49;gs0n7*9GzNRaI5u`1m-2AgBsNVPPR{ZEd*SZhSr;B_$SlF#s-HxPTxCM9%C-e*oz_6bdmpIXNqfqL!8x&E({yG$lvtivI|L zAZv5u@NhUmDnr7>Q16e2oDb#ZN@bx?2(4Bdb5AJl+0tsYJp1%oDmMRdRu)5TC*Bi3 zINc?yC*F?evX_R30Wd{5AO8p>-4m>;suI_ig{QLfJr@;QRju5;GFx_}v?tiy=n&5w zchLW>pWE}&`19cxr2Jcq+z}bMBQxdhmF6Q3@y~}};P$*U`oHya=D0(){^mv*IT?GS zNxCC6dObV^dA(j%nv@SdtChP~R+`LsyPx#07*qoM6N<$f>JEd^8f$< literal 0 HcmV?d00001 From 552c37a06bccd6ce4a21ebe401cf4c0fd49b674b Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 28 Jul 2023 19:22:12 +0200 Subject: [PATCH 02/32] WIP Attempting at allowing the space artillery to be fired without need to be held --- .../Components/SpaceArtilleryComponent.txt | 23 ++++++++ .../SpaceArtillery/SpaceArtillerySystem.cs | 49 +++++++++++++++++ .../SharedSpaceArtilleryComponent.cs | 23 ++++++++ .../SharedSpaceArtillerySystem.txt | 53 +++++++++++++++++++ .../Entities/Structures/space_artillery.yml | 1 + 5 files changed, 149 insertions(+) create mode 100644 Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt create mode 100644 Content.Server/SpaceArtillery/SpaceArtillerySystem.cs create mode 100644 Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs create mode 100644 Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt diff --git a/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt b/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt new file mode 100644 index 00000000000..0e0afd4bf66 --- /dev/null +++ b/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt @@ -0,0 +1,23 @@ +//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.Components; + +[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 new file mode 100644 index 00000000000..645035f1638 --- /dev/null +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -0,0 +1,49 @@ +using Content.Server.Storage.EntitySystems; +using Content.Shared.Containers.ItemSlots; +using Content.Shared.Interaction; +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(user, null); + RaiseLocalEvent(gunUid, ref 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 _); +// } + } +} diff --git a/Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs b/Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs new file mode 100644 index 00000000000..f0819bb4c6d --- /dev/null +++ b/Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs @@ -0,0 +1,23 @@ +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.Shared.SpaceArtillery.Components; + +[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.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt new file mode 100644 index 00000000000..cab1fa9b842 --- /dev/null +++ b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt @@ -0,0 +1,53 @@ +using Content.Server.Storage.EntitySystems; +using Content.Shared.Containers.ItemSlots; +using Content.Shared.Interaction; +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 +{ + [UsedImplicitly] + public sealed class SharedSpaceArtillerySystem : EntitySystem + { + // [Dependency] private readonly SharedPopupSystem _popup = default!; + // [Dependency] private readonly ProjectileSystem _projectile = default!; + // [Dependency] private readonly GunSystem _gun = default!; + + //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, EmitterComponent component, InteractHandEvent args) + //{ + // if (args.Handled) + // return; + // + //var attemptEv = new AttemptShootEvent(user, null); + //RaiseLocalEvent(gunUid, ref 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 _); +// } + } +} diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml index b6a5b113387..ceb2f1e8b4a 100644 --- a/Resources/Prototypes/Entities/Structures/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -6,6 +6,7 @@ placement: mode: SnapgridCenter components: + - type: SpaceArtillery - type: Clickable - type: InteractionOutline - type: Physics From 2683a43910151692b716d28f5036eb0cf3f38456 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Sat, 29 Jul 2023 21:33:30 +0200 Subject: [PATCH 03/32] WIP further attempts at trying to get the firing of space artillery working --- .../Components/SpaceArtilleryComponent.cs | 2 +- .../Components/SpaceArtilleryComponent.txt | 23 -------- .../SpaceArtillery/SpaceArtillerySystem.cs | 7 +-- .../SharedSpaceArtillerySystem.txt | 53 ------------------- 4 files changed, 5 insertions(+), 80 deletions(-) rename Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs => Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs (93%) delete mode 100644 Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt delete mode 100644 Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt diff --git a/Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs similarity index 93% rename from Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs rename to Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs index f0819bb4c6d..266ce287aae 100644 --- a/Content.Shared/SpaceArtillery/Components/SharedSpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.cs @@ -8,7 +8,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; -namespace Content.Shared.SpaceArtillery.Components; +namespace Content.Server.SpaceArtillery; [RegisterComponent, NetworkedComponent] public sealed class SpaceArtilleryComponent : Component diff --git a/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt b/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt deleted file mode 100644 index 0e0afd4bf66..00000000000 --- a/Content.Server/SpaceArtillery/Components/SpaceArtilleryComponent.txt +++ /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.Components; - -[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 index 645035f1638..71255b24f97 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -1,6 +1,7 @@ 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; @@ -25,9 +26,9 @@ private void OnInteractHand(EntityUid uid, SpaceArtilleryComponent component, In { if (args.Handled) return; - - var attemptEv = new AttemptShootEvent(user, null); - RaiseLocalEvent(gunUid, ref attemptEv); + + var attemptEv = new AttemptShootEvent(uid, null); + RaiseLocalEvent(uid, attemptEv); } diff --git a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt deleted file mode 100644 index cab1fa9b842..00000000000 --- a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.txt +++ /dev/null @@ -1,53 +0,0 @@ -using Content.Server.Storage.EntitySystems; -using Content.Shared.Containers.ItemSlots; -using Content.Shared.Interaction; -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 -{ - [UsedImplicitly] - public sealed class SharedSpaceArtillerySystem : EntitySystem - { - // [Dependency] private readonly SharedPopupSystem _popup = default!; - // [Dependency] private readonly ProjectileSystem _projectile = default!; - // [Dependency] private readonly GunSystem _gun = default!; - - //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, EmitterComponent component, InteractHandEvent args) - //{ - // if (args.Handled) - // return; - // - //var attemptEv = new AttemptShootEvent(user, null); - //RaiseLocalEvent(gunUid, ref 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 _); -// } - } -} From 35728bb32d91d593d82e4736a84251a95163fe3f Mon Sep 17 00:00:00 2001 From: Qulibly Date: Mon, 31 Jul 2023 02:46:43 +0200 Subject: [PATCH 04/32] Laying groundwork for machine linking of space artillery --- .../en-US/machine-linking/receiver_ports.ftl | 3 + .../machine-linking/transmitter_ports.ftl | 3 + .../Prototypes/DeviceLinking/sink_ports.yml | 5 ++ .../Prototypes/DeviceLinking/source_ports.yml | 5 ++ .../Entities/Structures/space_artillery.yml | 72 ++++++++++++++++++ .../Structures/space_artillery.rsi/meta.json | 15 ++++ .../space_artillery.rsi/space_artillery.png | Bin 0 -> 3046 bytes 7 files changed, 103 insertions(+) create mode 100644 Resources/Prototypes/Entities/Structures/space_artillery.yml create mode 100644 Resources/Textures/Structures/space_artillery.rsi/meta.json create mode 100644 Resources/Textures/Structures/space_artillery.rsi/space_artillery.png diff --git a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl index 4d2dd25af2c..bbaad1939ae 100644 --- a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl @@ -76,5 +76,8 @@ signal-port-description-logic-input-a = First input of a logic gate. signal-port-name-logic-input-b = Input B signal-port-description-logic-input-b = Second input of a logic gate. +signal-port-name-space-artillery-fire = Fire +signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. + signal-port-name-logic-input = Input signal-port-description-logic-input = Input to the edge detector, cannot be a pulse signal. diff --git a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl index 02ede1e1b67..57761a8ad7d 100644 --- a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl @@ -36,3 +36,6 @@ signal-port-description-logic-output-high = This port is invoked whenever the in signal-port-name-logic-output-low = Low Output signal-port-description-logic-output-low = This port is invoked whenever the input has a falling edge. + +signal-port-name-space-artillery-fire = Fire +signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. diff --git a/Resources/Prototypes/DeviceLinking/sink_ports.yml b/Resources/Prototypes/DeviceLinking/sink_ports.yml index f05934f3baa..312bfaee21b 100644 --- a/Resources/Prototypes/DeviceLinking/sink_ports.yml +++ b/Resources/Prototypes/DeviceLinking/sink_ports.yml @@ -107,3 +107,8 @@ id: SetParticleZeta name: signal-port-name-set-particle-zeta description: signal-port-description-set-particle-zeta + +- type: sinkPort + id: SpaceArtilleryFire + name: signal-port-name-space-artillery-fire + description: signal-port-description-space-artillery-fire diff --git a/Resources/Prototypes/DeviceLinking/source_ports.yml b/Resources/Prototypes/DeviceLinking/source_ports.yml index 45ee812f2e4..2808b77b1ae 100644 --- a/Resources/Prototypes/DeviceLinking/source_ports.yml +++ b/Resources/Prototypes/DeviceLinking/source_ports.yml @@ -96,3 +96,8 @@ name: signal-port-name-logic-output-low description: signal-port-description-logic-output-low defaultLinks: [ Off, Close ] + +- type: sourcePort + id: SpaceArtilleryFire + name: signal-port-name-space-artillery-fire + description: signal-port-description-space-artillery-fire diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml new file mode 100644 index 00000000000..8de6b8aac1d --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -0,0 +1,72 @@ +- type: entity + id: Space_Artillery + name: space artillery + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: Structures/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + - type: Appearance + - type: Storage + capacity: 120 + - type: UserInterface + interfaces: + - key: enum.StorageUiKey.Key + type: StorageBoundUserInterface + - type: ContainerContainer + containers: + storagebase: !type:Container + ents: [] + - type: ContainerAmmoProvider + container: storagebase + - type: PneumaticCannon + gasUsage: 0 + baseProjectileSpeed: 25 + toolModifyPower: Screwing + throwItems: false + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - type: Gun + fireRate: 10 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg diff --git a/Resources/Textures/Structures/space_artillery.rsi/meta.json b/Resources/Textures/Structures/space_artillery.rsi/meta.json new file mode 100644 index 00000000000..798889e4759 --- /dev/null +++ b/Resources/Textures/Structures/space_artillery.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da354ba4e28fcaf73002d25cab0da4815808be60", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "space_artillery", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Structures/space_artillery.rsi/space_artillery.png b/Resources/Textures/Structures/space_artillery.rsi/space_artillery.png new file mode 100644 index 0000000000000000000000000000000000000000..ef59df7509c1a832925042e37cd12703e0288049 GIT binary patch literal 3046 zcmVPx=ph-kQRCt{2ntNx=E&YhOdUPHTRWW&7Okp6_waJ?EbD9hhT|Uo;w}3+?Ug|4lnm;^4u9BEat5 zyEStE<*-;RvgPyd#en+ydQq>>9GBY!|_{JNQ-$xLt zs;Z=}KQ=a|No+7z~p0spwZj!bjlDx^)2e+yg{W7G#U+NvsslPiTEjdfZ~hLci(-7+wBHm`SRsbc}YnLIXO8L6ck9#WoKstFgiMl z)9I92z~}SfbUGOs8Bt}79HCGsr5@1H(Ls56IRHQW@I%u26$9XMxinU*Rea!q2c)u+ zk`l(p$LZ{oUGBPqK zDJcQMFE(-w0C#5tH6(l$jsyY1z2K8iK0&9`QB+h!US3{|tjFV_p`n4jd-rnw{CNOI zMn>-2d97AUAP|t8A0HoQVq#)OBV=c1V>BAE+wBw-6fiI_Kw4T_()v}e1$ujXF_}z2 zcu<;{n3y3`R8$1O`t|GCw{M@?sui(Xt>Tg;OQcudXs08s9$|EJl+n>qDl02#ZEcmx zZ8n?O*x0Dp2&w|m-QA7ZY-VC&0znX{tgHm!=+UD9)YQ}f(AwHcdU`r0lZl3g2DN_5 zVzpYuRjXDpJv|MC8z4VFpVHD&ApAJS53t?c-845hOA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QZ>f*%k~2$;!%-e2QnrBOnL@&$qS3 zl=*x(;H4K59|AM`;F-v(4x8#mGG0))tdliZG)GghC-U0(-q) z1VNy`zn{#^Ok6G(BO@bH#qkQF2?m4G_4pQ3L;O8HpD(7)c%p3@8XA&p?(gqM5Cptl zFB^gFQDa(!83Ay)TpBDE@%r`aEM2;kJ$v?GHk)xeow!`Cq$jna5d=XxFQgW^d(`S1 z8yh1hCkLz5N_BNL-QC^1^2#exj?v|EX;i%lo+W%RqNJpRLx&D=^5jW;J|BgJg$Ykv zL_49;gs0n7*9GzNRaI5u`1m-2AgBsNVPPR{ZEd*SZhSr;B_$SlF#s-HxPTxCM9%C-e*oz_6bdmpIXNqfqL!8x&E({yG$lvtivI|L zAZv5u@NhUmDnr7>Q16e2oDb#ZN@bx?2(4Bdb5AJl+0tsYJp1%oDmMRdRu)5TC*Bi3 zINc?yC*F?evX_R30Wd{5AO8p>-4m>;suI_ig{QLfJr@;QRju5;GFx_}v?tiy=n&5w zchLW>pWE}&`19cxr2Jcq+z}bMBQxdhmF6Q3@y~}};P$*U`oHya=D0(){^mv*IT?GS zNxCC6dObV^dA(j%nv@SdtChP~R+`LsyPx#07*qoM6N<$f>JEd^8f$< literal 0 HcmV?d00001 From de549f3e8edb0fb0267a52e695595ccfef6f85cd Mon Sep 17 00:00:00 2001 From: Qulibly Date: Mon, 31 Jul 2023 03:35:25 +0200 Subject: [PATCH 05/32] 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 _); -// } - } -} From 57e0f14e7f6561caa9c202b1e85141a51ffd60a8 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Wed, 9 Aug 2023 21:31:19 +0200 Subject: [PATCH 06/32] WIP fixing small things with system and component of space artillery --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 23 ++++++++++++++ .../SpaceArtillery/SpaceArtillerySystem.cs | 30 +++++++++++++++++++ .../Entities/Structures/space_artillery.yml | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs create mode 100644 Content.Server/SpaceArtillery/SpaceArtillerySystem.cs diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs new file mode 100644 index 00000000000..bb60db59b4b --- /dev/null +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -0,0 +1,23 @@ +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("spaceArtilleryFirePort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryFirePort = "SpaceArtilleryFire"; + +} \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs new file mode 100644 index 00000000000..bdae441aeca --- /dev/null +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -0,0 +1,30 @@ +using Content.Server.DeviceLinking.Events; +using Content.Server.Projectiles; +using Content.Server.Weapons.Ranged.Systems; +using Content.Shared.Weapons.Ranged.Components; + +namespace Content.Server.SpaceArtillery +{ + + public sealed class SpaceArtillerySystem : EntitySystem + { + [Dependency] private readonly ProjectileSystem _projectile = default!; + [Dependency] private readonly GunSystem _gun = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnSignalReceived); + } + + private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) + { + if (args.Port == component.SpaceArtilleryFirePort) + { + //var attemptEv = new AttemptShootEvent(uid, null); + //RaiseLocalEvent(uid, ref attemptEv); + } + } + } +} \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml index 52c46675636..851df02e36a 100644 --- a/Resources/Prototypes/Entities/Structures/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -69,4 +69,4 @@ soundGunshot: path: /Audio/Effects/thunk.ogg soundEmpty: - path: /Audio/Items/hiss.ogg + path: /Audio/Items/hiss.ogg \ No newline at end of file From 5e1f357f6e6207b5f962d322a602d1ba4981221c Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 11 Aug 2023 04:05:56 +0200 Subject: [PATCH 07/32] Fixed issue causing space artillery to break client --- .../SpaceArtillery/SpaceArtillerySystem.cs | 7 ++++ .../SpaceArtillery/SpaceArtilleryComponent.cs | 8 ++--- .../SpaceArtilleryComponent.txt | 23 +++++++++++++ .../SpaceArtillery/SpaceArtillerySystem.cs | 32 +++++++++---------- .../SpaceArtillery/SpaceArtillerySystem.txt | 31 ++++++++++++++++++ .../SharedSpaceArtillerySystem.cs | 6 ++++ 6 files changed, 85 insertions(+), 22 deletions(-) create mode 100644 Content.Client/SpaceArtillery/SpaceArtillerySystem.cs create mode 100644 Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt create mode 100644 Content.Server/SpaceArtillery/SpaceArtillerySystem.txt create mode 100644 Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs diff --git a/Content.Client/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Client/SpaceArtillery/SpaceArtillerySystem.cs new file mode 100644 index 00000000000..f82c3b7d93b --- /dev/null +++ b/Content.Client/SpaceArtillery/SpaceArtillerySystem.cs @@ -0,0 +1,7 @@ +using Content.Shared.SpaceArtillery; + +namespace Content.Shared.SpaceArtillery; + +public sealed class SpaceArtillerySystem : EntitySystem +{ +} diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs index bb60db59b4b..efdf6ee366e 100644 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -1,19 +1,15 @@ +namespace Content.Shared.SpaceArtillery; 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] +[RegisterComponent] public sealed class SpaceArtilleryComponent : Component { - /// /// Signal port that makes space artillery fire. /// diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt new file mode 100644 index 00000000000..bb60db59b4b --- /dev/null +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt @@ -0,0 +1,23 @@ +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("spaceArtilleryFirePort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryFirePort = "SpaceArtilleryFire"; + +} \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index bdae441aeca..0c45220a1ab 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -1,30 +1,30 @@ +using Content.Shared.SpaceArtillery; using Content.Server.DeviceLinking.Events; using Content.Server.Projectiles; using Content.Server.Weapons.Ranged.Systems; using Content.Shared.Weapons.Ranged.Components; -namespace Content.Server.SpaceArtillery +namespace Content.Shared.SpaceArtillery; + +public sealed class SpaceArtillerySystem : EntitySystem { + + [Dependency] private readonly ProjectileSystem _projectile = default!; + [Dependency] private readonly GunSystem _gun = default!; - public sealed class SpaceArtillerySystem : EntitySystem + public override void Initialize() { - [Dependency] private readonly ProjectileSystem _projectile = default!; - [Dependency] private readonly GunSystem _gun = default!; + base.Initialize(); - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnSignalReceived); - } + SubscribeLocalEvent(OnSignalReceived); + } - private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) + private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) + { + if (args.Port == component.SpaceArtilleryFirePort) { - if (args.Port == component.SpaceArtilleryFirePort) - { - //var attemptEv = new AttemptShootEvent(uid, null); - //RaiseLocalEvent(uid, ref attemptEv); - } + //var attemptEv = new AttemptShootEvent(uid, null); + //RaiseLocalEvent(uid, ref attemptEv); } } } \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.txt b/Content.Server/SpaceArtillery/SpaceArtillerySystem.txt new file mode 100644 index 00000000000..a3e596f013a --- /dev/null +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.txt @@ -0,0 +1,31 @@ +using Content.Server.DeviceLinking.Events; +using Content.Server.Projectiles; +using Content.Server.Weapons.Ranged.Systems; +using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.SpaceArtillery; + +namespace Content.Server.SpaceArtillery +{ + + public sealed class SpaceArtillerySystem : EntitySystem + { + //[Dependency] private readonly ProjectileSystem _projectile = default!; + //[Dependency] private readonly GunSystem _gun = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnSignalReceived); + } + + /*private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) + //{ + //if (args.Port == component.SpaceArtilleryFirePort) + //{ + //var attemptEv = new AttemptShootEvent(uid, null); + //RaiseLocalEvent(uid, ref attemptEv); + //} + }*/ + } +} \ No newline at end of file diff --git a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs new file mode 100644 index 00000000000..839c02a6ea9 --- /dev/null +++ b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs @@ -0,0 +1,6 @@ + +namespace Content.Shared.SpaceArtillery; + +public sealed class SharedSpaceArtillerySystem : EntitySystem +{ +} From f2584dc5dfbbd72a4e356ff633729b94c11a054d Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 11 Aug 2023 04:37:41 +0200 Subject: [PATCH 08/32] Creation of space artillery system and component structure --- .../SpaceArtilleryComponent.txt | 23 -------------- .../SpaceArtillery/SpaceArtillerySystem.cs | 4 ++- .../SpaceArtillery/SpaceArtillerySystem.txt | 31 ------------------- .../Entities/Structures/space_artillery.yml | 3 +- 4 files changed, 5 insertions(+), 56 deletions(-) delete mode 100644 Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt delete mode 100644 Content.Server/SpaceArtillery/SpaceArtillerySystem.txt diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt deleted file mode 100644 index bb60db59b4b..00000000000 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.txt +++ /dev/null @@ -1,23 +0,0 @@ -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("spaceArtilleryFirePort", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string SpaceArtilleryFirePort = "SpaceArtilleryFire"; - -} \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index 0c45220a1ab..e7c8641186a 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -2,7 +2,9 @@ using Content.Server.DeviceLinking.Events; using Content.Server.Projectiles; using Content.Server.Weapons.Ranged.Systems; +using Content.Shared.Weapons.Ranged.Systems; using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Weapons.Ranged.Events; namespace Content.Shared.SpaceArtillery; @@ -24,7 +26,7 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, if (args.Port == component.SpaceArtilleryFirePort) { //var attemptEv = new AttemptShootEvent(uid, null); - //RaiseLocalEvent(uid, ref attemptEv); + RaiseLocalEvent(uid, RequestShootEvent); } } } \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.txt b/Content.Server/SpaceArtillery/SpaceArtillerySystem.txt deleted file mode 100644 index a3e596f013a..00000000000 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.txt +++ /dev/null @@ -1,31 +0,0 @@ -using Content.Server.DeviceLinking.Events; -using Content.Server.Projectiles; -using Content.Server.Weapons.Ranged.Systems; -using Content.Shared.Weapons.Ranged.Components; -using Content.Shared.SpaceArtillery; - -namespace Content.Server.SpaceArtillery -{ - - public sealed class SpaceArtillerySystem : EntitySystem - { - //[Dependency] private readonly ProjectileSystem _projectile = default!; - //[Dependency] private readonly GunSystem _gun = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnSignalReceived); - } - - /*private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) - //{ - //if (args.Port == component.SpaceArtilleryFirePort) - //{ - //var attemptEv = new AttemptShootEvent(uid, null); - //RaiseLocalEvent(uid, ref attemptEv); - //} - }*/ - } -} \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml index 851df02e36a..96eccc66ae5 100644 --- a/Resources/Prototypes/Entities/Structures/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -69,4 +69,5 @@ soundGunshot: path: /Audio/Effects/thunk.ogg soundEmpty: - path: /Audio/Items/hiss.ogg \ No newline at end of file + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery \ No newline at end of file From 0795487662276843eb9d87a58da44c0658fc8ff2 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 18 Aug 2023 02:52:33 +0200 Subject: [PATCH 09/32] Added working firing mechanism for Space Artillery --- .../SpaceArtillery/SpaceArtillerySystem.cs | 46 +++++++++++++++++-- .../Entities/Structures/space_artillery.yml | 5 +- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index e7c8641186a..d6f79dee378 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -5,6 +5,12 @@ using Content.Shared.Weapons.Ranged.Systems; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Events; +using Content.Shared.Interaction.Events; +using System.Numerics; +using Content.Shared.CombatMode; +using Content.Shared.Interaction; +using Robust.Shared.Map; +using Robust.Shared.Physics.Components; namespace Content.Shared.SpaceArtillery; @@ -13,20 +19,54 @@ public sealed class SpaceArtillerySystem : EntitySystem [Dependency] private readonly ProjectileSystem _projectile = default!; [Dependency] private readonly GunSystem _gun = default!; + [Dependency] private readonly SharedCombatModeSystem _combat = default!; + [Dependency] private readonly RotateToFaceSystem _rotate = default!; + + private const float ShootSpeed = 25f; + + protected ISawmill Sawmill = default!; public override void Initialize() { base.Initialize(); - + Sawmill = Logger.GetSawmill("SpaceArtillery"); SubscribeLocalEvent(OnSignalReceived); } private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { + Sawmill.Info($"Space Artillery has been pinged. Entity: {ToPrettyString(uid)}"); if (args.Port == component.SpaceArtilleryFirePort) { - //var attemptEv = new AttemptShootEvent(uid, null); - RaiseLocalEvent(uid, RequestShootEvent); + Sawmill.Info($"Space Artillery has received FIRE signal. Entity: {ToPrettyString(uid)}"); + //var attemptEv = new AttemptShootEvent(uid, "text", false); + //RaiseLocalEvent(uid, ref attemptEv); + //var attemptEv = new UseInHandEvent(uid); + //RaiseLocalEvent(uid, attemptEv); + var bodyQuery = GetEntityQuery(); + var xformQuery = GetEntityQuery(); + var combatQuery = GetEntityQuery(); + var query = EntityQueryEnumerator(); + while (query.MoveNext(out uid, out var comp, out var xform)) + { + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + { + continue; + } + + //var (worldPos, worldRot) = _transform.GetWorldPositionRotation(xform, xformQuery); + //var (targetPos, targetRot) = _transform.GetWorldPositionRotation(targetXform, xformQuery); + //var distance = (targetPos - worldPos).Length(); + //var mapVelocity = targetBody.LinearVelocity; + + //var targetSpot = targetPos + mapVelocity * distance / ShootSpeed; + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, new Vector2(250, 75)); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + } + } } } \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml index 96eccc66ae5..ff3df940059 100644 --- a/Resources/Prototypes/Entities/Structures/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -31,6 +31,7 @@ - type: Pullable - type: Rotatable rotateWhilePulling: false + rotateWhileAnchored: true - type: Appearance - type: Storage capacity: 120 @@ -70,4 +71,6 @@ path: /Audio/Effects/thunk.ogg soundEmpty: path: /Audio/Items/hiss.ogg - - type: SpaceArtillery \ No newline at end of file + - type: SpaceArtillery + - type: Actions + - type: CombatMode \ No newline at end of file From fac9bff9dcf632ca079ba14a39e7d0421562df0d Mon Sep 17 00:00:00 2001 From: Qulibly Date: Tue, 22 Aug 2023 09:35:50 +0200 Subject: [PATCH 10/32] Fixed Space Artillery's firing direction --- .../SpaceArtillery/SpaceArtillerySystem.cs | 23 ++- .../Entities/Structures/space_artillery.yml | 144 ++++++++++++++++++ 2 files changed, 159 insertions(+), 8 deletions(-) diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index d6f79dee378..3995a2db889 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -23,6 +23,9 @@ public sealed class SpaceArtillerySystem : EntitySystem [Dependency] private readonly RotateToFaceSystem _rotate = default!; private const float ShootSpeed = 25f; + private const float distance = 100; + private const float rotOffset = 3.14159265f; //Without it the artillery would be shooting backwards.The rotation is in radians and equals to 180 degrees + //private readonly TransformSystem _transform; protected ISawmill Sawmill = default!; @@ -39,10 +42,6 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, if (args.Port == component.SpaceArtilleryFirePort) { Sawmill.Info($"Space Artillery has received FIRE signal. Entity: {ToPrettyString(uid)}"); - //var attemptEv = new AttemptShootEvent(uid, "text", false); - //RaiseLocalEvent(uid, ref attemptEv); - //var attemptEv = new UseInHandEvent(uid); - //RaiseLocalEvent(uid, attemptEv); var bodyQuery = GetEntityQuery(); var xformQuery = GetEntityQuery(); var combatQuery = GetEntityQuery(); @@ -54,17 +53,25 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, continue; } + //_transform = _entity.System(); //var (worldPos, worldRot) = _transform.GetWorldPositionRotation(xform, xformQuery); //var (targetPos, targetRot) = _transform.GetWorldPositionRotation(targetXform, xformQuery); //var distance = (targetPos - worldPos).Length(); //var mapVelocity = targetBody.LinearVelocity; //var targetSpot = targetPos + mapVelocity * distance / ShootSpeed; + if(TryComp(uid, out var transformComponent)){ + Sawmill.Info($"Space Artillery has calculated a TARGET. Entity: {ToPrettyString(uid)}"); + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, new Vector2(250, 75)); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + } } } diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml index ff3df940059..1893ef65e08 100644 --- a/Resources/Prototypes/Entities/Structures/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -73,4 +73,148 @@ path: /Audio/Items/hiss.ogg - type: SpaceArtillery - type: Actions + - type: CombatMode + + +- type: entity + id: Space_Machine_Gun + name: space machine gun + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: Structures/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + - type: Appearance + - type: AmmoCounter + - type: BallisticAmmoProvider + autoCycle: true + capacity: 60 + proto: CartridgeLightRifle + whitelist: + tags: + - CartridgeLightRifle + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - type: Gun + fireRate: 3 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + - type: Actions + - type: CombatMode + + +- type: entity + id: Space_Ray + name: space ray + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: Structures/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + - type: Appearance + - type: AmmoCounter + - type: Battery + maxCharge: 10000 + startingCharge: 10000 + - type: HitscanBatteryAmmoProvider + proto: RedMediumLaser + fireCost: 100 + - type: BatterySelfRecharger + autoRecharge: true + autoRechargeRate: 40 + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - type: Gun + fireRate: 3 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + - type: Actions - type: CombatMode \ No newline at end of file From 1a5fcacc13b553a2bd9ff2ec4d3754dcbfb745d7 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Mon, 28 Aug 2023 03:54:10 +0200 Subject: [PATCH 11/32] Added to Space Artillery code for mountable weapons as well as safety mechanism control --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 21 ++++ .../SpaceArtillery/SpaceArtillerySystem.cs | 96 ++++++++++++++++--- .../SharedSpaceArtillerySystem.cs | 7 ++ .../en-US/machine-linking/receiver_ports.ftl | 3 + .../machine-linking/transmitter_ports.ftl | 3 + .../Prototypes/DeviceLinking/sink_ports.yml | 5 + .../Prototypes/DeviceLinking/source_ports.yml | 5 + .../Entities/Structures/space_artillery.yml | 26 ++++- 8 files changed, 152 insertions(+), 14 deletions(-) diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs index efdf6ee366e..121fd1090cc 100644 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -6,6 +6,8 @@ namespace Content.Shared.SpaceArtillery; 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; +using Content.Shared.Actions.ActionTypes; +using Robust.Shared.Utility; [RegisterComponent] public sealed class SpaceArtilleryComponent : Component @@ -15,5 +17,24 @@ public sealed class SpaceArtilleryComponent : Component /// [DataField("spaceArtilleryFirePort", customTypeSerializer: typeof(PrototypeIdSerializer))] public string SpaceArtilleryFirePort = "SpaceArtilleryFire"; + + /// + /// Signal port that toggles artillery's safety, which is the combat mode + /// + [DataField("spaceArtillerySafetyPort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtillerySafetyPort = "SpaceArtillerySafety"; + /// + /// The action for firing the artillery when mounted + /// + [DataField("fireAction")] + [ViewVariables(VVAccess.ReadWrite)] + public InstantAction FireAction = new() + { + UseDelay = TimeSpan.FromSeconds(0.1), + Icon = new SpriteSpecifier.Texture(new("Objects/Fun/bikehorn.rsi/icon.png")), + DisplayName = "action-name-honk", //To be changed + Description = "action-desc-honk", //To be changed + Event = new FireActionEvent(), + }; } \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index 3995a2db889..12717868fa5 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -11,6 +11,9 @@ using Content.Shared.Interaction; using Robust.Shared.Map; using Robust.Shared.Physics.Components; +using Content.Shared.Actions; +using Content.Shared.Buckle; +using Content.Shared.Buckle.Components; namespace Content.Shared.SpaceArtillery; @@ -20,7 +23,9 @@ public sealed class SpaceArtillerySystem : EntitySystem [Dependency] private readonly ProjectileSystem _projectile = default!; [Dependency] private readonly GunSystem _gun = default!; [Dependency] private readonly SharedCombatModeSystem _combat = default!; - [Dependency] private readonly RotateToFaceSystem _rotate = default!; + //[Dependency] private readonly RotateToFaceSystem _rotate = default!; + [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; + [Dependency] private readonly SharedBuckleSystem _buckle = default!; private const float ShootSpeed = 25f; private const float distance = 100; @@ -34,14 +39,15 @@ public override void Initialize() base.Initialize(); Sawmill = Logger.GetSawmill("SpaceArtillery"); SubscribeLocalEvent(OnSignalReceived); + SubscribeLocalEvent(OnBuckleChange); + SubscribeLocalEvent(OnFireAction); } private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { - Sawmill.Info($"Space Artillery has been pinged. Entity: {ToPrettyString(uid)}"); + //Sawmill.Info($"Space Artillery has been pinged. Entity: {ToPrettyString(uid)}"); if (args.Port == component.SpaceArtilleryFirePort) { - Sawmill.Info($"Space Artillery has received FIRE signal. Entity: {ToPrettyString(uid)}"); var bodyQuery = GetEntityQuery(); var xformQuery = GetEntityQuery(); var combatQuery = GetEntityQuery(); @@ -53,13 +59,77 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, continue; } - //_transform = _entity.System(); - //var (worldPos, worldRot) = _transform.GetWorldPositionRotation(xform, xformQuery); - //var (targetPos, targetRot) = _transform.GetWorldPositionRotation(targetXform, xformQuery); - //var distance = (targetPos - worldPos).Length(); - //var mapVelocity = targetBody.LinearVelocity; - - //var targetSpot = targetPos + mapVelocity * distance / ShootSpeed; + if(TryComp(uid, out var transformComponent)){ + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + } + } + + } + if (args.Port == component.SpaceArtilleryFirePort) + { + if (TryComp(uid, out var combat)) + { + if(combat.IsInCombatMode == false && combat.IsInCombatMode != null) + { + _combat.SetInCombatMode(uid, true, combat); + } + else + { + _combat.SetInCombatMode(uid, false, combat); + } + } + } + } + + private void OnBuckleChange(EntityUid uid, SpaceArtilleryComponent component, ref BuckleChangeEvent args) + { + // Once Gunner buckles + if (args.Buckling) + { + + // Update actions + + if (TryComp(args.BuckledEntity, out var actions)) + { + _actionsSystem.AddAction(args.BuckledEntity, component.FireAction, uid, actions); + } + return; + } + + // Once gunner unbuckles + // Clean up actions + _actionsSystem.RemoveProvidedActions(args.BuckledEntity, uid); + + } + + /// + /// This fires when the gunner presses the fire action + /// + private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, FireActionEvent args) + { + if (args.Handled) + return; + + Sawmill.Info($"Space Artillery has received FIRE signal. Entity: {ToPrettyString(uid)}"); + var bodyQuery = GetEntityQuery(); + var xformQuery = GetEntityQuery(); + var combatQuery = GetEntityQuery(); + var query = EntityQueryEnumerator(); + while (query.MoveNext(out uid, out var comp, out var xform)) + { + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + { + continue; + } + if(TryComp(uid, out var transformComponent)){ Sawmill.Info($"Space Artillery has calculated a TARGET. Entity: {ToPrettyString(uid)}"); var worldPosX = transformComponent.WorldPosition.X; @@ -72,8 +142,8 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); } - } - } - } + + args.Handled = true; + } } \ No newline at end of file diff --git a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs index 839c02a6ea9..bcd070305b1 100644 --- a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs +++ b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs @@ -1,6 +1,13 @@ +using Content.Shared.Actions; namespace Content.Shared.SpaceArtillery; public sealed class SharedSpaceArtillerySystem : EntitySystem { } +/// +/// Raised when someone fires the artillery +/// +public sealed class FireActionEvent : InstantActionEvent +{ +} \ No newline at end of file diff --git a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl index bbaad1939ae..11a1d2a9418 100644 --- a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl @@ -79,5 +79,8 @@ signal-port-description-logic-input-b = Second input of a logic gate. signal-port-name-space-artillery-fire = Fire signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. +signal-port-name-space-artillery-safety = Safety +signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. + signal-port-name-logic-input = Input signal-port-description-logic-input = Input to the edge detector, cannot be a pulse signal. diff --git a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl index 57761a8ad7d..a0192181f75 100644 --- a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl @@ -39,3 +39,6 @@ signal-port-description-logic-output-low = This port is invoked whenever the inp signal-port-name-space-artillery-fire = Fire signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. + +signal-port-name-space-artillery-safety = Safety +signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. diff --git a/Resources/Prototypes/DeviceLinking/sink_ports.yml b/Resources/Prototypes/DeviceLinking/sink_ports.yml index 312bfaee21b..6b770d9167d 100644 --- a/Resources/Prototypes/DeviceLinking/sink_ports.yml +++ b/Resources/Prototypes/DeviceLinking/sink_ports.yml @@ -112,3 +112,8 @@ id: SpaceArtilleryFire name: signal-port-name-space-artillery-fire description: signal-port-description-space-artillery-fire + +- type: sinkPort + id: SpaceArtillerySafety + name: signal-port-name-space-artillery-safety + description: signal-port-description-space-artillery-safety diff --git a/Resources/Prototypes/DeviceLinking/source_ports.yml b/Resources/Prototypes/DeviceLinking/source_ports.yml index 2808b77b1ae..0df79bbdd23 100644 --- a/Resources/Prototypes/DeviceLinking/source_ports.yml +++ b/Resources/Prototypes/DeviceLinking/source_ports.yml @@ -101,3 +101,8 @@ id: SpaceArtilleryFire name: signal-port-name-space-artillery-fire description: signal-port-description-space-artillery-fire + +- type: sourcePort + id: SpaceArtillerySafety + name: signal-port-name-space-artillery-safety + description: signal-port-description-space-artillery-safety diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/space_artillery.yml index 1893ef65e08..9c2dc84ec7c 100644 --- a/Resources/Prototypes/Entities/Structures/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/space_artillery.yml @@ -58,9 +58,11 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire + - SpaceArtillerySafety - type: DeviceLinkSource ports: - SpaceArtilleryFire + - SpaceArtillerySafety - type: Gun fireRate: 3 selectedMode: FullAuto @@ -74,6 +76,11 @@ - type: SpaceArtillery - type: Actions - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.5" + maxBuckleDistance: 1 - type: entity @@ -131,9 +138,11 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire + - SpaceArtillerySafety - type: DeviceLinkSource ports: - SpaceArtilleryFire + - SpaceArtillerySafety - type: Gun fireRate: 3 selectedMode: FullAuto @@ -147,6 +156,11 @@ - type: SpaceArtillery - type: Actions - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.5" + maxBuckleDistance: 1 - type: entity @@ -202,9 +216,11 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire + - SpaceArtillerySafety - type: DeviceLinkSource ports: - SpaceArtilleryFire + - SpaceArtillerySafety - type: Gun fireRate: 3 selectedMode: FullAuto @@ -217,4 +233,12 @@ path: /Audio/Items/hiss.ogg - type: SpaceArtillery - type: Actions - - type: CombatMode \ No newline at end of file + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.5" + maxBuckleDistance: 1 + + +# Space Artillery projectiles From 881594c46f144bc6066505d330d360a45ae68f15 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Mon, 28 Aug 2023 16:38:09 +0200 Subject: [PATCH 12/32] Fixed issue in space artillery causing all weapons to be fired at once --- .../SpaceArtillery/SpaceArtillerySystem.cs | 78 +++++++++---------- 1 file changed, 35 insertions(+), 43 deletions(-) diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index 12717868fa5..19573edbfe5 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -48,32 +48,28 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, //Sawmill.Info($"Space Artillery has been pinged. Entity: {ToPrettyString(uid)}"); if (args.Port == component.SpaceArtilleryFirePort) { - var bodyQuery = GetEntityQuery(); - var xformQuery = GetEntityQuery(); - var combatQuery = GetEntityQuery(); - var query = EntityQueryEnumerator(); - while (query.MoveNext(out uid, out var comp, out var xform)) + var xform = Transform(uid); + + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) { - if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) - { - continue; - } + return; + } + + if(TryComp(uid, out var transformComponent)){ - if(TryComp(uid, out var transformComponent)){ - var worldPosX = transformComponent.WorldPosition.X; - var worldPosY = transformComponent.WorldPosition.Y; - var worldRot = transformComponent.WorldRotation+rotOffset; - var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); - } + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); } } - if (args.Port == component.SpaceArtilleryFirePort) + if (args.Port == component.SpaceArtillerySafetyPort) { if (TryComp(uid, out var combat)) { @@ -113,36 +109,32 @@ private void OnBuckleChange(EntityUid uid, SpaceArtilleryComponent component, re /// /// This fires when the gunner presses the fire action /// + private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, FireActionEvent args) { if (args.Handled) return; - Sawmill.Info($"Space Artillery has received FIRE signal. Entity: {ToPrettyString(uid)}"); - var bodyQuery = GetEntityQuery(); - var xformQuery = GetEntityQuery(); - var combatQuery = GetEntityQuery(); - var query = EntityQueryEnumerator(); - while (query.MoveNext(out uid, out var comp, out var xform)) + var xform = Transform(uid); + + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) { - if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) - { - continue; - } + return; + } + + if(TryComp(uid, out var transformComponent)){ - if(TryComp(uid, out var transformComponent)){ - Sawmill.Info($"Space Artillery has calculated a TARGET. Entity: {ToPrettyString(uid)}"); - var worldPosX = transformComponent.WorldPosition.X; - var worldPosY = transformComponent.WorldPosition.Y; - var worldRot = transformComponent.WorldRotation+rotOffset; - var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); - } + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); } + args.Handled = true; } From 8e243de0a88f91e69618e7f215e30c839cdb3ff5 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Sat, 23 Sep 2023 12:39:09 +0200 Subject: [PATCH 13/32] Fixing merge conflicts with space artillery --- .../en-US/machine-linking/receiver_ports.ftl | 8 +- .../machine-linking/transmitter_ports.ftl | 13 +- .../Prototypes/DeviceLinking/sink_ports.yml | 113 +++++++++++++++++- .../Prototypes/DeviceLinking/source_ports.yml | 22 +++- 4 files changed, 146 insertions(+), 10 deletions(-) diff --git a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl index 11a1d2a9418..5a589bcdd5e 100644 --- a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl @@ -76,11 +76,11 @@ signal-port-description-logic-input-a = First input of a logic gate. signal-port-name-logic-input-b = Input B signal-port-description-logic-input-b = Second input of a logic gate. +signal-port-name-logic-input = Input +signal-port-description-logic-input = Input to the edge detector, cannot be a pulse signal. + signal-port-name-space-artillery-fire = Fire signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. signal-port-name-space-artillery-safety = Safety -signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. - -signal-port-name-logic-input = Input -signal-port-description-logic-input = Input to the edge detector, cannot be a pulse signal. +signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. \ No newline at end of file diff --git a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl index a0192181f75..cac9a8f298f 100644 --- a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl @@ -8,7 +8,7 @@ signal-port-name-off-transmitter = Off signal-port-description-off-transmitter = This port is invoked whenever the transmitter is turned off. signal-port-name-status-transmitter = Status -signal-port-description-logic-output = This port is invoked with HIGH or LOW depending on the transmitter status. +signal-port-description-status-transmitter = This port is invoked with HIGH or LOW depending on the transmitter status. signal-port-name-left = Left signal-port-description-left = This port is invoked whenever the lever is moved to the leftmost position. @@ -37,8 +37,17 @@ signal-port-description-logic-output-high = This port is invoked whenever the in signal-port-name-logic-output-low = Low Output signal-port-description-logic-output-low = This port is invoked whenever the input has a falling edge. +signal-port-name-air-danger = Danger +signal-port-description-air-danger = This port is invoked with HIGH when in danger mode and LOW when not. + +signal-port-name-air-warning = Warning +signal-port-description-air-warning = This port is invoked with HIGH when in warning mode and LOW when not. + +signal-port-name-air-normal = Normal +signal-port-description-air-normal = This port is invoked with HIGH when in normal mode and LOW when not. + signal-port-name-space-artillery-fire = Fire signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. signal-port-name-space-artillery-safety = Safety -signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. +signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. \ No newline at end of file diff --git a/Resources/Prototypes/DeviceLinking/sink_ports.yml b/Resources/Prototypes/DeviceLinking/sink_ports.yml index 6b770d9167d..e24c21778c1 100644 --- a/Resources/Prototypes/DeviceLinking/sink_ports.yml +++ b/Resources/Prototypes/DeviceLinking/sink_ports.yml @@ -103,6 +103,115 @@ name: signal-port-name-set-particle-epsilon description: signal-port-description-set-particle-epsilon +- type: sinkPort + id: SetParticleZeta + name: signal-port-name-set-particle-zeta + description: signal-port-description-set-particle-zeta +- type: sinkPort + id: AutoClose + name: signal-port-name-hold-open + description: signal-port-description-hold-open + +- type: sinkPort + id: Toggle + name: signal-port-name-toggle + description: signal-port-description-toggle + +- type: sinkPort + id: On + name: signal-port-name-on-receiver + description: signal-port-description-on-receiver + +- type: sinkPort + id: Off + name: signal-port-name-off-receiver + description: signal-port-description-off-receiver + +- type: sinkPort + id: Forward + name: signal-port-name-forward + description: signal-port-description-forward + +- type: sinkPort + id: Reverse + name: signal-port-name-reverse + description: signal-port-description-reverse + +- type: sinkPort + id: Open + name: signal-port-name-open + description: signal-port-description-open + +- type: sinkPort + id: Close + name: signal-port-name-close + description: signal-port-description-close + +- type: sinkPort + id: DoorBolt + name: signal-port-name-doorbolt + description: signal-port-description-doorbolt + +- type: sinkPort + id: Trigger + name: signal-port-name-trigger + description: signal-port-description-trigger + +- type: sinkPort + id: OrderReceiver + name: signal-port-name-order-receiver + description: signal-port-description-order-receiver + +- type: sinkPort + id: Pressurize + name: signal-port-name-pressurize + description: signal-port-description-pressurize + +- type: sinkPort + id: Depressurize + name: signal-port-name-depressurize + description: signal-port-description-depressurize + +- type: sinkPort + id: CloningPodReceiver + name: signal-port-name-pod-receiver + description: signal-port-description-pod-receiver + +- type: sinkPort + id: MedicalScannerReceiver + name: signal-port-name-med-scanner-receiver + description: signal-port-description-med-scanner-receiver + +- type: sinkPort + id: ArtifactAnalyzerReceiver + name: signal-port-name-artifact-analyzer-receiver + description: signal-port-description-artifact-analyzer-receiver + +- type: sinkPort + id: InputA + name: signal-port-name-logic-input-a + description: signal-port-description-logic-input-a + +- type: sinkPort + id: InputB + name: signal-port-name-logic-input-b + description: signal-port-description-logic-input-b + +- type: sinkPort + id: Input + name: signal-port-name-logic-input + description: signal-port-description-logic-input + +- type: sinkPort + id: SetParticleDelta + name: signal-port-name-set-particle-delta + description: signal-port-description-set-particle-delta + +- type: sinkPort + id: SetParticleEpsilon + name: signal-port-name-set-particle-epsilon + description: signal-port-description-set-particle-epsilon + - type: sinkPort id: SetParticleZeta name: signal-port-name-set-particle-zeta @@ -112,8 +221,8 @@ id: SpaceArtilleryFire name: signal-port-name-space-artillery-fire description: signal-port-description-space-artillery-fire - + - type: sinkPort id: SpaceArtillerySafety name: signal-port-name-space-artillery-safety - description: signal-port-description-space-artillery-safety + description: signal-port-description-space-artillery-safety \ No newline at end of file diff --git a/Resources/Prototypes/DeviceLinking/source_ports.yml b/Resources/Prototypes/DeviceLinking/source_ports.yml index 0df79bbdd23..7f1fe0df8d9 100644 --- a/Resources/Prototypes/DeviceLinking/source_ports.yml +++ b/Resources/Prototypes/DeviceLinking/source_ports.yml @@ -97,12 +97,30 @@ description: signal-port-description-logic-output-low defaultLinks: [ Off, Close ] +- type: sourcePort + id: AirDanger + name: signal-port-name-air-danger + description: signal-port-description-air-danger + defaultLinks: [ DoorBolt ] + +- type: sourcePort + id: AirWarning + name: signal-port-name-air-warning + description: signal-port-description-air-warning + defaultLinks: [ DoorBolt ] + +- type: sourcePort + id: AirNormal + name: signal-port-name-air-normal + description: signal-port-description-air-normal + defaultLinks: [ DoorBolt ] + - type: sourcePort id: SpaceArtilleryFire name: signal-port-name-space-artillery-fire description: signal-port-description-space-artillery-fire - + - type: sourcePort id: SpaceArtillerySafety name: signal-port-name-space-artillery-safety - description: signal-port-description-space-artillery-safety + description: signal-port-description-space-artillery-safety \ No newline at end of file From 82d62455b2aeba701a9ebc8e27307d9fab3f03af Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 13 Oct 2023 10:36:53 +0200 Subject: [PATCH 14/32] Space Artillery Fire action fixed. Power is WIP --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 37 +++++++++++++------ .../SpaceArtillery/SpaceArtillerySystem.cs | 4 +- .../SharedSpaceArtillerySystem.cs | 2 +- .../Structures/SpaceArtillery/actions.yml | 10 +++++ .../{ => SpaceArtillery}/space_artillery.yml | 0 5 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 Resources/Prototypes/Entities/Structures/SpaceArtillery/actions.yml rename Resources/Prototypes/Entities/Structures/{ => SpaceArtillery}/space_artillery.yml (100%) diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs index 121fd1090cc..8bbb4491874 100644 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -6,12 +6,27 @@ namespace Content.Shared.SpaceArtillery; 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; -using Content.Shared.Actions.ActionTypes; +using Content.Shared.Actions; using Robust.Shared.Utility; [RegisterComponent] -public sealed class SpaceArtilleryComponent : Component +public sealed partial class SpaceArtilleryComponent : Component { + // Whether the space artillery has enough power + [ViewVariables(VVAccess.ReadWrite)] public bool IsPowered = false; + + // Whether the space artillery need power to operate + [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequired = true; + + // Whether the space artillery need power to operate + [ViewVariables(VVAccess.ReadWrite)] public bool IsArmed = false; + + /// + /// The current amount of power being used. + /// + [DataField("powerUseActive")] + public int PowerUseActive = 600; + /// /// Signal port that makes space artillery fire. /// @@ -27,14 +42,14 @@ public sealed class SpaceArtilleryComponent : Component /// /// The action for firing the artillery when mounted /// - [DataField("fireAction")] + + [DataField("fireAction", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string? FireAction = "ActionSpaceArtilleryFire"; + + /// + /// The action for the horn (if any) + /// + [DataField("fireActionEntity")] [ViewVariables(VVAccess.ReadWrite)] - public InstantAction FireAction = new() - { - UseDelay = TimeSpan.FromSeconds(0.1), - Icon = new SpriteSpecifier.Texture(new("Objects/Fun/bikehorn.rsi/icon.png")), - DisplayName = "action-name-honk", //To be changed - Description = "action-desc-honk", //To be changed - Event = new FireActionEvent(), - }; + public EntityUid? FireActionEntity; } \ No newline at end of file diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index 19573edbfe5..89b9e24914c 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -17,7 +17,7 @@ namespace Content.Shared.SpaceArtillery; -public sealed class SpaceArtillerySystem : EntitySystem +public sealed partial class SpaceArtillerySystem : EntitySystem { [Dependency] private readonly ProjectileSystem _projectile = default!; @@ -95,7 +95,7 @@ private void OnBuckleChange(EntityUid uid, SpaceArtilleryComponent component, re if (TryComp(args.BuckledEntity, out var actions)) { - _actionsSystem.AddAction(args.BuckledEntity, component.FireAction, uid, actions); + _actionsSystem.AddAction(args.BuckledEntity, ref component.FireActionEntity, component.FireAction, uid, actions); } return; } diff --git a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs index bcd070305b1..934efd2b20d 100644 --- a/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs +++ b/Content.Shared/SpaceArtillery/SharedSpaceArtillerySystem.cs @@ -8,6 +8,6 @@ public sealed class SharedSpaceArtillerySystem : EntitySystem /// /// Raised when someone fires the artillery /// -public sealed class FireActionEvent : InstantActionEvent +public sealed partial class FireActionEvent : InstantActionEvent { } \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/SpaceArtillery/actions.yml b/Resources/Prototypes/Entities/Structures/SpaceArtillery/actions.yml new file mode 100644 index 00000000000..faf426b069f --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/SpaceArtillery/actions.yml @@ -0,0 +1,10 @@ +- type: entity + id: ActionSpaceArtilleryFire + name: Fire + description: Sends lead downrange + noSpawn: true + components: + - type: InstantAction + useDelay: 0.1 + icon: Objects/Fun/bikehorn.rsi/icon.png #To be changed + event: !type:FireActionEvent \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/space_artillery.yml b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml similarity index 100% rename from Resources/Prototypes/Entities/Structures/space_artillery.yml rename to Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml From f9b21e3233684ee0ad6545010c3d13b54100b8ec Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 20 Oct 2023 20:53:26 +0200 Subject: [PATCH 15/32] Space Artillery power foundation --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 48 ++++- .../SpaceArtillery/SpaceArtillerySystem.cs | 164 ++++++++++++------ .../SpaceArtillery/space_artillery.yml | 33 +++- 3 files changed, 180 insertions(+), 65 deletions(-) diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs index 8bbb4491874..55b1b6655da 100644 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -12,21 +12,55 @@ namespace Content.Shared.SpaceArtillery; [RegisterComponent] public sealed partial class SpaceArtilleryComponent : Component { - // Whether the space artillery has enough power + /// + /// Whether the space artillery's safety is enabled or not + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsArmed = false; + + /// + /// Whether the space artillery has enough power + /// [ViewVariables(VVAccess.ReadWrite)] public bool IsPowered = false; - // Whether the space artillery need power to operate - [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequired = true; + /// + /// Whether the space artillery's battery is being charged + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsCharging = false; - // Whether the space artillery need power to operate - [ViewVariables(VVAccess.ReadWrite)] public bool IsArmed = false; + /// + /// Rate of charging the battery + /// + [DataField("powerChargeRate"), ViewVariables(VVAccess.ReadWrite)] + public int PowerChargeRate = 30; + + /// + /// Whether the space artillery need power to operate remotely from signal + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredForSignal = true; + + /// + /// Whether the space artillery need power to operate manually when mounted/buckled to + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredForMount = false; /// - /// The current amount of power being used. + /// Amount of power being used when operating /// - [DataField("powerUseActive")] + [DataField("powerUsePassive"), ViewVariables(VVAccess.ReadWrite)] + public int PowerUsePassive = 60; + + /// + /// Whether the space artillery needs power to fire a shot + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredToFire = false; + + /// + /// Amount of power used when firing + /// + [DataField("powerUseActive"), ViewVariables(VVAccess.ReadWrite)] public int PowerUseActive = 600; + /// /// Signal port that makes space artillery fire. /// diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index 89b9e24914c..e1fee4226f6 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -14,6 +14,10 @@ using Content.Shared.Actions; using Content.Shared.Buckle; using Content.Shared.Buckle.Components; +using Content.Server.Power.Components; +using Content.Server.Power.EntitySystems; +using Content.Shared.Power; +using Content.Shared.Rounding; namespace Content.Shared.SpaceArtillery; @@ -27,7 +31,7 @@ public sealed partial class SpaceArtillerySystem : EntitySystem [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; [Dependency] private readonly SharedBuckleSystem _buckle = default!; - private const float ShootSpeed = 25f; + private const float ShootSpeed = 30f; private const float distance = 100; private const float rotOffset = 3.14159265f; //Without it the artillery would be shooting backwards.The rotation is in radians and equals to 180 degrees //private readonly TransformSystem _transform; @@ -41,45 +45,59 @@ public override void Initialize() SubscribeLocalEvent(OnSignalReceived); SubscribeLocalEvent(OnBuckleChange); SubscribeLocalEvent(OnFireAction); + SubscribeLocalEvent(OnApcChanged); + SubscribeLocalEvent(OnBatteryChargeChanged); } private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { - //Sawmill.Info($"Space Artillery has been pinged. Entity: {ToPrettyString(uid)}"); - if (args.Port == component.SpaceArtilleryFirePort) + if(component.IsPowered == true || component.IsPowerRequiredForSignal == false) { - var xform = Transform(uid); - - if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + //Sawmill.Info($"Space Artillery has been pinged. Entity: {ToPrettyString(uid)}"); + if (args.Port == component.SpaceArtilleryFirePort && component.IsArmed == true) { - return; - } - - if(TryComp(uid, out var transformComponent)){ - - var worldPosX = transformComponent.WorldPosition.X; - var worldPosY = transformComponent.WorldPosition.Y; - var worldRot = transformComponent.WorldRotation+rotOffset; - var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); - } - - } - if (args.Port == component.SpaceArtillerySafetyPort) - { - if (TryComp(uid, out var combat)) - { - if(combat.IsInCombatMode == false && combat.IsInCombatMode != null) + if(TryComp(uid, out var battery)) { - _combat.SetInCombatMode(uid, true, combat); + if((component.IsPowered == true && battery.Charge >= component.PowerUseActive) || component.IsPowerRequiredToFire == false) + { + var xform = Transform(uid); + + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + { + return; + } + + if(TryComp(uid, out var transformComponent)){ + + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + if(component.IsPowerRequiredToFire == true) + battery.CurrentCharge -= component.PowerUseActive; + } + } } - else + } + if (args.Port == component.SpaceArtillerySafetyPort) + { + if (TryComp(uid, out var combat)) { - _combat.SetInCombatMode(uid, false, combat); + if(combat.IsInCombatMode == false && combat.IsInCombatMode != null) + { + _combat.SetInCombatMode(uid, true, combat); + component.IsArmed = true; + } + else + { + _combat.SetInCombatMode(uid, false, combat); + component.IsArmed = false; + } } } } @@ -112,30 +130,72 @@ private void OnBuckleChange(EntityUid uid, SpaceArtilleryComponent component, re private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, FireActionEvent args) { - if (args.Handled) - return; + if((component.IsPowered == true || component.IsPowerRequiredForMount == false) && component.IsArmed == true) + { + if(TryComp(uid, out var battery)) + { + if((component.IsPowered == true && battery.Charge >= component.PowerUseActive) || component.IsPowerRequiredToFire == false) + { + if (args.Handled) + return; + + var xform = Transform(uid); + + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + { + return; + } + + if(TryComp(uid, out var transformComponent)){ + + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + if(component.IsPowerRequiredToFire == true) + battery.CurrentCharge -= component.PowerUseActive; + } - var xform = Transform(uid); + + args.Handled = true; + } + } + } + } + + private void OnApcChanged(EntityUid uid, SpaceArtilleryComponent component, ref PowerChangedEvent args){ - if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) - { - return; + if(TryComp(uid, out var batteryCharger)){ + + if (args.Powered) + { + component.IsCharging = true; + batteryCharger.AutoRecharge = true; + batteryCharger.AutoRechargeRate = component.PowerChargeRate; + } + else + { + component.IsCharging = false; + batteryCharger.AutoRecharge = true; + batteryCharger.AutoRechargeRate = component.PowerUsePassive * -1; + } } + } + + private void OnBatteryChargeChanged(EntityUid uid, SpaceArtilleryComponent component, ref ChargeChangedEvent args){ - if(TryComp(uid, out var transformComponent)){ - - var worldPosX = transformComponent.WorldPosition.X; - var worldPosY = transformComponent.WorldPosition.Y; - var worldRot = transformComponent.WorldRotation+rotOffset; - var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + if(args.Charge > 0) + { + component.IsPowered = true; } - - - args.Handled = true; - } + else + { + component.IsPowered = false; + } + } } \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml index 9c2dc84ec7c..b15008c70ad 100644 --- a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml @@ -65,6 +65,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 3 + projectileSpeed: 30 selectedMode: FullAuto availableModes: - SemiAuto @@ -81,12 +82,20 @@ position: Stand buckleOffset: "0,0.5" maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: Battery + maxCharge: 10000 + startingCharge: 5000 + - type: ExaminableBattery + - type: BatterySelfRecharger - type: entity id: Space_Machine_Gun name: space machine gun - parent: ConstructibleMachine + parent: ConstructibleMachine #base machine powered makes power work but also messes with rotation description: It's like from 20th century second planet wars! Old and reliable. placement: mode: SnapgridCenter @@ -119,6 +128,10 @@ rotateWhileAnchored: true - type: Appearance - type: AmmoCounter + - type: Battery + maxCharge: 10000 + startingCharge: 5000 + - type: ExaminableBattery - type: BallisticAmmoProvider autoCycle: true capacity: 60 @@ -145,6 +158,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 3 + projectileSpeed: 30 selectedMode: FullAuto availableModes: - SemiAuto @@ -161,6 +175,10 @@ position: Stand buckleOffset: "0,0.5" maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger - type: entity @@ -201,13 +219,11 @@ - type: AmmoCounter - type: Battery maxCharge: 10000 - startingCharge: 10000 + startingCharge: 5000 + - type: ExaminableBattery - type: HitscanBatteryAmmoProvider proto: RedMediumLaser fireCost: 100 - - type: BatterySelfRecharger - autoRecharge: true - autoRechargeRate: 40 - type: DeviceNetwork deviceNetId: Wireless receiveFrequencyId: BasicDevice @@ -223,6 +239,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 3 + projectileSpeed: 30 selectedMode: FullAuto availableModes: - SemiAuto @@ -239,6 +256,10 @@ position: Stand buckleOffset: "0,0.5" maxBuckleDistance: 1 - + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + # Space Artillery projectiles From 751363f711d676d9a5771ef1064445e943c52e23 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Sat, 21 Oct 2023 04:12:04 +0200 Subject: [PATCH 16/32] Space Artillery adding things and fixing issues with power --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 6 +++--- .../SpaceArtillery/SpaceArtillerySystem.cs | 19 ++++++++++++++++++- .../SpaceArtillery/space_artillery.yml | 11 +++++++---- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs index 55b1b6655da..b6b0622406e 100644 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -31,7 +31,7 @@ public sealed partial class SpaceArtilleryComponent : Component /// Rate of charging the battery /// [DataField("powerChargeRate"), ViewVariables(VVAccess.ReadWrite)] - public int PowerChargeRate = 30; + public int PowerChargeRate = 3000; /// /// Whether the space artillery need power to operate remotely from signal @@ -47,7 +47,7 @@ public sealed partial class SpaceArtilleryComponent : Component /// Amount of power being used when operating /// [DataField("powerUsePassive"), ViewVariables(VVAccess.ReadWrite)] - public int PowerUsePassive = 60; + public int PowerUsePassive = 600; /// /// Whether the space artillery needs power to fire a shot @@ -58,7 +58,7 @@ public sealed partial class SpaceArtilleryComponent : Component /// Amount of power used when firing /// [DataField("powerUseActive"), ViewVariables(VVAccess.ReadWrite)] - public int PowerUseActive = 600; + public int PowerUseActive = 6000; /// diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index e1fee4226f6..cb31c776102 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -167,7 +167,8 @@ private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, Fire } } } - + + private void OnApcChanged(EntityUid uid, SpaceArtilleryComponent component, ref PowerChangedEvent args){ if(TryComp(uid, out var batteryCharger)){ @@ -183,10 +184,14 @@ private void OnApcChanged(EntityUid uid, SpaceArtilleryComponent component, ref component.IsCharging = false; batteryCharger.AutoRecharge = true; batteryCharger.AutoRechargeRate = component.PowerUsePassive * -1; + + if(TryComp(uid, out var battery)) + battery.CurrentCharge -= 1; //It is done so that BatterySelfRecharger will get start operating instead of being blocked by fully charged battery } } } + private void OnBatteryChargeChanged(EntityUid uid, SpaceArtilleryComponent component, ref ChargeChangedEvent args){ if(args.Charge > 0) @@ -197,5 +202,17 @@ private void OnBatteryChargeChanged(EntityUid uid, SpaceArtilleryComponent compo { component.IsPowered = false; } + + if(TryComp(uid, out var apcPowerReceiver) && TryComp(uid, out var battery)) + { + if(battery.IsFullyCharged == false) + { + apcPowerReceiver.Load = component.PowerUsePassive + component.PowerChargeRate; + } + else + { + apcPowerReceiver.Load = component.PowerUsePassive; + } + } } } \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml index b15008c70ad..d4fdfcec8f6 100644 --- a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml @@ -32,6 +32,7 @@ - type: Rotatable rotateWhilePulling: false rotateWhileAnchored: true + increment: 45 - type: Appearance - type: Storage capacity: 120 @@ -47,7 +48,7 @@ container: storagebase - type: PneumaticCannon gasUsage: 0 - baseProjectileSpeed: 25 + baseProjectileSpeed: 30 toolModifyPower: Screwing throwItems: false - type: DeviceNetwork @@ -126,6 +127,7 @@ - type: Rotatable rotateWhilePulling: false rotateWhileAnchored: true + increment: 45 - type: Appearance - type: AmmoCounter - type: Battery @@ -215,15 +217,16 @@ - type: Rotatable rotateWhilePulling: false rotateWhileAnchored: true + increment: 45 - type: Appearance - type: AmmoCounter - type: Battery - maxCharge: 10000 - startingCharge: 5000 + maxCharge: 100000 + startingCharge: 50000 - type: ExaminableBattery - type: HitscanBatteryAmmoProvider proto: RedMediumLaser - fireCost: 100 + fireCost: 45000 - type: DeviceNetwork deviceNetId: Wireless receiveFrequencyId: BasicDevice From fe90b7af6f12584106d9b356d1923c568ce38349 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Sat, 21 Oct 2023 22:50:04 +0200 Subject: [PATCH 17/32] Space Artillery first weapon and projectile foundations --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 8 +- .../SpaceArtillery/SpaceArtillerySystem.cs | 2 +- .../SpaceArtillery/space_artillery.yml | 323 +++++++++++++++++- Resources/Prototypes/tags.yml | 3 + .../space_artillery.rsi/space_artillery.png | Bin 3046 -> 3857 bytes .../emp_shell_casing.rsi/base-spent.png | Bin 0 -> 792 bytes .../emp_shell_casing.rsi/base.png | Bin 0 -> 883 bytes .../emp_shell_casing.rsi/meta.json | 17 + .../large_casing.rsi/base-spent.png | Bin 0 -> 6910 bytes .../SpaceArtillery/large_casing.rsi/base.png | Bin 0 -> 6944 bytes .../SpaceArtillery/large_casing.rsi/meta.json | 17 + .../shell_casing.rsi/base-spent.png | Bin 0 -> 795 bytes .../SpaceArtillery/shell_casing.rsi/base.png | Bin 0 -> 887 bytes .../SpaceArtillery/shell_casing.rsi/meta.json | 17 + 14 files changed, 377 insertions(+), 10 deletions(-) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/meta.json diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs index b6b0622406e..adb2d178d71 100644 --- a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs @@ -15,7 +15,7 @@ public sealed partial class SpaceArtilleryComponent : Component /// /// Whether the space artillery's safety is enabled or not /// - [ViewVariables(VVAccess.ReadWrite)] public bool IsArmed = false; + [DataField("isArmed"),ViewVariables(VVAccess.ReadWrite)] public bool IsArmed = false; /// /// Whether the space artillery has enough power @@ -36,12 +36,12 @@ public sealed partial class SpaceArtilleryComponent : Component /// /// Whether the space artillery need power to operate remotely from signal /// - [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredForSignal = true; + [DataField("isPowerRequiredForSignal"),ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredForSignal = true; /// /// Whether the space artillery need power to operate manually when mounted/buckled to /// - [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredForMount = false; + [DataField("isPowerRequiredForMount"),ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredForMount = false; /// /// Amount of power being used when operating @@ -52,7 +52,7 @@ public sealed partial class SpaceArtilleryComponent : Component /// /// Whether the space artillery needs power to fire a shot /// - [ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredToFire = false; + [DataField("isPowerRequiredToFire"),ViewVariables(VVAccess.ReadWrite)] public bool IsPowerRequiredToFire = false; /// /// Amount of power used when firing diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs index cb31c776102..a087d546bdd 100644 --- a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs @@ -186,7 +186,7 @@ private void OnApcChanged(EntityUid uid, SpaceArtilleryComponent component, ref batteryCharger.AutoRechargeRate = component.PowerUsePassive * -1; if(TryComp(uid, out var battery)) - battery.CurrentCharge -= 1; //It is done so that BatterySelfRecharger will get start operating instead of being blocked by fully charged battery + battery.CurrentCharge -= component.PowerUsePassive; //It is done so that BatterySelfRecharger will get start operating instead of being blocked by fully charged battery } } } diff --git a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml index d4fdfcec8f6..863c691a604 100644 --- a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml @@ -81,7 +81,7 @@ IsInCombatMode: true - type: Strap position: Stand - buckleOffset: "0,0.5" + buckleOffset: "0,0.8" maxBuckleDistance: 1 - type: ApcPowerReceiver powerLoad: 1000 @@ -137,10 +137,10 @@ - type: BallisticAmmoProvider autoCycle: true capacity: 60 - proto: CartridgeLightRifle + proto: CartridgeShellSolid whitelist: tags: - - CartridgeLightRifle + - CartridgeShell - type: ContainerContainer containers: ballistic-ammo: !type:Container @@ -175,7 +175,7 @@ IsInCombatMode: true - type: Strap position: Stand - buckleOffset: "0,0.5" + buckleOffset: "0,0.8" maxBuckleDistance: 1 - type: ApcPowerReceiver powerLoad: 1000 @@ -257,12 +257,325 @@ IsInCombatMode: true - type: Strap position: Stand - buckleOffset: "0,0.5" + buckleOffset: "0,0.8" maxBuckleDistance: 1 - type: ApcPowerReceiver powerLoad: 1000 - type: ExtensionCableReceiver - type: BatterySelfRecharger +# Actual Space weapons +- type: entity + id: Artillery_Gun_630 + name: artillery gun 630cal + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Fires 630 caliber shells. Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: Structures/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: AmmoCounter + - type: Battery + maxCharge: 1000000 + startingCharge: 1000000 + - type: ExaminableBattery + - type: BallisticAmmoProvider + autoCycle: true + capacity: 1 + proto: CartridgeShellSolid + whitelist: + tags: + - CartridgeShell + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: Gun + fireRate: 1 + projectileSpeed: 30 + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + powerChargeRate: 2000 + powerUsePassive: 3000 + isPowerRequiredForSignal: true + isPowerRequiredToFire: false + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: ApcPowerReceiver + powerLoad: 3000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + + +- type: entity + id: Mounted_Machine_Gun_60 + name: mounted machine gun 60 + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Puts down suppressive fire. With enough shots turns hull into swiss cheese. Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: Structures/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Battery + maxCharge: 0 + startingCharge: 0 + - type: Appearance + - type: BallisticAmmoProvider + autoCycle: true + capacity: 60 + proto: CartridgeMachineGun + whitelist: + tags: + - CartridgeAntiMateriel + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + - type: Gun + fireRate: 5 + projectileSpeed: 30 + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + powerChargeRate: 0 + powerUsePassive: 0 + isPowerRequiredForMount: false + isPowerRequiredToFire: false + isPowerRequiredForSignal: false + - type: BatterySelfRecharger + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 # Space Artillery projectiles + + +#EMP shell +- type: entity + id: BulletShellEmp + name: shell + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 100 + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + layers: + - state: frag-emp + - type: EmpOnTrigger + range: 4 + energyConsumption: 50000 + disableDuration: 60 + +- type: entity + id: CartridgeShellEmp + name: 630 EMP shell + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeShell + - type: Item + size: 60 + - type: CartridgeAmmo + proto: BulletShellEmp + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/emp_shell_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + +#Solid Shell +- type: entity + id: BulletShellSolid + name: shell + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 1000 + #currently explosion deals roughly 22.5 damage + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + layers: + - state: frag-emp + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 4 + intensitySlope: 3 + totalIntensity: 10 + maxTileBreak: 1 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeShellSolid + name: 630 Solid shell + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeShell + - type: Item + size: 60 + - type: CartridgeAmmo + proto: BulletShellSolid + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/shell_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + + +#.60 call for machine gun +- type: entity + id: BulletMachineGun + name: 60 Machine Gun bullet + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 30 + #currently explosion deals roughly ? damage + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + layers: + - state: frag-emp + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 2 + intensitySlope: 1 + totalIntensity: 5 + maxTileBreak: 0 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeMachineGun + name: 60 Machine Gun cartridge + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeAntiMateriel + - type: Item + size: 2 + - type: CartridgeAmmo + proto: BulletMachineGun + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/large_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index ac83a683ebe..29a1a2339e8 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -271,6 +271,9 @@ - type: Tag id: CartridgeRocket +- type: Tag + id: CartridgeShell + # Allows you to walk over tile entities such as lava without steptrigger - type: Tag id: Catwalk diff --git a/Resources/Textures/Structures/space_artillery.rsi/space_artillery.png b/Resources/Textures/Structures/space_artillery.rsi/space_artillery.png index ef59df7509c1a832925042e37cd12703e0288049..a33b77621ee3d3dce33464e1b8e0aed37c826b21 100644 GIT binary patch literal 3857 zcmV+s5AN`ZP)^?8c)L5Kuj})GyY5v5|Hy;eO#BE0Z_M=TSFlO4@TV zsa-O=@rW`-1Pz@$t7OPAB-NJ8s{6u4-z-`281i>0;EE$fTD*gz=A~;=swsL>z6=GG z``Ld96-wkoLyEl zeHYF*q4U8>xQU_^lo>Ehcs+&Y1!%j0hNV(g<#kT(A-*n8bPap^&?oy_mVW?65@;%l zlm6HM000SaNLh0L01FZT01FZU(%pXi000e0NklZ|;BZe{Z54tsfUkPO%%G6OVEBpUb z7BFtyxJa#9wS=c`-MTTd9yxME3JVKm&YU?>xq>VpF@}n(!pj6FPMqke>8z}*=)jgt z5Cax3=$F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|$`Lx#eZa76REdQm$rsIpVwgd+*YrS|;yC=WR9yIIg?t@o-yky3llZQXu zxBd5wd?D$L^6IkKz^YeHhy9%1a&4PMk)yWH4Q(;0cwhG;@5L8(?m25?d>ruk4@D(zv|U~U(3;xOqm+kx`n4T-6#pq3WqjIy5b$-0WBL( z3Lgpk3^}0iwbBy}eo>rh@P}d}8lD5Y>gmb+;lv--vPNEbT-ck>m9^jVsGGP_g{6qp zVVNVCgb5PBLxM8vbsS5W8tX z2wn6e{EK{LzM9OXETN?)o6+9+yi>_%y?(+aW25Y9pDad2ew;kz<<7g}r1xsT_kFBh9&vR&#MkFL zM&og{<7N@Eov__*o1xl!uLf+}#>LM7>-7qEH`hj^oziBpxQFGh7eQZXYJreh}YE zrpacYq6F3m({)|{cTSFu1^cj#r_*V{ro1iwS0gtVXbyI}UF$JqIh?rz+yU+Yci?;- Z_yu(HUxI{-n<@YR002ovPDHLkV1h-gZJq!C literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base.png b/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..60c741e36e061ecf4bb4831148bcbe2e99281d02 GIT binary patch literal 887 zcmV--1Bm>IP)uk4@D(zv|U~U(3;xOqm+kx`n4T-6#pq3WqjIy5b$-0WBL( z3Lgpk3^}0iwbBy}eo>rh@P}d}8lD5Y>gmb+;lv--vPNEbT-ck>m9^jVsGGP_g{6qp zVVNVCgb5PBLxM8v40effy*@qIM;S*e3T67ETY6Xf~fwTGf$uHoUzV<&@KP9mAm`)(Jug1VLa(bJH}L zIO@b;FbLe7l7Rx~!g=kQy;w=ubRJ;_DWw73IqgQPow?z1^d0niy};kl?cvBB;0|yHxC686zz;}=jfDx88595j N002ovPDHLkV1g_JmXrVh literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/meta.json new file mode 100644 index 00000000000..632f148dc68 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/8a848cde3e8610455f77704e861e5a06315a3b0e/icons/obj/ammo.dmi", + "states": [ + { + "name": "base" + }, + { + "name": "base-spent" + } + ] +} \ No newline at end of file From c3ecb6e498780e4c1d3891066ab9f1da9557da71 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 17 Nov 2023 04:22:51 +0100 Subject: [PATCH 18/32] Space Artillery adding railgun and sprites --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 0 .../SpaceArtillery/SpaceArtillerySystem.cs | 0 .../SpaceArtillery/actions.yml | 0 .../SpaceArtillery/space_artillery.yml | 399 ++++++++++++++++-- Resources/Prototypes/tags.yml | 16 + .../base-projectile.png | Bin 0 -> 1333 bytes .../base-spent.png | Bin 0 -> 819 bytes .../base.png | Bin 0 -> 1899 bytes .../meta.json | 20 + .../base-projectile.png | Bin 0 -> 225 bytes .../base-spent.png | Bin 0 -> 516 bytes .../base.png | Bin 0 -> 598 bytes .../meta.json | 5 +- .../base-projectile.png | Bin 0 -> 577 bytes .../base-spent.png | Bin 0 -> 542 bytes .../base.png | Bin 0 -> 910 bytes .../meta.json | 5 +- .../base-projectile.png | Bin 0 -> 522 bytes .../630_emp_shell_casing.rsi/base-spent.png | Bin 0 -> 580 bytes .../630_emp_shell_casing.rsi/base.png | Bin 0 -> 919 bytes .../meta.json | 5 +- .../emp_shell_casing.rsi/base-spent.png | Bin 792 -> 0 bytes .../emp_shell_casing.rsi/base.png | Bin 883 -> 0 bytes .../large_casing.rsi/base-spent.png | Bin 6910 -> 0 bytes .../SpaceArtillery/large_casing.rsi/base.png | Bin 6944 -> 0 bytes .../shell_casing.rsi/base-spent.png | Bin 795 -> 0 bytes .../SpaceArtillery/shell_casing.rsi/base.png | Bin 887 -> 0 bytes .../space_artillery.rsi/meta.json | 15 + .../space_artillery.rsi/space_artillery.png | Bin 0 -> 3857 bytes .../space_artillery_wallmount.rsi/meta.json | 15 + .../space_artillery.png | Bin 0 -> 6240 bytes 31 files changed, 450 insertions(+), 30 deletions(-) rename Content.Server/{ => _NF}/SpaceArtillery/SpaceArtilleryComponent.cs (100%) rename Content.Server/{ => _NF}/SpaceArtillery/SpaceArtillerySystem.cs (100%) rename Resources/Prototypes/{Entities/Structures => _NF}/SpaceArtillery/actions.yml (100%) rename Resources/Prototypes/{Entities/Structures => _NF}/SpaceArtillery/space_artillery.yml (56%) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi/base.png rename Resources/Textures/_NF/Objects/SpaceArtillery/{large_casing.rsi => 50_armorpiercing_machinegun_casing.rsi}/meta.json (87%) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base.png rename Resources/Textures/_NF/Objects/SpaceArtillery/{shell_casing.rsi => 630_armorpiercing_shell_casing.rsi}/meta.json (87%) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi/base.png rename Resources/Textures/_NF/Objects/SpaceArtillery/{emp_shell_casing.rsi => 630_emp_shell_casing.rsi}/meta.json (87%) delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/base-spent.png delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/base.png delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/base-spent.png delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/base.png delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base-spent.png delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/space_artillery.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/space_artillery.png diff --git a/Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs similarity index 100% rename from Content.Server/SpaceArtillery/SpaceArtilleryComponent.cs rename to Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs diff --git a/Content.Server/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs similarity index 100% rename from Content.Server/SpaceArtillery/SpaceArtillerySystem.cs rename to Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs diff --git a/Resources/Prototypes/Entities/Structures/SpaceArtillery/actions.yml b/Resources/Prototypes/_NF/SpaceArtillery/actions.yml similarity index 100% rename from Resources/Prototypes/Entities/Structures/SpaceArtillery/actions.yml rename to Resources/Prototypes/_NF/SpaceArtillery/actions.yml diff --git a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml similarity index 56% rename from Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml rename to Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml index 863c691a604..139bcff61e0 100644 --- a/Resources/Prototypes/Entities/Structures/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml @@ -24,7 +24,7 @@ - type: Transform anchored: true - type: Sprite - sprite: Structures/space_artillery.rsi + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi layers: - state: space_artillery - type: Anchorable @@ -119,7 +119,7 @@ - type: Transform anchored: true - type: Sprite - sprite: Structures/space_artillery.rsi + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi layers: - state: space_artillery - type: Anchorable @@ -209,7 +209,7 @@ - type: Transform anchored: true - type: Sprite - sprite: Structures/space_artillery.rsi + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi layers: - state: space_artillery - type: Anchorable @@ -291,7 +291,7 @@ - type: Transform anchored: true - type: Sprite - sprite: Structures/space_artillery.rsi + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi layers: - state: space_artillery - type: Anchorable @@ -309,7 +309,100 @@ - type: BallisticAmmoProvider autoCycle: true capacity: 1 - proto: CartridgeShellSolid + proto: CartridgeShellArmorPiercing + whitelist: + tags: + - CartridgeShell + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: Gun + fireRate: 1 + projectileSpeed: 30 + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + powerChargeRate: 2000 + powerUsePassive: 3000 + isPowerRequiredForSignal: true + isPowerRequiredToFire: false + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: ApcPowerReceiver + powerLoad: 3000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + + +- type: entity + id: Artillery_Gun_630_WallMounted + name: artillery gun 630cal wallmounted + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Fires 630 caliber shells. Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Tag + tags: + - Wall + - type: Airtight + - type: Occluder + boundingBox: "-0.1,-0.5,0.5,0.5" + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + density: 600 + mask: + - FullTileMask + layer: + - WallLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: AmmoCounter + - type: Battery + maxCharge: 1000000 + startingCharge: 1000000 + - type: ExaminableBattery + - type: BallisticAmmoProvider + autoCycle: true + capacity: 1 + proto: CartridgeShellArmorPiercing whitelist: tags: - CartridgeShell @@ -350,11 +443,13 @@ powerLoad: 3000 - type: ExtensionCableReceiver - type: BatterySelfRecharger + - type: RadiationBlocker + resistance: 8 - type: entity - id: Mounted_Machine_Gun_60 - name: mounted machine gun 60 + id: Mounted_Machine_Gun_50 + name: mounted machine gun 50 parent: ConstructibleMachine description: It's like from 20th century second planet wars! Puts down suppressive fire. With enough shots turns hull into swiss cheese. Old and reliable. placement: @@ -378,7 +473,7 @@ - type: Transform anchored: true - type: Sprite - sprite: Structures/space_artillery.rsi + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi layers: - state: space_artillery - type: Anchorable @@ -397,7 +492,7 @@ proto: CartridgeMachineGun whitelist: tags: - - CartridgeAntiMateriel + - CartridgeMachineGun - type: ContainerContainer containers: ballistic-ammo: !type:Container @@ -424,6 +519,196 @@ position: Stand buckleOffset: "0,0.8" maxBuckleDistance: 1 + +- type: entity + id: Mounted_Machine_Gun_50_WallMounted + name: mounted machine gun 50 wallmounted + parent: ConstructibleMachine + description: It's like from 20th century second planet wars! Puts down suppressive fire. With enough shots turns hull into swiss cheese. Old and reliable. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 90 + - type: Battery + maxCharge: 200000 + startingCharge: 200000 + - type: ExaminableBattery + - type: Appearance + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: BallisticAmmoProvider + autoCycle: true + capacity: 120 + proto: CartridgeMachineGun + whitelist: + tags: + - CartridgeMachineGun + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + - type: Gun + fireRate: 5 + projectileSpeed: 30 + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + powerChargeRate: 1500 + powerUsePassive: 500 + isPowerRequiredForMount: false + isPowerRequiredToFire: false + isPowerRequiredForSignal: true + - type: BatterySelfRecharger + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Tag + tags: + - Wall + - type: Airtight + - type: Occluder + boundingBox: "-0.1,-0.5,0.5,0.5" + - type: RadiationBlocker + resistance: 8 + - type: ApcPowerReceiver + powerLoad: 3000 + - type: ExtensionCableReceiver + +- type: entity + id: Railgun_WallMounted + name: railgun 1000 cal wallmounted + parent: ConstructibleMachine + description: A rather new invention. Fires 1000 caliber solid rails. Wrecks through hull. You don't want to be on the receiving end. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Tag + tags: + - Wall + - type: Airtight + - type: Occluder + boundingBox: "-0.1,-0.5,0.5,0.5" + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + density: 600 + mask: + - FullTileMask + layer: + - WallLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: AmmoCounter + - type: Battery + maxCharge: 1000000 + startingCharge: 1000000 + - type: ExaminableBattery + - type: BallisticAmmoProvider + autoCycle: true + capacity: 1 + proto: CartridgeRailArmorPiercing + whitelist: + tags: + - CartridgeRail + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: Gun + fireRate: 1 + projectileSpeed: 70 + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + powerChargeRate: 14000 + powerUsePassive: 6000 + powerUseActive: 500000 + isPowerRequiredForSignal: true + isPowerRequiredToFire: true + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: ApcPowerReceiver + powerLoad: 6000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + - type: RadiationBlocker + resistance: 8 + # Space Artillery projectiles @@ -443,9 +728,9 @@ lifetime: 20 #roughly 600m range - type: Sprite - sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + sprite: _NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi layers: - - state: frag-emp + - state: base-projectile - type: EmpOnTrigger range: 4 energyConsumption: 50000 @@ -466,16 +751,18 @@ proto: BulletShellEmp deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/emp_shell_casing.rsi + sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] - type: Appearance - type: SpentAmmoVisuals + - type: SpaceGarbage + #Solid Shell - type: entity - id: BulletShellSolid + id: BulletShellArmorPiercing name: shell parent: BaseBulletTrigger noSpawn: true @@ -489,9 +776,9 @@ lifetime: 20 #roughly 600m range - type: Sprite - sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi layers: - - state: frag-emp + - state: base-projectile - type: ExplodeOnTrigger - type: Explosive explosionType: Default @@ -505,8 +792,8 @@ energy: 0.5 - type: entity - id: CartridgeShellSolid - name: 630 Solid shell + id: CartridgeShellArmorPiercing + name: 630 Armor-Piercing shell parent: BaseItem description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. components: @@ -516,36 +803,37 @@ - type: Item size: 60 - type: CartridgeAmmo - proto: BulletShellSolid + proto: BulletShellArmorPiercing deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/shell_casing.rsi + sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] - type: Appearance - type: SpentAmmoVisuals + - type: SpaceGarbage -#.60 call for machine gun +#.50 call for machine gun - type: entity id: BulletMachineGun - name: 60 Machine Gun bullet + name: 50 Machine Gun bullet parent: BaseBulletTrigger noSpawn: true components: - type: Projectile damage: types: - Structural: 30 + Structural: 35 #currently explosion deals roughly ? damage - type: TimedDespawn lifetime: 20 #roughly 600m range - type: Sprite - sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi layers: - - state: frag-emp + - state: base-projectile - type: ExplodeOnTrigger - type: Explosive explosionType: Default @@ -560,22 +848,79 @@ - type: entity id: CartridgeMachineGun - name: 60 Machine Gun cartridge + name: 50 Machine Gun cartridge parent: BaseItem description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. components: - type: Tag tags: - - CartridgeAntiMateriel + - CartridgeMachineGun - type: Item size: 2 - type: CartridgeAmmo proto: BulletMachineGun deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/large_casing.rsi + sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#1000 cal Railgun Rails + +- type: entity + id: BulletRailArmorPiercing + name: rail + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 10000 + #currently explosion deals roughly 22.5 damage + - type: TimedDespawn + lifetime: 34 + #roughly 1000m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 64 + intensitySlope: 32 + totalIntensity: 96 + maxTileBreak: 2 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeRailArmorPiercing + name: 1000 Armor-Piercing rail + parent: BaseItem + description: A 1000 caliber rail designed for the Railgun. Is made out of solid plasma infused tungsten rod. Punches through hull like butter. + components: + - type: Tag + tags: + - CartridgeRail + - type: Item + size: 120 + - type: MultiHandedItem + - type: CartridgeAmmo + proto: BulletRailArmorPiercing + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] - type: Appearance - type: SpentAmmoVisuals + - type: SpaceGarbage \ No newline at end of file diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 7430000eb21..bf306175c7c 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -280,9 +280,25 @@ - type: Tag id: CartridgeRocket +# Space Artillery ammunition - type: Tag id: CartridgeShell +- type: Tag + id: CartridgeMachineGun + +- type: Tag + id: CartridgeRailgun + +- type: Tag + id: CartridgeCoolant + +- type: Tag + id: CartridgeGPMG + +- type: Tag + id: CartridgeNitroExpress + # Allows you to walk over tile entities such as lava without steptrigger - type: Tag id: Catwalk diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..c16c990a5fb7af41030eb48ec1d0cb719c599c29 GIT binary patch literal 1333 zcmV-51>#rZtXFJtc0z4^aIyL$Pfmw%~xJ(Uvh##^5@ zvMibR{i)||+j$jWn?1nS(0+#c1L|KOqSL#sy|J~=FgU>zmStZ_)9eK(U{0jZ|1!G0 zhx!icgM&l#{_3wl*EAPiyky03ynr2V%+D{r;=1ld+ji@&>j}ufw7KLtXD>c}#h0tL zZGVHd_3?)dRN^>e@6)bpzlJZ5 zqke_@J*w8CodAI4)~=vFnPu6O+U$_* z5BU1aPl&ROT455hYf^MgX^&XNQ&&O0fMGUV{nSw2?zdQ2N&)227Fe{6T zC*{nUhsDO258fXhF}dGb35cT*n342wm*L?dg^??#sUSC!APA+^+LKPZTR6n~nzMxx zMh=?LMXdysJ|Ipak*-LsHeD!!JI*9%KOg+g{+rYumEEzB97lNF-xk>?bE%fSUm=weP%7bQ z>6gIyimbO(NIHGo{uSW72$QmLBoB<|6Qp95DTzU3%Ni962c-B@(jT9 z7$pu$6b~Y1e9-$xR;qyg6B96%&~EP(c>(SHa3$;?J-P3dDxh389UvVY{v!bRq;PhQ z;}irOtb}s(WZPpQ;9m%oK99yCoCEF^X|nIv@IJt0@w8a4{c|11N`T4-91uVf+C^lb z68N7%Ri#1#)NZOsFznc94!qBU6O|*V&HrC1K!K*L%UbR-!74Q<*_R2>9d81$%@-aN zZY1z$I0@!)7bqC8Z#qTS^Chz&eVhXZ84eFP;7<1eUWS8^vXBI1wt1{BP!Ht}+a8Y0 z>=QUQPbE#-l2ib^T$X7K1BL;^fMLKeU>GnA7zPXjh5^HXVZbn87%&VN1`Gp+0mFb{ rz%XDKFbo(53GnZeZXa%PhhJyp!)y00000NkvXXu0mjf_gHoc literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-spent.png new file mode 100644 index 0000000000000000000000000000000000000000..32c38257a3dd15a4f904f34fc846fcef9e3d41bb GIT binary patch literal 819 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GGLLkg|>2BR01_q|5 zo-U3d6^w6Z?(e$lAad;d8I|v1U9HhN5uA&f6mDmwK2=`BufP#@i=)e~;aZYr)7q!o zesg6jnw2T7X+7Jtsl0gd8TtLjp3~MIQmS^kVmy8F%#>&6&itI4A2dfGGmy#4fm4G~ zbpgwi2B84rI6t;?N_c*scW39!ihnhZxfhEzw5mo~C|&+;5grgZ<%wa^RUy-jzuRAy ze=jQc&zaw<(y;pKa~s>;hvh^HYC4boob*B_tNnM2pRkqnCl_|pi;7ut_6#Q`bHutZ z{^*vzDa`G^#yI5A{EAVfJ3`uJzC6nx#YOy|Jam{JDy?E@*7#(3PT#sYph}|Ve4=mLC&2@; z-}xH87|vsgWB9W_$MVl2j$aZT>kMC?6g{x!u<^lXA&kNf^S%nLYKUx4Z#uh@Nv*-= zwQ30CX1?<*vx8ZE7%H!MuV6}(oyTeR{l2z?iDDDOy8}Fvl&%NHH$E-lcy+N!=9D5^ zP2=0cF3l>u4+Mo4Ej9gSDCEH3R&!y-_c?4XKLaCvuj8#_uUs7LC_TG)jlal&&)=)> zSA4wApa0&Ob>ih@OXnW9@bA&D=Wh_CR|?{e?DF6oYc{q5MHNb!$H)fFyBD|nyjOe&kh zZO8e*+F{W#Wz%~VeiP$Y)b9COQoZ_+#P?T+m*35Max>nQF=2Opl2=;j&t9(k&Jo{q zKEE+v&A|L=;`_<_V~&bQo=|&Z*OvEKkpJ=Y6&@4W3VO@WUi`Y@@p~Edz31}2np{ZB kfB1uGhTg(!O1=-wnUxM{&wi8N0n7yqp00i_>zopr01JI+;s5{u literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base.png b/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..6b6db59ce0c838c2f5979d2a404451000acbcfa5 GIT binary patch literal 1899 zcmV-x2bB1UP)C(6a1fX_`F^ z25bAHWFxAbzXI{7BI39$>`v(SwUvOP_ziqp{uImZFK)1Q% zIeS+hzoBs4w(T#GPab*qz%=ieOs>g?^VzVpgY0q06JZ$aaGc&XP!P&nO2~pdPbH2s z*52Z}_Dd+-2l)*04a8_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Sk82E@G>&4O&j7{g` zj6c-=JN)52|IcF+)=!qY$3Dw(Bl8T2f5sm+6;FCA(ivLm1WeExl614&C9`0oxd zssW$-hoa$Hc;|hbHeSg(1{L6}l1H&nMJ}5G&M&Ak(8!TOh0?=Ed8blfjO_d@a`$B_Sh2?@ZHmrt|Pmg)h`!Uz`$ zK%KiTJ7YRTqy{3ov4ZlGY!CPVuIq+rr+E`d05gUO zb3P4oHVdXVB?PIILUh4s&K2FVAnp10bSbUf;4paUJE25_WgWsNK~` zud1RZ1)dxq38!m?zhAr4k+tCA@#%x4MYb*pOdR+#4txQUK!2sITw0z00000qk{udhlDk2>u9ffS1o7q|5{|ceN z>F%Zo0e7GZ)xqV#mVm0@ZeuMJ2{M7gSrsf)=vI^yavGCiFAizcBPT|Q|F$YMw2%~%A&(*qvAUB8kDC`^TO z%jUBi&~3u5qk0TU1UNUL>)dHR(=?qq;PDygl{5!(*$iT;3a!zEVQ^;{1&Zo1CJ`8) z7y(S6UT+}Qh)D(Hf_RY#*s@!^g=Vwqgbi~hkO)N8IO2nSi1(+!A|*+J)JhI{5`nAh zA}W?@tIfvBK5=L0?XzmF+G*X;`}tuFN&m7)n-isuCJ{MtzL1qU$s_~ ky`baf{*~m5EM2dFUjs~*cFb`JWB>pF07*qoM6N<$f+r3O0{{R3 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi/meta.json similarity index 87% rename from Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/meta.json rename to Resources/Textures/_NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi/meta.json index 632f148dc68..16745049c94 100644 --- a/Resources/Textures/_NF/Objects/SpaceArtillery/large_casing.rsi/meta.json +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi/meta.json @@ -12,6 +12,9 @@ }, { "name": "base-spent" - } + }, + { + "name": "base-projectile" + } ] } \ No newline at end of file diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..ef0a8f9d8b63a8943c3b091da87e07cb07474378 GIT binary patch literal 577 zcmV-H0>1r;P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc0oF-GK~z{r?Uc)E z+dveC|Cy0Ay0n;3H@(n(HeMM+wtbg8lwZM*(nXA+V1f-<1bQJ^6xXU`S+~g?Wl~IN z=}byi(Ffw_GMe*g=IEfOr{~$jOtfY)nW!{P(Y7t5l!)UPK@fCtI2>Xy7+^Y`TF=W( zw1yHNqLeacKwZ~pn#Nq&;VeK&C@EuiA4%sVMTx7b>JAs21rERXAtdr}h5m(e4V(?% zsbkI&366pA@xc%AR{A*A*O_2gR5dZwFW P00000NkvXXu0mjfdz}G? literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi/base-spent.png new file mode 100644 index 0000000000000000000000000000000000000000..2b362cf78e0f3a7a449ffa0cbfb4eff3531ffd02 GIT binary patch literal 542 zcmV+(0^$9MP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc0kcU&K~z{r?Ul<) z!$1^<|E9V1qV%Gmwu+!t7eW_;APOyReE<=4;ZA%Yapyusd;qsXK@kLZqGDW#_6FLf zG`*xXc1%LB3Kly;aA7_O!};fuKa)9U;Nalk@YlGkwkwEEHk*YcNhp`gkYyQ)qF`cj z3^&(zh{xkdCX-ZaGFIC)EX#u9IPg3VhGEQy<9M`ME#&h#YgG48xm{UaB9Wnf1bY1t zMZr=5Rc)YDt{{_r#^KSij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TB-i{_QCKd zx7Z70S*(>VpJx14odjSuq&0t12nhrnN41=w9} Skawa00000n{2MT3x&deML&BxoeY#LaH9o88UsJbRvPO-~jtIZUnbV6na3^i)@URn=Wp z!2e8=sMTu8<>h5Lt{wWg2T$tU*Z|Trm5oLNTU%Rj90yBFOJjLqEC7Y_<2hhG8gn+qN+~JBwPa2G8@by1L2{qj)v$i7X7|kDps;H=5|QyXtt4LeTdd zxb9E^SzKJKESK$p+bbJNsk18(^gM*!eZ+we;kbx=hiebm0FWPDo1BcyB{Zq40Tf2_ zuM{6ZmMbgsJV!D9me>F?WTj4BLf3UjGMw@eG@3Py{RsFWFtyUnq@N;SfM6&P*3`5D z68Rp>DQpi+9=Y9<8O$s}El-isD9AK4q&hDwYyj(@-YI3?;1IDhMCQ?mN~_~AKoa`u zd(}TSfVqqFO19J9MQE9D^B6*l)m|QYNVC!#{|vx(Fp2th(+mv$oG*1 zVO8CVkL`i^8<*5Ur*j&9?*Q@O98#}TDtt;#p^L+f&y_*20X(|$5<9y+v}_l9mcU># zfKR!hc#`|BgD*QntW{P|7ni}SSeu;|TAc*lo(th?uyqTGme4wat>v)m7E2@>z{6)v z#A$>;#PH(s@O>6)?VPHtf&J#KYep!5i z$UrD9q)K_fa#7`2jikzCC_^Vi_n@zu(PBRkLUlrs$nfOBUA*|PSy?XI1K;1=L1S-- zK80YvQ|5ioPvMIcVHm5*I09Q`W&<#chzfs3r8tIelp)ZK3>wwvq9-uz@@ZC4UhuF1 zXh$tsk@@JS$e=Pjq6vL+w5&A$Ia!GvI6re1*XHW-^3@rLD8-ajr-T&1o-nbwF~GM* zptYz}S0&z?sVbGh#|}XuTet~KdUjKmrK~T!K)spTXXsX}>=4|$byHrrej2BybJS}l twP6M|AsK>%UV^J*ciqALw=0$9{szhNoI3(Nyo~?=002ovPDHLkV1iUktd{@) literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi/meta.json similarity index 87% rename from Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/meta.json rename to Resources/Textures/_NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi/meta.json index 632f148dc68..16745049c94 100644 --- a/Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/meta.json +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi/meta.json @@ -12,6 +12,9 @@ }, { "name": "base-spent" - } + }, + { + "name": "base-projectile" + } ] } \ No newline at end of file diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/emp_shell_casing.rsi/base-spent.png deleted file mode 100644 index 7f54a7309b48a97ab8f79e5d3eaae73174f5ba9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 792 zcmV+z1LypSP)uk4@D(zv|U~U(3;xOqm+kx`n4T-6#pq3WqjIy5b$-0WBL( z3Lgpk3^}0iwbBy}eo>rh@P}d}8lD5Y>gmb+;lv--vPNEbT-ck>m9^jVsGGP_g{6qp zVVNVCgb5PBLxM8v6fxck z_ELK54=DZ%f2IGV6iRam6k1x^(g>}leq_rSRvM!vp0f}1>6>w9_BjhkNC%_?(gEqf zu{)p)F(3>>erUd77)|PEG(uHXh~s##p4Ma?@Zh>GZc7ekFcd!pu1_pz+I9(5Rk7J@ zKui!iX@tdMQFHq?r~$?pX6zN|cZxG>g2`kG()utSkL#WH#YrF3KoA62J>0?ZPVu#R z!+d_z?6_ToY$v2?+79i!4{E@+Z3NuH=le6f^BH{Khpy{83yK%|73=jHNsF9gq$juLHls W{$MhzYMtc(0000uk4@D(zv|U~U(3;xOqm+kx`n4T-6#pq3WqjIy5b$-0WBL( z3Lgpk3^}0iwbBy}eo>rh@P}d}8lD5Y>gmb+;lv--vPNEbT-ck>m9^jVsGGP_g{6qp zVVNVCgb5PBLxM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AuxH+nZ)#{fQ!3I_XiZL+xhLY5xqKQ#!mbwq+2Ta=Ft(^IaMXUFUrh_cq-^b z{M6WpT?5qYj6V+yYBxXj%({~#OrO1}cl%wP$|{a_+g!CTVd3{}oL{d=i!ObsZ^g1Z z!gmHAxTo|$`Lx#eZa76REdQm$rsIpVwgd+*YrS|;yC=WR9yIIg?t@o-yky3llZQXu zxBd5wd?D$L^6IkKz^YeHhy9%1a&4PMk)yWH4Q(;0cwhG;@5L8(?m25?d>ruk4@D(zv|U~U(3;xOqm+kx`n4T-6#pq3WqjIy5b$-0WBL( z3Lgpk3^}0iwbBy}eo>rh@P}d}8lD5Y>gmb+;lv--vPNEbT-ck>m9^jVsGGP_g{6qp zVVNVCgb5PBLxM8vbsS5W8tX z2wn6e{EK{LzM9OXETN?)o6+9+yi>_%y?(+aW25Y9pDad2ew;kz<<7g}r1xsT_kFBh9&vR&#MkFL zM&og{<7N@Eov__*o1xl!uLf+}#>LM7>-7qEH`hj^oziBpxQFGh7eQZXYJreh}YE zrpacYq6F3m({)|{cTSFu1^cj#r_*V{ro1iwS0gtVXbyI}UF$JqIh?rz+yU+Yci?;- Z_yu(HUxI{-n<@YR002ovPDHLkV1h-gZJq!C diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base.png b/Resources/Textures/_NF/Objects/SpaceArtillery/shell_casing.rsi/base.png deleted file mode 100644 index 60c741e36e061ecf4bb4831148bcbe2e99281d02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmV--1Bm>IP)uk4@D(zv|U~U(3;xOqm+kx`n4T-6#pq3WqjIy5b$-0WBL( z3Lgpk3^}0iwbBy}eo>rh@P}d}8lD5Y>gmb+;lv--vPNEbT-ck>m9^jVsGGP_g{6qp zVVNVCgb5PBLxM8v40effy*@qIM;S*e3T67ETY6Xf~fwTGf$uHoUzV<&@KP9mAm`)(Jug1VLa(bJH}L zIO@b;FbLe7l7Rx~!g=kQy;w=ubRJ;_DWw73IqgQPow?z1^d0niy};kl?cvBB;0|yHxC686zz;}=jfDx88595j N002ovPDHLkV1g_JmXrVh diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/meta.json new file mode 100644 index 00000000000..798889e4759 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da354ba4e28fcaf73002d25cab0da4815808be60", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "space_artillery", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/space_artillery.png b/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery.rsi/space_artillery.png new file mode 100644 index 0000000000000000000000000000000000000000..a33b77621ee3d3dce33464e1b8e0aed37c826b21 GIT binary patch literal 3857 zcmV+s5AN`ZP)^?8c)L5Kuj})GyY5v5|Hy;eO#BE0Z_M=TSFlO4@TV zsa-O=@rW`-1Pz@$t7OPAB-NJ8s{6u4-z-`281i>0;EE$fTD*gz=A~;=swsL>z6=GG z``Ld96-wkoLyEl zeHYF*q4U8>xQU_^lo>Ehcs+&Y1!%j0hNV(g<#kT(A-*n8bPap^&?oy_mVW?65@;%l zlm6HM000SaNLh0L01FZT01FZU(%pXi000e0NklZ|;BZe{Z54tsfUkPO%%G6OVEBpUb z7BFtyxJa#9wS=c`-MTTd9yxME3JVKm&YU?>xq>VpF@}n(!pj6FPMqke>8z}*=)jgt z5Cax3=$F}T(4c{$S>e;u(@S;ZefRF&GHTSQ$lSSeV|XcrT=EjA0B5H$W5z^k)~qQF z8#dG#a5M1IOE0Nn%x|c{owVbX5vWZI-97N(k)(n1TBB>q~KQv8VaLL5&(U zq<{bZ;%6aIF3VWB?Y7&ZJ-+<%%V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sMx*~FG;)1_1;q3>F5FJfCzt9WctIi}e(v0#pniyjW z0arq9#2B54TCaZ2IwIJF=i-5<0!lI|8U!UCUltfNXpkl@=tCTVNV16~HZzQz>0)Aa z)CB>#2(nH@mFW*qu3WitP}frJ@P6jZ8Jig@WeFBBMga)lw{KrDY6&^(BYwn9+Hu>o|VQXGh3Dc=}Y7oAyGh!7A^9V8Yu3SW{C|RZ;kWvH-l3Nm_Smr_B3pw&dpK#&q{o0FLJVlzU|R z;ae6!uO&;C$dDmJVt!*NnhI;Gt4$&UCsbg9m1D<_)s#BQ;UU$IKsI-?cm=LCeoLl$K60#5}H+6D-PvyOOR8iLMWZi2Xh6t#79 z-0dS?h$Dkh);55E%qmL(Tr7g^mYf4tfzT`kuGWxj#ad7f^>$s`af5h62C`LFCfm>c z#;BJqj2xU3xa))YGnn(&iDS!dr64Q{AX!P?KEtf@9zA-Pyg{-Gh4A2zOQf9)bDuta zq;u!aYVx!Nfs-f8BRo3+ne6uLtdH4~%uGZI&ALrDmn6@hKd%>}xbTQKXGUz=*-6A* z1{c7AUAuNomjH=V6k!F%31X_uDzlEmlg;3v#)M`J;uPlD!7QkvDSow zpTU6%OM<2y!#zIl@aDxcviM!t_Ot*Ppu^)Omz-ys?5w${L$xxoYu7F<+kY_TgsNuy zG6paGf7VHwq|}w)&zSFQE>rpOp?&0B(M4JFk36|he7V&1IIPqOmJeneo}Ve%&HRL? zZ;TIc5~R%MaPRINwR-)wUD2$o8;?&_FFd^dHvxPS;74B@9sk^TL7(O^OMn6G^XM-# zBRPM|mIFu6$hAr}qDv8y?^Vo~U!vBSGrMLk24k zzix<8fE(fT$s_9dInK80a Tx;xUa00000NkvXXu0mjf3iD4C literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/meta.json new file mode 100644 index 00000000000..c47ed9a9656 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da354ba4e28fcaf73002d25cab0da4815808be60", + "size": { + "x": 64, + "y": 64 + }, + "states": [ + { + "name": "space_artillery", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/space_artillery.png b/Resources/Textures/_NF/Objects/SpaceArtillery/space_artillery_wallmount.rsi/space_artillery.png new file mode 100644 index 0000000000000000000000000000000000000000..294fe23e449685541a88af4fefb9a4cee4342ca4 GIT binary patch literal 6240 zcmbt&Ra6{I(B&Y(HMm1?C%F5d!Cev{5MUVGoxvS~5AN<7AXtLC2ZzAm5Zv|W+qd0) z+kL3+Q~gl4x~opr?TS=amB&OQMFRi;n2HLrnr}PgKS4oyTYJULMgaggdytHbI>_7{ z0ANaROXyUV)*v1TFwlT*n#w8!2LpqH@MX=3w>2?szRwp3NWe>Q+_KPAODP9W;WS_I zT~W=EHW4C9;mS5O-!_M=t``Qq_vYB^lE`t%Nps0TXbG)K zUJo1S=bC7>Jd94bXQCLKr2SkWey3AA@wglp7+X{>rPqDdR6+*aG}sKSE~xQT^Hdn^ z69`cY@e3nYztcU46z*nLUAR}S$HklsRJpz?G7_BrZ8$K5s)pj@vXuBoFupyKHr*sn z!EKbhpYBrxHRb!{MLK2N?zs+&KkGzg_o++~@=4vQBr@b6?yc)c!^9fJa^~rzi*L-8 ztFL>Yk`jiaH43SHzvimRkNYd(HvJ9$YV4KXNNb#q*$xlriL+xr_ESoB#gO)}jMsUa z`{0cK{T^zh6xiY`H!5LI35rK2jtM-XJO*D^ksf79NVyv2>|555U^)3|h-3h1vBMR{^4Z7b3F>ZAH+Oj(+bExiZsmihj zIQVCh_$e~DvI&=VFNqTZOF-SuD!tk-D`0<$+DaDI?y=Ly029g-gB0cv#(0Q)5A9#v zG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8x~M@zr#-535HKg;So3@>Do0^88PgK_Nyw?T}u}93+l|K#C@KVY^onR(T@U2!#Lc^R(s*0+r*o=xp z`_aSF($ZKdG2WVOf?onH@uYh!g4_NSP3_@q>X$CFF{z Date: Tue, 21 Nov 2023 04:01:04 +0100 Subject: [PATCH 19/32] Space Artillery first coolant system foundations --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 21 + .../SpaceArtillery/SpaceArtillerySystem.cs | 68 +- .../_NF/SpaceArtillery/space_artillery.yml | 684 +++++++++++------- 3 files changed, 506 insertions(+), 267 deletions(-) diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs index adb2d178d71..24360faaf32 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs @@ -8,6 +8,8 @@ namespace Content.Shared.SpaceArtillery; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; using Content.Shared.Actions; using Robust.Shared.Utility; +using Content.Shared.Containers.ItemSlots; +using Content.Shared.Stacks; [RegisterComponent] public sealed partial class SpaceArtilleryComponent : Component @@ -86,4 +88,23 @@ public sealed partial class SpaceArtilleryComponent : Component [DataField("fireActionEntity")] [ViewVariables(VVAccess.ReadWrite)] public EntityUid? FireActionEntity; + + [ViewVariables(VVAccess.ReadWrite), DataField("coolantType", customTypeSerializer:typeof(PrototypeIdSerializer))] + public string CoolantType = "Coolant"; + + public static string CoolantSlotSlotId = "SpaceArtillery-CoolantSlot"; + + [DataField("SpaceArtillery-CoolantSlot")] + public ItemSlot CoolantSlot = new(); + + /// + /// Whether the space artillery need coolant to fire on top of ammunition or power + /// + [DataField("isCoolantRequiredForFire"),ViewVariables(VVAccess.ReadWrite)] public bool IsCoolantRequiredForFire = false; + + /// + /// Stored amount of coolant + /// + [DataField("coolantStored"), ViewVariables(VVAccess.ReadWrite)] + public int CoolantStored = 0; } \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index a087d546bdd..c1603a759f1 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -18,18 +18,25 @@ using Content.Server.Power.EntitySystems; using Content.Shared.Power; using Content.Shared.Rounding; +using Robust.Shared.Containers; +using Content.Shared.Stacks; +using Content.Server.Stack; +using Robust.Shared.Prototypes; +using Content.Shared.Containers.ItemSlots; namespace Content.Shared.SpaceArtillery; public sealed partial class SpaceArtillerySystem : EntitySystem { - + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly ProjectileSystem _projectile = default!; [Dependency] private readonly GunSystem _gun = default!; [Dependency] private readonly SharedCombatModeSystem _combat = default!; //[Dependency] private readonly RotateToFaceSystem _rotate = default!; [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; [Dependency] private readonly SharedBuckleSystem _buckle = default!; + [Dependency] private readonly SharedContainerSystem _containerSystem = default!; + [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; private const float ShootSpeed = 30f; private const float distance = 100; @@ -47,8 +54,24 @@ public override void Initialize() SubscribeLocalEvent(OnFireAction); SubscribeLocalEvent(OnApcChanged); SubscribeLocalEvent(OnBatteryChargeChanged); + SubscribeLocalEvent(OnCoolantSlotChanged); + SubscribeLocalEvent(OnCoolantSlotChanged); + SubscribeLocalEvent(OnComponentInit); + SubscribeLocalEvent(OnComponentRemove); } + + private void OnComponentInit(EntityUid uid, SpaceArtilleryComponent component, ComponentInit args) + { + _itemSlotsSystem.AddItemSlot(uid, SpaceArtilleryComponent.CoolantSlotSlotId, component.CoolantSlot); + } + + private void OnComponentRemove(EntityUid uid, SpaceArtilleryComponent component, ComponentRemove args) + { + _itemSlotsSystem.RemoveItemSlot(uid, component.CoolantSlot); + } + + private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { if(component.IsPowered == true || component.IsPowerRequiredForSignal == false) @@ -215,4 +238,47 @@ private void OnBatteryChargeChanged(EntityUid uid, SpaceArtilleryComponent compo } } } + + private void OnCoolantSlotChanged(EntityUid uid, SpaceArtilleryComponent component, ContainerModifiedMessage args) + { + GetInsertedCoolantAmount(component, out var storage); + + // validating the cash slot was setup correctly in the yaml + if (component.CoolantSlot.ContainerSlot is not BaseContainer coolantSlot) + { + return; + } + + // validate stack prototypes + if (!TryComp(component.CoolantSlot.ContainerSlot.ContainedEntity, out var stackComponent) || + stackComponent.StackTypeId == null) + { + return; + } + + // and then check them against the ATM's CashType + if (_prototypeManager.Index(component.CoolantType) != _prototypeManager.Index(stackComponent.StackTypeId)) + { + return; + } + + var currentCoolant = component.CoolantStored; + component.CoolantStored = currentCoolant + storage; + _containerSystem.CleanContainer(coolantSlot); + } + + private void GetInsertedCoolantAmount(SpaceArtilleryComponent component, out int amount) + { + amount = 0; + var coolantEntity = component.CoolantSlot.ContainerSlot?.ContainedEntity; + + if (!TryComp(coolantEntity, out var coolantStack) || + coolantStack.StackTypeId != component.CoolantType) + { + return; + } + + amount = coolantStack.Count; + return; + } } \ No newline at end of file diff --git a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml index 139bcff61e0..b07f8dcb1fe 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml @@ -1,268 +1,3 @@ -- type: entity - id: Space_Artillery - name: space artillery - parent: ConstructibleMachine - description: It's like from 20th century second planet wars! Old and reliable. - placement: - mode: SnapgridCenter - components: - - type: Clickable - - type: InteractionOutline - - type: Physics - bodyType: Static - - type: Fixtures - fixtures: - fix1: - shape: - !type:PhysShapeAabb - bounds: "-0.25,-0.25,0.25,0.25" - density: 600 - mask: - - MachineMask - layer: - - MachineLayer - - type: Transform - anchored: true - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi - layers: - - state: space_artillery - - type: Anchorable - - type: Pullable - - type: Rotatable - rotateWhilePulling: false - rotateWhileAnchored: true - increment: 45 - - type: Appearance - - type: Storage - capacity: 120 - - type: UserInterface - interfaces: - - key: enum.StorageUiKey.Key - type: StorageBoundUserInterface - - type: ContainerContainer - containers: - storagebase: !type:Container - ents: [] - - type: ContainerAmmoProvider - container: storagebase - - type: PneumaticCannon - gasUsage: 0 - baseProjectileSpeed: 30 - toolModifyPower: Screwing - throwItems: false - - type: DeviceNetwork - deviceNetId: Wireless - receiveFrequencyId: BasicDevice - - type: WirelessNetworkConnection - range: 200 - - type: DeviceLinkSink - ports: - - SpaceArtilleryFire - - SpaceArtillerySafety - - type: DeviceLinkSource - ports: - - SpaceArtilleryFire - - SpaceArtillerySafety - - type: Gun - fireRate: 3 - projectileSpeed: 30 - selectedMode: FullAuto - availableModes: - - SemiAuto - - FullAuto - soundGunshot: - path: /Audio/Effects/thunk.ogg - soundEmpty: - path: /Audio/Items/hiss.ogg - - type: SpaceArtillery - - type: Actions - - type: CombatMode - IsInCombatMode: true - - type: Strap - position: Stand - buckleOffset: "0,0.8" - maxBuckleDistance: 1 - - type: ApcPowerReceiver - powerLoad: 1000 - - type: ExtensionCableReceiver - - type: Battery - maxCharge: 10000 - startingCharge: 5000 - - type: ExaminableBattery - - type: BatterySelfRecharger - - -- type: entity - id: Space_Machine_Gun - name: space machine gun - parent: ConstructibleMachine #base machine powered makes power work but also messes with rotation - description: It's like from 20th century second planet wars! Old and reliable. - placement: - mode: SnapgridCenter - components: - - type: Clickable - - type: InteractionOutline - - type: Physics - bodyType: Static - - type: Fixtures - fixtures: - fix1: - shape: - !type:PhysShapeAabb - bounds: "-0.25,-0.25,0.25,0.25" - density: 600 - mask: - - MachineMask - layer: - - MachineLayer - - type: Transform - anchored: true - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi - layers: - - state: space_artillery - - type: Anchorable - - type: Pullable - - type: Rotatable - rotateWhilePulling: false - rotateWhileAnchored: true - increment: 45 - - type: Appearance - - type: AmmoCounter - - type: Battery - maxCharge: 10000 - startingCharge: 5000 - - type: ExaminableBattery - - type: BallisticAmmoProvider - autoCycle: true - capacity: 60 - proto: CartridgeShellSolid - whitelist: - tags: - - CartridgeShell - - type: ContainerContainer - containers: - ballistic-ammo: !type:Container - ents: [] - - type: DeviceNetwork - deviceNetId: Wireless - receiveFrequencyId: BasicDevice - - type: WirelessNetworkConnection - range: 200 - - type: DeviceLinkSink - ports: - - SpaceArtilleryFire - - SpaceArtillerySafety - - type: DeviceLinkSource - ports: - - SpaceArtilleryFire - - SpaceArtillerySafety - - type: Gun - fireRate: 3 - projectileSpeed: 30 - selectedMode: FullAuto - availableModes: - - SemiAuto - - FullAuto - soundGunshot: - path: /Audio/Effects/thunk.ogg - soundEmpty: - path: /Audio/Items/hiss.ogg - - type: SpaceArtillery - - type: Actions - - type: CombatMode - IsInCombatMode: true - - type: Strap - position: Stand - buckleOffset: "0,0.8" - maxBuckleDistance: 1 - - type: ApcPowerReceiver - powerLoad: 1000 - - type: ExtensionCableReceiver - - type: BatterySelfRecharger - - -- type: entity - id: Space_Ray - name: space ray - parent: ConstructibleMachine - description: It's like from 20th century second planet wars! Old and reliable. - placement: - mode: SnapgridCenter - components: - - type: Clickable - - type: InteractionOutline - - type: Physics - bodyType: Static - - type: Fixtures - fixtures: - fix1: - shape: - !type:PhysShapeAabb - bounds: "-0.25,-0.25,0.25,0.25" - density: 600 - mask: - - MachineMask - layer: - - MachineLayer - - type: Transform - anchored: true - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi - layers: - - state: space_artillery - - type: Anchorable - - type: Pullable - - type: Rotatable - rotateWhilePulling: false - rotateWhileAnchored: true - increment: 45 - - type: Appearance - - type: AmmoCounter - - type: Battery - maxCharge: 100000 - startingCharge: 50000 - - type: ExaminableBattery - - type: HitscanBatteryAmmoProvider - proto: RedMediumLaser - fireCost: 45000 - - type: DeviceNetwork - deviceNetId: Wireless - receiveFrequencyId: BasicDevice - - type: WirelessNetworkConnection - range: 200 - - type: DeviceLinkSink - ports: - - SpaceArtilleryFire - - SpaceArtillerySafety - - type: DeviceLinkSource - ports: - - SpaceArtilleryFire - - SpaceArtillerySafety - - type: Gun - fireRate: 3 - projectileSpeed: 30 - selectedMode: FullAuto - availableModes: - - SemiAuto - - FullAuto - soundGunshot: - path: /Audio/Effects/thunk.ogg - soundEmpty: - path: /Audio/Items/hiss.ogg - - type: SpaceArtillery - - type: Actions - - type: CombatMode - IsInCombatMode: true - - type: Strap - position: Stand - buckleOffset: "0,0.8" - maxBuckleDistance: 1 - - type: ApcPowerReceiver - powerLoad: 1000 - - type: ExtensionCableReceiver - - type: BatterySelfRecharger # Actual Space weapons - type: entity @@ -709,6 +444,295 @@ - type: RadiationBlocker resistance: 8 +- type: entity + id: Military_Laser + name: military laser + parent: ConstructibleMachine + description: Highly focused laser beam designed to melt through hull. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: AmmoCounter + - type: Battery + maxCharge: 100000 + startingCharge: 100000 + - type: ExaminableBattery + - type: HitscanBatteryAmmoProvider + proto: RedMediumLaser + fireCost: 25000 + - type: ItemSlots + - type: ContainerContainer + containers: + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: Gun + fireRate: 3 + projectileSpeed: 30 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + SpaceArtillery-CoolantSlot: + name: SpaceArtillery-CoolantSlot + insertSound: /Audio/Machines/scanning.ogg + ejectSound: /Audio/Machines/tray_eject.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - Stack + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + +#Insert Mining Laser here + +- type: entity + id: Pneumatic_Launcher + name: pneumatic launcher + parent: ConstructibleMachine + description: Utilises internal piston and pressure mechanisms to launch small and medium items forward at large speeds. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: Storage + capacity: 120 + - type: UserInterface + interfaces: + - key: enum.StorageUiKey.Key + type: StorageBoundUserInterface + - type: ContainerContainer + containers: + storagebase: !type:Container + ents: [] + - type: ContainerAmmoProvider + container: storagebase + - type: PneumaticCannon + gasUsage: 0 + baseProjectileSpeed: 70 + toolModifyPower: Screwing + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: Gun + fireRate: 3 + projectileSpeed: 30 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + powerChargeRate: 2000 + powerUsePassive: 1000 + powerUseActive: 10000 + isPowerRequiredForSignal: true + isPowerRequiredToFire: true + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,1.2" + maxBuckleDistance: 1.5 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: Battery + maxCharge: 300000 + startingCharge: 300000 + - type: ExaminableBattery + - type: BatterySelfRecharger + +#Deployable weaponry + +- type: entity + name: General Purpose Machine Gun .35 cal + parent: BaseItem + id: WeaponGPMG + description: Designed for tearing through armored cover of vessels. Utilises .35 caliber ammunition with explosive tip. + components: + - type: Sprite + sprite: Objects/Weapons/Guns/LMGs/l6.rsi + layers: + - state: base + map: ["enum.GunVisualLayers.Base"] + - state: mag-3 + map: ["enum.GunVisualLayers.Mag"] + - type: Item + size: 60 + - type: Clothing + sprite: Objects/Weapons/Guns/LMGs/l6.rsi + quickEquip: false + slots: + - Back + - type: MagazineVisuals + magState: mag + steps: 4 + zeroVisible: true + - type: Appearance + - type: Gun + minAngle: 24 + maxAngle: 45 + angleIncrease: 4 + angleDecay: 16 + fireRate: 8 + selectedMode: FullAuto + availableModes: + - FullAuto + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/lmg.ogg + soundEmpty: + path: /Audio/Weapons/Guns/Empty/lmg_empty.ogg + - type: ChamberMagazineAmmoProvider + soundRack: + path: /Audio/Weapons/Guns/Cock/lmg_cock.ogg + - type: AmmoCounter + - type: MultiHandedItem + - type: ItemSlots + slots: + gun_magazine: + name: Magazine + startingItem: MagazineLightRifleBox + insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg + priority: 2 + whitelist: + tags: + - MagazineLightRifleBox + gun_chamber: + name: Chamber + startingItem: CartridgeLightRifle + priority: 1 + whitelist: + tags: + - CartridgeLightRifle + - type: ContainerContainer + containers: + gun_magazine: !type:ContainerSlot + gun_chamber: !type:ContainerSlot + - type: StaticPrice + price: 500 + - type: UseDelay + delay: 1 + - type: SpaceArtillery + isArmed: true + isPowerRequiredForMount: false + isPowerRequiredToFire: false + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 0 + - type: ExtensionCableReceiver + - type: Battery + maxCharge: 0 + startingCharge: 0 + - type: BatterySelfRecharger + - type: Anchorable + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + + # Space Artillery projectiles @@ -923,4 +947,132 @@ map: ["enum.AmmoVisualLayers.Base"] - type: Appearance - type: SpentAmmoVisuals - - type: SpaceGarbage \ No newline at end of file + - type: SpaceGarbage + + + + +# Coolant object +- type: entity + parent: BaseItem + id: CoolantCartridge + name: coolant cartridge + description: A rather dense package. Utilises reaction of Frezon and Nitrogen to rappidly cool whatever machine it's in. Most often used in Space Armaments or Mining Lasers. + components: + - type: Material + - type: PhysicalComposition + materialComposition: + Coolant: 1 + - type: StaticPrice + price: 0 + - type: Stack + stackType: Coolant + count: 1 + baseLayer: base + layerStates: + - cash + - cash_10 + - cash_100 + - cash_500 + - cash_1000 + - cash_1000000 + - type: Sprite + sprite: Objects/Economy/cash.rsi + state: cash + layers: + - state: cash + map: ["base"] + - type: Physics + bodyType: Dynamic + - type: Fixtures + fixtures: + fix1: + density: 30 + shape: + !type:PhysShapeAabb + bounds: "-0.35,-0.2,0.25,0.1" + mask: + - ItemMask + - type: Appearance + +- type: material + id: Coolant + name: coolant + unit: materials-unit-bill + stackEntity: CoolantCartridge + icon: { sprite: /Textures/Objects/Economy/cash.rsi, state: cash } + price: 500 + +- type: stack + id: Coolant + name: coolant + icon: { sprite: /Textures/Objects/Economy/cash.rsi, state: cash } + spawn: CoolantCartridge + maxCount: 30 + itemSize: 4 + + +- type: entity + parent: CoolantCartridge + id: CoolantCartridge10 + suffix: 10 + components: + - type: Icon + sprite: Objects/Economy/cash.rsi + state: cash_10 + - type: Stack + count: 10 + +- type: entity + parent: CoolantCartridge + id: CoolantCartridge30 + suffix: 30 + components: + - type: Icon + sprite: Objects/Economy/cash.rsi + state: cash_100 + - type: Stack + count: 30 + + +- type: entity + parent: BaseItem + id: CoolantCartridgeHighQuality + name: coolant cartridge high quality + description: A rather dense package. This one was made using very advanced methods. Utilises reaction of Frezon and Nitrogen to rappidly cool whatever machine it's in. Most often used in Space Armaments or Mining Lasers. + components: + - type: Material + - type: PhysicalComposition + materialComposition: + Coolant: 10 + - type: StaticPrice + price: 0 + - type: Stack + stackType: Coolant + count: 1 + baseLayer: base + layerStates: + - cash + - cash_10 + - cash_100 + - cash_500 + - cash_1000 + - cash_1000000 + - type: Sprite + sprite: Objects/Economy/cash.rsi + state: cash + layers: + - state: cash + map: ["base"] + - type: Physics + bodyType: Dynamic + - type: Fixtures + fixtures: + fix1: + density: 30 + shape: + !type:PhysShapeAabb + bounds: "-0.35,-0.2,0.25,0.1" + mask: + - ItemMask + - type: Appearance \ No newline at end of file From 3492fe784adadc780bb32238e9b67c77550a95da Mon Sep 17 00:00:00 2001 From: Qulibly Date: Thu, 23 Nov 2023 16:37:12 +0100 Subject: [PATCH 20/32] Space Artillery basic shuttle wide recoil system added, WIP --- .../SpaceArtillery/SpaceArtillerySystem.cs | 21 +++++++++++++----- .../_NF/SpaceArtillery/space_artillery.yml | 4 ++-- .../SpaceArtillery/mining_laser.rsi/meta.json | 15 +++++++++++++ .../mining_laser.rsi/mining_laser.png | Bin 0 -> 3759 bytes 4 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/mining_laser.png diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index c1603a759f1..e662cd13902 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -11,6 +11,8 @@ using Content.Shared.Interaction; using Robust.Shared.Map; using Robust.Shared.Physics.Components; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Systems; using Content.Shared.Actions; using Content.Shared.Buckle; using Content.Shared.Buckle.Components; @@ -37,6 +39,7 @@ public sealed partial class SpaceArtillerySystem : EntitySystem [Dependency] private readonly SharedBuckleSystem _buckle = default!; [Dependency] private readonly SharedContainerSystem _containerSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; + [Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!; private const float ShootSpeed = 30f; private const float distance = 100; @@ -97,12 +100,20 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, var worldRot = transformComponent.WorldRotation+rotOffset; var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + var _gridUid = transformComponent.GridUid; + if(TryComp(_gridUid, out var gridPhysicsComponent) && _gridUid is {Valid :true} gridUid){ - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); - if(component.IsPowerRequiredToFire == true) - battery.CurrentCharge -= component.PowerUseActive; + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + if(component.IsPowerRequiredToFire == true) + battery.CurrentCharge -= component.PowerUseActive; + + + var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; + _physicsSystem.SetLinearVelocity(gridUid, new Vector2(oldLinearVelocity.X + 1,oldLinearVelocity.Y + 1)); + } } } } diff --git a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml index b07f8dcb1fe..1500ea27c33 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml @@ -470,9 +470,9 @@ - type: Transform anchored: true - type: Sprite - sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + sprite: _NF/Objects/SpaceArtillery/mining_laser.rsi layers: - - state: space_artillery + - state: mining_laser - type: Anchorable - type: Pullable - type: Rotatable diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json new file mode 100644 index 00000000000..ff310a7a1b2 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da354ba4e28fcaf73002d25cab0da4815808be60", + "size": { + "x": 48, + "y": 48 + }, + "states": [ + { + "name": "mining_laser", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/mining_laser.png b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/mining_laser.png new file mode 100644 index 0000000000000000000000000000000000000000..c248f4ac36453c71ecfd7dd71c842761115e34e7 GIT binary patch literal 3759 zcmb7{_dnEuAICp;&dSKh-XkMhb}~bXyF#`Qakj#t>@7q|&O9O_CmDBE&L}d@-g}f0 zXI*EHZ{P2K@O``<&-d%M*W>-e`|)@`UWpH&26R_AuK)l*X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6AuDGBqPGvle=KX98i4wrt> zifO0Y`@YlVX8oG=XqYO$%9ZkGs#$T)DpkrmbJi?`i8W{F8@}LyOvd~c*`K#e$N-cG z2p^#;`1MAX5~oAT?Uq~b%=j-;9^mxT*tFJPNGKMpBUJhaLe^Y+(~n^UK}A5z`kO!{ z9eqC9H83GO$SIQkvW;$2^9b8g61)CTH&@e&vmKar6poMCx&|* zVV}Eo3m>|8UhDIT6C^M)^6$^wagW`xaJlFRn3mItmTOEy8&qUDY`EQoBp2?=7ESB3 z8-eMIgcLH4b*u@|Ei6I|*4?RpU;P|eqd9}9+|xTgR~H2H3({gu;O-ITs=;rWc1KHk zcs!jUJ5V8jYrDLN9dafaEo;4WU4l;h5o?P5>GBmM%a=T#>@-2hXNM(;SH@tZ#KY^( zY_)q27)0QI6ENLxs$>&5F!4I4z#$Yh z_j!GrL8lF#$bp;P)+LEXX;pFpRa^Akwhi9xc0%n(m3G2IW{7K%mt@g?^Epq_G1vYz OP{2?RdZ$vyA?iPtsxz1X literal 0 HcmV?d00001 From 0151d7fa29445b34ae1154c81da4babb5f856dfc Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 24 Nov 2023 12:36:13 +0100 Subject: [PATCH 21/32] Space Artillery basic recoil system to armament has been added --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 37 +++++++++--------- .../SpaceArtillery/SpaceArtillerySystem.cs | 16 +++++++- .../_NF/SpaceArtillery/space_artillery.yml | 9 ++++- .../mining_laser.rsi/capacitor.png | Bin 0 -> 1895 bytes .../SpaceArtillery/mining_laser.rsi/chair.png | Bin 0 -> 786 bytes .../SpaceArtillery/mining_laser.rsi/meta.json | 14 +++++-- .../mining_laser.rsi/mining_laser.png | Bin 3759 -> 0 bytes .../mining_laser.rsi/turret.png | Bin 0 -> 2120 bytes 8 files changed, 52 insertions(+), 24 deletions(-) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/capacitor.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/chair.png delete mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/mining_laser.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/turret.png diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs index 24360faaf32..d138211925c 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs @@ -14,6 +14,25 @@ namespace Content.Shared.SpaceArtillery; [RegisterComponent] public sealed partial class SpaceArtilleryComponent : Component { + [ViewVariables(VVAccess.ReadWrite), DataField("coolantType", customTypeSerializer:typeof(PrototypeIdSerializer))] + public string CoolantType = "Coolant"; + + public static string CoolantSlotSlotId = "SpaceArtillery-CoolantSlot"; + + [DataField("SpaceArtillery-CoolantSlot")] + public ItemSlot CoolantSlot = new(); + + /// + /// Whether the space artillery need coolant to fire on top of ammunition or power + /// + [DataField("isCoolantRequiredForFire"),ViewVariables(VVAccess.ReadWrite)] public bool IsCoolantRequiredForFire = false; + + /// + /// Stored amount of coolant + /// + [DataField("coolantStored"), ViewVariables(VVAccess.ReadWrite)] + public int CoolantStored = 0; + /// /// Whether the space artillery's safety is enabled or not /// @@ -89,22 +108,4 @@ public sealed partial class SpaceArtilleryComponent : Component [ViewVariables(VVAccess.ReadWrite)] public EntityUid? FireActionEntity; - [ViewVariables(VVAccess.ReadWrite), DataField("coolantType", customTypeSerializer:typeof(PrototypeIdSerializer))] - public string CoolantType = "Coolant"; - - public static string CoolantSlotSlotId = "SpaceArtillery-CoolantSlot"; - - [DataField("SpaceArtillery-CoolantSlot")] - public ItemSlot CoolantSlot = new(); - - /// - /// Whether the space artillery need coolant to fire on top of ammunition or power - /// - [DataField("isCoolantRequiredForFire"),ViewVariables(VVAccess.ReadWrite)] public bool IsCoolantRequiredForFire = false; - - /// - /// Stored amount of coolant - /// - [DataField("coolantStored"), ViewVariables(VVAccess.ReadWrite)] - public int CoolantStored = 0; } \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index e662cd13902..97ea207eefc 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -110,9 +110,21 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, if(component.IsPowerRequiredToFire == true) battery.CurrentCharge -= component.PowerUseActive; - + //TODO Add calculation where velocity gained is based on mass + var gridMass = gridPhysicsComponent.FixturesMass; var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; - _physicsSystem.SetLinearVelocity(gridUid, new Vector2(oldLinearVelocity.X + 1,oldLinearVelocity.Y + 1)); + var oldAngularVelocity = gridPhysicsComponent.AngularVelocity; + + if(transformComponent.Anchored == true) + { + _physicsSystem.SetLinearVelocity(gridUid, new Vector2(oldLinearVelocity.X + (30f/(gridMass*0.1f)), oldLinearVelocity.Y + (30f/(gridMass*0.1f)))); + _physicsSystem.SetAngularVelocity(gridUid, oldAngularVelocity + (10f/(gridMass*0.1f))); + } + else + { //TODO, get velocity for the weapon itself separate from shuttle + _physicsSystem.SetLinearVelocity(uid, new Vector2(oldLinearVelocity.X + 1, oldLinearVelocity.Y + 1)); + _physicsSystem.SetAngularVelocity(uid, oldAngularVelocity + 1); + } } } } diff --git a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml index 1500ea27c33..58bd3169619 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml @@ -471,9 +471,16 @@ anchored: true - type: Sprite sprite: _NF/Objects/SpaceArtillery/mining_laser.rsi + granularLayersRendering: true layers: - - state: mining_laser + - state: capacitor + renderingStrategy: SnapToCardinals + - state: chair + renderingStrategy: SnapToCardinals + - state: turret + renderingStrategy: Default - type: Anchorable + delay: 9999 - type: Pullable - type: Rotatable rotateWhilePulling: false diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/capacitor.png b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/capacitor.png new file mode 100644 index 0000000000000000000000000000000000000000..d3a92a929f16734243cbcf7daa82a36e028d7629 GIT binary patch literal 1895 zcmV-t2blPYP);sEECvE&f3Ndus%yG? zx+c>zPGdn+f3JSt_o`l1y{e8)Pfv?xa%*dAW!+6A5@l&Y6Iz23{uk)LJeW-;ld?Oj ztE+<3tLbB`Sw=wn{ke+#9i5-5NTU-p#RvfNZ@xYvZr|F_`!D1D1B2p=YjeUB1POrE zNYS%)CBteU7KE-@Xb1o>UkPE*ouXW<7YMBIQhmab?uyvi`-gCydZmkexVh{5CQ{{}5uV#Js9$XBGs3Ks2YW{lT~lhZO+xmqt6N`XD2KX&0A*>w;D= zHPW{x(rLRPNIsj*N}doN8?%rR>*Bq1PAo31iIwey7)pc>fC{YF2;k{}5#XmJy@XV@ z3cNJ@l|}oiW39E*ys8K{9gMM4!)~o|{^C+_eb6$LNYPwYD+j~zlaJ|BnP(a<>z|$z@ZIuF`rsG=l@K~Z zo)SOgCZ&%w&O`XMWL)$;+#x^2-9S<6t|pA-YK_==+4Qoqk6Hhb4J_-Z}+dTc&0Tg(pt^g0(#UMqvPz z$t0=2CXN8W&dyppX+s1_zwnG*DOa?(WQTYZY~Qg*3g;uf**Ppq`!ka+_|rlNIPt*; zleTiqN=6}d78cX_*XYcZBfw;PyV;o)nEN{LzC@R>8dvFp z*6z>&K?~{3>hYlU1f}cjw5JC$vrgjZu0KfuJM`M{x##)}{ zjZv>22LF<&zGY*(MpXcy8yE?*v$LUUf1O<~C8wsVJ612dhDu|s1Jq81t^L)uFw*>- zp3lr};>HPcOgbdOAE7vr`mjeVr!V}~+L z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Zp z>179Lu|eXYL(Juh5-xOb0~xs7L6sp4(01000hUSV?A0O#mtY000O800000007cc QlK=n!07*qoM6N<$f=lvOtpET3 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json index ff310a7a1b2..cfbc27f97f8 100644 --- a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/meta.json @@ -3,12 +3,20 @@ "license": "CC-BY-SA-3.0", "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da354ba4e28fcaf73002d25cab0da4815808be60", "size": { - "x": 48, - "y": 48 + "x": 32, + "y": 32 }, "states": [ { - "name": "mining_laser", + "name": "turret", + "directions": 4 + }, + { + "name": "chair", + "directions": 4 + }, + { + "name": "capacitor", "directions": 4 } ] diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/mining_laser.png b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/mining_laser.png deleted file mode 100644 index c248f4ac36453c71ecfd7dd71c842761115e34e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3759 zcmb7{_dnEuAICp;&dSKh-XkMhb}~bXyF#`Qakj#t>@7q|&O9O_CmDBE&L}d@-g}f0 zXI*EHZ{P2K@O``<&-d%M*W>-e`|)@`UWpH&26R_AuK)l*XL$FH$v=1aFH{u&<}xx+ z<)2ae-nH@r02-$M0vetRI|BfEN5ebXW0w!yCzXlX2z|-RM5Ocru(_G zRrpxTiZa5eFqIVdgb#tZ;7SNRnD^_SIyDN+{$P>VzX*_ zog~PXM4`E2JgfdKwS&FnutXv;Fh=C22Ud)#m&%O-Od0pLP;Tyt^K`y)jH z;)%QD;m^u{%YQyOIib~6Emu;~sk$!dWt=u#YeH77=Js)<+^!w~!u|b6w-#`k@JlIC zs=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TOEy8&qUDY`EQoBp2?=7ESB3 z8-eMIgcLH4b*u@|Ei6I|*4?RpU;P|eqd9}9+|xTgR~H2H3({gu;O-ITs=;rWc1KHk zcs!jUJ5V8jYrDLN9dafaEo;4WU4l;h5o?P5>GBmM%a=T#>@-2hXNM(;SH@tZ#KY^( zY_)q27)0QI6ENLxs$>&5F!4I4z#$Yh z_j!GrL8lF#$bp;P)+LEXX;pFpRa^Akwhi9xc0%n(m3G2IW{7K%mt@g?^Epq_G1vYz OP{2?RdZ$vyA?iPtsxz1X diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/turret.png b/Resources/Textures/_NF/Objects/SpaceArtillery/mining_laser.rsi/turret.png new file mode 100644 index 0000000000000000000000000000000000000000..8ca32e73569e152f69596f294c373c94b57ac3eb GIT binary patch literal 2120 zcmV-O2)Fl%P)%X;Dy%G|&dY#rK_gIX^e| z&wFp?zgLssANc>hxijz1z31M!Gw;r8GAmsA`uc(-n39RN|4|cJcgoED`nNU9kry^r%`^1XEqmX-WvWUG zxmmRUFyKY*Z}mx<0t6$T0#gRlC1e_`S^%Illz;lb0~P=u4`AQ%vOfs90O)=D^-4#_ z6J~byiaGP)r@;}}YUWvdJRmJdCJhq|z^UWyVmZ1PDR0a}_g^%Ue&Y08VPL?uS>(M- zA-0c~{o_Fp08p~l65mI%#BK_q7KNzf1;Os_7A7m3+M2Dd<*8|NU|+leI{s0!q34}` zD-MjZ-33k(EeHTaVa!Dq&NhC?|+>zm4dG7?52fu6;Li?w2#LLg*_5F7G;Ws}&Z@c448rtPc zQW`(m=H&rUM$UHzBiA6X2>ar>yulDk;*AeiC<)6OGhr=_LaWPuF1eCu-X4&|;J=_x zOiWaVq2eUSy6opGmzM{CnOuXh=XYPQ{pwkd(*$m9ZM7bN-@$_i4HV@x zfJabq_DkcX+q^vh>oI=VZ9#cg0Uhn^>*^CqgHkBGLRsANCzY4|e8=(j07lynzStGb zLu2Qlc1KvlwqM#|z2ols9i~*8sf>(_)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_F24E}61uxjewd9Lm#L z^&E^!We{U<>P$ZLraTI3nF|GgOCmGJu$*4zv;bLkF0bq-18df^KJA49fB_+}UXQt2 zgiHkr4{s_GPz_2h0O+Dr9M*<~7z21lAXWyi?}c=pfPmIBrL@Ajo+}6q7DFjfaF-{TVzlyLWc&A1_BKP8VEEHSStwp y3)1vbC<@&2+W-In4rN$LW=%~1DgXcg2mk;800000(o>TF0000 Date: Mon, 4 Dec 2023 22:59:58 +0100 Subject: [PATCH 22/32] Space Artillery added working space recoil system --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 25 +++++++++++++++++++ .../SpaceArtillery/SpaceArtillerySystem.cs | 20 ++++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs index d138211925c..8357f140e50 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs @@ -81,6 +81,31 @@ public sealed partial class SpaceArtilleryComponent : Component [DataField("powerUseActive"), ViewVariables(VVAccess.ReadWrite)] public int PowerUseActive = 6000; + + /// + /// Amount of power used when firing + /// + [DataField("linearRecoilGrid"), ViewVariables(VVAccess.ReadWrite)] + public float LinearRecoilGrid = 30; + + /// + /// Amount of power used when firing + /// + [DataField("angularInstabilityGrid"), ViewVariables(VVAccess.ReadWrite)] + public float AngularInstabilityGrid = 10; + + /// + /// Amount of power used when firing + /// + [DataField("linearRecoilWeapon"), ViewVariables(VVAccess.ReadWrite)] + public float LinearRecoilWeapon = 60; + + /// + /// Amount of power used when firing + /// + [DataField("angularInstabilityWeapon"), ViewVariables(VVAccess.ReadWrite)] + public float AngularInstabilityWeapon = 30; + /// /// Signal port that makes space artillery fire. diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index 97ea207eefc..f66e8c86212 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -25,6 +25,7 @@ using Content.Server.Stack; using Robust.Shared.Prototypes; using Content.Shared.Containers.ItemSlots; +using Robust.Shared.Random; namespace Content.Shared.SpaceArtillery; @@ -40,6 +41,7 @@ public sealed partial class SpaceArtillerySystem : EntitySystem [Dependency] private readonly SharedContainerSystem _containerSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!; + [Dependency] private readonly IRobustRandom _random = default!; private const float ShootSpeed = 30f; private const float distance = 100; @@ -74,7 +76,7 @@ private void OnComponentRemove(EntityUid uid, SpaceArtilleryComponent component, _itemSlotsSystem.RemoveItemSlot(uid, component.CoolantSlot); } - +//TODO move firing system into separate function private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { if(component.IsPowered == true || component.IsPowerRequiredForSignal == false) @@ -111,14 +113,26 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, battery.CurrentCharge -= component.PowerUseActive; //TODO Add calculation where velocity gained is based on mass + //TODO Calculation for linear velocity direction with rotation var gridMass = gridPhysicsComponent.FixturesMass; var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; var oldAngularVelocity = gridPhysicsComponent.AngularVelocity; if(transformComponent.Anchored == true) { - _physicsSystem.SetLinearVelocity(gridUid, new Vector2(oldLinearVelocity.X + (30f/(gridMass*0.1f)), oldLinearVelocity.Y + (30f/(gridMass*0.1f)))); - _physicsSystem.SetAngularVelocity(gridUid, oldAngularVelocity + (10f/(gridMass*0.1f))); + var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilGrid * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilGrid * (float) Math.Cos(worldRot)); + var recoilX = (worldPosX - targetSpotRecoil.X); + var recoilY = (worldPosY - targetSpotRecoil.Y); + var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/gridMass), oldLinearVelocity.Y + (recoilY/gridMass)); + + var randomAngularInstability = _random.Next((int) -component.AngularInstabilityGrid, (int) component.AngularInstabilityGrid); + var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/gridMass); + + _physicsSystem.SetLinearVelocity(gridUid, newLinearVelocity); + _physicsSystem.SetAngularVelocity(gridUid, newAngularVelocity); + + Sawmill.Info($"Space Artillery recoil. RecoilX: {recoilX} RecoilY: {recoilY} Instability: {randomAngularInstability}"); + Sawmill.Info($"Space Artillery recoil. LinearVelocityX: {newLinearVelocity.X}/{oldLinearVelocity.X} LinearVelocityY: {newLinearVelocity.Y}/{oldLinearVelocity.Y} AngularInstability: {newAngularVelocity}/{oldAngularVelocity}"); } else { //TODO, get velocity for the weapon itself separate from shuttle From bbc582b5498cc5b831b270b0e20f34ceac1799d4 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Wed, 6 Dec 2023 04:04:05 +0100 Subject: [PATCH 23/32] Space Artillery fixing power and coolant, fixes to space recoil --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 8 +- .../SpaceArtillery/SpaceArtillerySystem.cs | 186 ++++++++++-------- .../_NF/SpaceArtillery/space_artillery.yml | 18 +- 3 files changed, 124 insertions(+), 88 deletions(-) diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs index 8357f140e50..3a51bfeec78 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs @@ -25,7 +25,7 @@ public sealed partial class SpaceArtilleryComponent : Component /// /// Whether the space artillery need coolant to fire on top of ammunition or power /// - [DataField("isCoolantRequiredForFire"),ViewVariables(VVAccess.ReadWrite)] public bool IsCoolantRequiredForFire = false; + [DataField("isCoolantRequiredToFire"),ViewVariables(VVAccess.ReadWrite)] public bool IsCoolantRequiredToFire = false; /// /// Stored amount of coolant @@ -33,6 +33,12 @@ public sealed partial class SpaceArtilleryComponent : Component [DataField("coolantStored"), ViewVariables(VVAccess.ReadWrite)] public int CoolantStored = 0; + /// + /// Maximum amount of coolant that can fit + /// + [DataField("maxCoolantStored"), ViewVariables(VVAccess.ReadWrite)] + public int MaxCoolantStored = 90; + /// /// Whether the space artillery's safety is enabled or not /// diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index f66e8c86212..8f308adbf0b 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -68,6 +68,7 @@ public override void Initialize() private void OnComponentInit(EntityUid uid, SpaceArtilleryComponent component, ComponentInit args) { + if(component.IsCoolantRequiredToFire == true) _itemSlotsSystem.AddItemSlot(uid, SpaceArtilleryComponent.CoolantSlotSlotId, component.CoolantSlot); } @@ -88,58 +89,9 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, { if((component.IsPowered == true && battery.Charge >= component.PowerUseActive) || component.IsPowerRequiredToFire == false) { - var xform = Transform(uid); - - if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + if((component.IsCoolantRequiredToFire == true && component.CoolantStored >= 1) || component.IsCoolantRequiredToFire == false) { - return; - } - - if(TryComp(uid, out var transformComponent)){ - - var worldPosX = transformComponent.WorldPosition.X; - var worldPosY = transformComponent.WorldPosition.Y; - var worldRot = transformComponent.WorldRotation+rotOffset; - var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - - var _gridUid = transformComponent.GridUid; - if(TryComp(_gridUid, out var gridPhysicsComponent) && _gridUid is {Valid :true} gridUid){ - - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); - if(component.IsPowerRequiredToFire == true) - battery.CurrentCharge -= component.PowerUseActive; - - //TODO Add calculation where velocity gained is based on mass - //TODO Calculation for linear velocity direction with rotation - var gridMass = gridPhysicsComponent.FixturesMass; - var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; - var oldAngularVelocity = gridPhysicsComponent.AngularVelocity; - - if(transformComponent.Anchored == true) - { - var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilGrid * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilGrid * (float) Math.Cos(worldRot)); - var recoilX = (worldPosX - targetSpotRecoil.X); - var recoilY = (worldPosY - targetSpotRecoil.Y); - var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/gridMass), oldLinearVelocity.Y + (recoilY/gridMass)); - - var randomAngularInstability = _random.Next((int) -component.AngularInstabilityGrid, (int) component.AngularInstabilityGrid); - var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/gridMass); - - _physicsSystem.SetLinearVelocity(gridUid, newLinearVelocity); - _physicsSystem.SetAngularVelocity(gridUid, newAngularVelocity); - - Sawmill.Info($"Space Artillery recoil. RecoilX: {recoilX} RecoilY: {recoilY} Instability: {randomAngularInstability}"); - Sawmill.Info($"Space Artillery recoil. LinearVelocityX: {newLinearVelocity.X}/{oldLinearVelocity.X} LinearVelocityY: {newLinearVelocity.Y}/{oldLinearVelocity.Y} AngularInstability: {newAngularVelocity}/{oldAngularVelocity}"); - } - else - { //TODO, get velocity for the weapon itself separate from shuttle - _physicsSystem.SetLinearVelocity(uid, new Vector2(oldLinearVelocity.X + 1, oldLinearVelocity.Y + 1)); - _physicsSystem.SetAngularVelocity(uid, oldAngularVelocity + 1); - } - } + TryFireArtillery(uid, component, battery); } } } @@ -196,33 +148,15 @@ private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, Fire { if((component.IsPowered == true && battery.Charge >= component.PowerUseActive) || component.IsPowerRequiredToFire == false) { - if (args.Handled) - return; - - var xform = Transform(uid); - - if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + if((component.IsCoolantRequiredToFire == true && component.CoolantStored >= 1) || component.IsCoolantRequiredToFire == false) { - return; - } - - if(TryComp(uid, out var transformComponent)){ - - var worldPosX = transformComponent.WorldPosition.X; - var worldPosY = transformComponent.WorldPosition.Y; - var worldRot = transformComponent.WorldRotation+rotOffset; - var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - - EntityCoordinates targetCordinates; - targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); - if(component.IsPowerRequiredToFire == true) - battery.CurrentCharge -= component.PowerUseActive; - } + if (args.Handled) + return; - - args.Handled = true; + TryFireArtillery(uid, component, battery); + + args.Handled = true; + } } } } @@ -280,7 +214,7 @@ private void OnCoolantSlotChanged(EntityUid uid, SpaceArtilleryComponent compone { GetInsertedCoolantAmount(component, out var storage); - // validating the cash slot was setup correctly in the yaml + // validating the coolant slot was setup correctly in the yaml if (component.CoolantSlot.ContainerSlot is not BaseContainer coolantSlot) { return; @@ -293,15 +227,107 @@ private void OnCoolantSlotChanged(EntityUid uid, SpaceArtilleryComponent compone return; } - // and then check them against the ATM's CashType + // and then check them against the Armament's CoolantType if (_prototypeManager.Index(component.CoolantType) != _prototypeManager.Index(stackComponent.StackTypeId)) { return; } var currentCoolant = component.CoolantStored; - component.CoolantStored = currentCoolant + storage; - _containerSystem.CleanContainer(coolantSlot); + var maxCoolant = component.MaxCoolantStored; + var totalCoolantPresent = currentCoolant + storage; + if(totalCoolantPresent > maxCoolant) + { + var remainingCoolant = totalCoolantPresent - maxCoolant; + stackComponent.Count = remainingCoolant; + stackComponent.UiUpdateNeeded = true; + component.CoolantStored = maxCoolant; + } + else + { + component.CoolantStored = totalCoolantPresent; + _containerSystem.CleanContainer(coolantSlot); + } + } + + private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, BatteryComponent battery) + { + var xform = Transform(uid); + + if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) + { + return; + } + + if(TryComp(uid, out var transformComponent)){ + + if(component.IsPowerRequiredToFire == true) + { + battery.CurrentCharge -= component.PowerUseActive; + } + if(component.IsCoolantRequiredToFire == true) + { + component.CoolantStored -= 1; + } + + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); + //TODO Fix armament recoil not working in space + var _gridUid = transformComponent.GridUid; + + EntityCoordinates targetCordinates; + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); + + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + + + ///Space Recoil is handled here + if(transformComponent.Anchored == true) + { + if(TryComp(_gridUid, out var gridPhysicsComponent) && _gridUid is {Valid :true} gridUid) + { + var gridMass = gridPhysicsComponent.FixturesMass; + var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; + var oldAngularVelocity = gridPhysicsComponent.AngularVelocity; + + var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilGrid * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilGrid * (float) Math.Cos(worldRot)); + var recoilX = (worldPosX - targetSpotRecoil.X); + var recoilY = (worldPosY - targetSpotRecoil.Y); + var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/gridMass), oldLinearVelocity.Y + (recoilY/gridMass)); + + var randomAngularInstability = _random.Next((int) -component.AngularInstabilityGrid, (int) component.AngularInstabilityGrid); + var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/gridMass); + + _physicsSystem.SetLinearVelocity(gridUid, newLinearVelocity); + _physicsSystem.SetAngularVelocity(gridUid, newAngularVelocity); + + Sawmill.Info($"Space Artillery recoil. RecoilX: {recoilX} RecoilY: {recoilY} Instability: {randomAngularInstability}"); + Sawmill.Info($"Space Artillery recoil. LinearVelocityX: {newLinearVelocity.X}/{oldLinearVelocity.X} LinearVelocityY: {newLinearVelocity.Y}/{oldLinearVelocity.Y} AngularInstability: {newAngularVelocity}/{oldAngularVelocity}"); + } + } + else + { //TODO, get velocity for the weapon itself separate from shuttle + if(TryComp(uid, out var weaponPhysicsComponent) && uid is {Valid :true} weaponUid) + { + var weaponMass = weaponPhysicsComponent.FixturesMass; + var oldLinearVelocity = weaponPhysicsComponent.LinearVelocity; + var oldAngularVelocity = weaponPhysicsComponent.AngularVelocity; + + var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilWeapon * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilWeapon * (float) Math.Cos(worldRot)); + var recoilX = (worldPosX - targetSpotRecoil.X); + var recoilY = (worldPosY - targetSpotRecoil.Y); + var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/weaponMass), oldLinearVelocity.Y + (recoilY/weaponMass)); + + var randomAngularInstability = _random.Next((int) -component.AngularInstabilityWeapon, (int) component.AngularInstabilityWeapon); + var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/weaponMass); + + _physicsSystem.SetLinearVelocity(uid, newLinearVelocity); + _physicsSystem.SetAngularVelocity(uid, newAngularVelocity); + } + } + } } private void GetInsertedCoolantAmount(SpaceArtilleryComponent component, out int amount) diff --git a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml index 58bd3169619..417a66d4bf1 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml @@ -67,7 +67,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 1 - projectileSpeed: 30 + projectileSpeed: 70 soundGunshot: path: /Audio/Effects/thunk.ogg soundEmpty: @@ -160,7 +160,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 1 - projectileSpeed: 30 + projectileSpeed: 70 soundGunshot: path: /Audio/Effects/thunk.ogg soundEmpty: @@ -234,7 +234,7 @@ ents: [] - type: Gun fireRate: 5 - projectileSpeed: 30 + projectileSpeed: 70 soundGunshot: path: /Audio/Effects/thunk.ogg soundEmpty: @@ -321,7 +321,7 @@ ents: [] - type: Gun fireRate: 5 - projectileSpeed: 30 + projectileSpeed: 70 soundGunshot: path: /Audio/Effects/thunk.ogg soundEmpty: @@ -514,7 +514,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 3 - projectileSpeed: 30 + projectileSpeed: 70 selectedMode: FullAuto availableModes: - SemiAuto @@ -524,6 +524,9 @@ soundEmpty: path: /Audio/Items/hiss.ogg - type: SpaceArtillery + isArmed: true + isCoolantRequiredToFire: true + isPowerRequiredToFire: true SpaceArtillery-CoolantSlot: name: SpaceArtillery-CoolantSlot insertSound: /Audio/Machines/scanning.ogg @@ -614,7 +617,7 @@ - SpaceArtillerySafety - type: Gun fireRate: 3 - projectileSpeed: 30 + projectileSpeed: 70 selectedMode: FullAuto availableModes: - SemiAuto @@ -647,7 +650,7 @@ - type: BatterySelfRecharger #Deployable weaponry - +#WARNING CURRENTLY VERY BUGGED. NEED TO RESOLVE THE ISSUE OF ACTING LIKE ITEM - type: entity name: General Purpose Machine Gun .35 cal parent: BaseItem @@ -679,6 +682,7 @@ angleIncrease: 4 angleDecay: 16 fireRate: 8 + projectileSpeed: 70 selectedMode: FullAuto availableModes: - FullAuto From 5fd3a366b8d4037142187317249690fb27aef9cd Mon Sep 17 00:00:00 2001 From: Qulibly Date: Mon, 25 Dec 2023 11:09:58 +0100 Subject: [PATCH 24/32] Space Artillery added basic velocity limiter for space recoil --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 15 ++++++++++- .../SpaceArtillery/SpaceArtillerySystem.cs | 25 +++++++++++++------ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs index 3a51bfeec78..fe03c96843e 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs @@ -88,6 +88,12 @@ public sealed partial class SpaceArtilleryComponent : Component public int PowerUseActive = 6000; + /// + /// Maximum velocity which grid can reach from recoil impulse, at moment there is high variance, will go above it by 10 + /// + [DataField("velocityLimitRecoilGrid"), ViewVariables(VVAccess.ReadWrite)] + public float VelocityLimitRecoilGrid = 30; + /// /// Amount of power used when firing /// @@ -100,6 +106,13 @@ public sealed partial class SpaceArtilleryComponent : Component [DataField("angularInstabilityGrid"), ViewVariables(VVAccess.ReadWrite)] public float AngularInstabilityGrid = 10; + + /// + /// Maximum velocity which unanchored weapon can reach from recoil impulse + /// + [DataField("velocityLimitRecoilWeapon"), ViewVariables(VVAccess.ReadWrite)] + public float VelocityLimitRecoilWeapon = 30; + /// /// Amount of power used when firing /// @@ -133,7 +146,7 @@ public sealed partial class SpaceArtilleryComponent : Component public string? FireAction = "ActionSpaceArtilleryFire"; /// - /// The action for the horn (if any) + /// The action for the weapon (if any) /// [DataField("fireActionEntity")] [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index 8f308adbf0b..9e65a409276 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -64,7 +64,7 @@ public override void Initialize() SubscribeLocalEvent(OnComponentInit); SubscribeLocalEvent(OnComponentRemove); } - + //TODO detect and handle when weapon fires from gun system and when it does not private void OnComponentInit(EntityUid uid, SpaceArtilleryComponent component, ComponentInit args) { @@ -77,7 +77,7 @@ private void OnComponentRemove(EntityUid uid, SpaceArtilleryComponent component, _itemSlotsSystem.RemoveItemSlot(uid, component.CoolantSlot); } -//TODO move firing system into separate function + private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { if(component.IsPowered == true || component.IsPowerRequiredForSignal == false) @@ -274,7 +274,7 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, var worldPosY = transformComponent.WorldPosition.Y; var worldRot = transformComponent.WorldRotation+rotOffset; var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - //TODO Fix armament recoil not working in space + var _gridUid = transformComponent.GridUid; EntityCoordinates targetCordinates; @@ -289,17 +289,23 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, if(TryComp(_gridUid, out var gridPhysicsComponent) && _gridUid is {Valid :true} gridUid) { var gridMass = gridPhysicsComponent.FixturesMass; + var linearVelocityLimitGrid = component.VelocityLimitRecoilGrid; var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; var oldAngularVelocity = gridPhysicsComponent.AngularVelocity; + if(oldLinearVelocity.X >= linearVelocityLimitGrid || oldLinearVelocity.Y >= linearVelocityLimitGrid) + return; + var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilGrid * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilGrid * (float) Math.Cos(worldRot)); var recoilX = (worldPosX - targetSpotRecoil.X); var recoilY = (worldPosY - targetSpotRecoil.Y); - var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/gridMass), oldLinearVelocity.Y + (recoilY/gridMass)); + //TODO fix the velocity limit to work more accuretly + var newLinearVelocity = new Vector2(MathF.Min(oldLinearVelocity.X + (recoilX/gridMass),linearVelocityLimitGrid), MathF.Min(oldLinearVelocity.Y + (recoilY/gridMass),linearVelocityLimitGrid)); var randomAngularInstability = _random.Next((int) -component.AngularInstabilityGrid, (int) component.AngularInstabilityGrid); var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/gridMass); + _physicsSystem.SetLinearVelocity(gridUid, newLinearVelocity); _physicsSystem.SetAngularVelocity(gridUid, newAngularVelocity); @@ -308,21 +314,26 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, } } else - { //TODO, get velocity for the weapon itself separate from shuttle + { if(TryComp(uid, out var weaponPhysicsComponent) && uid is {Valid :true} weaponUid) { var weaponMass = weaponPhysicsComponent.FixturesMass; + var linearVelocityLimitWeapon = component.VelocityLimitRecoilWeapon; var oldLinearVelocity = weaponPhysicsComponent.LinearVelocity; var oldAngularVelocity = weaponPhysicsComponent.AngularVelocity; - + + if(oldLinearVelocity.X >= linearVelocityLimitWeapon || oldLinearVelocity.Y >= linearVelocityLimitWeapon) + return; + var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilWeapon * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilWeapon * (float) Math.Cos(worldRot)); var recoilX = (worldPosX - targetSpotRecoil.X); var recoilY = (worldPosY - targetSpotRecoil.Y); - var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/weaponMass), oldLinearVelocity.Y + (recoilY/weaponMass)); + var newLinearVelocity = new Vector2(MathF.Min(oldLinearVelocity.X + (recoilX/weaponMass),linearVelocityLimitWeapon), MathF.Min(oldLinearVelocity.Y + (recoilY/weaponMass),linearVelocityLimitWeapon)); var randomAngularInstability = _random.Next((int) -component.AngularInstabilityWeapon, (int) component.AngularInstabilityWeapon); var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/weaponMass); + _physicsSystem.SetLinearVelocity(uid, newLinearVelocity); _physicsSystem.SetAngularVelocity(uid, newAngularVelocity); } From c011a91e638c5e0d8da145975e38ddee0501e9b2 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Tue, 2 Jan 2024 14:58:25 +0100 Subject: [PATCH 25/32] Space Artillery projectiles updated first part --- .../{space_artillery.yml => armaments.yml} | 447 ++++------------- .../Prototypes/_NF/SpaceArtillery/laser.yml | 33 ++ .../Prototypes/_NF/SpaceArtillery/shells.yml | 465 ++++++++++++++++++ .../base-projectile.png | Bin 0 -> 609 bytes .../base-spent.png | Bin 0 -> 425 bytes .../base.png | Bin 0 -> 840 bytes .../meta.json | 20 + .../lasers.rsi/beam_focused_pulse.png | Bin 0 -> 1265 bytes .../SpaceArtillery/lasers.rsi/beam_mining.png | Bin 0 -> 1474 bytes .../lasers.rsi/impact_focused_pulse.png | Bin 0 -> 1522 bytes .../lasers.rsi/impact_mining.png | Bin 0 -> 1573 bytes .../SpaceArtillery/lasers.rsi/meta.json | 101 ++++ .../lasers.rsi/muzzle_focused_pulse.png | Bin 0 -> 1665 bytes .../lasers.rsi/muzzle_mining.png | Bin 0 -> 1705 bytes 14 files changed, 720 insertions(+), 346 deletions(-) rename Resources/Prototypes/_NF/SpaceArtillery/{space_artillery.yml => armaments.yml} (70%) create mode 100644 Resources/Prototypes/_NF/SpaceArtillery/laser.yml create mode 100644 Resources/Prototypes/_NF/SpaceArtillery/shells.yml create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/beam_focused_pulse.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/beam_mining.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/impact_focused_pulse.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/impact_mining.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/muzzle_focused_pulse.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/muzzle_mining.png diff --git a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml similarity index 70% rename from Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml rename to Resources/Prototypes/_NF/SpaceArtillery/armaments.yml index 417a66d4bf1..7a3c544e07e 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/space_artillery.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml @@ -454,6 +454,104 @@ components: - type: Clickable - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + delay: 9999 + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: AmmoCounter + - type: Battery + maxCharge: 100000 + startingCharge: 100000 + - type: ExaminableBattery + - type: HitscanBatteryAmmoProvider + proto: Focused_Pulse + fireCost: 25000 + - type: ItemSlots + - type: ContainerContainer + containers: + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryFire + - SpaceArtillerySafety + - type: Gun + fireRate: 3 + projectileSpeed: 70 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + isCoolantRequiredToFire: true + isPowerRequiredToFire: true + SpaceArtillery-CoolantSlot: + name: SpaceArtillery-CoolantSlot + insertSound: /Audio/Machines/scanning.ogg + ejectSound: /Audio/Machines/tray_eject.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - Stack + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + +- type: entity + id: Mining_Laser + name: mining laser + parent: ConstructibleMachine + description: Laser Beam utilising crystaline plasma to melt rock down into usable chunks with uncanny precision. Requires coolant to function. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline - type: Physics bodyType: Static - type: Fixtures @@ -493,8 +591,8 @@ startingCharge: 100000 - type: ExaminableBattery - type: HitscanBatteryAmmoProvider - proto: RedMediumLaser - fireCost: 25000 + proto: Mining + fireCost: 5000 - type: ItemSlots - type: ContainerContainer containers: @@ -526,6 +624,7 @@ - type: SpaceArtillery isArmed: true isCoolantRequiredToFire: true + coolantStored: 90 isPowerRequiredToFire: true SpaceArtillery-CoolantSlot: name: SpaceArtillery-CoolantSlot @@ -548,8 +647,6 @@ - type: ExtensionCableReceiver - type: BatterySelfRecharger -#Insert Mining Laser here - - type: entity id: Pneumatic_Launcher name: pneumatic launcher @@ -745,345 +842,3 @@ -# Space Artillery projectiles - - -#EMP shell -- type: entity - id: BulletShellEmp - name: shell - parent: BaseBulletTrigger - noSpawn: true - components: - - type: Projectile - damage: - types: - Structural: 100 - - type: TimedDespawn - lifetime: 20 - #roughly 600m range - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi - layers: - - state: base-projectile - - type: EmpOnTrigger - range: 4 - energyConsumption: 50000 - disableDuration: 60 - -- type: entity - id: CartridgeShellEmp - name: 630 EMP shell - parent: BaseItem - description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. - components: - - type: Tag - tags: - - CartridgeShell - - type: Item - size: 60 - - type: CartridgeAmmo - proto: BulletShellEmp - deleteOnSpawn: false - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi - layers: - - state: base - map: ["enum.AmmoVisualLayers.Base"] - - type: Appearance - - type: SpentAmmoVisuals - - type: SpaceGarbage - - -#Solid Shell -- type: entity - id: BulletShellArmorPiercing - name: shell - parent: BaseBulletTrigger - noSpawn: true - components: - - type: Projectile - damage: - types: - Structural: 1000 - #currently explosion deals roughly 22.5 damage - - type: TimedDespawn - lifetime: 20 - #roughly 600m range - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi - layers: - - state: base-projectile - - type: ExplodeOnTrigger - - type: Explosive - explosionType: Default - maxIntensity: 4 - intensitySlope: 3 - totalIntensity: 10 - maxTileBreak: 1 - - type: PointLight - radius: 3.5 - color: orange - energy: 0.5 - -- type: entity - id: CartridgeShellArmorPiercing - name: 630 Armor-Piercing shell - parent: BaseItem - description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. - components: - - type: Tag - tags: - - CartridgeShell - - type: Item - size: 60 - - type: CartridgeAmmo - proto: BulletShellArmorPiercing - deleteOnSpawn: false - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi - layers: - - state: base - map: ["enum.AmmoVisualLayers.Base"] - - type: Appearance - - type: SpentAmmoVisuals - - type: SpaceGarbage - - -#.50 call for machine gun -- type: entity - id: BulletMachineGun - name: 50 Machine Gun bullet - parent: BaseBulletTrigger - noSpawn: true - components: - - type: Projectile - damage: - types: - Structural: 35 - #currently explosion deals roughly ? damage - - type: TimedDespawn - lifetime: 20 - #roughly 600m range - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi - layers: - - state: base-projectile - - type: ExplodeOnTrigger - - type: Explosive - explosionType: Default - maxIntensity: 2 - intensitySlope: 1 - totalIntensity: 5 - maxTileBreak: 0 - - type: PointLight - radius: 3.5 - color: orange - energy: 0.5 - -- type: entity - id: CartridgeMachineGun - name: 50 Machine Gun cartridge - parent: BaseItem - description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. - components: - - type: Tag - tags: - - CartridgeMachineGun - - type: Item - size: 2 - - type: CartridgeAmmo - proto: BulletMachineGun - deleteOnSpawn: false - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi - layers: - - state: base - map: ["enum.AmmoVisualLayers.Base"] - - type: Appearance - - type: SpentAmmoVisuals - - type: SpaceGarbage - -#1000 cal Railgun Rails - -- type: entity - id: BulletRailArmorPiercing - name: rail - parent: BaseBulletTrigger - noSpawn: true - components: - - type: Projectile - damage: - types: - Structural: 10000 - #currently explosion deals roughly 22.5 damage - - type: TimedDespawn - lifetime: 34 - #roughly 1000m range - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi - layers: - - state: base-projectile - - type: ExplodeOnTrigger - - type: Explosive - explosionType: Default - maxIntensity: 64 - intensitySlope: 32 - totalIntensity: 96 - maxTileBreak: 2 - - type: PointLight - radius: 3.5 - color: orange - energy: 0.5 - -- type: entity - id: CartridgeRailArmorPiercing - name: 1000 Armor-Piercing rail - parent: BaseItem - description: A 1000 caliber rail designed for the Railgun. Is made out of solid plasma infused tungsten rod. Punches through hull like butter. - components: - - type: Tag - tags: - - CartridgeRail - - type: Item - size: 120 - - type: MultiHandedItem - - type: CartridgeAmmo - proto: BulletRailArmorPiercing - deleteOnSpawn: false - - type: Sprite - sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi - layers: - - state: base - map: ["enum.AmmoVisualLayers.Base"] - - type: Appearance - - type: SpentAmmoVisuals - - type: SpaceGarbage - - - - -# Coolant object -- type: entity - parent: BaseItem - id: CoolantCartridge - name: coolant cartridge - description: A rather dense package. Utilises reaction of Frezon and Nitrogen to rappidly cool whatever machine it's in. Most often used in Space Armaments or Mining Lasers. - components: - - type: Material - - type: PhysicalComposition - materialComposition: - Coolant: 1 - - type: StaticPrice - price: 0 - - type: Stack - stackType: Coolant - count: 1 - baseLayer: base - layerStates: - - cash - - cash_10 - - cash_100 - - cash_500 - - cash_1000 - - cash_1000000 - - type: Sprite - sprite: Objects/Economy/cash.rsi - state: cash - layers: - - state: cash - map: ["base"] - - type: Physics - bodyType: Dynamic - - type: Fixtures - fixtures: - fix1: - density: 30 - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.2,0.25,0.1" - mask: - - ItemMask - - type: Appearance - -- type: material - id: Coolant - name: coolant - unit: materials-unit-bill - stackEntity: CoolantCartridge - icon: { sprite: /Textures/Objects/Economy/cash.rsi, state: cash } - price: 500 - -- type: stack - id: Coolant - name: coolant - icon: { sprite: /Textures/Objects/Economy/cash.rsi, state: cash } - spawn: CoolantCartridge - maxCount: 30 - itemSize: 4 - - -- type: entity - parent: CoolantCartridge - id: CoolantCartridge10 - suffix: 10 - components: - - type: Icon - sprite: Objects/Economy/cash.rsi - state: cash_10 - - type: Stack - count: 10 - -- type: entity - parent: CoolantCartridge - id: CoolantCartridge30 - suffix: 30 - components: - - type: Icon - sprite: Objects/Economy/cash.rsi - state: cash_100 - - type: Stack - count: 30 - - -- type: entity - parent: BaseItem - id: CoolantCartridgeHighQuality - name: coolant cartridge high quality - description: A rather dense package. This one was made using very advanced methods. Utilises reaction of Frezon and Nitrogen to rappidly cool whatever machine it's in. Most often used in Space Armaments or Mining Lasers. - components: - - type: Material - - type: PhysicalComposition - materialComposition: - Coolant: 10 - - type: StaticPrice - price: 0 - - type: Stack - stackType: Coolant - count: 1 - baseLayer: base - layerStates: - - cash - - cash_10 - - cash_100 - - cash_500 - - cash_1000 - - cash_1000000 - - type: Sprite - sprite: Objects/Economy/cash.rsi - state: cash - layers: - - state: cash - map: ["base"] - - type: Physics - bodyType: Dynamic - - type: Fixtures - fixtures: - fix1: - density: 30 - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.2,0.25,0.1" - mask: - - ItemMask - - type: Appearance \ No newline at end of file diff --git a/Resources/Prototypes/_NF/SpaceArtillery/laser.yml b/Resources/Prototypes/_NF/SpaceArtillery/laser.yml new file mode 100644 index 00000000000..b474a3ad2d0 --- /dev/null +++ b/Resources/Prototypes/_NF/SpaceArtillery/laser.yml @@ -0,0 +1,33 @@ +- type: hitscan + id: Mining + damage: + types: + Heat: 10 + Structural: 300 + muzzleFlash: + sprite: _NF/Objects/SpaceArtillery/lasers.rsi + state: muzzle_mining + travelFlash: + sprite: _NF/Objects/SpaceArtillery/lasers.rsi + state: beam_mining + impactFlash: + sprite: _NF/Objects/SpaceArtillery/lasers.rsi + state: impact_mining + maxLength: 40 + +- type: hitscan + id: Focused_Pulse + damage: + types: + Heat: 30 + Structural: 1000 + muzzleFlash: + sprite: _NF/Objects/SpaceArtillery/lasers.rsi + state: muzzle_focused_pulse + travelFlash: + sprite: _NF/Objects/SpaceArtillery/lasers.rsi + state: beam_focused_pulse + impactFlash: + sprite: _NF/Objects/SpaceArtillery/lasers.rsi + state: impact_focused_pulse + maxLength: 40 \ No newline at end of file diff --git a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml new file mode 100644 index 00000000000..e3173993fab --- /dev/null +++ b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml @@ -0,0 +1,465 @@ +# Space Artillery projectiles + + +#EMP shell +- type: entity + id: BulletShellEmp + name: shell + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 100 + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi + layers: + - state: base-projectile + - type: EmpOnTrigger + range: 8 + energyConsumption: 50000 + disableDuration: 60 + +- type: entity + id: CartridgeShellEmp + name: 630 EMP shell + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeShell + - type: Item + size: 60 + - type: CartridgeAmmo + proto: BulletShellEmp + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + + +#Solid Shell +- type: entity + id: BulletShellArmorPiercing + name: shell + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 1000 + #currently explosion deals roughly 22.5 damage + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 4 + intensitySlope: 3 + totalIntensity: 10 + maxTileBreak: 1 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeShellArmorPiercing + name: 630 Armor-Piercing shell + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeShell + - Cartridge + - type: Item + size: 60 + - type: CartridgeAmmo + proto: BulletShellArmorPiercing + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#High Explosive Shell +- type: entity + id: BulletShellHighExplosive + name: shell + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 100 + #currently explosion deals roughly 30 damage per tile in large AoE + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 2 + intensitySlope: 2 + totalIntensity: 100 + maxTileBreak: 2 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeShellHighExplosive + name: 630 High-Explosive shell + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeShell + - Cartridge + - type: Item + size: 60 + - type: CartridgeAmmo + proto: BulletShellHighExplosive + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#Practice Shell +- type: entity + id: BulletShellPractice + name: shell + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 1 + #currently explosion deals roughly 30 damage per tile in large AoE + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 0.1 + intensitySlope: 1 + totalIntensity: 2 + maxTileBreak: 2 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeShellPractice + name: 630 Practice shell + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeShell + - Cartridge + - type: Item + size: 60 + - type: CartridgeAmmo + proto: BulletShellPractice + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#.50 call AP for machine gun +- type: entity + id: BulletMachineGun + name: 50 Machine Gun bullet + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 35 + #currently explosion deals roughly ? damage + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 2 + intensitySlope: 1 + totalIntensity: 5 + maxTileBreak: 0 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeMachineGun + name: 50 Machine Gun cartridge + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeMachineGun + - Cartridge + - type: Item + size: 2 + - type: CartridgeAmmo + proto: BulletMachineGun + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#.50 call EMP for machine gun +- type: entity + id: BulletMachineGunEMP + name: 50 Machine Gun EMP bullet + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 35 + #currently explosion deals roughly ? damage + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + layers: + - state: base-projectile + - type: EmpOnTrigger + range: 3 + energyConsumption: 2000 + disableDuration: 4 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeMachineGunEMP + name: 50 Machine Gun EMP cartridge + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeMachineGun + - Cartridge + - type: Item + size: 2 + - type: CartridgeAmmo + proto: BulletMachineGunEMP + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#1000 cal Railgun Rails + +- type: entity + id: BulletRailArmorPiercing + name: rail + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 10000 + #currently explosion deals roughly 22.5 damage + - type: TimedDespawn + lifetime: 34 + #roughly 1000m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 64 + intensitySlope: 32 + totalIntensity: 96 + maxTileBreak: 2 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeRailArmorPiercing + name: 1000 Armor-Piercing rail + parent: BaseItem + description: A 1000 caliber rail designed for the Railgun. Is made out of solid plasma infused tungsten rod. Punches through hull like butter. + components: + - type: Tag + tags: + - CartridgeRail + - Cartridge + - type: Item + size: 120 + - type: MultiHandedItem + - type: CartridgeAmmo + proto: BulletRailArmorPiercing + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + + + + +# Coolant object +- type: entity + parent: BaseItem + id: CoolantCartridge + name: coolant cartridge + description: A rather dense package. Utilises reaction of Frezon and Nitrogen to rappidly cool whatever machine it's in. Most often used in Space Armaments or Mining Lasers. + components: + - type: Material + - type: PhysicalComposition + materialComposition: + Coolant: 1 + - type: StaticPrice + price: 0 + - type: Stack + stackType: Coolant + count: 1 + baseLayer: base + layerStates: + - cash + - cash_10 + - cash_100 + - cash_500 + - cash_1000 + - cash_1000000 + - type: Sprite + sprite: Objects/Economy/cash.rsi + state: cash + layers: + - state: cash + map: ["base"] + - type: Physics + bodyType: Dynamic + - type: Fixtures + fixtures: + fix1: + density: 30 + shape: + !type:PhysShapeAabb + bounds: "-0.35,-0.2,0.25,0.1" + mask: + - ItemMask + - type: Appearance + +- type: material + id: Coolant + name: coolant + unit: materials-unit-bill + stackEntity: CoolantCartridge + icon: { sprite: /Textures/Objects/Economy/cash.rsi, state: cash } + price: 500 + +- type: stack + id: Coolant + name: coolant + icon: { sprite: /Textures/Objects/Economy/cash.rsi, state: cash } + spawn: CoolantCartridge + maxCount: 30 + itemSize: 4 + + +- type: entity + parent: CoolantCartridge + id: CoolantCartridge10 + suffix: 10 + components: + - type: Icon + sprite: Objects/Economy/cash.rsi + state: cash_10 + - type: Stack + count: 10 + +- type: entity + parent: CoolantCartridge + id: CoolantCartridge30 + suffix: 30 + components: + - type: Icon + sprite: Objects/Economy/cash.rsi + state: cash_100 + - type: Stack + count: 30 + + diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea4cb3312c7db190cedf0c090ede6b0dcd94c8d GIT binary patch literal 609 zcmV-n0-pVeP) zSLhWuLN`q>P{ayVAazlxiIhmGNXWoIVWtLxlI56+Rq)34jQxI(U)!HyU-k~{9eC;v z2wMX_#N@Gt$XU;fJV8({Qz;2fBB=R_k6*3}>nd9SCk)VmOQ_c|BCV*YDGgupvhMRN zTuNRSmbC_OWe$H+(nYokqNX|Le$3q*7K@YvRe161`GryM2cE|;2DKaUMUdg!N68VC< zoAavTab(;`oupvs^)PFI*KY$3%s~qS0}#2$>WrER9v+A0dKkFlL->4A7{VIhs3r+& z4yp`6Mc`E;Jk#gYBYW=R8+UAqHNdB@F<#hUnkjBZm!_?0wOVM;;r8+mKY#aZ;$wyT z?d*G=3eC(*nFR?Ya~m8Nw8;U|$rza{`s?;;cL49+zY&vc!rdrEqzlHgDbqK$$!Oz%<2d-fPp8v)u%sZuRsc)w@px=9pj<&DNrKkqiQJ-C6F-j8 vY&Oly1g56lZvU6oW8Hmw@4()Hr{%yumy3dB2DWNS00000NkvXXu0mjf{J0c= literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi/base-spent.png new file mode 100644 index 0000000000000000000000000000000000000000..0ebd237c9dd770955c61a3fb92587c45123c3e74 GIT binary patch literal 425 zcmV;a0apHrP)^-f4Uc=KT5KiK$#&Hf4g!N!}} z=xR6+1j|+6Zv3x(Vg^uWV+`W~?Z_BqfCiLOb1$#LxL&V2LjH#-~PhRvxO ze{XM39~~Xp>E>S9kEjA*e}7+}o}NN$4W$$YgMqH%hvrlQkR%D(?Y0F_6a`wXR@L}? z06RN7I*wzTIYlKFgb?U-I+a*pGqAnAjW7(6Wf>gD0Wlz@#OCH^B^Fo!`u)E4JkJI% zqY(oHfI!jj<@@X2SpWh|@nbl~{d?=!+IoaW(?_e`fc9P7TJg~oO}u~ifd#_5E>arz zaCIFkg`r&uB&mYRfIQP^MQzlDG($FJAv-`D8H=4|6oXnY3pT>9+(k6S$bx5iEc(QkaJYhfq6~1wg#|0!OtGCOOVb z@KNSq5oVaB87{*d^W+}`@MHsLQG$=t3}X{)t_%xlZZi>H0k6)|G@pS43er_59En0J zvk$Do5laAtD3A*(fW$h!?gwiL-hK`-ml|Iqfmvpz#zQRRQgdk`3?nT4@fjFAXyYQ3 zaK|x5vBIR@flQ=zlqMQkZUo9S76T{eAttfJnNhu|K19Igg-%Sj(u z9N8e$kR-bBnl-x>7q00EW;4Rv!*PAAh4O!QqWaa1ebyT zON5kNDKruzeJAme(Na{g8)tw8pv?C7Osi&I`d}CC-SsuSvC*^hW78L!&E>zMEX>4Tx04R}tkv&MmKpe$iQ>CR=RO}$)kfA!+MMWG-6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|>f)s6A|?JWDYS_7;J6>}?mh0_0Yam~RI?`vsG4P@ z;xRFsTNQn;=)({O5rAJ}rk+SIX3%wf-NVDzy9m$fe(ulFujEYzctqkT(+!JwgLrn+ z(mC%FhgeBch|h^94Z0xlBiCh@-#8Z?7Imr&Zfo)$aJd7FJn51lIg*#AP$&TJXY@@uVE7gYthv3l_Hp_EWT>m<8{ps& zm?%>AdY50Osl^iR*iC-@Zgkh00006VoOIv0RI4q007;?T>Jn4010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=L;7M8y`@w;HCfo0@O)FK~#9!?c2dh8$le$@!v`+ zSZbgcDYPOvibzi};Hj6MN{&8&K7mjQ9{L0Y$t&0g$T9R%FTsOUb1FeRiuGa>54CEb zl}=AHPR7~9wL-LhKd>a3ng4&2|IBPIyAl8Z0000006YZAu)o0O%9-&$pR_LA`}|z) z%J`Gkh4OPb_c}rKrsm$b9q)bz}(8*kaRSbX@~!t+)04HL%MLcVf%dl-S$Divh^=IQ<%cWFmo-;x2h_@K zv$#E(gj?6&1@=ey#rIdWjg9SsK|4T_Dy4Usc7Pol+W|`>tHz&bw*z9=&Bg7>dCZzd@1Qj*p`>`Ns800000007{w`U{4|Ms9ll#&iGx01jnXNoGw=04e|g b00;m8000000Mb*F00000NkvXXu0mjf)g@O+ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/beam_mining.png b/Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/beam_mining.png new file mode 100644 index 0000000000000000000000000000000000000000..ed86e6404d8d4838cd369fabe138940cff1f530a GIT binary patch literal 1474 zcmV;z1wHzSP)EX>4Tx04R}tkv&MmKpe$iQ>CR=RO}$)kfA!+MMWG-6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|>f)s6A|?JWDYS_7;J6>}?mh0_0Yam~RI?`vsG4P@ z;xRFsTNQn;=)({O5rAJ}rk+SIX3%wf-NVDzy9m$fe(ulFujEYzctqkT(+!JwgLrn+ z(mC%FhgeBch|h^94Z0xlBiCh@-#8Z?7Imr&Zfo)$aJd7FJn51lIg*#AP$&TJXY@@uVE7gYthv3l_Hp_EWT>m<8{ps& zm?%>AdY50Osl^iR*iC-@Zgkh00006VoOIv0RI4q007;?T>Jn4010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=L;7M5gy$~IJy7;1EonsK~#9!?cF_2BQY3&;m^|0 zZ~?S*Il&5Qs@-OC04S)q1yT-x#GWG67RdpahOJVA_5^ewE|7*u-XgZKJ+^Tmghcy3 z&614&|0d1n6#)PM00000008(;>1)x9!mdo#q}97T+3&6YBmLHsR;!OxsLnc7+n`ih z5s{b2JKfAivN*Yty~AVm@_463M4E3$BGX~9EsK*Y5fN!-qhdN+cigrh|LILwpZRRl zShkHpou@alc)IVm#s5C;k9pS2Mj{WLs7q1$TC@z>ux(yGb=E1jPzG(#Hd}A5uYO*2 zDat-qTI(-A<`z%)(tJB||JJ0BmGb4vjlcIlr}6}oStzTNuIHB$8MGn~otxBb`F3$t zq>UFwk6nODDOJ0>S2+oCt1y+O@pnVTj^8^xR<*~V9i-F_ZM^3)9ZGY0vwSce%HCPG z-09v9Y`h&E4|3x#Mq7?4D?SZ^lVs2?cc<5fYA@E@ zgdn@f)rT%!!U}Qfi<7I@vQ6HgT=Q97is}uBiJK3Yye_sr(KcVNeme+WeaW)oy8ZUY z-}`-v`(wuD*`&K%eR_RHrb352R zEAE=;1S!U*&qlpF0^F?_xf7aDYCq~&k44L~`EVfp^kdQX?@exiRqDJw7ya}1dfHejOSzr7-`2&R+X=5opDn`+ zxeg}IPOyl`^Xufr|Gm1*yWn}e7+e~&_~QKT(uB%Mv71C)EH_MU(cYem{_)+k%k<&T zUlD)s?c%g$tYe~Y&zEypTaI66*f4LWCwFqq36L7}!l@G97ZA56_dHlIW-+`qneJqW z7T!8{+a`QTdu!j}pH@G=4FCWD000000001B1^)n`QJCxRdw<&i000hUSV?A0O#mtY c000O800000007cclK=n!07*qoM6N<$f{KN*ApigX literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/impact_focused_pulse.png b/Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/impact_focused_pulse.png new file mode 100644 index 0000000000000000000000000000000000000000..2913054d630bb600b8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_MHoa=qE zz~Dv9{aCopUARz^LxS39a_qi@acR1P!EzpmvlAwFzg+Gf8eg8QorGBYMwrx&f%O_s z;B3X=V|B2|Ap9p`=`p?9G`71XwNjCz>YfMdp&1VNBMZN&lij~5D9dZFnq}jsW`*Nw{n64HPNyKRq})h+oEv8gvhk`9BZ$yomL(u>o5AU4*Y)de5cp N8rJfR1r?1W{tG+h#v=d# literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/impact_mining.png b/Resources/Textures/_NF/Objects/SpaceArtillery/lasers.rsi/impact_mining.png new file mode 100644 index 0000000000000000000000000000000000000000..16d5c7e84ec9a63f9e7de07ef4c6ca12f9474f43 GIT binary patch literal 1573 zcmV+=2HN?FP)EX>4Tx04R}tkv&MmKpe$iQ>CR=RO}$)kfA!+MMWG-6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|>f)s6A|?JWDYS_7;J6>}?mh0_0Yam~RI?`vsG4P@ z;xRFsTNQn;=)({O5rAJ}rk+SIX3%wf-NVDzy9m$fe(ulFujEYzctqkT(+!JwgLrn+ z(mC%FhgeBch|h^94Z0xlBiCh@-#8Z?7Imr&Zfo)$aJd7FJn51lIg*#AP$&TJXY@@uVE7gYthv3l_Hp_EWT>m<8{ps& zm?%>AdY50Osl^iR*iC-@Zgkh00006VoOIv0RI4q007;?T>Jn4010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=L;7M6aus{kgxy%1PDn)K~#9!?cG6Y<46>M;a8yE zv)!yzM5Ori zS>*a`@8_HOLW;YqJ4-2ReeRk+1qRii6jE+Q;S0g1+;1#nKnwcC*sdrP!???)Aksf?4nWx%X0I zD2y?tYnGdf+VpkmShHV5M6S=IIKPqR;oi@reY0KW3qLDzSAgc>-p{h){Km)h;i5L% z%}T===;QqKS(=CYcm+5uMWh}cz-hVD*Y4cWD(GhWx|SlC{r=dT7>?z8JoU3<-i!^I zMPuFrr1Z-e_W+n+(DD=j000000000000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: Wed, 3 Jan 2024 22:50:04 +0100 Subject: [PATCH 26/32] Space Artillery added advanced signals and examination --- .../SpaceArtillery/SpaceArtilleryComponent.cs | 44 ++++- .../SpaceArtillery/SpaceArtillerySystem.cs | 163 ++++++++++++++---- .../en-US/_NF/space_artillery/examine.ftl | 9 + .../_NF/space_artillery/receiver_ports.ftl | 11 ++ .../_NF/space_artillery/transmitter_ports.ftl | 8 + .../en-US/machine-linking/receiver_ports.ftl | 6 - .../machine-linking/transmitter_ports.ftl | 5 - .../Prototypes/DeviceLinking/sink_ports.yml | 10 -- .../Prototypes/DeviceLinking/source_ports.yml | 9 - .../_NF/SpaceArtillery/armaments.yml | 87 +++++++--- .../Prototypes/_NF/SpaceArtillery/shells.yml | 10 +- .../_NF/SpaceArtillery/sink_ports.yml | 19 ++ .../_NF/SpaceArtillery/source_ports.yml | 14 ++ .../base-projectile.png | Bin 1333 -> 1259 bytes .../base-projectile.png | Bin 0 -> 232 bytes .../base-spent.png | Bin 0 -> 516 bytes .../50_emp_machinegun_casing.rsi/base.png | Bin 0 -> 581 bytes .../50_emp_machinegun_casing.rsi/meta.json | 20 +++ .../base-projectile.png | Bin 0 -> 248 bytes .../base-spent.png | Bin 0 -> 516 bytes .../base.png | Bin 0 -> 598 bytes .../meta.json | 20 +++ .../base-projectile.png | Bin 0 -> 523 bytes .../base-spent.png | Bin 0 -> 504 bytes .../630_practice_shell_casing.rsi/base.png | Bin 0 -> 881 bytes .../630_practice_shell_casing.rsi/meta.json | 20 +++ 26 files changed, 361 insertions(+), 94 deletions(-) create mode 100644 Resources/Locale/en-US/_NF/space_artillery/examine.ftl create mode 100644 Resources/Locale/en-US/_NF/space_artillery/receiver_ports.ftl create mode 100644 Resources/Locale/en-US/_NF/space_artillery/transmitter_ports.ftl create mode 100644 Resources/Prototypes/_NF/SpaceArtillery/sink_ports.yml create mode 100644 Resources/Prototypes/_NF/SpaceArtillery/source_ports.yml create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/meta.json create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/meta.json diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs index fe03c96843e..1bec4b18f5c 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs @@ -39,6 +39,12 @@ public sealed partial class SpaceArtilleryComponent : Component [DataField("maxCoolantStored"), ViewVariables(VVAccess.ReadWrite)] public int MaxCoolantStored = 90; + /// + /// Amount of coolant consumed upon artillery firing + /// + [DataField("coolantConsumed"), ViewVariables(VVAccess.ReadWrite)] + public int CoolantConsumed = 1; + /// /// Whether the space artillery's safety is enabled or not /// @@ -126,6 +132,7 @@ public sealed partial class SpaceArtilleryComponent : Component public float AngularInstabilityWeapon = 30; +///Sink Ports /// /// Signal port that makes space artillery fire. /// @@ -135,9 +142,42 @@ public sealed partial class SpaceArtilleryComponent : Component /// /// Signal port that toggles artillery's safety, which is the combat mode /// - [DataField("spaceArtillerySafetyPort", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string SpaceArtillerySafetyPort = "SpaceArtillerySafety"; + [DataField("spaceArtilleryToggleSafetyPort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryToggleSafetyPort = "SpaceArtilleryToggleSafety"; + + /// + /// Signal port that sets artillery's safety to "SAFE" + /// + [DataField("spaceArtilleryOnSafetyPort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryOnSafetyPort = "SpaceArtilleryOnSafety"; + + /// + /// Signal port that sets artillery's safety to "ARMED" + /// + [DataField("spaceArtilleryOffSafetyPort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryOffSafetyPort = "SpaceArtilleryOffSafety"; + +///Source Ports + /// + /// The port that gets set to high while the alarm is in the danger state, and low when not. + /// + [DataField("spaceArtilleryDetectedFiringPort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryDetectedFiringPort = "SpaceArtilleryDetectedFiring"; + + /// + /// The port that gets set to high while the alarm is in the danger state, and low when not. + /// + [DataField("spaceArtilleryDetectedMalfunctionPort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryDetectedMalfunctionPort = "SpaceArtilleryDetectedMalfunction"; + + /// + /// The port that gets set to high while the alarm is in the danger state, and low when not. + /// + [DataField("spaceArtilleryDetectedSafetyChangePort", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SpaceArtilleryDetectedSafetyChangePort = "SpaceArtilleryDetectedSafetyChange"; + +///Actions /// /// The action for firing the artillery when mounted /// diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index 9e65a409276..6549373704f 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -3,12 +3,14 @@ using Content.Server.Projectiles; using Content.Server.Weapons.Ranged.Systems; using Content.Shared.Weapons.Ranged.Systems; +using Content.Server.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Events; using Content.Shared.Interaction.Events; using System.Numerics; using Content.Shared.CombatMode; using Content.Shared.Interaction; +using Content.Shared.Examine; using Robust.Shared.Map; using Robust.Shared.Physics.Components; using Robust.Shared.Physics; @@ -26,6 +28,9 @@ using Robust.Shared.Prototypes; using Content.Shared.Containers.ItemSlots; using Robust.Shared.Random; +using Content.Server.DeviceLinking.Components; +using Content.Server.DeviceLinking.Systems; +using Content.Server.DeviceNetwork; namespace Content.Shared.SpaceArtillery; @@ -42,6 +47,7 @@ public sealed partial class SpaceArtillerySystem : EntitySystem [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly DeviceLinkSystem _deviceLink = default!; private const float ShootSpeed = 30f; private const float distance = 100; @@ -57,10 +63,13 @@ public override void Initialize() SubscribeLocalEvent(OnSignalReceived); SubscribeLocalEvent(OnBuckleChange); SubscribeLocalEvent(OnFireAction); + SubscribeLocalEvent(OnShotEvent); + SubscribeLocalEvent(OnEmptyShotEvent); SubscribeLocalEvent(OnApcChanged); SubscribeLocalEvent(OnBatteryChargeChanged); SubscribeLocalEvent(OnCoolantSlotChanged); SubscribeLocalEvent(OnCoolantSlotChanged); + SubscribeLocalEvent(OnExamine); SubscribeLocalEvent(OnComponentInit); SubscribeLocalEvent(OnComponentRemove); } @@ -77,6 +86,31 @@ private void OnComponentRemove(EntityUid uid, SpaceArtilleryComponent component, _itemSlotsSystem.RemoveItemSlot(uid, component.CoolantSlot); } + private void OnExamine(EntityUid uid, SpaceArtilleryComponent component, ExaminedEvent args) + { + if (!args.IsInDetailsRange) + return; + + + if(component.IsArmed == true) + { + args.PushMarkup(Loc.GetString("space-artillery-on-examine-safe")); + } + else + { + args.PushMarkup(Loc.GetString("space-artillery-on-examine-armed")); + } + + if(component.IsCoolantRequiredToFire == true) + { + args.PushMarkup(Loc.GetString("space-artillery-on-examine-coolant-consumed", + ("consumed_coolant", component.CoolantConsumed))); + + args.PushMarkup(Loc.GetString("space-artillery-on-examine-coolant-count", + ("current_coolant", component.CoolantStored), ("max_coolant", component.MaxCoolantStored))); + } + + } private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, ref SignalReceivedEvent args) { @@ -89,14 +123,16 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, { if((component.IsPowered == true && battery.Charge >= component.PowerUseActive) || component.IsPowerRequiredToFire == false) { - if((component.IsCoolantRequiredToFire == true && component.CoolantStored >= 1) || component.IsCoolantRequiredToFire == false) + if((component.IsCoolantRequiredToFire == true && component.CoolantStored >= component.CoolantConsumed) || component.IsCoolantRequiredToFire == false) { TryFireArtillery(uid, component, battery); - } - } + } else + OnMalfunction(uid,component); + } else + OnMalfunction(uid,component); } } - if (args.Port == component.SpaceArtillerySafetyPort) + if (args.Port == component.SpaceArtilleryToggleSafetyPort) { if (TryComp(uid, out var combat)) { @@ -104,15 +140,41 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, { _combat.SetInCombatMode(uid, true, combat); component.IsArmed = true; + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); } else { _combat.SetInCombatMode(uid, false, combat); component.IsArmed = false; + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); } } } - } + if (args.Port == component.SpaceArtilleryOnSafetyPort) + { + if (TryComp(uid, out var combat) && combat.IsInCombatMode != null) + { + if(combat.IsInCombatMode == true) + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); + + _combat.SetInCombatMode(uid, false, combat); + component.IsArmed = false; + + } + } + if (args.Port == component.SpaceArtilleryOffSafetyPort) + { + if (TryComp(uid, out var combat) && combat.IsInCombatMode != null) + { + if(combat.IsInCombatMode == false) + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); + + _combat.SetInCombatMode(uid, true, combat); + component.IsArmed = true; + } + } + } else + OnMalfunction(uid,component); } private void OnBuckleChange(EntityUid uid, SpaceArtilleryComponent component, ref BuckleChangeEvent args) @@ -148,7 +210,7 @@ private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, Fire { if((component.IsPowered == true && battery.Charge >= component.PowerUseActive) || component.IsPowerRequiredToFire == false) { - if((component.IsCoolantRequiredToFire == true && component.CoolantStored >= 1) || component.IsCoolantRequiredToFire == false) + if((component.IsCoolantRequiredToFire == true && component.CoolantStored >= component.CoolantConsumed) || component.IsCoolantRequiredToFire == false) { if (args.Handled) return; @@ -156,10 +218,13 @@ private void OnFireAction(EntityUid uid, SpaceArtilleryComponent component, Fire TryFireArtillery(uid, component, battery); args.Handled = true; - } - } + } else + OnMalfunction(uid,component); + } else + OnMalfunction(uid,component); } - } + } else + OnMalfunction(uid,component); } @@ -256,20 +321,12 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, if (!_gun.TryGetGun(uid, out var gunUid, out var gun)) { + OnMalfunction(uid,component); return; } if(TryComp(uid, out var transformComponent)){ - if(component.IsPowerRequiredToFire == true) - { - battery.CurrentCharge -= component.PowerUseActive; - } - if(component.IsCoolantRequiredToFire == true) - { - component.CoolantStored -= 1; - } - var worldPosX = transformComponent.WorldPosition.X; var worldPosY = transformComponent.WorldPosition.Y; var worldRot = transformComponent.WorldRotation+rotOffset; @@ -282,12 +339,51 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + } + } + + private void GetInsertedCoolantAmount(SpaceArtilleryComponent component, out int amount) + { + amount = 0; + var coolantEntity = component.CoolantSlot.ContainerSlot?.ContainedEntity; + + if (!TryComp(coolantEntity, out var coolantStack) || + coolantStack.StackTypeId != component.CoolantType) + { + return; + } + + amount = coolantStack.Count; + return; + } + + private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoShotEvent args) + { + if(TryComp(uid, out var transformComponent) && TryComp(uid, out var battery)){ + var worldPosX = transformComponent.WorldPosition.X; + var worldPosY = transformComponent.WorldPosition.Y; + var worldRot = transformComponent.WorldRotation+rotOffset; + var targetSpot = new Vector2(worldPosX - distance * (float) Math.Sin(worldRot), worldPosY + distance * (float) Math.Cos(worldRot)); - ///Space Recoil is handled here - if(transformComponent.Anchored == true) + var _gridUid = transformComponent.GridUid; + + + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedFiringPort, true); + + if(component.IsPowerRequiredToFire == true) + { + battery.CurrentCharge -= component.PowerUseActive; + } + if(component.IsCoolantRequiredToFire == true) + { + component.CoolantStored -= component.CoolantConsumed; + } + + ///Space Recoil is handled here + if(transformComponent.Anchored == true) + { + if(TryComp(_gridUid, out var gridPhysicsComponent) && _gridUid is {Valid :true} gridUid) { - if(TryComp(_gridUid, out var gridPhysicsComponent) && _gridUid is {Valid :true} gridUid) - { var gridMass = gridPhysicsComponent.FixturesMass; var linearVelocityLimitGrid = component.VelocityLimitRecoilGrid; var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; @@ -341,18 +437,13 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, } } - private void GetInsertedCoolantAmount(SpaceArtilleryComponent component, out int amount) - { - amount = 0; - var coolantEntity = component.CoolantSlot.ContainerSlot?.ContainedEntity; - - if (!TryComp(coolantEntity, out var coolantStack) || - coolantStack.StackTypeId != component.CoolantType) - { - return; - } - - amount = coolantStack.Count; - return; - } + private void OnEmptyShotEvent(EntityUid uid, SpaceArtilleryComponent component, OnEmptyGunShotEvent args) + { + OnMalfunction(uid,component); + } + + private void OnMalfunction(EntityUid uid, SpaceArtilleryComponent component) + { + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedMalfunctionPort, true); + } } \ No newline at end of file diff --git a/Resources/Locale/en-US/_NF/space_artillery/examine.ftl b/Resources/Locale/en-US/_NF/space_artillery/examine.ftl new file mode 100644 index 00000000000..40c8f6796f1 --- /dev/null +++ b/Resources/Locale/en-US/_NF/space_artillery/examine.ftl @@ -0,0 +1,9 @@ +space-artillery-on-examine-armed = Armament mode: [bold][color=green]SAFE[/color][/bold] + +space-artillery-on-examine-safe = Armament mode: [bold][color=red]ARMED[/color][/bold] + + + +space-artillery-on-examine-coolant-consumed = Consumed coolant: [bold][color=cyan]{$consumed_coolant}[/color][/bold] + +space-artillery-on-examine-coolant-count = Remaining coolant: [bold][color=cyan]{$current_coolant} / {$max_coolant}[/color][/bold] diff --git a/Resources/Locale/en-US/_NF/space_artillery/receiver_ports.ftl b/Resources/Locale/en-US/_NF/space_artillery/receiver_ports.ftl new file mode 100644 index 00000000000..a3dd754a553 --- /dev/null +++ b/Resources/Locale/en-US/_NF/space_artillery/receiver_ports.ftl @@ -0,0 +1,11 @@ +signal-port-name-space-artillery-fire = Fire Armament +signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. + +signal-port-name-space-artillery-toggle-safety = Toggle Safety +signal-port-description-space-artillery-toggle-safety = Toggles Space Artillery's safety mechanism. + +signal-port-name-space-artillery-on-safety = On Safety +signal-port-description-space-artillery-on-safety = Enables Space Artillery's safety mechanism, preventing it from firing. + +signal-port-name-space-artillery-off-safety = Off Safety +signal-port-description-space-artillery-off-safety = Disables Space Artillery's safety mechanism, readying it for firing. \ No newline at end of file diff --git a/Resources/Locale/en-US/_NF/space_artillery/transmitter_ports.ftl b/Resources/Locale/en-US/_NF/space_artillery/transmitter_ports.ftl new file mode 100644 index 00000000000..de1a4248bad --- /dev/null +++ b/Resources/Locale/en-US/_NF/space_artillery/transmitter_ports.ftl @@ -0,0 +1,8 @@ +signal-port-name-space-artillery-detected-firing = Firing detected +signal-port-description-space-artillery-detected-firing = Sends signal when it detects Space Artillery succesfully firing a shot. + +signal-port-name-space-artillery-detected-malfunction = Malfunction detected +signal-port-description-space-artillery-detected-malfunction = Sends signal when it detects Space Artillery failing to fire or detecting an issue. + +signal-port-name-space-artillery-detected-safety-change = Safety Change detected +signal-port-description-space-artillery-detected-safety-change = Sends signal when it detects Space Artillery succesfully changing safety mode. \ No newline at end of file diff --git a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl index 5a589bcdd5e..4d2dd25af2c 100644 --- a/Resources/Locale/en-US/machine-linking/receiver_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/receiver_ports.ftl @@ -78,9 +78,3 @@ signal-port-description-logic-input-b = Second input of a logic gate. signal-port-name-logic-input = Input signal-port-description-logic-input = Input to the edge detector, cannot be a pulse signal. - -signal-port-name-space-artillery-fire = Fire -signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. - -signal-port-name-space-artillery-safety = Safety -signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. \ No newline at end of file diff --git a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl index 8cef848f821..be76eb1beaf 100644 --- a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl +++ b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl @@ -46,8 +46,3 @@ signal-port-description-air-warning = This port is invoked with HIGH when in war signal-port-name-air-normal = Normal signal-port-description-air-normal = This port is invoked with HIGH when in normal mode and LOW when not. -signal-port-name-space-artillery-fire = Fire -signal-port-description-space-artillery-fire = Controls Space Artillery's firing mechanism. - -signal-port-name-space-artillery-safety = Safety -signal-port-description-space-artillery-safety = Toggles Space Artillery's safety mechanism. diff --git a/Resources/Prototypes/DeviceLinking/sink_ports.yml b/Resources/Prototypes/DeviceLinking/sink_ports.yml index e24c21778c1..b0575b5d26b 100644 --- a/Resources/Prototypes/DeviceLinking/sink_ports.yml +++ b/Resources/Prototypes/DeviceLinking/sink_ports.yml @@ -216,13 +216,3 @@ id: SetParticleZeta name: signal-port-name-set-particle-zeta description: signal-port-description-set-particle-zeta - -- type: sinkPort - id: SpaceArtilleryFire - name: signal-port-name-space-artillery-fire - description: signal-port-description-space-artillery-fire - -- type: sinkPort - id: SpaceArtillerySafety - name: signal-port-name-space-artillery-safety - description: signal-port-description-space-artillery-safety \ No newline at end of file diff --git a/Resources/Prototypes/DeviceLinking/source_ports.yml b/Resources/Prototypes/DeviceLinking/source_ports.yml index b91db0aa621..95bd15fa0f9 100644 --- a/Resources/Prototypes/DeviceLinking/source_ports.yml +++ b/Resources/Prototypes/DeviceLinking/source_ports.yml @@ -115,12 +115,3 @@ description: signal-port-description-air-normal defaultLinks: [ DoorBolt ] -- type: sourcePort - id: SpaceArtilleryFire - name: signal-port-name-space-artillery-fire - description: signal-port-description-space-artillery-fire - -- type: sourcePort - id: SpaceArtillerySafety - name: signal-port-name-space-artillery-safety - description: signal-port-description-space-artillery-safety diff --git a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml index 7a3c544e07e..7a6ef531bf0 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml @@ -60,11 +60,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: Gun fireRate: 1 projectileSpeed: 70 @@ -153,11 +156,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: Gun fireRate: 1 projectileSpeed: 70 @@ -171,6 +177,7 @@ powerUsePassive: 3000 isPowerRequiredForSignal: true isPowerRequiredToFire: false + linearRecoilGrid: 300 - type: Actions - type: CombatMode IsInCombatMode: true @@ -254,6 +261,15 @@ position: Stand buckleOffset: "0,0.8" maxBuckleDistance: 1 + - type: UserInterface + interfaces: + - key: enum.RadarConsoleUiKey.Key + type: RadarConsoleBoundUserInterface + - type: IntrinsicUI + uis: + - key: enum.RadarConsoleUiKey.Key + toggleAction: ActionSpaceArtilleryShowRadar + - type: RadarConsole - type: entity id: Mounted_Machine_Gun_50_WallMounted @@ -303,11 +319,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: BallisticAmmoProvider autoCycle: true capacity: 120 @@ -415,11 +434,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: Gun fireRate: 1 projectileSpeed: 70 @@ -434,6 +456,8 @@ powerUseActive: 500000 isPowerRequiredForSignal: true isPowerRequiredToFire: true + linearRecoilGrid: 900 + angularInstabilityGrid: 30 - type: Actions - type: CombatMode IsInCombatMode: true @@ -501,11 +525,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: Gun fireRate: 3 projectileSpeed: 70 @@ -605,11 +632,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: Gun fireRate: 3 projectileSpeed: 70 @@ -707,11 +737,14 @@ - type: DeviceLinkSink ports: - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety - type: DeviceLinkSource ports: - - SpaceArtilleryFire - - SpaceArtillerySafety + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange - type: Gun fireRate: 3 projectileSpeed: 70 @@ -842,3 +875,15 @@ +- type: entity + id: ActionSpaceArtilleryShowRadar + name: Mass Scanner Interface + description: View a mass scanner interface. + noSpawn: true + components: + - type: InstantAction + icon: { sprite: Structures/Machines/parts.rsi, state: box_0 } + iconOn: Structures/Machines/parts.rsi/box_2.png + keywords: [ "AI", "console", "interface" ] + priority: -10 + event: !type:ToggleIntrinsicUIEvent { key: enum.RadarConsoleUiKey.Key } \ No newline at end of file diff --git a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml index e3173993fab..ffef8429e16 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml @@ -39,7 +39,7 @@ proto: BulletShellEmp deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_armorpiercing_shell_casing.rsi + sprite: _NF/Objects/SpaceArtillery/630_emp_shell_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] @@ -174,7 +174,7 @@ lifetime: 20 #roughly 600m range - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi + sprite: _NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi layers: - state: base-projectile - type: ExplodeOnTrigger @@ -205,7 +205,7 @@ proto: BulletShellPractice deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/630_highexplosive_shell_casing.rsi + sprite: _NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] @@ -284,7 +284,7 @@ lifetime: 20 #roughly 600m range - type: Sprite - sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + sprite: _NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi layers: - state: base-projectile - type: EmpOnTrigger @@ -312,7 +312,7 @@ proto: BulletMachineGunEMP deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi + sprite: _NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] diff --git a/Resources/Prototypes/_NF/SpaceArtillery/sink_ports.yml b/Resources/Prototypes/_NF/SpaceArtillery/sink_ports.yml new file mode 100644 index 00000000000..9fcd4478639 --- /dev/null +++ b/Resources/Prototypes/_NF/SpaceArtillery/sink_ports.yml @@ -0,0 +1,19 @@ +- type: sinkPort + id: SpaceArtilleryFire + name: signal-port-name-space-artillery-fire + description: signal-port-description-space-artillery-fire + +- type: sinkPort + id: SpaceArtilleryToggleSafety + name: signal-port-name-space-artillery-toggle-safety + description: signal-port-description-space-artillery-toggle-safety + +- type: sinkPort + id: SpaceArtilleryOnSafety + name: signal-port-name-space-artillery-on-safety + description: signal-port-description-space-artillery-on-safety + +- type: sinkPort + id: SpaceArtilleryOffSafety + name: signal-port-name-space-artillery-off-safety + description: signal-port-description-space-artillery-off-safety \ No newline at end of file diff --git a/Resources/Prototypes/_NF/SpaceArtillery/source_ports.yml b/Resources/Prototypes/_NF/SpaceArtillery/source_ports.yml new file mode 100644 index 00000000000..b18ec6108a2 --- /dev/null +++ b/Resources/Prototypes/_NF/SpaceArtillery/source_ports.yml @@ -0,0 +1,14 @@ +- type: sourcePort + id: SpaceArtilleryDetectedFiring + name: signal-port-name-space-artillery-detected-firing + description: signal-port-description-space-artillery-detected-firing + +- type: sourcePort + id: SpaceArtilleryDetectedMalfunction + name: signal-port-name-space-artillery-detected-malfunction + description: signal-port-description-space-artillery-detected-malfunction + +- type: sourcePort + id: SpaceArtilleryDetectedSafetyChange + name: signal-port-name-space-artillery-detected-safety-change + description: signal-port-description-space-artillery-detected-safety-change \ No newline at end of file diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi/base-projectile.png index c16c990a5fb7af41030eb48ec1d0cb719c599c29..405f3593c8d02b9d6679c105e04e2dd946cace69 100644 GIT binary patch delta 1219 zcmV;!1U&n-3hN1wBpLy8Qb$4nuFf3k00004XF*Lt006O%3;baPks%m=fJsC_RCr$P zna^unRTRh1`+47+d6Uc(o1|7OXpOcOK^OJMLd2c_f+#L^p<)Fo?%XIv5DQ&&(M1kZ}hvqkC=ICLu-_tEd5mar$#MmTag1opvJ-(S^G3Bj_YT!}i

CG^0SVA9yuft6~J-aE8)64 zvXgVl^BmX4`fJ0ms&YgT6(G;EE0JY9^1{qQ`I29+4TD(8uR~OT)#T)PKE-jBqNs{% z7YptWEqXMRB7n&*k?#josnie&1PC!_N@A3h=l~YN)V=SA+6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+r1@HRn3AGB4B#}WCf9FX=K~#7F?ODxl8$}%b?Wfb=B*lq|)D+Yrp(vbya^%8^ z190O)RgiiE@gV^PMQ}q1sE{hk1+KuqfW(0l;#3YGaRWiCo=B9Cm?ZXkzj<%RYhu?) zisjj;bVeGFy*slr@6G#t>{!He?_}``JyRN;lwa+j(!4sBcUrE#K1t?%n zq|g5{y1j?`4(fx0L-hXYuRzx{7hb$%#c{lV9dFFfFTUcs?nT>n>#pkw$iTF@U=n#jh%MTJd65V7zQhjQ$GQK0B;qQD#-Ix;y7dP z)2?g3hA)q!euerys@9^N0D$GzuAn}dW!aS4?SdG|va|r_`;N@cPLr&Af*@Ln&h z^3%`PrMWOGi;E}a%$bM9#+VP@A09Ee-&zTXqY#*p^l+Eq;UR^QE2pU-HPm_S)+3PAu_+m86YkK1Kr7?cBfVMt^@-K7!& z#s{HaA(awPD&c79m%#aothZE3KnaBeFcRP$e*q4!JP_es1)PZ!UzGUPsJk2s0R&Be z>IHGo{uSW72$QmLBoB<|6Qp95DTzU z3%Ni962c-B@(jT97$pu$6b~Y1e9-$xR;qyg6B96%&~EP(c>(SHa3$;?J-P3dDxh38 ze;ptl9sVN#_@r=lj^h*r9IS+L^kmy(A>dyKls=EfBAf&66=|~X*YG~TW%0CFul;i! z$4Y?82OJPU652&%pc43>K~<$f0@QA*NHFZ!Xb!y3gAe3AvCS7A6mBH&XE+JwaTh2Uf3R;lMc4Bsvmkw(0|prm4>;gX_W@ppgOIY2 z1Z1{(tS(RwGH zFkl!k3>XFs1BL;^fMLKeU>GnA7zPXjh5^HXVc>3H;2+B@!UMdM?@<5%002ov22Mn- GLSTZ?`*V^2 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..c16f964e83d8a32d05f48edda263ac9222128d3d GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G^tAk28_ZrvZCV6CT%V@QO1vIOhm1d*PmK!Xbnf?kt(P8C1@ z%YN~D{G7yytyNMtpBXs5WModUesEaauPvS@hUfo`1B{Ml61x-`n0g#eoIJ_P*9jIL9)`)5LN1*X S-8Fy?VeoYIb6Mw<&;$T$eoF8F literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/base-spent.png new file mode 100644 index 0000000000000000000000000000000000000000..5fc0a28554ddee16e43e904ede4f3720375fb935 GIT binary patch literal 516 zcmV+f0{i`mP)ivLm1WeExl614&C9`0oxd zssW$-hoa$Hc;|hbHeSg(1{L6}l1H&nMJ}5G&M&Ak(8!TOh0?=Ed8blfjO_d@a`$B_Sh2?@ZHmrt|Pmg)h`!Uz`$ zK%KiTJ7YRTqy{3ov4ZlGY!CPVuIq+rr+E`d05gUO zb3P4oHVdXVB?PIILUh4s&K2FVAnp10bSbUf;4paUJE25_WgWsNK~` zud1RZ1)dxq38!m?zhAr4k+tCA@#%x4MYb*pOdR+#4txQUK!2sITw0z00000n

tDgEP6vh(HE#Jz@MGjbW`dl%l;B zkO9WEGydP{+sOd289trfjmfB38<7lPeRs_vgbO{79&m(*^f1k58}Pq3p_B>YSf_$tLAV_QLEBJdfb(As_CHzXSuQ*rwFC zqaUJNSwn5TimlBWPR<&cpM;i}B(lPHZ{O&!@2A`Erq?sQ5aZ(VA32}RIhVKtd$E+u T{lx5u00000NkvXXu0mjf-meIE literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/meta.json new file mode 100644 index 00000000000..16745049c94 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi/meta.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/8a848cde3e8610455f77704e861e5a06315a3b0e/icons/obj/ammo.dmi", + "states": [ + { + "name": "base" + }, + { + "name": "base-spent" + }, + { + "name": "base-projectile" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..294b071dc08fa279b608e608ae4ba37f32c42ca3 GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G^tAk28_ZrvZCV6Uf(V@QPi+e;gH4;hHCT-eNOc*sM6OD(1G z%z-H)JPfS7zCuFMUHcvMCf>P|y|1*j_L8}a%M!En;%(ReM$I}cc=K(c-Q5?}d(Pgp z`d`19ivLm1WeExl614&C9`0oxd zssW$-hoa$Hc;|hbHeSg(1{L6}l1H&nMJ}5G&M&Ak(8!TOh0?=Ed8blfjO_d@a`$B_Sh2?@ZHmrt|Pmg)h`!Uz`$ zK%KiTJ7YRTqy{3ov4ZlGY!CPVuIq+rr+E`d05gUO zb3P4oHVdXVB?PIILUh4s&K2FVAnp10bSbUf;4paUJE25_WgWsNK~` zud1RZ1)dxq38!m?zhAr4k+tCA@#%x4MYb*pOdR+#4txQUK!2sITw0z00000;!%3z z3h%&!Ah-bM9=O1z5(gxHBq&0SqEt~F+u7`H*V{z+SkEGH!II^*zy{V8^=m1 zyn1sitVOA*Rw}6s?CtJg=iU~wEW=|u zzaR}vCQ~HS#5v$@$b%A4+HTYwd7k^SA$tNPU`4jjy52ymxdssroCqpPUOXk>!^abh zMnl}(?BH6ff$!gbkPRTEzkK~p^!j(OeRm5F?r-Dx{Ry?JmZ~Y>lgE#2HW~TP?|eLV kSt#)7^C`teTlcqs7im?aB?#fi9{>OV07*qoM6N<$f;4^zxc~qF literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/meta.json new file mode 100644 index 00000000000..16745049c94 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi/meta.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/8a848cde3e8610455f77704e861e5a06315a3b0e/icons/obj/ammo.dmi", + "states": [ + { + "name": "base" + }, + { + "name": "base-spent" + }, + { + "name": "base-projectile" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..5acf67f01706b592caf50c23856c6b554d54661b GIT binary patch literal 523 zcmV+m0`&cfP)`00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc0ia1lK~yMHO_9BB z6HyR_zx(4|@2=TIc1RZrIwV?XAheV`1VV^6pv(hM@d7*p^mIrR$Z~@aZU}-9Llb+m z8$0`ZnY*?GM;h(inKS3^oU2|xd*tFcB+Cj`7aQ8TCW->?-nq@=C-=b|qOBXCT*5%b zSQS7QO2jy2F>==J3SE^g+G&h2D5db|x~|WSu{33a?wr9nht|3epL_V+4_4PD`m)&U zNKU4=1P@OF$NDlu=fzs|y|mdiq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z^l`GgK@w#8bJbX0b-$}+~7RyXo=F6NvM@!nCqTjAd zK@wgXkBd^Wc!^u3m`ux#$wW+>i|SM{Z`{AdaJ*uC-eWqmOr*Nqoi&qb%x1sI`PBvH zt8c#N{9?s235i6eFs^WVks|lc1 z0t%qCuDmba)u#{Ma)VdeG=m(!YNV11R+=59mT;jN9nbj>)JllQ#+y}-00000NkvXX Hu0mjfF21KP literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/meta.json b/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/meta.json new file mode 100644 index 00000000000..16745049c94 --- /dev/null +++ b/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/meta.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/8a848cde3e8610455f77704e861e5a06315a3b0e/icons/obj/ammo.dmi", + "states": [ + { + "name": "base" + }, + { + "name": "base-spent" + }, + { + "name": "base-projectile" + } + ] +} \ No newline at end of file From 0e91c59ec0fd1499659e5c58580aebfc0d73f7f5 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 5 Jan 2024 10:59:16 +0100 Subject: [PATCH 27/32] Space Artillery ammunition rebalance --- .../_NF/SpaceArtillery/armaments.yml | 19 +- .../Prototypes/_NF/SpaceArtillery/laser.yml | 6 +- .../Prototypes/_NF/SpaceArtillery/shells.yml | 270 ++++++++++++++++-- .../base-projectile.png | Bin 0 -> 215 bytes .../base-spent.png | Bin 0 -> 516 bytes .../base.png | Bin 0 -> 588 bytes .../meta.json | 20 ++ .../base-projectile.png | Bin 523 -> 577 bytes .../base-spent.png | Bin 504 -> 608 bytes .../630_practice_shell_casing.rsi/base.png | Bin 881 -> 1032 bytes 10 files changed, 286 insertions(+), 29 deletions(-) create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base-projectile.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base-spent.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base.png create mode 100644 Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/meta.json diff --git a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml index 7a6ef531bf0..700ae512374 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml @@ -231,7 +231,7 @@ - type: BallisticAmmoProvider autoCycle: true capacity: 60 - proto: CartridgeMachineGun + proto: CartridgeMachineGunArmorPiercing whitelist: tags: - CartridgeMachineGun @@ -330,7 +330,7 @@ - type: BallisticAmmoProvider autoCycle: true capacity: 120 - proto: CartridgeMachineGun + proto: CartridgeMachineGunArmorPiercing whitelist: tags: - CartridgeMachineGun @@ -456,8 +456,20 @@ powerUseActive: 500000 isPowerRequiredForSignal: true isPowerRequiredToFire: true + isCoolantRequiredToFire: true + coolantConsumed: 30 + maxCoolantStored: 120 linearRecoilGrid: 900 angularInstabilityGrid: 30 + SpaceArtillery-CoolantSlot: + name: SpaceArtillery-CoolantSlot + insertSound: /Audio/Machines/scanning.ogg + ejectSound: /Audio/Machines/tray_eject.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - Stack - type: Actions - type: CombatMode IsInCombatMode: true @@ -467,6 +479,9 @@ - type: BatterySelfRecharger - type: RadiationBlocker resistance: 8 + - type: ContainerContainer + containers: + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} - type: entity id: Military_Laser diff --git a/Resources/Prototypes/_NF/SpaceArtillery/laser.yml b/Resources/Prototypes/_NF/SpaceArtillery/laser.yml index b474a3ad2d0..5548ed219f4 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/laser.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/laser.yml @@ -2,8 +2,8 @@ id: Mining damage: types: - Heat: 10 - Structural: 300 + Heat: 5 + Structural: 100 muzzleFlash: sprite: _NF/Objects/SpaceArtillery/lasers.rsi state: muzzle_mining @@ -20,7 +20,7 @@ damage: types: Heat: 30 - Structural: 1000 + Structural: 800 muzzleFlash: sprite: _NF/Objects/SpaceArtillery/lasers.rsi state: muzzle_focused_pulse diff --git a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml index ffef8429e16..aa12bca49b2 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml @@ -12,6 +12,7 @@ damage: types: Structural: 100 + Blunt: 20 - type: TimedDespawn lifetime: 20 #roughly 600m range @@ -22,7 +23,7 @@ - type: EmpOnTrigger range: 8 energyConsumption: 50000 - disableDuration: 60 + disableDuration: 20 - type: entity id: CartridgeShellEmp @@ -59,7 +60,7 @@ damage: types: Structural: 1000 - #currently explosion deals roughly 22.5 damage + #currently explosion deals roughly 60 damage - type: TimedDespawn lifetime: 20 #roughly 600m range @@ -213,10 +214,62 @@ - type: SpentAmmoVisuals - type: SpaceGarbage +#.50 call EMP for machine gun +- type: entity + id: BulletMachineGunEMP + name: 50 Machine Gun EMP bullet + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 35 + Blunt: 10 + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi + layers: + - state: base-projectile + - type: EmpOnTrigger + range: 3 + energyConsumption: 2000 + disableDuration: 3 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeMachineGunEMP + name: 50 Machine Gun EMP cartridge + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeMachineGun + - Cartridge + - type: Item + size: 2 + - type: CartridgeAmmo + proto: BulletMachineGunEMP + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + #.50 call AP for machine gun - type: entity - id: BulletMachineGun - name: 50 Machine Gun bullet + id: BulletMachineGunArmorPiercing + name: 50 Machine Gun Armor-Piercing bullet parent: BaseBulletTrigger noSpawn: true components: @@ -224,7 +277,7 @@ damage: types: Structural: 35 - #currently explosion deals roughly ? damage + #currently explosion deals 30 damage - type: TimedDespawn lifetime: 20 #roughly 600m range @@ -245,8 +298,8 @@ energy: 0.5 - type: entity - id: CartridgeMachineGun - name: 50 Machine Gun cartridge + id: CartridgeMachineGunArmorPiercing + name: 50 Machine Gun Armor-Piercing cartridge parent: BaseItem description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. components: @@ -257,7 +310,7 @@ - type: Item size: 2 - type: CartridgeAmmo - proto: BulletMachineGun + proto: BulletMachineGunArmorPiercing deleteOnSpawn: false - type: Sprite sprite: _NF/Objects/SpaceArtillery/50_armorpiercing_machinegun_casing.rsi @@ -268,37 +321,40 @@ - type: SpentAmmoVisuals - type: SpaceGarbage -#.50 call EMP for machine gun +#.50 call HE for machine gun - type: entity - id: BulletMachineGunEMP - name: 50 Machine Gun EMP bullet + id: BulletMachineGunHighExplosive + name: 50 Machine Gun High-Explosive bullet parent: BaseBulletTrigger noSpawn: true components: - type: Projectile damage: types: - Structural: 35 - #currently explosion deals roughly ? damage + Structural: 24 + #currently explosion deals 21 damage per tile in large AoE - type: TimedDespawn lifetime: 20 #roughly 600m range - type: Sprite - sprite: _NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi + sprite: _NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi layers: - state: base-projectile - - type: EmpOnTrigger - range: 3 - energyConsumption: 2000 - disableDuration: 4 + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 1.4 + intensitySlope: 0.8 + totalIntensity: 16 + maxTileBreak: 0 - type: PointLight radius: 3.5 color: orange energy: 0.5 - type: entity - id: CartridgeMachineGunEMP - name: 50 Machine Gun EMP cartridge + id: CartridgeMachineGunHighExplosive + name: 50 Machine Gun High-Explosive cartridge parent: BaseItem description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. components: @@ -309,10 +365,10 @@ - type: Item size: 2 - type: CartridgeAmmo - proto: BulletMachineGunEMP + proto: BulletMachineGunHighExplosive deleteOnSpawn: false - type: Sprite - sprite: _NF/Objects/SpaceArtillery/50_emp_machinegun_casing.rsi + sprite: _NF/Objects/SpaceArtillery/50_highexplosive_machinegun_casing.rsi layers: - state: base map: ["enum.AmmoVisualLayers.Base"] @@ -320,7 +376,117 @@ - type: SpentAmmoVisuals - type: SpaceGarbage -#1000 cal Railgun Rails +#.50 call Practice for machine gun +- type: entity + id: BulletMachineGunPractice + name: 50 Machine Gun Practice bullet + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 5 + #currently explosion deals 30 damage + - type: TimedDespawn + lifetime: 20 + #roughly 600m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 0.1 + intensitySlope: 1 + totalIntensity: 0.6 + maxTileBreak: 0 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeMachineGunPractice + name: 50 Machine Gun Practice cartridge + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeMachineGun + - Cartridge + - type: Item + size: 2 + - type: CartridgeAmmo + proto: BulletMachineGunPractice + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + + +#1000 cal Railgun EMP Rail + +- type: entity + id: BulletRailEMP + name: rail + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 500 + Blunt: 50 + - type: TimedDespawn + lifetime: 34 + #roughly 1000m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base-projectile + - type: EmpOnTrigger + range: 12 + energyConsumption: 1000000 + disableDuration: 120 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeRailEMP + name: 1000 EMP rail + parent: BaseItem + description: A 1000 caliber rail designed for the Railgun. Is made out of solid plasma infused tungsten rod. Punches through hull like butter. + components: + - type: Tag + tags: + - CartridgeRail + - Cartridge + - type: Item + size: 120 + - type: MultiHandedItem + - type: CartridgeAmmo + proto: BulletRailEMP + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage + +#1000 cal Railgun AP Rail - type: entity id: BulletRailArmorPiercing @@ -332,7 +498,7 @@ damage: types: Structural: 10000 - #currently explosion deals roughly 22.5 damage + #currently explosion deals 720 damage, gibs in 3 direct rail hits - type: TimedDespawn lifetime: 34 #roughly 1000m range @@ -377,6 +543,62 @@ - type: SpentAmmoVisuals - type: SpaceGarbage +#1000 cal Railgun HE Rail + +- type: entity + id: BulletRailHighExplosive + name: rail + parent: BaseBulletTrigger + noSpawn: true + components: + - type: Projectile + damage: + types: + Structural: 1000 + #currently explosion deals 156 damage per tile in large AoE + - type: TimedDespawn + lifetime: 34 + #roughly 1000m range + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base-projectile + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + maxIntensity: 10 + intensitySlope: 10 + totalIntensity: 500 + maxTileBreak: 50 + - type: PointLight + radius: 3.5 + color: orange + energy: 0.5 + +- type: entity + id: CartridgeRailHighExplosive + name: 1000 High-Explosive rail + parent: BaseItem + description: A 1000 caliber rail designed for the Railgun. Is made out of solid plasma infused tungsten rod. Punches through hull like butter. + components: + - type: Tag + tags: + - CartridgeRail + - Cartridge + - type: Item + size: 120 + - type: MultiHandedItem + - type: CartridgeAmmo + proto: BulletRailHighExplosive + deleteOnSpawn: false + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/1000_armorpiercing_rail_casing.rsi + layers: + - state: base + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + - type: SpaceGarbage diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base-projectile.png b/Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base-projectile.png new file mode 100644 index 0000000000000000000000000000000000000000..1f6a0f6c0b20039d12e30c3d219a2ff0bd37f0a0 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G^tAk28_ZrvZCV2-DYV@QPi+e;gH4=C`kIH>a`u}n)a_CIK$ zbBy6iAxjb4iC~2#`=9A@ZOCcq=qTH5Qy&~EeKTruly=Sew>x?7IJ~c2c2kDs%^l8~ zq@K9M2W-ava#if=)eF6%-Woc*5$GBh=@n8&(Lkm%-E3&t;uc GLK6UyzejEW literal 0 HcmV?d00001 diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/50_practice_machinegun_casing.rsi/base-spent.png new file mode 100644 index 0000000000000000000000000000000000000000..5fc0a28554ddee16e43e904ede4f3720375fb935 GI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IGt78IkLNj1VOvig=$CJ5AOAKhG`@;UQDqWT+Iy+@n-Y zLKU-<#UwW~3;kdXaMr&Se-GM)etZz&P3M%xf$BJhtsTCdE;u>)eD7!Ex+aPO?%ui0<0tpQ9HOlopj^U0#aI#s@aVd(&yBG(WrOaV!8wQ4x(}aw_}mXx*CqP0*z8D7rndwSPXfpKGDGLZ zTJ*iN*)^oKQwBwzU&+6z_GEAGnxa~>5YAs+hDs&Hm&6=c~cS?*j%lp79LQW6dj~AVnyvj zN+KHZtxXQdIl{DUbrMewDQe5IXk{S8MKUxR5sq*2?Oc5Ndb(7nzgog1W)KhQM9Etb zrTe`9Sn=ZJ8`bYTpU(-ySVB~g7toe8O_|MRzD-YBtyU_}bMb2XELz?zNjMUw(`jGW zx+i%1?!%TLn_6pm`ux@I{2$399*wb5iR9{kfWIqmrAmUUYtH}x002ovPDHLkV1fp0 B=sExZ diff --git a/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base-spent.png b/Resources/Textures/_NF/Objects/SpaceArtillery/630_practice_shell_casing.rsi/base-spent.png index 9b309fbd29f47e0865fb02cc8d0f3741882aa012..a8054e10412cad81a7852908dd14b44834e6543e 100644 GIT binary patch delta 598 zcmV-c0;&D@1K}amuC5wjO&dgtmSyO5N8#5B)?*Qkj6@3|*51^c-D&ZRo#gi-L-lV>?x) z0Llc8-@5$tGQ1#RHcOd>Ij3$&!_w$9Y&4Bh54E zUQtS*9N_-JEqcQR!*LrwNb%$<*xOy<`3c=ljq!A{*#OU8ykR_95H2I)7^1|WKUvbO z8nm0XG~d~5fJcW1xPyRRKfv=6rUBUYlzOX}19d*0$W#iYJOswJ#mcevzi z850*{qEOe~voAFFT5ay$bj0mDEf&j^?W#k#lEYw`d^z#?+>5n=KfP$b@~%7w3dO}- zu76RL=GAlaB7{5&&fj0@c&R~|z>~v=V*g%)T0O_9n3#q^Di5Z3ES(a~b=*%gj*ed` k>t4!LK9&SZ0{;<#UkAR|+L39xRR91007*qoM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S9cVN@Hj%U^XpmTxlT8sqlyie3GGNJJ@t>IvH`QhHD1+@a}hLZ_sHdO8>LYr^5-j zO-HrbnhTL-)X{NT=xo~PZd?CC^am*}=x83Pm}rdBHG64u$7^H%1zWzj=OIZ2npGRY zoWej|^3O*;Rvz{ucIvP3RIEUf8RfsMlJn}qxq_fpuz0@&Eqm8i;G;Wl$nHxn8cqSb u!of`wf*Mnl34}8P{RdOrJ^Hq^-G2aw4wbP6tCWBM0000_&@}mDo#&xS|^7(6?fxi6W6KAcJ$Lp*2-hJKOAj_MhqazoF zA-O9+kY$b_2R9zlsimrj+TV{2ZmOJ5ktKCOK%)tL3Bp zc1J*}1eKx`E+R#qtJ106e`=s>b+7a)yo*(^74{9YRvFrOMnG1)9a>-at+0!5xkyp- zD(Jk@C39<3(Kj8*POx%LMK`BHtV&VVz3J9dLwFuCKUt7or7Zr6X?7c|&O*NaNtjZ4 zlBqOS=yfh3B`;$ooK#$`R_L3xbmNyz{vIiwo>duNcuW@&;Zn+;e`wCm9KW8%g%X$2 zd12DIBn}mQt(7a-CGomn!#sR6;@?TeWERUzS?0@}KSxX2o}%BbOF$w!n~UmHF>ldXdnnRp@oMo(u9PiIUfF;_FF*RKe=MNR>apG25S%VT4!NtlUv zcE(ib>VCjx+m{J7qI!h-;O#xv+mNY@5~2S8GQP*vM8?_E4f;Wc{-)1h$9skvjT0{A zw~8db+U@qZ`;zZoKIpPaEUlW)axEccI{tVv<+ouZL1nELKBAAS37}R23ZS&Eyf5C> yrw`t8gIC%#gB-tVq>>6&njNK Date: Fri, 5 Jan 2024 11:16:54 +0100 Subject: [PATCH 28/32] Space Artillery ammunition fixup --- Resources/Prototypes/_NF/SpaceArtillery/armaments.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml index 700ae512374..d1b0ded7855 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml @@ -426,6 +426,7 @@ containers: ballistic-ammo: !type:Container ents: [] + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} - type: DeviceNetwork deviceNetId: Wireless receiveFrequencyId: BasicDevice @@ -479,9 +480,6 @@ - type: BatterySelfRecharger - type: RadiationBlocker resistance: 8 - - type: ContainerContainer - containers: - SpaceArtillery-CoolantSlot: !type:ContainerSlot {} - type: entity id: Military_Laser @@ -562,6 +560,7 @@ - type: SpaceArtillery isArmed: true isCoolantRequiredToFire: true + coolantConsumed: 10 isPowerRequiredToFire: true SpaceArtillery-CoolantSlot: name: SpaceArtillery-CoolantSlot From c3469cdedb1adff0e4142aef20e8fa19ea794148 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Fri, 2 Feb 2024 14:00:44 +0100 Subject: [PATCH 29/32] Space Artillery activation system WIP --- .../SpaceArtilleryGridComponent.cs | 35 +++++++++++++++++++ .../SpaceArtillery/SpaceArtillerySystem.cs | 12 ++++++- .../_NF/SpaceArtillery/armaments.yml | 2 +- 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs new file mode 100644 index 00000000000..e11f2f570e4 --- /dev/null +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs @@ -0,0 +1,35 @@ +namespace Content.Shared.SpaceArtillery; +using Content.Shared.Construction.Prototypes; +using Content.Shared.DeviceLinking; +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; +using Content.Shared.Actions; +using Robust.Shared.Utility; +using Content.Shared.Containers.ItemSlots; +using Content.Shared.Stacks; + + + +///

+/// Component dictates if grid is allowed to utilise space artillery armaments at all +/// +[RegisterComponent] +public sealed partial class SpaceArtilleryGridComponent : Component +{ + /// + /// Whether the grid has activated the armaments + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsActive = false; + + [ViewVariables] + public TimeSpan LastActivationTime; + + [ViewVariables] + public TimeSpan CooldownDuration = TimeSpan.FromSeconds(300); + + [ViewVariables] + public TimeSpan CooldownEndTime; +} \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index 6549373704f..bd3dd5f3254 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -31,6 +31,7 @@ using Content.Server.DeviceLinking.Components; using Content.Server.DeviceLinking.Systems; using Content.Server.DeviceNetwork; +using Robust.Shared.Timing; namespace Content.Shared.SpaceArtillery; @@ -48,6 +49,7 @@ public sealed partial class SpaceArtillerySystem : EntitySystem [Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly DeviceLinkSystem _deviceLink = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; //var variable = _gameTiming.CurTime; - to set with current time private const float ShootSpeed = 30f; private const float distance = 100; @@ -72,8 +74,16 @@ public override void Initialize() SubscribeLocalEvent(OnExamine); SubscribeLocalEvent(OnComponentInit); SubscribeLocalEvent(OnComponentRemove); + + SubscribeLocalEvent(OnMapInit); } - //TODO detect and handle when weapon fires from gun system and when it does not + + private void OnMapInit(EntityUid uid, SpaceArtilleryGridComponent componentGrid, MapInitEvent args) + { + componentGrid.LastActivationTime = _gameTiming.CurTime; + componentGrid.CooldownEndTime = componentGrid.LastActivationTime + componentGrid.CooldownDuration; + } + private void OnComponentInit(EntityUid uid, SpaceArtilleryComponent component, ComponentInit args) { diff --git a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml index d1b0ded7855..500ee0c7c37 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml @@ -261,7 +261,7 @@ position: Stand buckleOffset: "0,0.8" maxBuckleDistance: 1 - - type: UserInterface + - type: UserInterface #internal radar idea will probably get scrapped interfaces: - key: enum.RadarConsoleUiKey.Key type: RadarConsoleBoundUserInterface From 35efd847b03580bcd349845948df917857bbe79e Mon Sep 17 00:00:00 2001 From: Qulibly Date: Sun, 4 Feb 2024 18:05:06 +0100 Subject: [PATCH 30/32] Space Artillery booster velocity limiter tweaks --- .../SpaceArtillery/SpaceArtillerySystem.cs | 43 ++++++++++++++++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index bd3dd5f3254..8f88b25cb1b 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -399,14 +399,28 @@ private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoS var oldLinearVelocity = gridPhysicsComponent.LinearVelocity; var oldAngularVelocity = gridPhysicsComponent.AngularVelocity; - if(oldLinearVelocity.X >= linearVelocityLimitGrid || oldLinearVelocity.Y >= linearVelocityLimitGrid) + var oldLinearRelativeVelocity = (float) Math.Sqrt((oldLinearVelocity.X * oldLinearVelocity.X) + (oldLinearVelocity.Y * oldLinearVelocity.Y)); + + //Check if grid isn't flying faster already than the velocity limit + if(oldLinearRelativeVelocity >= linearVelocityLimitGrid) return; var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilGrid * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilGrid * (float) Math.Cos(worldRot)); var recoilX = (worldPosX - targetSpotRecoil.X); var recoilY = (worldPosY - targetSpotRecoil.Y); - //TODO fix the velocity limit to work more accuretly - var newLinearVelocity = new Vector2(MathF.Min(oldLinearVelocity.X + (recoilX/gridMass),linearVelocityLimitGrid), MathF.Min(oldLinearVelocity.Y + (recoilY/gridMass),linearVelocityLimitGrid)); + + var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/gridMass), oldLinearVelocity.Y + (recoilY/gridMass)); + + + var newLinearRelativeVelocity = (float) Math.Sqrt((newLinearVelocity.X * newLinearVelocity.X) + (newLinearVelocity.Y * newLinearVelocity.Y)); + + //Check if new velocity isn't faster than the limit + if(newLinearRelativeVelocity > linearVelocityLimitGrid) + { + //Decrease X and Y velocity so that relative velocity matches the limit + newLinearVelocity.X = newLinearVelocity.X * linearVelocityLimitGrid / newLinearRelativeVelocity; + newLinearVelocity.Y = newLinearVelocity.Y * linearVelocityLimitGrid / newLinearRelativeVelocity; + } var randomAngularInstability = _random.Next((int) -component.AngularInstabilityGrid, (int) component.AngularInstabilityGrid); var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/gridMass); @@ -417,6 +431,8 @@ private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoS Sawmill.Info($"Space Artillery recoil. RecoilX: {recoilX} RecoilY: {recoilY} Instability: {randomAngularInstability}"); Sawmill.Info($"Space Artillery recoil. LinearVelocityX: {newLinearVelocity.X}/{oldLinearVelocity.X} LinearVelocityY: {newLinearVelocity.Y}/{oldLinearVelocity.Y} AngularInstability: {newAngularVelocity}/{oldAngularVelocity}"); + + //(float) Math.Sqrt(GetSeverityModifier()); } } else @@ -428,13 +444,28 @@ private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoS var oldLinearVelocity = weaponPhysicsComponent.LinearVelocity; var oldAngularVelocity = weaponPhysicsComponent.AngularVelocity; - if(oldLinearVelocity.X >= linearVelocityLimitWeapon || oldLinearVelocity.Y >= linearVelocityLimitWeapon) + var oldLinearRelativeVelocity = (float) Math.Sqrt((oldLinearVelocity.X * oldLinearVelocity.X) + (oldLinearVelocity.Y * oldLinearVelocity.Y)); + + //Check if weapon isn't flying faster already than the velocity limit + if(oldLinearRelativeVelocity >= linearVelocityLimitWeapon) return; var targetSpotRecoil = new Vector2(worldPosX - component.LinearRecoilWeapon * (float) Math.Sin(worldRot), worldPosY + component.LinearRecoilWeapon * (float) Math.Cos(worldRot)); var recoilX = (worldPosX - targetSpotRecoil.X); var recoilY = (worldPosY - targetSpotRecoil.Y); - var newLinearVelocity = new Vector2(MathF.Min(oldLinearVelocity.X + (recoilX/weaponMass),linearVelocityLimitWeapon), MathF.Min(oldLinearVelocity.Y + (recoilY/weaponMass),linearVelocityLimitWeapon)); + + var newLinearVelocity = new Vector2(oldLinearVelocity.X + (recoilX/weaponMass), oldLinearVelocity.Y + (recoilY/weaponMass)); + + + var newLinearRelativeVelocity = (float) Math.Sqrt((newLinearVelocity.X * newLinearVelocity.X) + (newLinearVelocity.Y * newLinearVelocity.Y)); + + //Check if new velocity isn't faster than the limit + if(newLinearRelativeVelocity > linearVelocityLimitWeapon) + { + //Decrease X and Y velocity so that relative velocity matches the limit + newLinearVelocity.X = newLinearVelocity.X * linearVelocityLimitWeapon / newLinearRelativeVelocity; + newLinearVelocity.Y = newLinearVelocity.Y * linearVelocityLimitWeapon / newLinearRelativeVelocity; + } var randomAngularInstability = _random.Next((int) -component.AngularInstabilityWeapon, (int) component.AngularInstabilityWeapon); var newAngularVelocity = oldAngularVelocity + (randomAngularInstability/weaponMass); @@ -442,6 +473,8 @@ private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoS _physicsSystem.SetLinearVelocity(uid, newLinearVelocity); _physicsSystem.SetAngularVelocity(uid, newAngularVelocity); + + //(float) Math.Sqrt(GetSeverityModifier()); } } } From 15e087a44c49d6312c388c73c376279953dac2f5 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Tue, 13 Feb 2024 19:41:31 +0100 Subject: [PATCH 31/32] Space Artillery basic Activation System framework with working Safezone System --- .../Projectiles/ProjectileSystem.cs | 18 ++ .../Components/IFFConsoleComponent.cs | 17 +- ...ckSpaceArtilleryProjectileGridComponent.cs | 12 + .../SpaceArtilleryComponent.cs | 11 + .../Components/SpaceArtilleryGridComponent.cs | 72 ++++++ .../SpaceArtilleryProjectileComponent.cs | 12 + .../SpaceArtilleryGridActivationEvents.cs | 10 + .../SpaceArtilleryGridComponent.cs | 35 --- .../SpaceArtillery/SpaceArtillerySystem.cs | 211 +++++++++++++++++- .../Prototypes/_NF/SpaceArtillery/shells.yml | 11 + 10 files changed, 363 insertions(+), 46 deletions(-) create mode 100644 Content.Server/_NF/SpaceArtillery/Components/BlockSpaceArtilleryProjectileGridComponent.cs rename Content.Server/_NF/SpaceArtillery/{ => Components}/SpaceArtilleryComponent.cs (93%) create mode 100644 Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryGridComponent.cs create mode 100644 Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryProjectileComponent.cs create mode 100644 Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridActivationEvents.cs delete mode 100644 Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index 8c6b84ec047..bd345f1bd06 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -9,6 +9,7 @@ using Robust.Shared.Physics.Events; using Content.Shared.Mobs.Components; using Robust.Shared.Player; +using Content.Shared.SpaceArtillery; //Frontier Modification namespace Content.Server.Projectiles; @@ -32,6 +33,23 @@ private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref St if (args.OurFixtureId != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity || component is { Weapon: null, OnlyCollideWhenShot: true }) return; + + //Frontier code + // Makes sure that armament projectile doesnt damage the safezone + if(TryComp(args.OtherEntity, out var transformComponent)) + { + var _gridUid = transformComponent.GridUid; + + if(_gridUid is {Valid :true} gridUid) + { + if(HasComp(uid) && HasComp(gridUid)) + { + QueueDel(uid); + return; + } + } + } + //Frontier code ends here var target = args.OtherEntity; // it's here so this check is only done once before possible hit diff --git a/Content.Server/Shuttles/Components/IFFConsoleComponent.cs b/Content.Server/Shuttles/Components/IFFConsoleComponent.cs index 562bec51c26..35cea9c660c 100644 --- a/Content.Server/Shuttles/Components/IFFConsoleComponent.cs +++ b/Content.Server/Shuttles/Components/IFFConsoleComponent.cs @@ -1,9 +1,10 @@ using Content.Server.Shuttles.Systems; using Content.Shared.Shuttles.Components; +using Content.Shared.SpaceArtillery; //Frontier code modification namespace Content.Server.Shuttles.Components; -[RegisterComponent, Access(typeof(ShuttleSystem))] +[RegisterComponent, Access(typeof(ShuttleSystem),typeof(SpaceArtillerySystem))] //Frontier modification, added acces to SpaceArtillerySystem public sealed partial class IFFConsoleComponent : Component { /// @@ -11,4 +12,18 @@ public sealed partial class IFFConsoleComponent : Component /// [ViewVariables(VVAccess.ReadWrite), DataField("allowedFlags")] public IFFFlags AllowedFlags = IFFFlags.HideLabel; + +//Frontier Code - allows temporarily disabling IFF console + /// + /// Whether the console should be treated as temporarily disabled + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsDisabled = false; + + /// + /// Flags into which console will be forced into + /// Switches with main flags when armaments are active + /// + [ViewVariables(VVAccess.ReadWrite)] + public IFFFlags AccessableAllowedFlags = IFFFlags.None; +//Frontier Code ends here } diff --git a/Content.Server/_NF/SpaceArtillery/Components/BlockSpaceArtilleryProjectileGridComponent.cs b/Content.Server/_NF/SpaceArtillery/Components/BlockSpaceArtilleryProjectileGridComponent.cs new file mode 100644 index 00000000000..dd9a6de1979 --- /dev/null +++ b/Content.Server/_NF/SpaceArtillery/Components/BlockSpaceArtilleryProjectileGridComponent.cs @@ -0,0 +1,12 @@ +namespace Content.Shared.SpaceArtillery; +using Content.Shared.Construction.Prototypes; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; + + +[RegisterComponent] +public sealed partial class BlockSpaceArtilleryProjectileGridComponent : Component +{ + +} \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs b/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryComponent.cs similarity index 93% rename from Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs rename to Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryComponent.cs index 1bec4b18f5c..0b495568d2b 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryComponent.cs +++ b/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryComponent.cs @@ -66,6 +66,17 @@ public sealed partial class SpaceArtilleryComponent : Component [DataField("powerChargeRate"), ViewVariables(VVAccess.ReadWrite)] public int PowerChargeRate = 3000; + /// + /// Whether the space artillery requires whole vessel to activate its armaments, + /// Use these for any armaments with high destructive capability + /// + [DataField("isDestructive"),ViewVariables(VVAccess.ReadWrite)] public bool IsDestructive = true; + + /// + /// Whether the space artillery can send signals at all + /// + [DataField("isCapableOfSendingSignal"),ViewVariables(VVAccess.ReadWrite)] public bool IsCapableOfSendingSignal = true; + /// /// Whether the space artillery need power to operate remotely from signal /// diff --git a/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryGridComponent.cs b/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryGridComponent.cs new file mode 100644 index 00000000000..b1c13819f6e --- /dev/null +++ b/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryGridComponent.cs @@ -0,0 +1,72 @@ +namespace Content.Shared.SpaceArtillery; +using Content.Shared.Construction.Prototypes; +using Content.Shared.DeviceLinking; +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; +using Content.Shared.Actions; +using Robust.Shared.Utility; +using Content.Shared.Containers.ItemSlots; +using Content.Shared.Stacks; +using Content.Shared.Shuttles.Components; + + + +/// +/// Component dictates if grid is allowed to utilise space artillery armaments at all +/// +[RegisterComponent] +public sealed partial class SpaceArtilleryGridComponent : Component +{ + /// + /// Whether the grid has fully activated the armaments + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsActive = false; + + /// + /// Whether the grid started activating the armaments, safety delay + /// + [ViewVariables(VVAccess.ReadWrite)] public bool IsCharging = false; + + [ViewVariables] + public TimeSpan LastActivationTime; + + [ViewVariables] + public TimeSpan ChargeUpDuration = TimeSpan.FromSeconds(30); + + [ViewVariables] + public TimeSpan ChargeUpEndTime; + + [ViewVariables] + public TimeSpan CooldownDuration = TimeSpan.FromSeconds(120); + + [ViewVariables] + public TimeSpan CooldownEndTime; + + /// + /// Default color to use for IFF if no component is found. + /// + public static readonly Color IFFColor = Color.Aquamarine; + + /// + /// Default color to use for activated armament IFF if no component is found. + /// + public static readonly Color IFFArmedColor = Color.Red; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public IFFFlags Flags = IFFFlags.None; + + /// + /// Color for this to show up on IFF. + /// + [ViewVariables(VVAccess.ReadWrite), DataField] + public Color Color = IFFColor; + + /// + /// Color for armed vessel to show up on IFF. + /// + [ViewVariables(VVAccess.ReadWrite), DataField] + public Color ArmedColor = IFFArmedColor; +} \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryProjectileComponent.cs b/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryProjectileComponent.cs new file mode 100644 index 00000000000..c92ed093b57 --- /dev/null +++ b/Content.Server/_NF/SpaceArtillery/Components/SpaceArtilleryProjectileComponent.cs @@ -0,0 +1,12 @@ +namespace Content.Shared.SpaceArtillery; +using Content.Shared.Construction.Prototypes; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; + + +[RegisterComponent] +public sealed partial class SpaceArtilleryProjectileComponent : Component +{ + +} \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridActivationEvents.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridActivationEvents.cs new file mode 100644 index 00000000000..ccd6a151a4b --- /dev/null +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridActivationEvents.cs @@ -0,0 +1,10 @@ + +namespace Content.Shared.SpaceArtillery; + + +[ByRefEvent] +public readonly record struct SpaceArtilleryGridActivationEvent; + + +[ByRefEvent] +public readonly record struct SpaceArtilleryGridDeactivationEvent; \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs deleted file mode 100644 index e11f2f570e4..00000000000 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtilleryGridComponent.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace Content.Shared.SpaceArtillery; -using Content.Shared.Construction.Prototypes; -using Content.Shared.DeviceLinking; -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; -using Content.Shared.Actions; -using Robust.Shared.Utility; -using Content.Shared.Containers.ItemSlots; -using Content.Shared.Stacks; - - - -/// -/// Component dictates if grid is allowed to utilise space artillery armaments at all -/// -[RegisterComponent] -public sealed partial class SpaceArtilleryGridComponent : Component -{ - /// - /// Whether the grid has activated the armaments - /// - [ViewVariables(VVAccess.ReadWrite)] public bool IsActive = false; - - [ViewVariables] - public TimeSpan LastActivationTime; - - [ViewVariables] - public TimeSpan CooldownDuration = TimeSpan.FromSeconds(300); - - [ViewVariables] - public TimeSpan CooldownEndTime; -} \ No newline at end of file diff --git a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs index 8f88b25cb1b..adcdee1f13b 100644 --- a/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs +++ b/Content.Server/_NF/SpaceArtillery/SpaceArtillerySystem.cs @@ -32,6 +32,9 @@ using Content.Server.DeviceLinking.Systems; using Content.Server.DeviceNetwork; using Robust.Shared.Timing; +using Content.Shared.Shuttles.Systems; +using Content.Shared.Shuttles.Components; +using Content.Server.Shuttles.Components; namespace Content.Shared.SpaceArtillery; @@ -50,6 +53,7 @@ public sealed partial class SpaceArtillerySystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly DeviceLinkSystem _deviceLink = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; //var variable = _gameTiming.CurTime; - to set with current time + [Dependency] private readonly SharedShuttleSystem _shuttleSystem = default!; private const float ShootSpeed = 30f; private const float distance = 100; @@ -75,7 +79,12 @@ public override void Initialize() SubscribeLocalEvent(OnComponentInit); SubscribeLocalEvent(OnComponentRemove); + ///TODO Integrate vessel armament deactivation event SubscribeLocalEvent(OnMapInit); + SubscribeLocalEvent(OnActivationEvent); + + //This is to ensure proper operation of armed vessel + SubscribeLocalEvent(OnIFFInit); } private void OnMapInit(EntityUid uid, SpaceArtilleryGridComponent componentGrid, MapInitEvent args) @@ -144,19 +153,37 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, } if (args.Port == component.SpaceArtilleryToggleSafetyPort) { + ///WIP TEST DEBUG----------------------------------------------------------------------------------- + if(TryComp(uid, out var transformComponent)) + { + var _gridUid = transformComponent.GridUid; + + if(_gridUid is {Valid :true} gridUid) + { + var activationEvent = new SpaceArtilleryGridActivationEvent(); + RaiseLocalEvent(gridUid, ref activationEvent); + } + } + + ///TEST DEBUG-------------------------------------------------------------------------------- + if (TryComp(uid, out var combat)) { if(combat.IsInCombatMode == false && combat.IsInCombatMode != null) { _combat.SetInCombatMode(uid, true, combat); component.IsArmed = true; - _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); + + if(component.IsCapableOfSendingSignal == true) + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); } else { _combat.SetInCombatMode(uid, false, combat); component.IsArmed = false; - _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); + + if(component.IsCapableOfSendingSignal == true) + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); } } } @@ -164,7 +191,7 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, { if (TryComp(uid, out var combat) && combat.IsInCombatMode != null) { - if(combat.IsInCombatMode == true) + if(combat.IsInCombatMode == true && component.IsCapableOfSendingSignal == true) _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); _combat.SetInCombatMode(uid, false, combat); @@ -176,7 +203,7 @@ private void OnSignalReceived(EntityUid uid, SpaceArtilleryComponent component, { if (TryComp(uid, out var combat) && combat.IsInCombatMode != null) { - if(combat.IsInCombatMode == false) + if(combat.IsInCombatMode == false && component.IsCapableOfSendingSignal == true) _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedSafetyChangePort, true); _combat.SetInCombatMode(uid, true, combat); @@ -347,7 +374,24 @@ private void TryFireArtillery(EntityUid uid, SpaceArtilleryComponent component, EntityCoordinates targetCordinates; targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); - _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + ///Checks if armaments on grid are activated, or its a harmless armament + if(TryComp(_gridUid, out var componentGrid)) + { + if(componentGrid.IsActive == true || component.IsDestructive == false) + { + ///Fires the armament, sending signal to gun system + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + } + else + { + OnMalfunction(uid,component); + } + } + else if(component.IsDestructive == false) + { + ///Fires the armament, sending signal to gun system + _gun.AttemptShoot(uid, gunUid, gun, targetCordinates); + } } } @@ -366,9 +410,17 @@ private void GetInsertedCoolantAmount(SpaceArtilleryComponent component, out int amount = coolantStack.Count; return; } - + + ///TODO Fix empty cartridge allowing recoil to be activated + ///TOD add check for args.FiredProjectiles private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoShotEvent args) { + if(args.FiredProjectiles.Count == 0) + { + OnMalfunction(uid,component); + return; + } + if(TryComp(uid, out var transformComponent) && TryComp(uid, out var battery)){ var worldPosX = transformComponent.WorldPosition.X; var worldPosY = transformComponent.WorldPosition.Y; @@ -377,8 +429,8 @@ private void OnShotEvent(EntityUid uid, SpaceArtilleryComponent component, AmmoS var _gridUid = transformComponent.GridUid; - - _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedFiringPort, true); + if(component.IsCapableOfSendingSignal == true) + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedFiringPort, true); if(component.IsPowerRequiredToFire == true) { @@ -487,6 +539,145 @@ private void OnEmptyShotEvent(EntityUid uid, SpaceArtilleryComponent component, private void OnMalfunction(EntityUid uid, SpaceArtilleryComponent component) { - _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedMalfunctionPort, true); + if(component.IsCapableOfSendingSignal == true) + _deviceLink.SendSignal(uid, component.SpaceArtilleryDetectedMalfunctionPort, true); + } + + + +///Armed vessels handling +//TODO Code it much much better + + ///Prevents built IFF console from being capable of changing armed vessel's IFF settings + private void OnIFFInit(EntityUid uid, IFFConsoleComponent iffComponent, ComponentInit args) + { + if(TryComp(uid, out var transformComponent)) + { + var _gridUid = transformComponent.GridUid; + + if(_gridUid is {Valid :true} gridUid) + { + if(TryComp(gridUid, out var SpaceArtilleryGridComponent)) + { + if(SpaceArtilleryGridComponent.IsActive == true || SpaceArtilleryGridComponent.IsCharging == true) + { + var _oldFlags = iffComponent.AllowedFlags; + var _newFlags = iffComponent.AccessableAllowedFlags; + + iffComponent.AllowedFlags = _newFlags; + iffComponent.AccessableAllowedFlags = _oldFlags; + + iffComponent.IsDisabled = true; + + var ev = new AnchorStateChangedEvent(transformComponent); + RaiseLocalEvent(uid, ref ev, false); + } + } + } + } + } + + + private void OnActivationEvent(EntityUid GridUid, SpaceArtilleryGridComponent componentGrid, ref SpaceArtilleryGridActivationEvent args) + { + + if(componentGrid.IsActive == true) + { + if(_gameTiming.CurTime >= componentGrid.CooldownEndTime) + { + componentGrid.IsActive = false; + + if(TryComp(GridUid, out var IffComponent)) + { + //IffComponent.Color = componentGrid.Color; + _shuttleSystem.SetIFFColor(GridUid, componentGrid.Color, IffComponent); + //_shuttleSystem.AddIFFFlag(GridUid, IFFFlags.Hide); + //_shuttleSystem.AddIFFFlag(GridUid, IFFFlags.HideLabel); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var comp)) + { + if(TryComp(uid, out var transformComponent)) + { + var _gridUid = transformComponent.GridUid; + + if(_gridUid is {Valid :true} gridUid && gridUid == GridUid && comp.IsDisabled == true) + { + var _oldFlags = comp.AllowedFlags; + var _newFlags = comp.AccessableAllowedFlags; + + comp.AllowedFlags = _newFlags; + comp.AccessableAllowedFlags = _oldFlags; + + comp.IsDisabled = false; + + var ev = new AnchorStateChangedEvent(transformComponent); + RaiseLocalEvent(uid, ref ev, false); + } + } + } + } + } + } + else if(componentGrid.IsCharging == true) + { + if(_gameTiming.CurTime >= componentGrid.ChargeUpEndTime) + { + componentGrid.IsCharging = false; + componentGrid.IsActive = true; + } + } + else + { + componentGrid.IsCharging = true; + + componentGrid.LastActivationTime = _gameTiming.CurTime; + componentGrid.ChargeUpEndTime = componentGrid.LastActivationTime + componentGrid.ChargeUpDuration; + componentGrid.CooldownEndTime = componentGrid.LastActivationTime + componentGrid.CooldownDuration; + + if(TryComp(GridUid, out var IffComponent)) + { + //IffComponent.Color = componentGrid.ArmedColor; + //IffComponent.Flags = componentGrid.Flags; + ///TODO have it affect IFF consoles and disable their ability + _shuttleSystem.SetIFFColor(GridUid, componentGrid.ArmedColor, IffComponent); + _shuttleSystem.RemoveIFFFlag(GridUid, IFFFlags.Hide); + _shuttleSystem.RemoveIFFFlag(GridUid, IFFFlags.HideLabel); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var comp)) + { + if(TryComp(uid, out var transformComponent)) + { + var _gridUid = transformComponent.GridUid; + + if(_gridUid is {Valid :true} gridUid && gridUid == GridUid && comp.IsDisabled == false) + { + var _oldFlags = comp.AllowedFlags; + var _newFlags = comp.AccessableAllowedFlags; + + comp.AllowedFlags = _newFlags; + comp.AccessableAllowedFlags = _oldFlags; + + comp.IsDisabled = true; + + var ev = new AnchorStateChangedEvent(transformComponent); + RaiseLocalEvent(uid, ref ev, false); + } + } + } + } + } } -} \ No newline at end of file +} + + + + +// Raise event to activate armaments for the grid + /* var activationEvent = new SpaceArtilleryGridActivationEvent(true, uid, GridUid); + RaiseLocalEvent(GridUid, activationEvent); + + if (activationEvent.Handled) + return; + */ \ No newline at end of file diff --git a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml index aa12bca49b2..4821d702421 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml @@ -24,6 +24,7 @@ range: 8 energyConsumption: 50000 disableDuration: 20 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeShellEmp @@ -79,6 +80,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeShellArmorPiercing @@ -134,6 +136,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeShellHighExplosive @@ -189,6 +192,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeShellPractice @@ -241,6 +245,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeMachineGunEMP @@ -296,6 +301,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeMachineGunArmorPiercing @@ -351,6 +357,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeMachineGunHighExplosive @@ -406,6 +413,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeMachineGunPractice @@ -460,6 +468,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeRailEMP @@ -517,6 +526,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeRailArmorPiercing @@ -574,6 +584,7 @@ radius: 3.5 color: orange energy: 0.5 + - type: SpaceArtilleryProjectile - type: entity id: CartridgeRailHighExplosive From 289f7310b9acad3152d2193210036b195b285303 Mon Sep 17 00:00:00 2001 From: Qulibly Date: Wed, 28 Feb 2024 04:31:57 +0100 Subject: [PATCH 32/32] Space Artillery basic booster framework --- .../_NF/SpaceArtillery/armaments.yml | 325 +++++++++++++++++- .../Prototypes/_NF/SpaceArtillery/shells.yml | 24 ++ Resources/Prototypes/tags.yml | 38 +- 3 files changed, 367 insertions(+), 20 deletions(-) diff --git a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml index 500ee0c7c37..1690d754aec 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/armaments.yml @@ -691,6 +691,7 @@ - type: ExtensionCableReceiver - type: BatterySelfRecharger +#Need to resolve issue which allows launcher to fire ANY bullet - type: entity id: Pneumatic_Launcher name: pneumatic launcher @@ -793,6 +794,328 @@ - type: ExaminableBattery - type: BatterySelfRecharger +#Boosters category +- type: entity + id: Booster_Basic + name: Basic Booster + parent: ConstructibleMachine + description: Standard construction booster utilising compresed ion wave to rappidly propel vessel in space with power. Requires quick cooling using coolant. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + delay: 10 + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: Battery + maxCharge: 100000 + startingCharge: 100000 + - type: ExaminableBattery + - type: ProjectileBatteryAmmoProvider + proto: BulletBoosterWave + fireCost: 20000 + - type: ItemSlots + - type: ContainerContainer + containers: + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange + - type: Gun + fireRate: 3 + projectileSpeed: 35 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + isDestructive: false + isCoolantRequiredToFire: true + coolantConsumed: 1 + coolantStored: 90 + isPowerRequiredToFire: true + powerUseActive: 5000 + powerUsePassive: 500 + SpaceArtillery-CoolantSlot: + name: SpaceArtillery-CoolantSlot + insertSound: /Audio/Machines/scanning.ogg + ejectSound: /Audio/Machines/tray_eject.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - Stack + linearRecoilGrid: 300 + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + +- type: entity + id: Booster_Security + name: Security Booster + parent: ConstructibleMachine + description: Security model of the basic booster. Has increased efficiency and impulse force. Requires quick cooling using coolant. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + delay: 10 + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: Battery + maxCharge: 100000 + startingCharge: 100000 + - type: ExaminableBattery + - type: ProjectileBatteryAmmoProvider + proto: BulletBoosterWave + fireCost: 10000 + - type: ItemSlots + - type: ContainerContainer + containers: + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange + - type: Gun + fireRate: 3 + projectileSpeed: 35 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + isDestructive: false + isCoolantRequiredToFire: true + coolantConsumed: 1 + coolantStored: 90 + isPowerRequiredToFire: true + powerUseActive: 2500 + powerUsePassive: 500 + SpaceArtillery-CoolantSlot: + name: SpaceArtillery-CoolantSlot + insertSound: /Audio/Machines/scanning.ogg + ejectSound: /Audio/Machines/tray_eject.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - Stack + linearRecoilGrid: 600 + velocityLimitRecoilGrid: 40 + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + +- type: entity + id: Booster_Security_Chase + name: Security Chase Booster + parent: ConstructibleMachine + description: Massive security booster. Perfect at drifting in space and rappidly burning NFSD's budget. Due to strong impulse it's more unstable than smaller cousin. Requires quick cooling using coolant. + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 600 + mask: + - MachineMask + layer: + - MachineLayer + - type: Transform + anchored: true + - type: Sprite + sprite: _NF/Objects/SpaceArtillery/space_artillery.rsi + layers: + - state: space_artillery + - type: Anchorable + delay: 10 + - type: Pullable + - type: Rotatable + rotateWhilePulling: false + rotateWhileAnchored: true + increment: 45 + - type: Appearance + - type: Battery + maxCharge: 100000 + startingCharge: 100000 + - type: ExaminableBattery + - type: ProjectileBatteryAmmoProvider + proto: BulletBoosterWave + fireCost: 10000 + - type: ItemSlots + - type: ContainerContainer + containers: + SpaceArtillery-CoolantSlot: !type:ContainerSlot {} + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - SpaceArtilleryFire + - SpaceArtilleryToggleSafety + - SpaceArtilleryOnSafety + - SpaceArtilleryOffSafety + - type: DeviceLinkSource + ports: + - SpaceArtilleryDetectedFiring + - SpaceArtilleryDetectedMalfunction + - SpaceArtilleryDetectedSafetyChange + - type: Gun + fireRate: 3 + projectileSpeed: 35 + selectedMode: FullAuto + availableModes: + - SemiAuto + - FullAuto + soundGunshot: + path: /Audio/Effects/thunk.ogg + soundEmpty: + path: /Audio/Items/hiss.ogg + - type: SpaceArtillery + isArmed: true + isDestructive: false + isCoolantRequiredToFire: true + coolantConsumed: 3 + coolantStored: 90 + isPowerRequiredToFire: true + powerUseActive: 2500 + powerUsePassive: 500 + SpaceArtillery-CoolantSlot: + name: SpaceArtillery-CoolantSlot + insertSound: /Audio/Machines/scanning.ogg + ejectSound: /Audio/Machines/tray_eject.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - Stack + linearRecoilGrid: 2400 + velocityLimitRecoilGrid: 60 + angularInstabilityGrid: 30 + - type: Actions + - type: CombatMode + IsInCombatMode: true + - type: Strap + position: Stand + buckleOffset: "0,0.8" + maxBuckleDistance: 1 + - type: ApcPowerReceiver + powerLoad: 1000 + - type: ExtensionCableReceiver + - type: BatterySelfRecharger + #Deployable weaponry #WARNING CURRENTLY VERY BUGGED. NEED TO RESOLVE THE ISSUE OF ACTING LIKE ITEM - type: entity @@ -888,7 +1211,7 @@ increment: 45 - +# Old code attempt at internal mass scanner - type: entity id: ActionSpaceArtilleryShowRadar name: Mass Scanner Interface diff --git a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml index 4821d702421..c267d1c32de 100644 --- a/Resources/Prototypes/_NF/SpaceArtillery/shells.yml +++ b/Resources/Prototypes/_NF/SpaceArtillery/shells.yml @@ -611,6 +611,30 @@ - type: SpentAmmoVisuals - type: SpaceGarbage +#Booster energy projectile which they spew out. +#NEEDS CHECKUP TO ENSURE THAT ITS FIXED AND WONT CAUSE ISSUES LATER +- type: entity + name: booster wave + id: BulletBoosterWave + parent: BaseBullet + noSpawn: true + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi + layers: + - state: omnilaser_greyscale + shader: unshaded + color: red + - type: Projectile + impactEffect: BulletImpactEffectRedDisabler + damage: + types: + Radiation: 5 + Structural: 30 # Slightly more damage than the 17heat from the Captain's Hitscan lasgun + soundHit: + collection: MeatLaserImpact + soundForce: true + - type: SpaceArtilleryProjectile # Coolant object diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 11139a0ee75..c1b6645dca8 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -295,25 +295,6 @@ - type: Tag id: CartridgeRocket -# Space Artillery ammunition -- type: Tag - id: CartridgeShell - -- type: Tag - id: CartridgeMachineGun - -- type: Tag - id: CartridgeRailgun - -- type: Tag - id: CartridgeCoolant - -- type: Tag - id: CartridgeGPMG - -- type: Tag - id: CartridgeNitroExpress - # Allows you to walk over tile entities such as lava without steptrigger - type: Tag id: Catwalk @@ -1214,6 +1195,24 @@ - type: Tag # Frontier id: BloodFood # Frontier +- type: Tag # Frontier Space Artillery + id: CartridgeCoolant # Frontier Space Artillery + +- type: Tag # Frontier Space Artillery + id: CartridgeGPMG # Frontier Space Artillery + +- type: Tag # Frontier Space Artillery + id: CartridgeMachineGun # Frontier Space Artillery + +- type: Tag # Frontier Space Artillery + id: CartridgeNitroExpress # Frontier Space Artillery + +- type: Tag # Frontier Space Artillery + id: CartridgeRailgun # Frontier Space Artillery + +- type: Tag # Frontier Space Artillery + id: CartridgeShell # Frontier Space Artillery + - type: Tag # Frontier id: MothFood #Frontier @@ -1228,3 +1227,4 @@ - type: Tag # Frontier id: WeaponMelee # Frontier +