From 407427b31b27dd5db97ff338b45d2e20dff4fed0 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Mon, 18 Mar 2024 01:25:09 +0500 Subject: [PATCH 01/25] add: base system + light module --- .../WeaponModules/WeaponModulesComponent.cs | 11 ++ .../WeaponModules/WeaponModulesSystem.cs | 96 ++++++++++++++++++ .../Objects/Weapons/Guns/Rifles/rifles.yml | 17 +++- .../Objects/Weapons/Guns/Modules/modules.yml | 32 ++++++ Resources/Prototypes/White/tags.yml | 3 + .../Objects/Weapons/modules.rsi/light.png | Bin 0 -> 2788 bytes .../Objects/Weapons/modules.rsi/meta.json | 14 +++ 7 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 Content.Server/_White/WeaponModules/WeaponModulesComponent.cs create mode 100644 Content.Server/_White/WeaponModules/WeaponModulesSystem.cs create mode 100644 Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml create mode 100644 Resources/Textures/White/Objects/Weapons/modules.rsi/light.png create mode 100644 Resources/Textures/White/Objects/Weapons/modules.rsi/meta.json diff --git a/Content.Server/_White/WeaponModules/WeaponModulesComponent.cs b/Content.Server/_White/WeaponModules/WeaponModulesComponent.cs new file mode 100644 index 0000000000..479e8a858d --- /dev/null +++ b/Content.Server/_White/WeaponModules/WeaponModulesComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server._White.WeaponModules; + +/// +/// This is used for... +/// +[RegisterComponent] +public sealed partial class WeaponModulesComponent : Component +{ + [ViewVariables(VVAccess.ReadWrite)] + public List Modules = new(); +} diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs new file mode 100644 index 0000000000..bb9114489a --- /dev/null +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -0,0 +1,96 @@ +using Content.Server.Light.Events; +using Content.Server.Lightning; +using Robust.Server.GameObjects; +using Robust.Shared.Containers; + +namespace Content.Server._White.WeaponModules; + +public sealed class WeaponModulesSystem : EntitySystem +{ + protected const string ModulesSlot = "gun_modules"; + [Dependency] private readonly SharedPointLightSystem _lightSystem = default!; + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnInsert); + SubscribeLocalEvent(OnEject); + } + + private void OnInsert(EntityUid uid, WeaponModulesComponent comp, EntInsertedIntoContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + string weapon = Prototype(args.Entity)!.ID; + EntityUid target = args.Container.Owner; + + insertModules(weapon, comp); + moduleEffect(weapon, target); + } + + private void OnEject(EntityUid uid, WeaponModulesComponent comp, EntRemovedFromContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + string weapon = Prototype(args.Entity)!.ID; + EntityUid target = args.Container.Owner; + + removeModules(weapon, comp); + removeModuleEffect(weapon, target); + } + + private void insertModules(string module, WeaponModulesComponent comp) + { + switch (module) + { + case "LightModule": + if(comp.Modules.Contains("LightModule")) break; + comp.Modules.Add("LightModule"); + break; + } + } + + private void moduleEffect(string module, EntityUid target) + { + switch (module) + { + case "LightModule": + if (HasComp(target)) + { + _lightSystem.SetEnabled(target, true); + break; + } + + _lightSystem.TryGetLight(target, out var light); + _lightSystem.EnsureLight(target); + _lightSystem.SetRadius(target, 2F, light); + break; + } + } + + private void removeModules(string module, WeaponModulesComponent comp) + { + switch (module) + { + case "LightModule": + comp.Modules.Remove("LightModule"); + break; + } + } + + private void removeModuleEffect(string module, EntityUid target) + { + switch (module) + { + case "LightModule": + if(!HasComp(target)) + break; + + _lightSystem.TryGetLight(target, out var light); + _lightSystem.SetEnabled(target, false, light); + break; + } + } +} diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 82c0770c7f..9baf951015 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -15,6 +15,7 @@ - Back - suitStorage - type: AmmoCounter + - type: WeaponModules - type: Gun fireRate: 5 selectedMode: FullAuto @@ -32,7 +33,7 @@ startingItem: MagazineLightRifle insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg - priority: 2 + priority: 3 whitelist: tags: - MagazineLightRifle @@ -43,10 +44,17 @@ whitelist: tags: - CartridgeLightRifle + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule - type: ContainerContainer containers: gun_magazine: !type:ContainerSlot gun_chamber: !type:ContainerSlot + gun_modules: !type:ContainerSlot - type: StaticPrice price: 500 @@ -88,10 +96,17 @@ whitelist: tags: - CartridgeLightRifle + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule - type: ContainerContainer containers: gun_magazine: !type:ContainerSlot gun_chamber: !type:ContainerSlot + gun_modules: !type:ContainerSlot - type: MagazineVisuals magState: mag steps: 1 diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml new file mode 100644 index 0000000000..be8ce29fbd --- /dev/null +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -0,0 +1,32 @@ +- type: entity + id: BaseModule + parent: BaseItem + abstract: true + components: + - type: Sprite + sprite: White/Objects/Weapons/modules.rsi + - type: Tag + tags: + - BaseModule + - type: Item + sprite: White/Objects/Weapons/modules.rsi + size: Small + shape: + - 0,0,1,1 + layers: + - state: base + map: ["enum.GunVisualLayers.Base"] + - state: mag-1 + map: ["enum.GunVisualLayers.Mag"] + - type: Appearance + +# modules +- type: entity + id: LightModule + name: "light module for rifle" + parent: BaseModule + components: + - type: Item + - type: Sprite + state: light + - type: Appearance \ No newline at end of file diff --git a/Resources/Prototypes/White/tags.yml b/Resources/Prototypes/White/tags.yml index 466a1ddb17..73d3311562 100644 --- a/Resources/Prototypes/White/tags.yml +++ b/Resources/Prototypes/White/tags.yml @@ -54,3 +54,6 @@ - type: Tag id: MindSlave + +- type: Tag + id: BaseModule diff --git a/Resources/Textures/White/Objects/Weapons/modules.rsi/light.png b/Resources/Textures/White/Objects/Weapons/modules.rsi/light.png new file mode 100644 index 0000000000000000000000000000000000000000..347e76a4b29de686039962bc0cebb13ea3efb4a1 GIT binary patch literal 2788 zcmVuJ@VVD_U zC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$OrQF$}6R&?d%y_c8YA7_1Q zpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X z6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv1)yUy0P^?0*fb9UASvow z`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q{wNRKos+;6rV8ldy0Owz z(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E` zvOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G41dM~{UdP z6d+Yd3o?MrAqM0Kc|iV92owdyL5UC#5<>aVCa44|hpM4Es0sQWIt5*Tu0n&*J!lk~ zf_{hI!w5`*sjxDv4V%CW*ah~3!{C*0BD@;TgA3v9a1~q+AA{TB3-ERLHar49hi4Ih z5D^-ph8Q6X#0?2VqLBoIkE}zAkxHZUgRb+f=natP#6>iMMoK->`~sRLq)(kHo*Vn{;LcG6+e zdD1=7D>9j^O?D{Qg|tCDK{ym)H7&wDr6*;uGTJg8GHjVb znL{!cWyUB7MT6o-VNo_w8Yq`2<5Ub)hw4L3rj}5@qxMs0WMyP6Wy582WNT#4$d1qu znl{acmP#w5ouJ*Jy_Zv#bCKi7ZIf$}8dZdVy&)LYdbX%I9R8VMQ|8r>Q*nyQ)sn)#Z|n)kKvS`4iutvy=3T65Yu+7a4Yv^%sX zb>ww?bn(=Yu(!=O6^iuTp>)p_Y^{w=i^lS773}6Fm1Fpe-gF!>I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ged/Components/GunComponent.cs | 6 + .../Weapons/Ranged/Systems/SharedGunSystem.cs | 29 ++++- .../Audio/White/Weapons/Modules/silence.ogg | Bin 0 -> 4574 bytes .../Objects/Weapons/Guns/Modules/modules.yml | 34 ++++- .../Weapons/modules.rsi/flamehider.png | Bin 0 -> 2736 bytes .../Objects/Weapons/modules.rsi/laser.png | Bin 0 -> 2805 bytes .../Objects/Weapons/modules.rsi/meta.json | 5 + .../Objects/Weapons/modules.rsi/silencer.png | Bin 0 -> 2747 bytes 9 files changed, 162 insertions(+), 28 deletions(-) create mode 100644 Resources/Audio/White/Weapons/Modules/silence.ogg create mode 100644 Resources/Textures/White/Objects/Weapons/modules.rsi/flamehider.png create mode 100644 Resources/Textures/White/Objects/Weapons/modules.rsi/laser.png create mode 100644 Resources/Textures/White/Objects/Weapons/modules.rsi/silencer.png diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index bb9114489a..0df6b63fe3 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,6 +1,11 @@ -using Content.Server.Light.Events; +using System.Numerics; +using Content.Server.Light.Events; using Content.Server.Lightning; +using Content.Shared.Light; +using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; +using Robust.Shared.Audio; using Robust.Shared.Containers; namespace Content.Server._White.WeaponModules; @@ -8,7 +13,11 @@ namespace Content.Server._White.WeaponModules; public sealed class WeaponModulesSystem : EntitySystem { protected const string ModulesSlot = "gun_modules"; - [Dependency] private readonly SharedPointLightSystem _lightSystem = default!; + [Dependency] private readonly PointLightSystem _lightSystem = default!; + [Dependency] private readonly SharedGunSystem _gunSystem = default!; + + SoundSpecifier? oldSoundGunshot; + public override void Initialize() { base.Initialize(); @@ -22,11 +31,14 @@ public sealed class WeaponModulesSystem : EntitySystem if (ModulesSlot != args.Container.ID) return; - string weapon = Prototype(args.Entity)!.ID; - EntityUid target = args.Container.Owner; + string module = Prototype(args.Entity)!.ID; + EntityUid weapon = args.Container.Owner; - insertModules(weapon, comp); - moduleEffect(weapon, target); + TryComp(weapon, out var gunComp); + oldSoundGunshot = gunComp!.SoundGunshot; + + insertModules(module, comp); + moduleEffect(module, weapon); } private void OnEject(EntityUid uid, WeaponModulesComponent comp, EntRemovedFromContainerMessage args) @@ -34,11 +46,11 @@ public sealed class WeaponModulesSystem : EntitySystem if (ModulesSlot != args.Container.ID) return; - string weapon = Prototype(args.Entity)!.ID; - EntityUid target = args.Container.Owner; + string module = Prototype(args.Entity)!.ID; + EntityUid weapon = args.Container.Owner; - removeModules(weapon, comp); - removeModuleEffect(weapon, target); + removeModules(module, comp); + removeModuleEffect(module, weapon); } private void insertModules(string module, WeaponModulesComponent comp) @@ -49,23 +61,52 @@ public sealed class WeaponModulesSystem : EntitySystem if(comp.Modules.Contains("LightModule")) break; comp.Modules.Add("LightModule"); break; + + case "LaserModule": + if(comp.Modules.Contains("LaserModule")) break; + comp.Modules.Add("LaserModule"); + break; + + case "FlameHiderModule": + if(comp.Modules.Contains("FlameHiderModule")) break; + comp.Modules.Add("FlameHiderModule"); + break; + + case "SilencerModule": + if(comp.Modules.Contains("SilencerModule")) break; + comp.Modules.Add("SilencerModule"); + break; } } - private void moduleEffect(string module, EntityUid target) + private void moduleEffect(string module, EntityUid weapon) { switch (module) { - case "LightModule": - if (HasComp(target)) - { - _lightSystem.SetEnabled(target, true); - break; - } + case "LightModule" when HasComp(weapon): + { + _lightSystem.SetEnabled(weapon, true); + break; + } - _lightSystem.TryGetLight(target, out var light); - _lightSystem.EnsureLight(target); - _lightSystem.SetRadius(target, 2F, light); + case "LightModule": + + _lightSystem.TryGetLight(weapon, out var light); + _lightSystem.EnsureLight(weapon).Offset = new Vector2(0, -1); + _lightSystem.SetRadius(weapon, 2F, light); + break; + + case "LaserModule": + _gunSystem.setProjectileSpeed(weapon, 40F); + break; + + case "FlameHiderModule": + _gunSystem.setUseEffect(weapon, true); + break; + + case "SilencerModule": + _gunSystem.setUseEffect(weapon, true); + _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); break; } } @@ -77,19 +118,46 @@ public sealed class WeaponModulesSystem : EntitySystem case "LightModule": comp.Modules.Remove("LightModule"); break; + + case "LaserModule": + comp.Modules.Remove("LaserModule"); + break; + + case "FlameHiderModule": + comp.Modules.Remove("FlameHiderModule"); + break; + + case "SilencerModule": + comp.Modules.Remove("SilencerModule"); + break; } } - private void removeModuleEffect(string module, EntityUid target) + private void removeModuleEffect(string module, EntityUid weapon) { switch (module) { case "LightModule": - if(!HasComp(target)) + if (!HasComp(weapon)) break; - _lightSystem.TryGetLight(target, out var light); - _lightSystem.SetEnabled(target, false, light); + _lightSystem.TryGetLight(weapon, out var light); + _lightSystem.SetEnabled(weapon, false, light); + break; + + case "LaserModule": + if (!HasComp(weapon)) + break; + _gunSystem.setProjectileSpeed(weapon, 25F); + break; + + case "FlameHiderModule": + _gunSystem.setUseEffect(weapon, false); + break; + + case "SilencerModule": + _gunSystem.setUseEffect(weapon, false); + _gunSystem.setSound(weapon, oldSoundGunshot!); break; } } diff --git a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs index 752232475a..f01f0f6373 100644 --- a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs +++ b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs @@ -179,6 +179,12 @@ public sealed partial class GunComponent : Component [DataField] public bool ResetOnHandSelected = true; + /// + /// For flamehider module | WD EDIT + /// + [DataField, AutoNetworkedField] + public bool canUseEffect; + /// /// The base value for how fast the projectile moves. /// diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 67a6b66cbb..681bd29987 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -475,7 +475,9 @@ public abstract partial class SharedGunSystem : EntitySystem protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null) { - var attemptEv = new GunMuzzleFlashAttemptEvent(); + TryComp(gun, out var gunComponent); // WD EDIT + + var attemptEv = new GunMuzzleFlashAttemptEvent(gunComponent!.canUseEffect); // WD EDIT RaiseLocalEvent(gun, ref attemptEv); if (attemptEv.Cancelled) return; @@ -534,8 +536,31 @@ public abstract partial class SharedGunSystem : EntitySystem Dirty(gun); } - protected abstract void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null); + public void setProjectileSpeed(EntityUid weapon, float projectileSpeed) + { + TryComp(weapon, out var gunComponent); + gunComponent!.ProjectileSpeed = projectileSpeed; + RefreshModifiers(weapon); + } + + public void setSound(EntityUid weapon, SoundSpecifier sound) + { + TryComp(weapon, out var gunComponent); + gunComponent!.SoundGunshot = sound; + + RefreshModifiers(weapon); + } + + public void setUseEffect(EntityUid weapon, bool state) + { + TryComp(weapon, out var gunComponent); + gunComponent!.canUseEffect = state; + + RefreshModifiers(weapon); + } + + protected abstract void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null); /// /// Used for animated effects on the client. /// diff --git a/Resources/Audio/White/Weapons/Modules/silence.ogg b/Resources/Audio/White/Weapons/Modules/silence.ogg new file mode 100644 index 0000000000000000000000000000000000000000..8492f5ad7fa208a6738b9eec04992404f4798663 GIT binary patch literal 4574 zcmahMd0Z1mce%q+8qP+H3YAELpaerDqLu^@2&6#5awLt&5kO;539;H1MG}riKpH~O z7%W(VB18o_1eL1gQV~TA2uM9ZK)kTFKx@@+HmF~}zrOjsoqhYRnR)Zx%-fKpBqpQ_ zy>GcgnQ8>x{PJtQ&SIUN+fw5;3lM^iZw>N-pbSqP?fa}w2%`D1A({y1x#>Bvx%az& zwS9W?Wd=*VzeDKbipW=+QWOgfEsL(iFFTVU&9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ities/Objects/Weapons/Guns/Modules/modules.yml index be8ce29fbd..aba064c9e0 100644 --- a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -12,7 +12,7 @@ sprite: White/Objects/Weapons/modules.rsi size: Small shape: - - 0,0,1,1 + - 0,0,0,0 layers: - state: base map: ["enum.GunVisualLayers.Base"] @@ -23,10 +23,40 @@ # modules - type: entity id: LightModule - name: "light module for rifle" + name: "light module" parent: BaseModule components: - type: Item - type: Sprite state: light + - type: Appearance + +- type: entity + id: LaserModule + name: "laser module" + parent: BaseModule + components: + - type: Item + - type: Sprite + state: laser + - type: Appearance + +- type: entity + id: FlameHiderModule + name: "flamehider module" + parent: BaseModule + components: + - type: Item + - type: Sprite + state: flamehider + - type: Appearance + +- type: entity + id: SilencerModule + name: "silencer module" + parent: BaseModule + components: + - type: Item + - type: Sprite + state: flamehider - type: Appearance \ No newline at end of file diff --git a/Resources/Textures/White/Objects/Weapons/modules.rsi/flamehider.png b/Resources/Textures/White/Objects/Weapons/modules.rsi/flamehider.png new file mode 100644 index 0000000000000000000000000000000000000000..3a66711c97d7edf72a6c34c19c6b02dfe497b61a GIT binary patch literal 2736 zcmV;h3QzTkP)uJ@VVD_U zC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$OrQF$}6R&?d%y_c8YA7_1Q zpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X z6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv1)yUy0P^?0*fb9UASvow z`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q{wNRKos+;6rV8ldy0Owz z(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E` zvOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G41dM~{UdP z6d+Yd3o?MrA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d&PK+RZLOLos~K(b5>qmrMN0})tOkySZ3_WICNY@+|jrX%s^&6b2i>5 zeqa0y%Z;^%^_=a@u3%4b9605ii3Ep)@`TAmhs0fpQ%O!ql}XcFH*PieWwLj2ZSq`7 zV9Mc?h17`D)-+sNT-qs~3@?S(ldh7UlRlVXkWrK|vf6I-?$tAVKYn8-l({mqQ$Q8{ zO!WzMg`0(=S&msXS#Pt$vrpzo=kRj+a`kh!z=6$;cwT88(J6|n-WB%w`m$h~4 zpmp)YIh_3ETV2tjiAU!0h1dxU-n=E9e!)6|Z;4?!H=SSy{V>ut&IOq{_dlbFb#!9eY1iCsp6Bajj|H zr?hX|zPbJE{X++w546-O*Ot`2Kgd0Jx6Z4syTu9enWavU5N9)I?I-1m1* z_?_rJ$vD~agVqoG+9++s?NEDe`%Fht$4F;X=in*dQ{7$mU2Q)a|9JSc+Uc4zvS-T9 z63!N$T{xF_ZuWe}`RNOZ7sk3{yB}PPym+f8xTpV;-=!;;JuhGEb?H5K#o@~7t9DmU zU1MD9xNd#Dz0azz?I)|B+WM{g+Xrk0I&awC=o(x)cy`EX=)z6+o0o6-+`4{y+3mqQ z%kSJBju{@g%f35#FZJHb`&swrA8dGtepviS>QUumrN{L@>;2q1Vm)$Z)P1z?N$8UY zW2~{~zhwUMVZ87u`Dx{Z>O|9|`Q+&->FRy-Sjp7DHsy69KwU-!MxeeuI@&cF4| zM9z%A Date: Tue, 19 Mar 2024 10:09:23 +0500 Subject: [PATCH 03/25] tweak: meta.json + add sprite --- .../White/Entities/Objects/Weapons/Guns/Modules/modules.yml | 2 +- .../Textures/White/Objects/Weapons/modules.rsi/meta.json | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml index aba064c9e0..719506a435 100644 --- a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -58,5 +58,5 @@ components: - type: Item - type: Sprite - state: flamehider + state: silencer - type: Appearance \ No newline at end of file diff --git a/Resources/Textures/White/Objects/Weapons/modules.rsi/meta.json b/Resources/Textures/White/Objects/Weapons/modules.rsi/meta.json index 8e40da7f79..7d61cbc01c 100644 --- a/Resources/Textures/White/Objects/Weapons/modules.rsi/meta.json +++ b/Resources/Textures/White/Objects/Weapons/modules.rsi/meta.json @@ -12,8 +12,12 @@ }, { "name": "laser" - }, { + }, + { "name": "flamehider" + }, + { + "name": "silencer" } ] } From ff681c54d8c60f5db783a44e15d9bdf7463b5943 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Tue, 19 Mar 2024 18:58:24 +0500 Subject: [PATCH 04/25] add: try add sprite module. attemp 1 --- .../WeaponsModules/WeaponModulesVisuals.cs | 42 ++++++++++++++++++ .../WeaponModulesVisualsComponent.cs | 15 +++++++ .../WeaponModules/WeaponModulesSystem.cs | 4 +- .../Objects/Weapons/Guns/Rifles/rifles.yml | 3 ++ .../Weapons/Guns/Rifles/ak.rsi/laser.png | Bin 0 -> 152 bytes .../Weapons/Guns/Rifles/ak.rsi/meta.json | 3 ++ 6 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs create mode 100644 Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs create mode 100644 Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/laser.png diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs new file mode 100644 index 0000000000..a360aa9faf --- /dev/null +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs @@ -0,0 +1,42 @@ +using Content.Client.Weapons.Ranged.Components; +using Content.Shared.Rounding; +using Content.Shared.Weapons.Ranged.Systems; +using Robust.Client.GameObjects; + +namespace Content.Client._White.WeaponsModules; + +public sealed partial class WeaponModulesVisuals : EntitySystem +{ + private void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(ComponentInit); + SubscribeLocalEvent(onModuleVisualChange); + } + + private void ComponentInit(EntityUid uid, WeaponModulesVisualsComponent component, ComponentInit args) + { + if (!TryComp(uid, out var sprite)) return; + + if (sprite.LayerMapTryGet(ModuleVisualState.Laser, out _)) + { + sprite.LayerSetState(ModuleVisualState.Laser, $"laser"); + sprite.LayerSetVisible(ModuleVisualState.Laser, false); + } + } + + private void onModuleVisualChange(EntityUid uid, WeaponModulesVisualsComponent component, ref AppearanceChangeEvent args) + { + var sprite = args.Sprite; + + if (sprite == null) return; + + if (sprite.LayerMapTryGet(ModuleVisualState.Laser, out _)) + { + sprite.LayerSetVisible(ModuleVisualState.Laser, true); + sprite.LayerSetState(ModuleVisualState.Laser, $"laser"); + } + } + +} diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs new file mode 100644 index 0000000000..67d1d7aaa3 --- /dev/null +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs @@ -0,0 +1,15 @@ +using Robust.Shared.GameStates; + +namespace Content.Client._White.WeaponsModules; + +/// +[RegisterComponent, Access(typeof(WeaponModulesVisuals))] +public sealed partial class WeaponModulesVisualsComponent : Component +{ + [DataField()] public string? state; +} + +public enum ModuleVisualState : byte +{ + Laser +} diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 0df6b63fe3..b919c07e15 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,7 +1,4 @@ using System.Numerics; -using Content.Server.Light.Events; -using Content.Server.Lightning; -using Content.Shared.Light; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; @@ -14,6 +11,7 @@ public sealed class WeaponModulesSystem : EntitySystem { protected const string ModulesSlot = "gun_modules"; [Dependency] private readonly PointLightSystem _lightSystem = default!; + [Dependency] private readonly SharedAppearanceSystem Appearance = default!; [Dependency] private readonly SharedGunSystem _gunSystem = default!; SoundSpecifier? oldSoundGunshot; diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 9baf951015..c5525d983c 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -71,6 +71,8 @@ map: [ "enum.GunVisualLayers.Base" ] - state: mag-0 map: [ "enum.GunVisualLayers.Mag" ] + - state: laser + map: [ "enum.ModuleVisualState.Laser" ] - type: Gun fireRate: 5 soundGunshot: @@ -111,6 +113,7 @@ magState: mag steps: 1 zeroVisible: true + - type: WeaponModulesVisuals - type: Appearance - type: entity diff --git a/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/laser.png b/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/laser.png new file mode 100644 index 0000000000000000000000000000000000000000..efe0ab5bbb1e107d0de7a77c8ced9b242d71e4b5 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|L<4+6T!FN? znN?{?rKE(^GASu9FRxk#h97(X9|B6Smjw9*GyMPm|HuFT3k){Y0fpo|T^vI!dXp0* uSe0cAjEo*lPft!xO literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json index 12a95021c6..c0a295d7d1 100644 --- a/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json +++ b/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json @@ -19,6 +19,9 @@ { "name": "mag-0" }, + { + "name": "laser" + }, { "name": "inhand-left", "directions": 4 From 796a1f3d5dbea697a80da133a8adac01f9eb37fc Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Wed, 20 Mar 2024 21:07:17 +0500 Subject: [PATCH 05/25] add: new modules, sprite visuals, client and shared logic --- .../WeaponsModules/WeaponModulesVisuals.cs | 48 ++++++++-------- .../WeaponModules/WeaponModulesSystem.cs | 52 +++++++++++++----- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 8 +++ .../WeaponModulesVisualsComponent.cs | 14 ++++- .../Objects/Weapons/Guns/Rifles/rifles.yml | 26 ++++++++- .../Objects/Weapons/Guns/SMGs/smgs.yml | 43 +++++++++++++++ .../Objects/Weapons/Guns/Modules/modules.yml | 10 ++++ .../Textures/Effects/LightMasks/cone.png | Bin 12242 -> 21672 bytes .../Weapons/Guns/Rifles/ak.rsi/meta.json | 3 - .../White/Effects/LightMasks/lightModule.png | Bin 0 -> 21672 bytes .../Weapons/modules.rsi/accelerator.png | Bin 0 -> 2801 bytes .../Objects/Weapons/modules.rsi/meta.json | 3 + .../modulesOnWeapon.rsi/accelerator.png | Bin 0 -> 178 bytes .../modulesOnWeapon.rsi/flamehider.png | Bin 0 -> 151 bytes .../Weapons/modulesOnWeapon.rsi}/laser.png | Bin .../Weapons/modulesOnWeapon.rsi/light.png | Bin 0 -> 154 bytes .../Weapons/modulesOnWeapon.rsi/meta.json | 26 +++++++++ .../Weapons/modulesOnWeapon.rsi/silencer.png | Bin 0 -> 145 bytes 18 files changed, 187 insertions(+), 46 deletions(-) rename {Content.Client/_White/WeaponsModules => Content.Shared/_White/WeaponModules}/WeaponModulesVisualsComponent.cs (51%) create mode 100644 Resources/Textures/White/Effects/LightMasks/lightModule.png create mode 100644 Resources/Textures/White/Objects/Weapons/modules.rsi/accelerator.png create mode 100644 Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/accelerator.png create mode 100644 Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/flamehider.png rename Resources/Textures/{Objects/Weapons/Guns/Rifles/ak.rsi => White/Objects/Weapons/modulesOnWeapon.rsi}/laser.png (100%) create mode 100644 Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/light.png create mode 100644 Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/meta.json create mode 100644 Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/silencer.png diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs index a360aa9faf..5601d15aca 100644 --- a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs @@ -5,38 +5,34 @@ using Robust.Client.GameObjects; namespace Content.Client._White.WeaponsModules; -public sealed partial class WeaponModulesVisuals : EntitySystem +public sealed partial class WeaponModulesVisuals : VisualizerSystem { - private void Initialize() + + [Dependency] private readonly PointLightSystem _lightSystem = default!; + + protected override void OnAppearanceChange(EntityUid uid, WeaponModulesVisualsComponent component, ref AppearanceChangeEvent args) { - base.Initialize(); + base.OnAppearanceChange(uid, component, ref args); - SubscribeLocalEvent(ComponentInit); - SubscribeLocalEvent(onModuleVisualChange); - } + if(args.Sprite == null) + return; - private void ComponentInit(EntityUid uid, WeaponModulesVisualsComponent component, ComponentInit args) - { - if (!TryComp(uid, out var sprite)) return; + args.Sprite.LayerSetVisible(ModuleVisualState.Module, false); - if (sprite.LayerMapTryGet(ModuleVisualState.Laser, out _)) + if (AppearanceSystem.TryGetData(uid, ModuleVisualState.Module, out var module, args.Component) && module.Length != 0 && module != "none") { - sprite.LayerSetState(ModuleVisualState.Laser, $"laser"); - sprite.LayerSetVisible(ModuleVisualState.Laser, false); + args.Sprite.LayerSetState(ModuleVisualState.Module, module); + args.Sprite.LayerSetVisible(ModuleVisualState.Module, true); + } + + if (AppearanceSystem.TryGetData(uid, Modules.Light, out var data, args.Component)) + { + if (TryComp(uid, out var pointLightComponent)) + { + if(!pointLightComponent.Enabled) + return; + _lightSystem.SetMask("/Textures/White/Effects/LightMasks/lightModule.png", pointLightComponent!); + } } } - - private void onModuleVisualChange(EntityUid uid, WeaponModulesVisualsComponent component, ref AppearanceChangeEvent args) - { - var sprite = args.Sprite; - - if (sprite == null) return; - - if (sprite.LayerMapTryGet(ModuleVisualState.Laser, out _)) - { - sprite.LayerSetVisible(ModuleVisualState.Laser, true); - sprite.LayerSetState(ModuleVisualState.Laser, $"laser"); - } - } - } diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index b919c07e15..7396072335 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using Content.Client._White.WeaponsModules; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; @@ -15,6 +15,7 @@ public sealed class WeaponModulesSystem : EntitySystem [Dependency] private readonly SharedGunSystem _gunSystem = default!; SoundSpecifier? oldSoundGunshot; + private float oldFireRate; public override void Initialize() { @@ -34,6 +35,7 @@ public sealed class WeaponModulesSystem : EntitySystem TryComp(weapon, out var gunComp); oldSoundGunshot = gunComp!.SoundGunshot; + oldFireRate = gunComp.FireRate; insertModules(module, comp); moduleEffect(module, weapon); @@ -74,38 +76,51 @@ public sealed class WeaponModulesSystem : EntitySystem if(comp.Modules.Contains("SilencerModule")) break; comp.Modules.Add("SilencerModule"); break; + + case "AcceleratorModule": + if(comp.Modules.Contains("AcceleratorModule")) break; + comp.Modules.Add("AcceleratorModule"); + break; } } private void moduleEffect(string module, EntityUid weapon) { + TryComp(weapon, out var appearanceComponent); switch (module) { - case "LightModule" when HasComp(weapon): - { - _lightSystem.SetEnabled(weapon, true); - break; - } - case "LightModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "light", appearanceComponent); + + _lightSystem.EnsureLight(weapon); _lightSystem.TryGetLight(weapon, out var light); - _lightSystem.EnsureLight(weapon).Offset = new Vector2(0, -1); - _lightSystem.SetRadius(weapon, 2F, light); + Appearance.SetData(weapon, Modules.Light, "none", appearanceComponent); + + _lightSystem.SetRadius(weapon, 4F, light); + _lightSystem.SetEnabled(weapon, true, light); break; case "LaserModule": - _gunSystem.setProjectileSpeed(weapon, 40F); + Appearance.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); + _gunSystem.setProjectileSpeed(weapon, 35.5F); break; case "FlameHiderModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); _gunSystem.setUseEffect(weapon, true); break; case "SilencerModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); _gunSystem.setUseEffect(weapon, true); _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); break; + + case "AcceleratorModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); + _gunSystem.setFireRate(weapon, 7.5F); + break; } } @@ -128,35 +143,46 @@ public sealed class WeaponModulesSystem : EntitySystem case "SilencerModule": comp.Modules.Remove("SilencerModule"); break; + + case "AcceleratorModule": + comp.Modules.Remove("AcceleratorModule"); + break; } } private void removeModuleEffect(string module, EntityUid weapon) { + TryComp(weapon, out var appearanceComponent); switch (module) { case "LightModule": - if (!HasComp(weapon)) - break; - + Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _lightSystem.TryGetLight(weapon, out var light); _lightSystem.SetEnabled(weapon, false, light); break; case "LaserModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); if (!HasComp(weapon)) break; _gunSystem.setProjectileSpeed(weapon, 25F); break; case "FlameHiderModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setUseEffect(weapon, false); break; case "SilencerModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setUseEffect(weapon, false); _gunSystem.setSound(weapon, oldSoundGunshot!); break; + + case "AcceleratorModule": + Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _gunSystem.setFireRate(weapon, oldFireRate); + break; } } } diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 681bd29987..534898791e 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -544,6 +544,14 @@ public abstract partial class SharedGunSystem : EntitySystem RefreshModifiers(weapon); } + public void setFireRate(EntityUid weapon, float fireRate) + { + TryComp(weapon, out var gunComponent); + gunComponent!.FireRate = fireRate; + + RefreshModifiers(weapon); + } + public void setSound(EntityUid weapon, SoundSpecifier sound) { TryComp(weapon, out var gunComponent); diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs b/Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs similarity index 51% rename from Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs rename to Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs index 67d1d7aaa3..4da7ef3418 100644 --- a/Content.Client/_White/WeaponsModules/WeaponModulesVisualsComponent.cs +++ b/Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs @@ -1,15 +1,23 @@ using Robust.Shared.GameStates; +using Robust.Shared.Serialization; namespace Content.Client._White.WeaponsModules; /// -[RegisterComponent, Access(typeof(WeaponModulesVisuals))] +[RegisterComponent] public sealed partial class WeaponModulesVisualsComponent : Component { - [DataField()] public string? state; + [DataField] public string? state; } +[Serializable, NetSerializable] public enum ModuleVisualState : byte { - Laser + Module +} + +[Serializable, NetSerializable] +public enum Modules : byte +{ + Light } diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index c5525d983c..d6b388b86e 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -72,7 +72,8 @@ - state: mag-0 map: [ "enum.GunVisualLayers.Mag" ] - state: laser - map: [ "enum.ModuleVisualState.Laser" ] + sprite: White/Objects/Weapons/modulesOnWeapon.rsi + map: [ "enum.ModuleVisualState.Module" ] - type: Gun fireRate: 5 soundGunshot: @@ -114,6 +115,9 @@ steps: 1 zeroVisible: true - type: WeaponModulesVisuals + - type: PointLight + enabled: false + autoRot: true - type: Appearance - type: entity @@ -172,6 +176,9 @@ map: [ "enum.GunVisualLayers.Base" ] - state: mag-0 map: [ "enum.GunVisualLayers.Mag" ] + - state: laser + sprite: White/Objects/Weapons/modulesOnWeapon.rsi + map: [ "enum.ModuleVisualState.Module" ] - type: Clothing sprite: Objects/Weapons/Guns/Rifles/lecter.rsi - type: Gun @@ -195,14 +202,25 @@ whitelist: tags: - CartridgeRifle + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule - type: ContainerContainer containers: gun_magazine: !type:ContainerSlot gun_chamber: !type:ContainerSlot + gun_modules: !type:ContainerSlot - type: MagazineVisuals magState: mag steps: 1 zeroVisible: true + - type: WeaponModulesVisuals + - type: PointLight + enabled: false + autoRot: true - type: Appearance - type: entity @@ -229,3 +247,9 @@ whitelist: tags: - CartridgeRifle + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml index b693bdba37..9dcbddb50d 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml @@ -117,6 +117,9 @@ map: ["enum.GunVisualLayers.Base"] - state: mag-0 map: ["enum.GunVisualLayers.Mag"] + - state: laser + sprite: White/Objects/Weapons/modulesOnWeapon.rsi + map: [ "enum.ModuleVisualState.Module" ] - type: Clothing sprite: Objects/Weapons/Guns/SMGs/drozd.rsi - type: Gun @@ -126,6 +129,7 @@ path: /Audio/Weapons/Guns/Gunshots/atreides.ogg availableModes: - FullAuto + - type: WeaponModules - type: ItemSlots slots: gun_magazine: @@ -144,10 +148,25 @@ whitelist: tags: - CartridgePistol + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule + - type: ContainerContainer + containers: + gun_magazine: !type:ContainerSlot + gun_chamber: !type:ContainerSlot + gun_modules: !type:ContainerSlot - type: MagazineVisuals magState: mag steps: 1 zeroVisible: true + - type: WeaponModulesVisuals + - type: PointLight + enabled: false + autoRot: true - type: Appearance - type: entity @@ -216,6 +235,9 @@ - state: mag-unshaded-0 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded + - state: laser + sprite: White/Objects/Weapons/modulesOnWeapon.rsi + map: [ "enum.ModuleVisualState.Module" ] - type: Clothing sprite: Objects/Weapons/Guns/SMGs/wt550.rsi - type: ChamberMagazineAmmoProvider @@ -225,6 +247,7 @@ selectedMode: FullAuto availableModes: - FullAuto + - type: WeaponModules - type: ItemSlots slots: gun_magazine: @@ -243,10 +266,24 @@ whitelist: tags: - CartridgePistol + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule + - type: ContainerContainer + containers: + gun_magazine: !type:ContainerSlot + gun_chamber: !type:ContainerSlot - type: MagazineVisuals magState: mag steps: 6 zeroVisible: true + - type: WeaponModulesVisuals + - type: PointLight + enabled: false + autoRot: true - type: Appearance # Rubber @@ -274,6 +311,12 @@ whitelist: tags: - CartridgePistol + gun_modules: + name: Modules + priority: 2 + whitelist: + tags: + - BaseModule - type: entity name: Vector diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml index 719506a435..a65f108cb1 100644 --- a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -59,4 +59,14 @@ - type: Item - type: Sprite state: silencer + - type: Appearance + +- type: entity + id: AcceleratorModule + name: "accelerator module" + parent: BaseModule + components: + - type: Item + - type: Sprite + state: accelerator - type: Appearance \ No newline at end of file diff --git a/Resources/Textures/Effects/LightMasks/cone.png b/Resources/Textures/Effects/LightMasks/cone.png index 2cd329b99c8f1702527bda240838e8b9f85e3311..66d006976809a0988b225f6b021b1d7a9156a847 100644 GIT binary patch literal 21672 zcmXteWn9z$_x6HOBStrj(J;Duba$t8H-dnOV}yishd5+3NS7Ex5Jm_{mk5FwfTAcN z#y!8k|NUUR_F$aPd7pEg>s;r&Kbe;12Go@7lmGyL+Q?AX8UO$hzk&ed#J_-74B3JJ z05Bp@N5?YI+ZzB7o+~MMVls+i9lzgitmmR4Ec`aVHcN+6Pm8mU#x1MZd8EZ8%FLP9 zXjDKit99qCWdzLa7yB>T>rAdpBwBR3oWG#IoN;64mD<@KcDTyUC!*usKi7aUY$+Ay z4)jvuW$zb60-HOLY1d$5@CW(4Vl!R-J?m6|IPc#e&q%0(Jvn*y%3+CS#*OGa=`}ZMbiAgLor$fq*sy>L6s5l;b*dGXfRf^n_ zYiWz&jx5UX6PK{$YLEw!DdP$-BusW~Bj{`ryKI@O*JU9;53G1;>pF7Sm6VNziyQ>| zjNRm0R6eqsf#nOX=G3@uMLqw*Z3KL6QFE?9nR)}Q|N8W4u3ASVRVsHfwDq{d(tMEz zx4P;43y={C@-GWDdkvW#K-ZGF>>ArpzM}l3a*{x)3q}2?~ROr)K|8YPOjGX3OQ;PGSluA`G3P0RWn@e;;6p7!3yiV7+amt7RMKew?`O^-keo z=%cI4KYv#RhaADA)*ENB@xsG2EYe_v2r9N^Vf6N&H`o4NTFm2boBfqH`!(0w?&+74 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8y;M$D+UEg z+e&9wUjZ_wG0Nlbu8nVdFYw3LM`VbhnD7_;CyKz&{*7HTJ`EucLa%DKzc={r&XWFyfxE+_k_P3EtJzq52PL`o z(%!#2OO)RsX$7g@&mJ%#2QJ+Go&PSG26)A^#y*YpU*=U$*J`g>u|DojnxbWd( zL%^$O=f|J-~P*zHYInrtpB@j z{9^32ualb1uELM{`iWx)z6MjjEaNV MehYkyyhSPh1938{C;$Ke diff --git a/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json index c0a295d7d1..12a95021c6 100644 --- a/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json +++ b/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/meta.json @@ -19,9 +19,6 @@ { "name": "mag-0" }, - { - "name": "laser" - }, { "name": "inhand-left", "directions": 4 diff --git a/Resources/Textures/White/Effects/LightMasks/lightModule.png b/Resources/Textures/White/Effects/LightMasks/lightModule.png new file mode 100644 index 0000000000000000000000000000000000000000..66d006976809a0988b225f6b021b1d7a9156a847 GIT binary patch literal 21672 zcmXteWn9z$_x6HOBStrj(J;Duba$t8H-dnOV}yishd5+3NS7Ex5Jm_{mk5FwfTAcN z#y!8k|NUUR_F$aPd7pEg>s;r&Kbe;12Go@7lmGyL+Q?AX8UO$hzk&ed#J_-74B3JJ z05Bp@N5?YI+ZzB7o+~MMVls+i9lzgitmmR4Ec`aVHcN+6Pm8mU#x1MZd8EZ8%FLP9 zXjDKit99qCWdzLa7yB>T>rAdpBwBR3oWG#IoN;64mD<@KcDTyUC!*usKi7aUY$+Ay z4)jvuW$zb60-HOLY1d$5@CW(4Vl!R-J?m6|IPc#e&q%0(Jvn*y%3+CS#*OGa=`}ZMbiAgLor$fq*sy>L6s5l;b*dGXfRf^n_ zYiWz&jx5UX6PK{$YLEw!DdP$-BusW~Bj{`ryKI@O*JU9;53G1;>pF7Sm6VNziyQ>| zjN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R`o5< zear5d9X#(Xl?EEjxI*R^Kl5hNEez{KvCHq{hyBN1?mwr=4}` zM|nY;&rFPu1ge4rzFbP~ZpsfKOW{GGJXH@fTc42MHnru?-J}#VpG9nfLr7pyD}M5) z@rmn|Gj*j95`|84gN~{7!Q9_RsvYYPF}&A1&AY!s^ABi1RbQwBfkao6_uB`xLdtmZ z`eRV1MbmGR^&^i;O>b)F=n06h?(_TWF7*WSWMwZj|Ck2U;d^W?coeDiduEnP^O#OJ zWLfTHdzR}-Cs-K2AAdsglIM386ip4AK61Hw@x)08y>!X(D>SEdKRN^y8QAe9U+u6z x|2K_i&{Dt|C02<4|G)pkBY+P)IhZ~JE2K#5nmN3O{&|AbK<~P4rS|Qx{{m5Lf@S~! literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/modules.rsi/accelerator.png b/Resources/Textures/White/Objects/Weapons/modules.rsi/accelerator.png new file mode 100644 index 0000000000000000000000000000000000000000..99fffd9ee616f5ea86482d715c0346a710796b87 GIT binary patch literal 2801 zcmVuJ@VVD_U zC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$OrQF$}6R&?d%y_c8YA7_1Q zpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X z6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv1)yUy0P^?0*fb9UASvow z`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q{wNRKos+;6rV8ldy0Owz z(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E` zvOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G41dM~{UdP z6d+Yd3o?MrAqM0Kc|iV92owdyL5UC#5<>aVCa44|hpM4Es0sQWIt5*Tu0n&*J!lk~ zf_{hI!w5`*sjxDv4V%CW*ah~3!{C*0BD@;TgA3v9a1~q+AA{TB3-ERLHar49hi4Ih z5D^-ph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mU zU1MD9xNd#Dz0azz?I)|B+WM{g+Xrk0I&awC=o(x)cy`EX=)z6+o0o6-+`4{y+3mqQ z%kSJBju{@g%f35#FZJHb`&swrA8dGtepviS>QUumrN{L@>;2q1Vm)$Z)P1z?N$8UY zW2~{~zhwUMVZ87u`Dx{Z>O|9|`Q+&->FRy-Sjp7DHsy69KwU-!MxeeuI@&cF4| zM9z%AMnyU08;%U~nV8fH3Y-|^L1Kl!%Q^>r*zNAg+PT2p00i_>zopr05qp6uK)l5 literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/laser.png b/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/laser.png similarity index 100% rename from Resources/Textures/Objects/Weapons/Guns/Rifles/ak.rsi/laser.png rename to Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/laser.png diff --git a/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/light.png b/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/light.png new file mode 100644 index 0000000000000000000000000000000000000000..c4328d7c12c0a37971ac88002d242e8c876e2b85 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|Bm#UwT!FN? znN?{?rKE(^GASu9FRxk#h7B7wEKKoQ43y(23GxeO`2YX^kN^K~ycNIs04OHo>Eak- w(VLtg!Ky4{U}W@YYC0=pnU_dUlOi`m%PR(#>5gwTfa(}LUHx3vIVCg!0J}FVIRF3v literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/meta.json b/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/meta.json new file mode 100644 index 0000000000..82d692646c --- /dev/null +++ b/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "made by CaypenNow", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "laser" + }, + { + "name": "light" + }, + { + "name": "flamehider" + }, + { + "name": "silencer" + }, + { + "name": "accelerator" + } + ] +} diff --git a/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/silencer.png b/Resources/Textures/White/Objects/Weapons/modulesOnWeapon.rsi/silencer.png new file mode 100644 index 0000000000000000000000000000000000000000..c51e1f4c8f860f931b3f59f4461cd2f081dd2d86 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|L<4+6T!FN? znN?{?rKE(^GASu9FRxk#h97(X9|B6Smjw9*GyMPm|HuFT3k){Y0fodpT^vI!dXp0* mSPwIAU}8+=ayzKuz|IhNfI&0$=T=jo5(ZCKKbLh*2~7YUv?!JU literal 0 HcmV?d00001 From 8efae430bea530e40ebb6d44cc69f26422bad663 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Wed, 20 Mar 2024 22:17:11 +0500 Subject: [PATCH 06/25] add: lathe + translate --- .../ru-RU/locales-new/autotranslate-57.ftl | 10 +++++ .../Entities/Structures/Machines/lathe.yml | 5 +++ .../Prototypes/Recipes/Lathes/security.yml | 42 +++++++++++++++++++ .../Objects/Weapons/Guns/Modules/modules.yml | 5 +++ 4 files changed, 62 insertions(+) create mode 100644 Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl diff --git a/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl b/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl new file mode 100644 index 0000000000..22a5530a80 --- /dev/null +++ b/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl @@ -0,0 +1,10 @@ +ent-LightModule = модульный фонарик + .desc = Излучает свет. +ent-LaserModule = лазерный модуль (улучшенный) + .desc = Улучшенный модуль. Увеличивает скорость ваших пуль. +ent-FlameHiderModule = пламегаситель + .desc = Скрывает пламя огня во время выстрела. +ent-SilencerModule = глушитель + .desc = Скрывает пламя огня и приглушает звук во время выстрела. +ent-AcceleratorModule = продвинутый модуль + .desc = Увеличивает скорострельность оружия. \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 7d4858eca9..a99ea22e42 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -707,6 +707,11 @@ - ShellShotgunPractice - WeaponLaserCarbinePractice - WeaponDisablerPractice + - LightModuleRecipe + - LaserModuleRecipe + - FlameHiderModuleRecipe + - SilencerModuleRecipe + - AcceleratorModuleRecipe dynamicRecipes: - CartridgeLightRifleIncendiary - CartridgeMagnumIncendiary diff --git a/Resources/Prototypes/Recipes/Lathes/security.yml b/Resources/Prototypes/Recipes/Lathes/security.yml index 644478f37c..e4c445f11c 100644 --- a/Resources/Prototypes/Recipes/Lathes/security.yml +++ b/Resources/Prototypes/Recipes/Lathes/security.yml @@ -649,3 +649,45 @@ Plastic: 100 Glass: 20 +- type: latheRecipe + id: LightModuleRecipe + result: LightModule + completetime: 5 + materials: + Steel: 700 + Plastic: 700 + Glass: 500 + +- type: latheRecipe + id: LaserModuleRecipe + result: LaserModule + completetime: 10 + materials: + Steel: 1500 + Plastic: 1000 + Glass: 300 + +- type: latheRecipe + id: FlameHiderModuleRecipe + result: FlameHiderModule + completetime: 15 + materials: + Steel: 1000 + Plastic: 1000 + +- type: latheRecipe + id: SilencerModuleRecipe + result: SilencerModule + completetime: 15 + materials: + Steel: 1000 + Plastic: 1000 + +- type: latheRecipe + id: AcceleratorModuleRecipe + result: AcceleratorModule + completetime: 30 + materials: + Steel: 4500 + Plastic: 2000 + Glass: 1000 \ No newline at end of file diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml index a65f108cb1..8986aff935 100644 --- a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -23,6 +23,7 @@ # modules - type: entity id: LightModule + description: Light module for rifles (lector, CV, drozd, WT). name: "light module" parent: BaseModule components: @@ -33,6 +34,7 @@ - type: entity id: LaserModule + description: Laser module for rifles (lector, CV, drozd, WT). name: "laser module" parent: BaseModule components: @@ -43,6 +45,7 @@ - type: entity id: FlameHiderModule + description: Flame Hider module for rifles (lector, CV, drozd, WT). name: "flamehider module" parent: BaseModule components: @@ -53,6 +56,7 @@ - type: entity id: SilencerModule + description: Silencer module for rifles (lector, CV, drozd, WT). name: "silencer module" parent: BaseModule components: @@ -63,6 +67,7 @@ - type: entity id: AcceleratorModule + description: Accelerator module for rifles (lector, CV, drozd, WT). name: "accelerator module" parent: BaseModule components: From 9298826eb5f2cb4b09306bed306c1520e05eab59 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Wed, 20 Mar 2024 22:32:14 +0500 Subject: [PATCH 07/25] wd edit --- Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 534898791e..8a77242b83 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -535,7 +535,7 @@ public abstract partial class SharedGunSystem : EntitySystem Dirty(gun); } - + // WD EDIT public void setProjectileSpeed(EntityUid weapon, float projectileSpeed) { TryComp(weapon, out var gunComponent); @@ -567,7 +567,7 @@ public abstract partial class SharedGunSystem : EntitySystem RefreshModifiers(weapon); } - +// WD EDIT END protected abstract void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null); /// /// Used for animated effects on the client. From 2b8d88d707dd0b9a64638ca07b12a7ab81967d1d Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 22 Mar 2024 13:06:36 +0500 Subject: [PATCH 08/25] add: module components --- .../Components/AcceleratorModuleComponent.cs | 10 ++ .../Components/FlameHiderModuleComponent.cs | 10 ++ .../Components/LaserModuleComponent.cs | 10 ++ .../LightModuleComponent.cs} | 6 +- .../Components/SilencerModuleComponent.cs | 10 ++ .../Components/WeaponModulesComponent.cs | 11 ++ .../WeaponModules/WeaponModulesSystem.cs | 120 ++++++------------ 7 files changed, 92 insertions(+), 85 deletions(-) create mode 100644 Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs create mode 100644 Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs create mode 100644 Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs rename Content.Server/_White/WeaponModules/{WeaponModulesComponent.cs => Components/LightModuleComponent.cs} (52%) create mode 100644 Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs create mode 100644 Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs diff --git a/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs new file mode 100644 index 0000000000..2ba3bc4c7e --- /dev/null +++ b/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Server._White.WeaponModules; + +/// +/// This is used for... +/// +[RegisterComponent] +public sealed partial class AcceleratorModuleComponent : Component +{ + +} diff --git a/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs new file mode 100644 index 0000000000..d504b700c3 --- /dev/null +++ b/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Server._White.WeaponModules; + +/// +/// This is used for... +/// +[RegisterComponent] +public sealed partial class FlameHiderModuleComponent : Component +{ + +} diff --git a/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs new file mode 100644 index 0000000000..5ab6004543 --- /dev/null +++ b/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Server._White.WeaponModules; + +/// +/// This is used for... +/// +[RegisterComponent] +public sealed partial class LaserModuleComponent : Component +{ + +} diff --git a/Content.Server/_White/WeaponModules/WeaponModulesComponent.cs b/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs similarity index 52% rename from Content.Server/_White/WeaponModules/WeaponModulesComponent.cs rename to Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs index 479e8a858d..43081881ab 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesComponent.cs +++ b/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs @@ -1,11 +1,11 @@ namespace Content.Server._White.WeaponModules; /// -/// This is used for... +/// LightModuleComponent /// [RegisterComponent] -public sealed partial class WeaponModulesComponent : Component +public sealed partial class LightModuleComponent : WeaponModulesComponent { [ViewVariables(VVAccess.ReadWrite)] - public List Modules = new(); + public bool Enabled; } diff --git a/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs new file mode 100644 index 0000000000..1c1f9c6a8d --- /dev/null +++ b/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Server._White.WeaponModules; + +/// +/// This is used for... +/// +[RegisterComponent] +public sealed partial class SilencerModuleComponent : Component +{ + +} diff --git a/Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs b/Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs new file mode 100644 index 0000000000..53cc288e5f --- /dev/null +++ b/Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server._White.WeaponModules; + +/// +/// Base Module Component +/// +[RegisterComponent] +public partial class WeaponModulesComponent : Component +{ + [ViewVariables(VVAccess.ReadWrite), DataField] + public List Modules = new(); +} diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 7396072335..70bd9a8de5 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,4 +1,5 @@ -using Content.Client._White.WeaponsModules; +using System.Linq; +using Content.Client._White.WeaponsModules; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; @@ -11,7 +12,7 @@ public sealed class WeaponModulesSystem : EntitySystem { protected const string ModulesSlot = "gun_modules"; [Dependency] private readonly PointLightSystem _lightSystem = default!; - [Dependency] private readonly SharedAppearanceSystem Appearance = default!; + [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; [Dependency] private readonly SharedGunSystem _gunSystem = default!; SoundSpecifier? oldSoundGunshot; @@ -30,15 +31,17 @@ public sealed class WeaponModulesSystem : EntitySystem if (ModulesSlot != args.Container.ID) return; - string module = Prototype(args.Entity)!.ID; + EntityUid module = args.Entity; EntityUid weapon = args.Container.Owner; - TryComp(weapon, out var gunComp); - oldSoundGunshot = gunComp!.SoundGunshot; - oldFireRate = gunComp.FireRate; + if (TryComp(weapon, out var gunComp)) + { + oldSoundGunshot = gunComp.SoundGunshot; + oldFireRate = gunComp.FireRate; + } - insertModules(module, comp); - moduleEffect(module, weapon); + InsertModules(module, comp); + ModuleEffect(module, weapon); } private void OnEject(EntityUid uid, WeaponModulesComponent comp, EntRemovedFromContainerMessage args) @@ -46,141 +49,94 @@ public sealed class WeaponModulesSystem : EntitySystem if (ModulesSlot != args.Container.ID) return; - string module = Prototype(args.Entity)!.ID; + EntityUid module = args.Entity; EntityUid weapon = args.Container.Owner; - removeModules(module, comp); - removeModuleEffect(module, weapon); + RemoveModules(module, comp); + RemoveModuleEffect(module, weapon); } - private void insertModules(string module, WeaponModulesComponent comp) + private void InsertModules(EntityUid module, WeaponModulesComponent comp) { + if(!comp.Modules.Contains(module)) + comp.Modules.Add(module); + } + + private void ModuleEffect(EntityUid module, EntityUid weapon) + { + if(!TryComp(weapon, out var appearanceComponent)) return; switch (module) { case "LightModule": - if(comp.Modules.Contains("LightModule")) break; - comp.Modules.Add("LightModule"); - break; - - case "LaserModule": - if(comp.Modules.Contains("LaserModule")) break; - comp.Modules.Add("LaserModule"); - break; - - case "FlameHiderModule": - if(comp.Modules.Contains("FlameHiderModule")) break; - comp.Modules.Add("FlameHiderModule"); - break; - - case "SilencerModule": - if(comp.Modules.Contains("SilencerModule")) break; - comp.Modules.Add("SilencerModule"); - break; - - case "AcceleratorModule": - if(comp.Modules.Contains("AcceleratorModule")) break; - comp.Modules.Add("AcceleratorModule"); - break; - } - } - - private void moduleEffect(string module, EntityUid weapon) - { - TryComp(weapon, out var appearanceComponent); - switch (module) - { - case "LightModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "light", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "light", appearanceComponent); _lightSystem.EnsureLight(weapon); _lightSystem.TryGetLight(weapon, out var light); - Appearance.SetData(weapon, Modules.Light, "none", appearanceComponent); + _appearanceSystem.SetData(weapon, Modules.Light, "none", appearanceComponent); _lightSystem.SetRadius(weapon, 4F, light); _lightSystem.SetEnabled(weapon, true, light); break; case "LaserModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); _gunSystem.setProjectileSpeed(weapon, 35.5F); break; case "FlameHiderModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); _gunSystem.setUseEffect(weapon, true); break; case "SilencerModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); _gunSystem.setUseEffect(weapon, true); _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); break; case "AcceleratorModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); _gunSystem.setFireRate(weapon, 7.5F); break; } } - private void removeModules(string module, WeaponModulesComponent comp) + private void RemoveModules(EntityUid module, WeaponModulesComponent comp) { - switch (module) - { - case "LightModule": - comp.Modules.Remove("LightModule"); - break; - - case "LaserModule": - comp.Modules.Remove("LaserModule"); - break; - - case "FlameHiderModule": - comp.Modules.Remove("FlameHiderModule"); - break; - - case "SilencerModule": - comp.Modules.Remove("SilencerModule"); - break; - - case "AcceleratorModule": - comp.Modules.Remove("AcceleratorModule"); - break; - } + if(comp.Modules.Contains(module)) + comp.Modules.Remove(module); } - private void removeModuleEffect(string module, EntityUid weapon) + private void RemoveModuleEffect(EntityUid module, EntityUid weapon) { - TryComp(weapon, out var appearanceComponent); + if(!TryComp(weapon, out var appearanceComponent)) return; switch (module) { case "LightModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _lightSystem.TryGetLight(weapon, out var light); _lightSystem.SetEnabled(weapon, false, light); break; case "LaserModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - if (!HasComp(weapon)) - break; + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setProjectileSpeed(weapon, 25F); break; case "FlameHiderModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setUseEffect(weapon, false); break; case "SilencerModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setUseEffect(weapon, false); _gunSystem.setSound(weapon, oldSoundGunshot!); break; case "AcceleratorModule": - Appearance.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setFireRate(weapon, oldFireRate); break; } From 4b79f1e2e0d7bd66d61ddde8a25cd2e5b20f4ef9 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 22 Mar 2024 16:27:51 +0500 Subject: [PATCH 09/25] change components, remake system --- .../WeaponsModules/WeaponModulesVisuals.cs | 5 +- .../Components/AcceleratorModuleComponent.cs | 5 +- .../Components/FlameHiderModuleComponent.cs | 3 +- .../Components/LaserModuleComponent.cs | 4 +- .../Components/LightModuleComponent.cs | 2 +- .../Components/SilencerModuleComponent.cs | 9 +- .../Components/WeaponModulesComponent.cs | 11 - .../WeaponModules/WeaponModulesSystem.cs | 267 +++++++++++------- .../Weapons/Ranged/Components/GunComponent.cs | 8 +- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 12 +- .../SharedWeaponModulesSystem.cs | 17 ++ .../WeaponModules/WeaponModulesComponent.cs | 29 ++ .../WeaponModulesVisualsComponent.cs | 23 -- .../Objects/Weapons/Guns/Modules/modules.yml | 5 + 14 files changed, 239 insertions(+), 161 deletions(-) delete mode 100644 Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs create mode 100644 Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs create mode 100644 Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs delete mode 100644 Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs index 5601d15aca..85eb8112af 100644 --- a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs @@ -1,16 +1,17 @@ using Content.Client.Weapons.Ranged.Components; +using Content.Shared._White.WeaponModules; using Content.Shared.Rounding; using Content.Shared.Weapons.Ranged.Systems; using Robust.Client.GameObjects; namespace Content.Client._White.WeaponsModules; -public sealed partial class WeaponModulesVisuals : VisualizerSystem +public sealed partial class WeaponModulesVisuals : VisualizerSystem { [Dependency] private readonly PointLightSystem _lightSystem = default!; - protected override void OnAppearanceChange(EntityUid uid, WeaponModulesVisualsComponent component, ref AppearanceChangeEvent args) + protected override void OnAppearanceChange(EntityUid uid, WeaponModulesComponent component, ref AppearanceChangeEvent args) { base.OnAppearanceChange(uid, component, ref args); diff --git a/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs index 2ba3bc4c7e..e95cf6e22e 100644 --- a/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs +++ b/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs @@ -4,7 +4,8 @@ /// This is used for... /// [RegisterComponent] -public sealed partial class AcceleratorModuleComponent : Component +public sealed partial class AcceleratorModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent { - + [ViewVariables(VVAccess.ReadWrite), DataField] + public float OldFireRate; } diff --git a/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs index d504b700c3..1900a94946 100644 --- a/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs +++ b/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs @@ -4,7 +4,6 @@ /// This is used for... /// [RegisterComponent] -public sealed partial class FlameHiderModuleComponent : Component +public sealed partial class FlameHiderModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent { - } diff --git a/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs index 5ab6004543..e4b7951872 100644 --- a/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs +++ b/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs @@ -4,7 +4,7 @@ /// This is used for... /// [RegisterComponent] -public sealed partial class LaserModuleComponent : Component +public sealed partial class LaserModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent { - + } diff --git a/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs index 43081881ab..8af16ff5f2 100644 --- a/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs +++ b/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs @@ -4,7 +4,7 @@ /// LightModuleComponent /// [RegisterComponent] -public sealed partial class LightModuleComponent : WeaponModulesComponent +public sealed partial class LightModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent { [ViewVariables(VVAccess.ReadWrite)] public bool Enabled; diff --git a/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs b/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs index 1c1f9c6a8d..8d0d2bbcd8 100644 --- a/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs +++ b/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs @@ -1,10 +1,13 @@ -namespace Content.Server._White.WeaponModules; +using Robust.Shared.Audio; + +namespace Content.Server._White.WeaponModules; /// /// This is used for... /// [RegisterComponent] -public sealed partial class SilencerModuleComponent : Component +public sealed partial class SilencerModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent { - + [ViewVariables(VVAccess.ReadWrite), DataField] + public SoundSpecifier? OldSoundGunshot; } diff --git a/Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs b/Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs deleted file mode 100644 index 53cc288e5f..0000000000 --- a/Content.Server/_White/WeaponModules/Components/WeaponModulesComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server._White.WeaponModules; - -/// -/// Base Module Component -/// -[RegisterComponent] -public partial class WeaponModulesComponent : Component -{ - [ViewVariables(VVAccess.ReadWrite), DataField] - public List Modules = new(); -} diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 70bd9a8de5..f9d6b14740 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,10 +1,13 @@ using System.Linq; -using Content.Client._White.WeaponsModules; +using Content.Shared._White.Chemistry; +using Content.Shared._White.WeaponModules; using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Weapons.Ranged.Events; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Containers; +using Robust.Shared.Prototypes; namespace Content.Server._White.WeaponModules; @@ -15,130 +18,200 @@ public sealed class WeaponModulesSystem : EntitySystem [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; [Dependency] private readonly SharedGunSystem _gunSystem = default!; - SoundSpecifier? oldSoundGunshot; - private float oldFireRate; - public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnInsert); - SubscribeLocalEvent(OnEject); + SubscribeLocalEvent(LightModuleOnInsert); + SubscribeLocalEvent(LightModuleOnEject); + + SubscribeLocalEvent(LaserModuleOnInsert); + SubscribeLocalEvent(LaserModuleOnEject); + + SubscribeLocalEvent(FlameHiderModuleOnInsert); + SubscribeLocalEvent(FlameHiderModuleOnEject); + + SubscribeLocalEvent(SilencerModuleOnInsert); + SubscribeLocalEvent(SilencerModuleOnEject); + + SubscribeLocalEvent(AcceleratorModuleOnInsert); + SubscribeLocalEvent(AcceleratorModuleOnEject); } - private void OnInsert(EntityUid uid, WeaponModulesComponent comp, EntInsertedIntoContainerMessage args) + #region InsertModules + private void LightModuleOnInsert(EntityUid module, LightModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - EntityUid module = args.Entity; + if(!component.Modules.Contains(module)) + component.Modules.Add(module); + EntityUid weapon = args.Container.Owner; - if (TryComp(weapon, out var gunComp)) - { - oldSoundGunshot = gunComp.SoundGunshot; - oldFireRate = gunComp.FireRate; - } + if(!TryComp(weapon, out var appearanceComponent)) return; - InsertModules(module, comp); - ModuleEffect(module, weapon); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "light", appearanceComponent); + + _lightSystem.EnsureLight(weapon); + + _lightSystem.TryGetLight(weapon, out var light); + _appearanceSystem.SetData(weapon, Modules.Light, "none", appearanceComponent); + + _lightSystem.SetRadius(weapon, 4F, light); + _lightSystem.SetEnabled(weapon, true, light); } - private void OnEject(EntityUid uid, WeaponModulesComponent comp, EntRemovedFromContainerMessage args) + private void LaserModuleOnInsert(EntityUid module, LaserModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - EntityUid module = args.Entity; + if(!component.Modules.Contains(module)) + component.Modules.Add(module); + EntityUid weapon = args.Container.Owner; - RemoveModules(module, comp); - RemoveModuleEffect(module, weapon); - } - - private void InsertModules(EntityUid module, WeaponModulesComponent comp) - { - if(!comp.Modules.Contains(module)) - comp.Modules.Add(module); - } - - private void ModuleEffect(EntityUid module, EntityUid weapon) - { if(!TryComp(weapon, out var appearanceComponent)) return; - switch (module) - { - case "LightModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "light", appearanceComponent); - _lightSystem.EnsureLight(weapon); - - _lightSystem.TryGetLight(weapon, out var light); - _appearanceSystem.SetData(weapon, Modules.Light, "none", appearanceComponent); - - _lightSystem.SetRadius(weapon, 4F, light); - _lightSystem.SetEnabled(weapon, true, light); - break; - - case "LaserModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); - _gunSystem.setProjectileSpeed(weapon, 35.5F); - break; - - case "FlameHiderModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); - _gunSystem.setUseEffect(weapon, true); - break; - - case "SilencerModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); - _gunSystem.setUseEffect(weapon, true); - _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); - break; - - case "AcceleratorModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); - _gunSystem.setFireRate(weapon, 7.5F); - break; - } + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); + _gunSystem.setProjectileSpeed(weapon, 35.5F); } - private void RemoveModules(EntityUid module, WeaponModulesComponent comp) + private void FlameHiderModuleOnInsert(EntityUid module, FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) { - if(comp.Modules.Contains(module)) - comp.Modules.Remove(module); - } + if (ModulesSlot != args.Container.ID) + return; + + if(!component.Modules.Contains(module)) + component.Modules.Add(module); + + EntityUid weapon = args.Container.Owner; - private void RemoveModuleEffect(EntityUid module, EntityUid weapon) - { if(!TryComp(weapon, out var appearanceComponent)) return; - switch (module) - { - case "LightModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _lightSystem.TryGetLight(weapon, out var light); - _lightSystem.SetEnabled(weapon, false, light); - break; - case "LaserModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _gunSystem.setProjectileSpeed(weapon, 25F); - break; - - case "FlameHiderModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _gunSystem.setUseEffect(weapon, false); - break; - - case "SilencerModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _gunSystem.setUseEffect(weapon, false); - _gunSystem.setSound(weapon, oldSoundGunshot!); - break; - - case "AcceleratorModule": - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _gunSystem.setFireRate(weapon, oldFireRate); - break; - } + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); + component.UseEffect = true; + Dirty(module, component); } + + private void SilencerModuleOnInsert(EntityUid module, SilencerModuleComponent component, EntGotInsertedIntoContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(!component.Modules.Contains(module)) + component.Modules.Add(module); + + EntityUid weapon = args.Container.Owner; + + if(!TryComp(weapon, out var appearanceComponent)) return; + if (!TryComp(weapon, out var gunComp)) return; + + component.OldSoundGunshot = gunComp.SoundGunshot; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); + component.UseEffect = true; + _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); + + Dirty(module, component); + } + + private void AcceleratorModuleOnInsert(EntityUid module, AcceleratorModuleComponent component, EntGotInsertedIntoContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(!component.Modules.Contains(module)) + component.Modules.Add(module); + + EntityUid weapon = args.Container.Owner; + + if(!TryComp(weapon, out var appearanceComponent)) return; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); + _gunSystem.setFireRate(weapon, 7.5F); + } + #endregion + + #region EjectModules + private void LightModuleOnEject(EntityUid module, LightModuleComponent component, EntGotRemovedFromContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(component.Modules.Contains(module)) + component.Modules.Remove(module); + + EntityUid weapon = args.Container.Owner; + if(!TryComp(weapon, out var appearanceComponent)) return; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _lightSystem.TryGetLight(weapon, out var light); + _lightSystem.SetEnabled(weapon, false, light); + } + + private void LaserModuleOnEject(EntityUid module, LaserModuleComponent component, EntGotRemovedFromContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(component.Modules.Contains(module)) + component.Modules.Remove(module); + + EntityUid weapon = args.Container.Owner; + if(!TryComp(weapon, out var appearanceComponent)) return; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _gunSystem.setProjectileSpeed(weapon, 25F); + } + + private void FlameHiderModuleOnEject(EntityUid module, FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(component.Modules.Contains(module)) + component.Modules.Remove(module); + + EntityUid weapon = args.Container.Owner; + if(!TryComp(weapon, out var appearanceComponent)) return; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + component.UseEffect = false; + Dirty(module, component); + } + + private void SilencerModuleOnEject(EntityUid module, SilencerModuleComponent component, EntGotRemovedFromContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(component.Modules.Contains(module)) + component.Modules.Remove(module); + + EntityUid weapon = args.Container.Owner; + if(!TryComp(weapon, out var appearanceComponent)) return; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + component.UseEffect = false; + _gunSystem.setSound(weapon, component.OldSoundGunshot!); + Dirty(module, component); + } + + private void AcceleratorModuleOnEject(EntityUid module, AcceleratorModuleComponent component, EntGotRemovedFromContainerMessage args) + { + if (ModulesSlot != args.Container.ID) + return; + + if(component.Modules.Contains(module)) + component.Modules.Remove(module); + + EntityUid weapon = args.Container.Owner; + if(!TryComp(weapon, out var appearanceComponent)) return; + + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + _gunSystem.setFireRate(weapon, component.OldFireRate); + } + #endregion } diff --git a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs index 712c10c3fd..569b10d75e 100644 --- a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs +++ b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs @@ -179,12 +179,6 @@ public sealed partial class GunComponent : Component [DataField] public bool ResetOnHandSelected = true; - /// - /// For flamehider module | WD EDIT - /// - [DataField, AutoNetworkedField] - public bool canUseEffect; - /// /// The base value for how fast the projectile moves. /// @@ -237,7 +231,7 @@ public sealed partial class GunComponent : Component // WD START public EntityUid? Target; - + [DataField("forceThrowingAngle")] [ViewVariables(VVAccess.ReadWrite)] public bool ForceThrowingAngle; diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 995f6908b4..e7c73b328f 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -476,9 +476,7 @@ public abstract partial class SharedGunSystem : EntitySystem protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null) { - TryComp(gun, out var gunComponent); // WD EDIT - - var attemptEv = new GunMuzzleFlashAttemptEvent(gunComponent!.canUseEffect); // WD EDIT + var attemptEv = new GunMuzzleFlashAttemptEvent(); RaiseLocalEvent(gun, ref attemptEv); if (attemptEv.Cancelled) return; @@ -560,14 +558,6 @@ public abstract partial class SharedGunSystem : EntitySystem RefreshModifiers(weapon); } - - public void setUseEffect(EntityUid weapon, bool state) - { - TryComp(weapon, out var gunComponent); - gunComponent!.canUseEffect = state; - - RefreshModifiers(weapon); - } // WD EDIT END protected abstract void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null); /// diff --git a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs new file mode 100644 index 0000000000..50fb307916 --- /dev/null +++ b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs @@ -0,0 +1,17 @@ +using Content.Shared.Weapons.Ranged.Events; + +namespace Content.Shared._White.WeaponModules; + +public abstract class SharedWeaponModulesSystem : EntitySystem +{ + + public override void Initialize() + { + SubscribeLocalEvent(OnMuzzleFlashEvent); + } + + private void OnMuzzleFlashEvent(EntityUid weapon, WeaponModulesComponent component, ref GunMuzzleFlashAttemptEvent args) + { + args.Cancelled = component.UseEffect; + } +} diff --git a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs new file mode 100644 index 0000000000..1a9c9bcf85 --- /dev/null +++ b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs @@ -0,0 +1,29 @@ +using Robust.Shared.GameStates; +using Robust.Shared.Serialization; + +namespace Content.Shared._White.WeaponModules; + +/// +/// Base Module Component +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public partial class WeaponModulesComponent : Component +{ + [ViewVariables(VVAccess.ReadWrite), DataField] + public List Modules = new(); + + [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] + public bool UseEffect; +} + +[Serializable, NetSerializable] +public enum ModuleVisualState : byte +{ + Module +} + +[Serializable, NetSerializable] +public enum Modules : byte +{ + Light +} diff --git a/Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs b/Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs deleted file mode 100644 index 4da7ef3418..0000000000 --- a/Content.Shared/_White/WeaponModules/WeaponModulesVisualsComponent.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Robust.Shared.GameStates; -using Robust.Shared.Serialization; - -namespace Content.Client._White.WeaponsModules; - -/// -[RegisterComponent] -public sealed partial class WeaponModulesVisualsComponent : Component -{ - [DataField] public string? state; -} - -[Serializable, NetSerializable] -public enum ModuleVisualState : byte -{ - Module -} - -[Serializable, NetSerializable] -public enum Modules : byte -{ - Light -} diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml index 8986aff935..7592dc5192 100644 --- a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -28,6 +28,7 @@ parent: BaseModule components: - type: Item + - type: LightModule - type: Sprite state: light - type: Appearance @@ -39,6 +40,7 @@ parent: BaseModule components: - type: Item + - type: LaserModule - type: Sprite state: laser - type: Appearance @@ -50,6 +52,7 @@ parent: BaseModule components: - type: Item + - type: FlameHiderModule - type: Sprite state: flamehider - type: Appearance @@ -61,6 +64,7 @@ parent: BaseModule components: - type: Item + - type: SilencerModule - type: Sprite state: silencer - type: Appearance @@ -72,6 +76,7 @@ parent: BaseModule components: - type: Item + - type: AcceleratorModule - type: Sprite state: accelerator - type: Appearance \ No newline at end of file From 330b1502beed3d9139d8f161a006c6ebce94cbfa Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 22 Mar 2024 17:01:21 +0500 Subject: [PATCH 10/25] change components --- Content.Server/_White/WeaponModules/WeaponModulesSystem.cs | 6 +----- .../_White/WeaponModules}/AcceleratorModuleComponent.cs | 0 .../_White/WeaponModules}/FlameHiderModuleComponent.cs | 0 .../_White/WeaponModules}/LaserModuleComponent.cs | 0 .../_White/WeaponModules}/LightModuleComponent.cs | 0 .../_White/WeaponModules/SharedWeaponModulesSystem.cs | 1 - .../_White/WeaponModules}/SilencerModuleComponent.cs | 0 .../_White/WeaponModules/WeaponModulesComponent.cs | 4 ++-- 8 files changed, 3 insertions(+), 8 deletions(-) rename {Content.Server/_White/WeaponModules/Components => Content.Shared/_White/WeaponModules}/AcceleratorModuleComponent.cs (100%) rename {Content.Server/_White/WeaponModules/Components => Content.Shared/_White/WeaponModules}/FlameHiderModuleComponent.cs (100%) rename {Content.Server/_White/WeaponModules/Components => Content.Shared/_White/WeaponModules}/LaserModuleComponent.cs (100%) rename {Content.Server/_White/WeaponModules/Components => Content.Shared/_White/WeaponModules}/LightModuleComponent.cs (100%) rename {Content.Server/_White/WeaponModules/Components => Content.Shared/_White/WeaponModules}/SilencerModuleComponent.cs (100%) diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index f9d6b14740..2b330ae897 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,13 +1,9 @@ -using System.Linq; -using Content.Shared._White.Chemistry; -using Content.Shared._White.WeaponModules; +using Content.Shared._White.WeaponModules; using Content.Shared.Weapons.Ranged.Components; -using Content.Shared.Weapons.Ranged.Events; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Containers; -using Robust.Shared.Prototypes; namespace Content.Server._White.WeaponModules; diff --git a/Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs similarity index 100% rename from Content.Server/_White/WeaponModules/Components/AcceleratorModuleComponent.cs rename to Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs diff --git a/Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs similarity index 100% rename from Content.Server/_White/WeaponModules/Components/FlameHiderModuleComponent.cs rename to Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs diff --git a/Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs similarity index 100% rename from Content.Server/_White/WeaponModules/Components/LaserModuleComponent.cs rename to Content.Shared/_White/WeaponModules/LaserModuleComponent.cs diff --git a/Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs similarity index 100% rename from Content.Server/_White/WeaponModules/Components/LightModuleComponent.cs rename to Content.Shared/_White/WeaponModules/LightModuleComponent.cs diff --git a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs index 50fb307916..2de85a0420 100644 --- a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs +++ b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs @@ -4,7 +4,6 @@ namespace Content.Shared._White.WeaponModules; public abstract class SharedWeaponModulesSystem : EntitySystem { - public override void Initialize() { SubscribeLocalEvent(OnMuzzleFlashEvent); diff --git a/Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs similarity index 100% rename from Content.Server/_White/WeaponModules/Components/SilencerModuleComponent.cs rename to Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs diff --git a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs index 1a9c9bcf85..d40d342e78 100644 --- a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs +++ b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs @@ -6,13 +6,13 @@ namespace Content.Shared._White.WeaponModules; /// /// Base Module Component /// -[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +[RegisterComponent, NetworkedComponent] public partial class WeaponModulesComponent : Component { [ViewVariables(VVAccess.ReadWrite), DataField] public List Modules = new(); - [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] + [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public bool UseEffect; } From b4e8f8d620742dda461e0b2759ba1fa35517db15 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 22 Mar 2024 17:02:30 +0500 Subject: [PATCH 11/25] add AutoGenerateComponentState --- Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs index d40d342e78..4610382fc9 100644 --- a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs +++ b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared._White.WeaponModules; /// /// Base Module Component /// -[RegisterComponent, NetworkedComponent] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public partial class WeaponModulesComponent : Component { [ViewVariables(VVAccess.ReadWrite), DataField] From 5f610860f51c9dc866f9ffdcdd37b8feeac378ae Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 22 Mar 2024 17:16:31 +0500 Subject: [PATCH 12/25] change namespace --- .../WeaponModules/WeaponModulesSystem.cs | 32 +++++++++---------- .../AcceleratorModuleComponent.cs | 4 +-- .../FlameHiderModuleComponent.cs | 4 +-- .../WeaponModules/LaserModuleComponent.cs | 4 +-- .../WeaponModules/LightModuleComponent.cs | 4 +-- .../WeaponModules/SilencerModuleComponent.cs | 4 +-- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 2b330ae897..78d921255a 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -18,24 +18,24 @@ public sealed class WeaponModulesSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(LightModuleOnInsert); - SubscribeLocalEvent(LightModuleOnEject); + SubscribeLocalEvent(LightModuleOnInsert); + SubscribeLocalEvent(LightModuleOnEject); - SubscribeLocalEvent(LaserModuleOnInsert); - SubscribeLocalEvent(LaserModuleOnEject); + SubscribeLocalEvent(LaserModuleOnInsert); + SubscribeLocalEvent(LaserModuleOnEject); - SubscribeLocalEvent(FlameHiderModuleOnInsert); - SubscribeLocalEvent(FlameHiderModuleOnEject); + SubscribeLocalEvent(FlameHiderModuleOnInsert); + SubscribeLocalEvent(FlameHiderModuleOnEject); SubscribeLocalEvent(SilencerModuleOnInsert); SubscribeLocalEvent(SilencerModuleOnEject); - SubscribeLocalEvent(AcceleratorModuleOnInsert); - SubscribeLocalEvent(AcceleratorModuleOnEject); + SubscribeLocalEvent(AcceleratorModuleOnInsert); + SubscribeLocalEvent(AcceleratorModuleOnEject); } #region InsertModules - private void LightModuleOnInsert(EntityUid module, LightModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void LightModuleOnInsert(EntityUid module, Shared._White.WeaponModules.LightModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -58,7 +58,7 @@ public sealed class WeaponModulesSystem : EntitySystem _lightSystem.SetEnabled(weapon, true, light); } - private void LaserModuleOnInsert(EntityUid module, LaserModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void LaserModuleOnInsert(EntityUid module, Shared._White.WeaponModules.LaserModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -74,7 +74,7 @@ public sealed class WeaponModulesSystem : EntitySystem _gunSystem.setProjectileSpeed(weapon, 35.5F); } - private void FlameHiderModuleOnInsert(EntityUid module, FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void FlameHiderModuleOnInsert(EntityUid module, Shared._White.WeaponModules.FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -113,7 +113,7 @@ public sealed class WeaponModulesSystem : EntitySystem Dirty(module, component); } - private void AcceleratorModuleOnInsert(EntityUid module, AcceleratorModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void AcceleratorModuleOnInsert(EntityUid module, Shared._White.WeaponModules.AcceleratorModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -131,7 +131,7 @@ public sealed class WeaponModulesSystem : EntitySystem #endregion #region EjectModules - private void LightModuleOnEject(EntityUid module, LightModuleComponent component, EntGotRemovedFromContainerMessage args) + private void LightModuleOnEject(EntityUid module, Shared._White.WeaponModules.LightModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -147,7 +147,7 @@ public sealed class WeaponModulesSystem : EntitySystem _lightSystem.SetEnabled(weapon, false, light); } - private void LaserModuleOnEject(EntityUid module, LaserModuleComponent component, EntGotRemovedFromContainerMessage args) + private void LaserModuleOnEject(EntityUid module, Shared._White.WeaponModules.LaserModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -162,7 +162,7 @@ public sealed class WeaponModulesSystem : EntitySystem _gunSystem.setProjectileSpeed(weapon, 25F); } - private void FlameHiderModuleOnEject(EntityUid module, FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) + private void FlameHiderModuleOnEject(EntityUid module, Shared._White.WeaponModules.FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; @@ -195,7 +195,7 @@ public sealed class WeaponModulesSystem : EntitySystem Dirty(module, component); } - private void AcceleratorModuleOnEject(EntityUid module, AcceleratorModuleComponent component, EntGotRemovedFromContainerMessage args) + private void AcceleratorModuleOnEject(EntityUid module, Shared._White.WeaponModules.AcceleratorModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; diff --git a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs index e95cf6e22e..cc83c9fc03 100644 --- a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs @@ -1,10 +1,10 @@ -namespace Content.Server._White.WeaponModules; +namespace Content.Shared._White.WeaponModules; /// /// This is used for... /// [RegisterComponent] -public sealed partial class AcceleratorModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent +public sealed partial class AcceleratorModuleComponent : WeaponModulesComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldFireRate; diff --git a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs index 1900a94946..81f0c8a279 100644 --- a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs @@ -1,9 +1,9 @@ -namespace Content.Server._White.WeaponModules; +namespace Content.Shared._White.WeaponModules; /// /// This is used for... /// [RegisterComponent] -public sealed partial class FlameHiderModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent +public sealed partial class FlameHiderModuleComponent : WeaponModulesComponent { } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index e4b7951872..6a7dd8a9b4 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -1,10 +1,10 @@ -namespace Content.Server._White.WeaponModules; +namespace Content.Shared._White.WeaponModules; /// /// This is used for... /// [RegisterComponent] -public sealed partial class LaserModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent +public sealed partial class LaserModuleComponent : WeaponModulesComponent { } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index 8af16ff5f2..51a0c819c6 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -1,10 +1,10 @@ -namespace Content.Server._White.WeaponModules; +namespace Content.Shared._White.WeaponModules; /// /// LightModuleComponent /// [RegisterComponent] -public sealed partial class LightModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent +public sealed partial class LightModuleComponent : WeaponModulesComponent { [ViewVariables(VVAccess.ReadWrite)] public bool Enabled; diff --git a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs index 8d0d2bbcd8..57ea5b46d0 100644 --- a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs @@ -1,12 +1,12 @@ using Robust.Shared.Audio; -namespace Content.Server._White.WeaponModules; +namespace Content.Shared._White.WeaponModules; /// /// This is used for... /// [RegisterComponent] -public sealed partial class SilencerModuleComponent : Shared._White.WeaponModules.WeaponModulesComponent +public sealed partial class SilencerModuleComponent : WeaponModulesComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier? OldSoundGunshot; From 3dbd027b5225f53cfa6a44123f5462c9d1e811f6 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 22 Mar 2024 19:36:18 +0500 Subject: [PATCH 13/25] basemodulecomponent & sharedgunsystem --- .../WeaponModules/WeaponModulesSystem.cs | 125 ++++++++++-------- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 4 + .../AcceleratorModuleComponent.cs | 2 +- .../WeaponModules/BaseModuleComponent.cs | 9 ++ .../FlameHiderModuleComponent.cs | 2 +- .../WeaponModules/LaserModuleComponent.cs | 2 +- .../WeaponModules/LightModuleComponent.cs | 2 +- .../SharedWeaponModulesSystem.cs | 6 - .../WeaponModules/SilencerModuleComponent.cs | 2 +- 9 files changed, 89 insertions(+), 65 deletions(-) create mode 100644 Content.Shared/_White/WeaponModules/BaseModuleComponent.cs diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 78d921255a..dc2739b7fe 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -18,32 +18,33 @@ public sealed class WeaponModulesSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(LightModuleOnInsert); - SubscribeLocalEvent(LightModuleOnEject); + SubscribeLocalEvent(LightModuleOnInsert); + SubscribeLocalEvent(LightModuleOnEject); - SubscribeLocalEvent(LaserModuleOnInsert); - SubscribeLocalEvent(LaserModuleOnEject); + SubscribeLocalEvent(LaserModuleOnInsert); + SubscribeLocalEvent(LaserModuleOnEject); - SubscribeLocalEvent(FlameHiderModuleOnInsert); - SubscribeLocalEvent(FlameHiderModuleOnEject); + SubscribeLocalEvent(FlameHiderModuleOnInsert); + SubscribeLocalEvent(FlameHiderModuleOnEject); SubscribeLocalEvent(SilencerModuleOnInsert); SubscribeLocalEvent(SilencerModuleOnEject); - SubscribeLocalEvent(AcceleratorModuleOnInsert); - SubscribeLocalEvent(AcceleratorModuleOnEject); + SubscribeLocalEvent(AcceleratorModuleOnInsert); + SubscribeLocalEvent(AcceleratorModuleOnEject); } #region InsertModules - private void LightModuleOnInsert(EntityUid module, Shared._White.WeaponModules.LightModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void LightModuleOnInsert(EntityUid module, LightModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(!component.Modules.Contains(module)) - component.Modules.Add(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); if(!TryComp(weapon, out var appearanceComponent)) return; @@ -58,15 +59,16 @@ public sealed class WeaponModulesSystem : EntitySystem _lightSystem.SetEnabled(weapon, true, light); } - private void LaserModuleOnInsert(EntityUid module, Shared._White.WeaponModules.LaserModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void LaserModuleOnInsert(EntityUid module, LaserModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(!component.Modules.Contains(module)) - component.Modules.Add(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); if(!TryComp(weapon, out var appearanceComponent)) return; @@ -74,21 +76,22 @@ public sealed class WeaponModulesSystem : EntitySystem _gunSystem.setProjectileSpeed(weapon, 35.5F); } - private void FlameHiderModuleOnInsert(EntityUid module, Shared._White.WeaponModules.FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void FlameHiderModuleOnInsert(EntityUid module, FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(!component.Modules.Contains(module)) - component.Modules.Add(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); - component.UseEffect = true; - Dirty(module, component); + weaponModulesComponent.UseEffect = true; + Dirty(module, weaponModulesComponent); } private void SilencerModuleOnInsert(EntityUid module, SilencerModuleComponent component, EntGotInsertedIntoContainerMessage args) @@ -96,10 +99,11 @@ public sealed class WeaponModulesSystem : EntitySystem if (ModulesSlot != args.Container.ID) return; - if(!component.Modules.Contains(module)) - component.Modules.Add(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); if(!TryComp(weapon, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; @@ -107,21 +111,22 @@ public sealed class WeaponModulesSystem : EntitySystem component.OldSoundGunshot = gunComp.SoundGunshot; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); - component.UseEffect = true; + weaponModulesComponent.UseEffect = true; _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); - Dirty(module, component); + Dirty(module, weaponModulesComponent); } - private void AcceleratorModuleOnInsert(EntityUid module, Shared._White.WeaponModules.AcceleratorModuleComponent component, EntGotInsertedIntoContainerMessage args) + private void AcceleratorModuleOnInsert(EntityUid module, AcceleratorModuleComponent component, EntGotInsertedIntoContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(!component.Modules.Contains(module)) - component.Modules.Add(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); if(!TryComp(weapon, out var appearanceComponent)) return; @@ -131,51 +136,58 @@ public sealed class WeaponModulesSystem : EntitySystem #endregion #region EjectModules - private void LightModuleOnEject(EntityUid module, Shared._White.WeaponModules.LightModuleComponent component, EntGotRemovedFromContainerMessage args) + private void LightModuleOnEject(EntityUid module, LightModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(component.Modules.Contains(module)) - component.Modules.Remove(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); + if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _lightSystem.TryGetLight(weapon, out var light); + _lightSystem.SetRadius(weapon, 0F, light); _lightSystem.SetEnabled(weapon, false, light); } - private void LaserModuleOnEject(EntityUid module, Shared._White.WeaponModules.LaserModuleComponent component, EntGotRemovedFromContainerMessage args) + private void LaserModuleOnEject(EntityUid module, LaserModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(component.Modules.Contains(module)) - component.Modules.Remove(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); + if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setProjectileSpeed(weapon, 25F); } - private void FlameHiderModuleOnEject(EntityUid module, Shared._White.WeaponModules.FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) + private void FlameHiderModuleOnEject(EntityUid module, FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(component.Modules.Contains(module)) - component.Modules.Remove(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); + if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - component.UseEffect = false; - Dirty(module, component); + weaponModulesComponent.UseEffect = false; + Dirty(module, weaponModulesComponent); } private void SilencerModuleOnEject(EntityUid module, SilencerModuleComponent component, EntGotRemovedFromContainerMessage args) @@ -183,31 +195,36 @@ public sealed class WeaponModulesSystem : EntitySystem if (ModulesSlot != args.Container.ID) return; - if(component.Modules.Contains(module)) - component.Modules.Remove(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); + if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - component.UseEffect = false; + weaponModulesComponent.UseEffect = false; _gunSystem.setSound(weapon, component.OldSoundGunshot!); - Dirty(module, component); + Dirty(module, weaponModulesComponent); } - private void AcceleratorModuleOnEject(EntityUid module, Shared._White.WeaponModules.AcceleratorModuleComponent component, EntGotRemovedFromContainerMessage args) + private void AcceleratorModuleOnEject(EntityUid module, AcceleratorModuleComponent component, EntGotRemovedFromContainerMessage args) { if (ModulesSlot != args.Container.ID) return; - if(component.Modules.Contains(module)) - component.Modules.Remove(module); - EntityUid weapon = args.Container.Owner; + if (!TryComp(weapon, out var weaponModulesComponent)) return; + + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); + if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.setFireRate(weapon, component.OldFireRate); + } #endregion } diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index e7c73b328f..01daf57ad6 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; +using Content.Shared._White.WeaponModules; using Content.Shared.ActionBlocker; using Content.Shared.Actions; using Content.Shared.Administration.Logs; @@ -476,6 +477,9 @@ public abstract partial class SharedGunSystem : EntitySystem protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null) { + bool cancelled = TryComp(gun, out var weaponModulesComponent) && weaponModulesComponent.UseEffect; + if(cancelled) return; + var attemptEv = new GunMuzzleFlashAttemptEvent(); RaiseLocalEvent(gun, ref attemptEv); if (attemptEv.Cancelled) diff --git a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs index cc83c9fc03..389c84c198 100644 --- a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs @@ -4,7 +4,7 @@ /// This is used for... /// [RegisterComponent] -public sealed partial class AcceleratorModuleComponent : WeaponModulesComponent +public sealed partial class AcceleratorModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldFireRate; diff --git a/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs b/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs new file mode 100644 index 0000000000..6ad8040090 --- /dev/null +++ b/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._White.WeaponModules; + + +[RegisterComponent, NetworkedComponent] +public partial class BaseModuleComponent : Component +{ +} diff --git a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs index 81f0c8a279..94c9a9f02b 100644 --- a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs @@ -4,6 +4,6 @@ /// This is used for... /// [RegisterComponent] -public sealed partial class FlameHiderModuleComponent : WeaponModulesComponent +public sealed partial class FlameHiderModuleComponent : BaseModuleComponent { } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index 6a7dd8a9b4..8a398502d0 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -4,7 +4,7 @@ /// This is used for... /// [RegisterComponent] -public sealed partial class LaserModuleComponent : WeaponModulesComponent +public sealed partial class LaserModuleComponent : BaseModuleComponent { } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index 51a0c819c6..7f215dd818 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -4,7 +4,7 @@ /// LightModuleComponent /// [RegisterComponent] -public sealed partial class LightModuleComponent : WeaponModulesComponent +public sealed partial class LightModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite)] public bool Enabled; diff --git a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs index 2de85a0420..8c46a14130 100644 --- a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs +++ b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs @@ -6,11 +6,5 @@ public abstract class SharedWeaponModulesSystem : EntitySystem { public override void Initialize() { - SubscribeLocalEvent(OnMuzzleFlashEvent); - } - - private void OnMuzzleFlashEvent(EntityUid weapon, WeaponModulesComponent component, ref GunMuzzleFlashAttemptEvent args) - { - args.Cancelled = component.UseEffect; } } diff --git a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs index 57ea5b46d0..d16d3104e7 100644 --- a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared._White.WeaponModules; /// This is used for... /// [RegisterComponent] -public sealed partial class SilencerModuleComponent : WeaponModulesComponent +public sealed partial class SilencerModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier? OldSoundGunshot; From 7c074f965515d186235215b467e52a5a5d989ebc Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sat, 23 Mar 2024 12:05:59 +0500 Subject: [PATCH 14/25] insert & eject sound --- .../_White/WeaponModules/WeaponModulesSystem.cs | 3 +-- .../WeaponModules/SilencerModuleComponent.cs | 3 +++ .../Audio/White/Gun/Modules/ejectmodule.ogg | Bin 0 -> 13043 bytes .../Audio/White/Gun/Modules/insertmodule.ogg | Bin 0 -> 15257 bytes .../Objects/Weapons/Guns/Rifles/rifles.yml | 8 ++++++++ .../Entities/Objects/Weapons/Guns/SMGs/smgs.yml | 6 ++++++ 6 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 Resources/Audio/White/Gun/Modules/ejectmodule.ogg create mode 100644 Resources/Audio/White/Gun/Modules/insertmodule.ogg diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index dc2739b7fe..159777e58f 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -2,7 +2,6 @@ using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; -using Robust.Shared.Audio; using Robust.Shared.Containers; namespace Content.Server._White.WeaponModules; @@ -112,7 +111,7 @@ public sealed class WeaponModulesSystem : EntitySystem _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); weaponModulesComponent.UseEffect = true; - _gunSystem.setSound(weapon, new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg")); + _gunSystem.setSound(weapon, component.NewSoundGunshot); Dirty(module, weaponModulesComponent); } diff --git a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs index d16d3104e7..074a21ae77 100644 --- a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs @@ -10,4 +10,7 @@ public sealed partial class SilencerModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier? OldSoundGunshot; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public SoundSpecifier NewSoundGunshot = new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg"); } diff --git a/Resources/Audio/White/Gun/Modules/ejectmodule.ogg b/Resources/Audio/White/Gun/Modules/ejectmodule.ogg new file mode 100644 index 0000000000000000000000000000000000000000..77ef768ab7b8acd853a99fcbe332fd1c1f9612a6 GIT binary patch literal 13043 zcmeG?30PBCvnT8z+8}5Vkp=`INZ{V=iA2K=5flPZ7O7^rfe0a(MbS!&5Rl?hL`0>C zxZqZ_V%@D4{ShrH6%lYla0QpDU4GEIy>k;mZSDKp_xgYDd++sdx!<{SX6DSynVB=^ z=1xvYi3KL$RU6w%K8AOX&ZtW#xDaNm)DndT2N1vmBhpLQaKL`TWSnxK;gkgUbSz`{ zes3J<_nPR6GbUHOO9%WK#oFO<$bO@a%R7gov6qs5w3_@gLEyklF zD4l}PC@4ZgXEJcyQbDNfh$){yW zB=BGEMpDRlZc`aiNK|GJmZ}J!r^aIEO^TDwOOtYBZWG2&%R5o$$+9ww^Xe*lk4Xis= za5#Pl)sIT0Kn#jzZiZHzMaj^Ne#OPeCK%I5)rw55LX|fD1(bH4nHx|G6B$niJv&|DL)^qq@O!GsH@TGzya`-~zvGEtzy+ zwoIKm-LM)msUMb(DWQTIXfE{EBoZv^cT6RjBlp8c4My&t2nrY##f`|&XvG;)EFzfa z1|hx*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q8 zLnz4eZI(tVva!DTMY%KJWz5@ZHYa71_Z~h+X~Q% ze$Pb~&RSSi6#h_O>z5|G=|k<^*awrm?-^x0DVPm4XFl&{rzwBPeGans9V?~QDygVT zr0pslt9!6_meWh#pKT%z$O?vMHC|PX8925YYnbVku)Rg$HXBqgT03_6fJHiH@@~%C zsj@xXvr#*+4x6UFTcW%4m)feCaQ#K4z6?ps_DY+Wk^*7OTLZ*^JSrjR_WZ^Tlg8~= zQFrRE|H9vP#p%U|30Qc2!8IQZ>N&c3{c^+1=gS7t6v{!3)I4EFUpWe$pZfO1az8&c zn|8w0&ZuT1<-aZ(y}^f8lGIFPEMI(fLVymcvhu6 z$hRRYt<1<>38Y@JK6eTzrA}C)QdL%Xa&=VBq%Xqh#7^AkLV1-pHzhnh&P8qWXRF_X z#gIeB+t1TlmZyGU8@3T`Pu+iGjLLSjwwbKDatn8obLx5jp=myv%0&#-5I?F;kVss?0q)+KEK$3ioX2!h!*ZX zQ~i%m-t6-#T^oXi6ivO?`I##w)rIEoB?=p_^{(D@uRs+VmL1#Fk;=iRtpAK&yQEv? z%^h%#W16NX?AbQ$irer0d!XVp8x&QzG literal 0 HcmV?d00001 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index d6b388b86e..b1847572a8 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -46,6 +46,8 @@ - CartridgeLightRifle gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: @@ -101,6 +103,8 @@ - CartridgeLightRifle gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: @@ -204,6 +208,8 @@ - CartridgeRifle gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: @@ -249,6 +255,8 @@ - CartridgeRifle gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml index 9dcbddb50d..fb064d3960 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml @@ -150,6 +150,8 @@ - CartridgePistol gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: @@ -268,6 +270,8 @@ - CartridgePistol gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: @@ -313,6 +317,8 @@ - CartridgePistol gun_modules: name: Modules + insertSound: /Audio/White/Gun/Modules/insertmodule.ogg + ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg priority: 2 whitelist: tags: From 37a29935e50170c736d5b47a9032526d3df77e1f Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sun, 24 Mar 2024 13:53:19 +0500 Subject: [PATCH 15/25] add gold --- Resources/Prototypes/Recipes/Lathes/security.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Recipes/Lathes/security.yml b/Resources/Prototypes/Recipes/Lathes/security.yml index 941f8d02b8..e8d007cd3a 100644 --- a/Resources/Prototypes/Recipes/Lathes/security.yml +++ b/Resources/Prototypes/Recipes/Lathes/security.yml @@ -707,6 +707,7 @@ result: AcceleratorModule completetime: 30 materials: - Steel: 4500 - Plastic: 2000 - Glass: 1000 + Steel: 3500 + Plastic: 1000 + Glass: 500 + Gold: 1000 From ce98d8157c90328e2403b2dab442df36a0d0e439 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sun, 24 Mar 2024 14:35:45 +0500 Subject: [PATCH 16/25] fix --- .../WeaponsModules/WeaponModulesVisuals.cs | 2 -- .../WeaponModules/WeaponModulesSystem.cs | 19 ++++++++++----- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 24 ++++++++++++------- .../WeaponModules/LaserModuleComponent.cs | 3 ++- .../WeaponModules/LightModuleComponent.cs | 2 +- .../Objects/Weapons/Guns/Rifles/rifles.yml | 2 ++ .../Objects/Weapons/Guns/SMGs/smgs.yml | 2 ++ 7 files changed, 35 insertions(+), 19 deletions(-) diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs index 85eb8112af..e9f3ce4987 100644 --- a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs @@ -18,8 +18,6 @@ public sealed partial class WeaponModulesVisuals : VisualizerSystem(uid, ModuleVisualState.Module, out var module, args.Component) && module.Length != 0 && module != "none") { args.Sprite.LayerSetState(ModuleVisualState.Module, module); diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 159777e58f..10d2b22d0f 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -70,9 +70,12 @@ public sealed class WeaponModulesSystem : EntitySystem weaponModulesComponent.Modules.Add(module); if(!TryComp(weapon, out var appearanceComponent)) return; + if (!TryComp(weapon, out var gunComp)) return; + + component.OldProjectileSpeed = gunComp.ProjectileSpeed; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); - _gunSystem.setProjectileSpeed(weapon, 35.5F); + _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed + 15F); } private void FlameHiderModuleOnInsert(EntityUid module, FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) @@ -111,7 +114,7 @@ public sealed class WeaponModulesSystem : EntitySystem _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); weaponModulesComponent.UseEffect = true; - _gunSystem.setSound(weapon, component.NewSoundGunshot); + _gunSystem.SetSound(weapon, component.NewSoundGunshot); Dirty(module, weaponModulesComponent); } @@ -129,8 +132,12 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; + if (!TryComp(weapon, out var gunComp)) return; + + component.OldFireRate = gunComp.FireRate; + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); - _gunSystem.setFireRate(weapon, 7.5F); + _gunSystem.SetFireRate(weapon, component.OldFireRate + 2F); } #endregion @@ -168,7 +175,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _gunSystem.setProjectileSpeed(weapon, 25F); + _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed); } private void FlameHiderModuleOnEject(EntityUid module, FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) @@ -204,7 +211,7 @@ public sealed class WeaponModulesSystem : EntitySystem _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); weaponModulesComponent.UseEffect = false; - _gunSystem.setSound(weapon, component.OldSoundGunshot!); + _gunSystem.SetSound(weapon, component.OldSoundGunshot!); Dirty(module, weaponModulesComponent); } @@ -222,7 +229,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - _gunSystem.setFireRate(weapon, component.OldFireRate); + _gunSystem.SetFireRate(weapon, component.OldFireRate); } #endregion diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 01daf57ad6..c8afd64540 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -539,26 +539,32 @@ public abstract partial class SharedGunSystem : EntitySystem Dirty(gun); } // WD EDIT - public void setProjectileSpeed(EntityUid weapon, float projectileSpeed) + public void SetProjectileSpeed(EntityUid weapon, float projectileSpeed) { - TryComp(weapon, out var gunComponent); - gunComponent!.ProjectileSpeed = projectileSpeed; + if(!TryComp(weapon, out var gunComponent)) + return; + + gunComponent.ProjectileSpeed = projectileSpeed; RefreshModifiers(weapon); } - public void setFireRate(EntityUid weapon, float fireRate) + public void SetFireRate(EntityUid weapon, float fireRate) { - TryComp(weapon, out var gunComponent); - gunComponent!.FireRate = fireRate; + if(!TryComp(weapon, out var gunComponent)) + return; + + gunComponent.FireRate = fireRate; RefreshModifiers(weapon); } - public void setSound(EntityUid weapon, SoundSpecifier sound) + public void SetSound(EntityUid weapon, SoundSpecifier sound) { - TryComp(weapon, out var gunComponent); - gunComponent!.SoundGunshot = sound; + if(!TryComp(weapon, out var gunComponent)) + return; + + gunComponent.SoundGunshot = sound; RefreshModifiers(weapon); } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index 8a398502d0..3f8404931b 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -6,5 +6,6 @@ [RegisterComponent] public sealed partial class LaserModuleComponent : BaseModuleComponent { - + [ViewVariables(VVAccess.ReadWrite), DataField] + public float OldProjectileSpeed; } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index 7f215dd818..b90bbfe04c 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -6,6 +6,6 @@ [RegisterComponent] public sealed partial class LightModuleComponent : BaseModuleComponent { - [ViewVariables(VVAccess.ReadWrite)] + [ViewVariables(VVAccess.ReadWrite), DataField] public bool Enabled; } diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index b1847572a8..2a160f2936 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -74,6 +74,7 @@ - state: mag-0 map: [ "enum.GunVisualLayers.Mag" ] - state: laser + visible: false sprite: White/Objects/Weapons/modulesOnWeapon.rsi map: [ "enum.ModuleVisualState.Module" ] - type: Gun @@ -181,6 +182,7 @@ - state: mag-0 map: [ "enum.GunVisualLayers.Mag" ] - state: laser + visible: false sprite: White/Objects/Weapons/modulesOnWeapon.rsi map: [ "enum.ModuleVisualState.Module" ] - type: Clothing diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml index fb064d3960..1332894437 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml @@ -118,6 +118,7 @@ - state: mag-0 map: ["enum.GunVisualLayers.Mag"] - state: laser + visible: false sprite: White/Objects/Weapons/modulesOnWeapon.rsi map: [ "enum.ModuleVisualState.Module" ] - type: Clothing @@ -238,6 +239,7 @@ map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded - state: laser + visible: false sprite: White/Objects/Weapons/modulesOnWeapon.rsi map: [ "enum.ModuleVisualState.Module" ] - type: Clothing From 676f469bf9ed146b02411a7b03cf0ec47bd85e62 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sun, 24 Mar 2024 14:37:57 +0500 Subject: [PATCH 17/25] fix2 --- .../_White/Construction/Prototypes - Ярлык.lnk | Bin 0 -> 1040 bytes .../Objects/Weapons/Guns/Modules/modules.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Resources/Prototypes/_White/Construction/Prototypes - Ярлык.lnk rename Resources/Prototypes/{White => _White}/Entities/Objects/Weapons/Guns/Modules/modules.yml (100%) diff --git a/Resources/Prototypes/_White/Construction/Prototypes - Ярлык.lnk b/Resources/Prototypes/_White/Construction/Prototypes - Ярлык.lnk new file mode 100644 index 0000000000000000000000000000000000000000..4d7b88f93a282f454be5efa8707b7e609493002b GIT binary patch literal 1040 zcmah|U1-x#6h7Ia`w?9>t87JWDJY%NE`@?^wb*IbRuEQKl{^ILh^^bCq-z?s34-F2 zIANfBP;eAiJ0J8xa18wI!=7}EGKRW7DTv5qjy}0Z&q-%m*@icK-#tmr{m!}HP0j!S zW2iv}$ZHIN+fWZ2#?#8-_er(L%*7X8&0i}r*WcwH&G22M0YdMOIT%OsUdVQ9E~%wDV&-kn1$X z3i-V+p$F9zR8>(|(qht%uJ=78_%3h|PRVIGJ(5Im2FQ6iq)y#ekMC>a5JpuQ z(i%n}xvp=-v~!4k2r`)FvQGdJjQ1dF5t%^yEFIG9kJ2)r!McB!{Rn`RlLdo1b3T@Aus+ z{O|n?Hr{|O_M)~U5{|6!Z;GejR&Z*qusf^7EnQTT3Y!pZh>b>@!HS3F!G<>;a62v4 zMh2M*@TG$@t3f08xKtAzo%s2bG8!p^3XuPsdtG+3i4uK8D<8D)o$O}mo>r5`CYEPU zupVSHbRzs1x!GgL$5|I<(wXc+Xe!3q$)zUxOK=P#sK4BRWc7|OG*5qoeD_jo;XFP+ zKnYaAg4k-S;wILJTkZzHjapRj`QC*8*_~u)D&(_gy~CsX@p&HtLWrH;`sXM{Td4j& F;}1W}*0BHp literal 0 HcmV?d00001 diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml similarity index 100% rename from Resources/Prototypes/White/Entities/Objects/Weapons/Guns/Modules/modules.yml rename to Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml From 1cb4c29d15221fb66403c2c55ece738ee1a3df9f Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sun, 24 Mar 2024 16:00:19 +0500 Subject: [PATCH 18/25] new methods --- .../WeaponsModules/WeaponModulesVisuals.cs | 2 + .../WeaponModules/WeaponModulesSystem.cs | 104 ++++++++---------- .../Catalog/Fills/Lockers/security.yml | 4 + 3 files changed, 50 insertions(+), 60 deletions(-) diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs index e9f3ce4987..85eb8112af 100644 --- a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs @@ -18,6 +18,8 @@ public sealed partial class WeaponModulesVisuals : VisualizerSystem(uid, ModuleVisualState.Module, out var module, args.Component) && module.Length != 0 && module != "none") { args.Sprite.LayerSetState(ModuleVisualState.Module, module); diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index 10d2b22d0f..b7db9f1eed 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -33,17 +33,37 @@ public sealed class WeaponModulesSystem : EntitySystem SubscribeLocalEvent(AcceleratorModuleOnEject); } + private bool TryInsertModule(EntityUid module, EntityUid weapon, EntGotInsertedIntoContainerMessage args) + { + if (TryComp(weapon, out var weaponModulesComponent) && ModulesSlot == args.Container.ID) + { + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); + return true; + } + + return false; + } + + private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args) + { + if (TryComp(weapon, out var weaponModulesComponent) && ModulesSlot == args.Container.ID) + { + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); + return true; + } + + return false; + } + #region InsertModules private void LightModuleOnInsert(EntityUid module, LightModuleComponent component, EntGotInsertedIntoContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(!weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Add(module); + if(!TryInsertModule(module, weapon, args)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -60,14 +80,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void LaserModuleOnInsert(EntityUid module, LaserModuleComponent component, EntGotInsertedIntoContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(!weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Add(module); + if(!TryInsertModule(module, weapon, args)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; @@ -80,14 +96,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void FlameHiderModuleOnInsert(EntityUid module, FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(!weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Add(module); + if(!TryInsertModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -98,14 +110,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void SilencerModuleOnInsert(EntityUid module, SilencerModuleComponent component, EntGotInsertedIntoContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(!weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Add(module); + if(!TryInsertModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; @@ -121,14 +129,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void AcceleratorModuleOnInsert(EntityUid module, AcceleratorModuleComponent component, EntGotInsertedIntoContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(!weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Add(module); + if(!TryInsertModule(module, weapon, args)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -144,14 +148,10 @@ public sealed class WeaponModulesSystem : EntitySystem #region EjectModules private void LightModuleOnEject(EntityUid module, LightModuleComponent component, EntGotRemovedFromContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Remove(module); + if(!TryEjectModule(module, weapon, args)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -163,14 +163,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void LaserModuleOnEject(EntityUid module, LaserModuleComponent component, EntGotRemovedFromContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Remove(module); + if(!TryEjectModule(module, weapon, args)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -180,14 +176,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void FlameHiderModuleOnEject(EntityUid module, FlameHiderModuleComponent component, EntGotRemovedFromContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Remove(module); + if(!TryEjectModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -198,14 +190,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void SilencerModuleOnEject(EntityUid module, SilencerModuleComponent component, EntGotRemovedFromContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Remove(module); + if(!TryEjectModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -217,14 +205,10 @@ public sealed class WeaponModulesSystem : EntitySystem private void AcceleratorModuleOnEject(EntityUid module, AcceleratorModuleComponent component, EntGotRemovedFromContainerMessage args) { - if (ModulesSlot != args.Container.ID) - return; - EntityUid weapon = args.Container.Owner; - if (!TryComp(weapon, out var weaponModulesComponent)) return; - if(weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Remove(module); + if(!TryEjectModule(module, weapon, args)) + return; if(!TryComp(weapon, out var appearanceComponent)) return; diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml index 0bca462d2a..2c13c0fcc6 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml @@ -18,6 +18,7 @@ - id: BoxMindshield - id: ClothingOuterHardsuitWarden - id: OxygenTankFilled + - id: LightModule - type: entity id: LockerWardenFilled @@ -37,6 +38,7 @@ - id: WeaponPistolMk58Nonlethal - id: MagazinePistol - id: BoxMindshield + - id: LightModule - type: entity id: LockerSecurityFilled @@ -66,6 +68,7 @@ - id: WeaponPistolMk58Nonlethal - id: SurveillanceBodyCamera - id: MagazinePistol + - id: LightModule - type: entity id: LockerBrigmedicFilled @@ -126,6 +129,7 @@ - id: VoiceRecorder - id: ClothingEyesGlassesSecurity - id: BoxZipLocks + - id: LightModule - type: entity id: ClosetBombFilled From e75639d5bcbfcf91aac18f6a45480ad6ab0a936c Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sun, 24 Mar 2024 17:51:05 +0500 Subject: [PATCH 19/25] fix --- .../_White/Construction/Prototypes - Ярлык.lnk | Bin 1040 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Resources/Prototypes/_White/Construction/Prototypes - Ярлык.lnk diff --git a/Resources/Prototypes/_White/Construction/Prototypes - Ярлык.lnk b/Resources/Prototypes/_White/Construction/Prototypes - Ярлык.lnk deleted file mode 100644 index 4d7b88f93a282f454be5efa8707b7e609493002b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1040 zcmah|U1-x#6h7Ia`w?9>t87JWDJY%NE`@?^wb*IbRuEQKl{^ILh^^bCq-z?s34-F2 zIANfBP;eAiJ0J8xa18wI!=7}EGKRW7DTv5qjy}0Z&q-%m*@icK-#tmr{m!}HP0j!S zW2iv}$ZHIN+fWZ2#?#8-_er(L%*7X8&0i}r*WcwH&G22M0YdMOIT%OsUdVQ9E~%wDV&-kn1$X z3i-V+p$F9zR8>(|(qht%uJ=78_%3h|PRVIGJ(5Im2FQ6iq)y#ekMC>a5JpuQ z(i%n}xvp=-v~!4k2r`)FvQGdJjQ1dF5t%^yEFIG9kJ2)r!McB!{Rn`RlLdo1b3T@Aus+ z{O|n?Hr{|O_M)~U5{|6!Z;GejR&Z*qusf^7EnQTT3Y!pZh>b>@!HS3F!G<>;a62v4 zMh2M*@TG$@t3f08xKtAzo%s2bG8!p^3XuPsdtG+3i4uK8D<8D)o$O}mo>r5`CYEPU zupVSHbRzs1x!GgL$5|I<(wXc+Xe!3q$)zUxOK=P#sK4BRWc7|OG*5qoeD_jo;XFP+ zKnYaAg4k-S;wILJTkZzHjapRj`QC*8*_~u)D&(_gy~CsX@p&HtLWrH;`sXM{Td4j& F;}1W}*0BHp From 7198ad69b2d5d8563ed19fc3c1c97f2fedc5f5f5 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Sun, 24 Mar 2024 21:28:59 +0500 Subject: [PATCH 20/25] new method --- .../WeaponModules/WeaponModulesSystem.cs | 30 +++++++++++-------- .../AcceleratorModuleComponent.cs | 3 ++ .../FlameHiderModuleComponent.cs | 2 ++ .../WeaponModules/LaserModuleComponent.cs | 3 ++ .../WeaponModules/LightModuleComponent.cs | 3 ++ .../SharedWeaponModulesSystem.cs | 10 ------- .../WeaponModules/SilencerModuleComponent.cs | 3 ++ 7 files changed, 31 insertions(+), 23 deletions(-) delete mode 100644 Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index b7db9f1eed..e48fd36bb1 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,4 +1,5 @@ -using Content.Shared._White.WeaponModules; +using System.Diagnostics.CodeAnalysis; +using Content.Shared._White.WeaponModules; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Systems; using Robust.Server.GameObjects; @@ -32,7 +33,6 @@ public sealed class WeaponModulesSystem : EntitySystem SubscribeLocalEvent(AcceleratorModuleOnInsert); SubscribeLocalEvent(AcceleratorModuleOnEject); } - private bool TryInsertModule(EntityUid module, EntityUid weapon, EntGotInsertedIntoContainerMessage args) { if (TryComp(weapon, out var weaponModulesComponent) && ModulesSlot == args.Container.ID) @@ -57,6 +57,11 @@ public sealed class WeaponModulesSystem : EntitySystem return false; } + private void SetAppearance(EntityUid weapon, Enum key, string value, AppearanceComponent appearanceComponent) + { + _appearanceSystem.SetData(weapon, key, value, appearanceComponent); + } + #region InsertModules private void LightModuleOnInsert(EntityUid module, LightModuleComponent component, EntGotInsertedIntoContainerMessage args) { @@ -67,7 +72,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "light", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); _lightSystem.EnsureLight(weapon); @@ -90,7 +95,7 @@ public sealed class WeaponModulesSystem : EntitySystem component.OldProjectileSpeed = gunComp.ProjectileSpeed; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "laser", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed + 15F); } @@ -103,7 +108,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "flamehider", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); weaponModulesComponent.UseEffect = true; Dirty(module, weaponModulesComponent); } @@ -120,7 +125,7 @@ public sealed class WeaponModulesSystem : EntitySystem component.OldSoundGunshot = gunComp.SoundGunshot; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "silencer", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); weaponModulesComponent.UseEffect = true; _gunSystem.SetSound(weapon, component.NewSoundGunshot); @@ -140,7 +145,7 @@ public sealed class WeaponModulesSystem : EntitySystem component.OldFireRate = gunComp.FireRate; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "accelerator", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); _gunSystem.SetFireRate(weapon, component.OldFireRate + 2F); } #endregion @@ -155,7 +160,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); _lightSystem.TryGetLight(weapon, out var light); _lightSystem.SetRadius(weapon, 0F, light); _lightSystem.SetEnabled(weapon, false, light); @@ -170,7 +175,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed); } @@ -183,7 +188,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); weaponModulesComponent.UseEffect = false; Dirty(module, weaponModulesComponent); } @@ -197,7 +202,7 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); weaponModulesComponent.UseEffect = false; _gunSystem.SetSound(weapon, component.OldSoundGunshot!); Dirty(module, weaponModulesComponent); @@ -212,9 +217,8 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryComp(weapon, out var appearanceComponent)) return; - _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.SetFireRate(weapon, component.OldFireRate); - } #endregion } diff --git a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs index 389c84c198..31e10e6214 100644 --- a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs @@ -8,4 +8,7 @@ public sealed partial class AcceleratorModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldFireRate; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public string AppearanceValue = "accelerator"; } diff --git a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs index 94c9a9f02b..19a1e58bd4 100644 --- a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs @@ -6,4 +6,6 @@ [RegisterComponent] public sealed partial class FlameHiderModuleComponent : BaseModuleComponent { + [ViewVariables(VVAccess.ReadWrite), DataField] + public string AppearanceValue = "flamehider"; } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index 3f8404931b..b2230a7d1b 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -8,4 +8,7 @@ public sealed partial class LaserModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldProjectileSpeed; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public string AppearanceValue = "laser"; } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index b90bbfe04c..689311586d 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -8,4 +8,7 @@ public sealed partial class LightModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public bool Enabled; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public string AppearanceValue = "light"; } diff --git a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs b/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs deleted file mode 100644 index 8c46a14130..0000000000 --- a/Content.Shared/_White/WeaponModules/SharedWeaponModulesSystem.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Content.Shared.Weapons.Ranged.Events; - -namespace Content.Shared._White.WeaponModules; - -public abstract class SharedWeaponModulesSystem : EntitySystem -{ - public override void Initialize() - { - } -} diff --git a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs index 074a21ae77..146d8bae52 100644 --- a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs @@ -13,4 +13,7 @@ public sealed partial class SilencerModuleComponent : BaseModuleComponent [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier NewSoundGunshot = new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg"); + + [ViewVariables(VVAccess.ReadWrite), DataField] + public string AppearanceValue = "silencer"; } From b2cf4d5f4645cf6a6c3408b0ecf52326beedc7a4 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Mon, 25 Mar 2024 00:23:23 +0500 Subject: [PATCH 21/25] fix: appvalue to basemodule --- .../WeaponModules/WeaponModulesSystem.cs | 42 ++++++++++--------- .../AcceleratorModuleComponent.cs | 3 -- .../WeaponModules/BaseModuleComponent.cs | 2 + .../FlameHiderModuleComponent.cs | 2 - .../WeaponModules/LaserModuleComponent.cs | 3 -- .../WeaponModules/LightModuleComponent.cs | 3 -- .../WeaponModules/SilencerModuleComponent.cs | 3 -- .../Objects/Weapons/Guns/Modules/modules.yml | 5 +++ 8 files changed, 29 insertions(+), 34 deletions(-) diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index e48fd36bb1..a399034b20 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -33,27 +33,29 @@ public sealed class WeaponModulesSystem : EntitySystem SubscribeLocalEvent(AcceleratorModuleOnInsert); SubscribeLocalEvent(AcceleratorModuleOnEject); } - private bool TryInsertModule(EntityUid module, EntityUid weapon, EntGotInsertedIntoContainerMessage args) + private bool TryInsertModule(EntityUid module, EntityUid weapon, EntGotInsertedIntoContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) { - if (TryComp(weapon, out var weaponModulesComponent) && ModulesSlot == args.Container.ID) + if (TryComp(weapon, out var weaponModulesComponents) && ModulesSlot == args.Container.ID) { - if(!weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Add(module); + if(!weaponModulesComponents.Modules.Contains(module)) + weaponModulesComponents.Modules.Add(module); + weaponModulesComponent = weaponModulesComponents; return true; } - + weaponModulesComponent = weaponModulesComponents; return false; } - private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args) + private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) { - if (TryComp(weapon, out var weaponModulesComponent) && ModulesSlot == args.Container.ID) + if (TryComp(weapon, out var weaponModulesComponents) && ModulesSlot == args.Container.ID) { - if(weaponModulesComponent.Modules.Contains(module)) - weaponModulesComponent.Modules.Remove(module); + if(weaponModulesComponents.Modules.Contains(module)) + weaponModulesComponents.Modules.Remove(module); + weaponModulesComponent = weaponModulesComponents; return true; } - + weaponModulesComponent = weaponModulesComponents; return false; } @@ -67,7 +69,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args)) + if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -87,7 +89,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args)) + if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -103,7 +105,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -117,7 +119,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -136,7 +138,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args)) + if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -155,7 +157,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -170,7 +172,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -183,7 +185,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -197,7 +199,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args) || !TryComp(weapon, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; @@ -212,7 +214,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; diff --git a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs index 31e10e6214..389c84c198 100644 --- a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs @@ -8,7 +8,4 @@ public sealed partial class AcceleratorModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldFireRate; - - [ViewVariables(VVAccess.ReadWrite), DataField] - public string AppearanceValue = "accelerator"; } diff --git a/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs b/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs index 6ad8040090..73a4a4b938 100644 --- a/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/BaseModuleComponent.cs @@ -6,4 +6,6 @@ namespace Content.Shared._White.WeaponModules; [RegisterComponent, NetworkedComponent] public partial class BaseModuleComponent : Component { + [ViewVariables(VVAccess.ReadWrite), DataField("value")] + public string AppearanceValue; } diff --git a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs index 19a1e58bd4..94c9a9f02b 100644 --- a/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/FlameHiderModuleComponent.cs @@ -6,6 +6,4 @@ [RegisterComponent] public sealed partial class FlameHiderModuleComponent : BaseModuleComponent { - [ViewVariables(VVAccess.ReadWrite), DataField] - public string AppearanceValue = "flamehider"; } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index b2230a7d1b..3f8404931b 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -8,7 +8,4 @@ public sealed partial class LaserModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldProjectileSpeed; - - [ViewVariables(VVAccess.ReadWrite), DataField] - public string AppearanceValue = "laser"; } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index 689311586d..b90bbfe04c 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -8,7 +8,4 @@ public sealed partial class LightModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public bool Enabled; - - [ViewVariables(VVAccess.ReadWrite), DataField] - public string AppearanceValue = "light"; } diff --git a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs index 146d8bae52..074a21ae77 100644 --- a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs @@ -13,7 +13,4 @@ public sealed partial class SilencerModuleComponent : BaseModuleComponent [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier NewSoundGunshot = new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg"); - - [ViewVariables(VVAccess.ReadWrite), DataField] - public string AppearanceValue = "silencer"; } diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml index 7592dc5192..cca40c558e 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -29,6 +29,7 @@ components: - type: Item - type: LightModule + value: "light" - type: Sprite state: light - type: Appearance @@ -41,6 +42,7 @@ components: - type: Item - type: LaserModule + value: "laser" - type: Sprite state: laser - type: Appearance @@ -53,6 +55,7 @@ components: - type: Item - type: FlameHiderModule + value: "flamehider" - type: Sprite state: flamehider - type: Appearance @@ -65,6 +68,7 @@ components: - type: Item - type: SilencerModule + value: "silencer" - type: Sprite state: silencer - type: Appearance @@ -77,6 +81,7 @@ components: - type: Item - type: AcceleratorModule + value: "accelerator" - type: Sprite state: accelerator - type: Appearance \ No newline at end of file From 428a153ddbe0664f8eba274df6771fc1174b5c71 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Mon, 25 Mar 2024 14:27:01 +0500 Subject: [PATCH 22/25] tweak: main values to components, rework methods --- .../WeaponModules/WeaponModulesSystem.cs | 82 +++++++------------ .../AcceleratorModuleComponent.cs | 3 + .../WeaponModules/LaserModuleComponent.cs | 3 + .../WeaponModules/LightModuleComponent.cs | 3 + .../Objects/Weapons/Guns/Rifles/rifles.yml | 2 - .../Objects/Weapons/Guns/SMGs/smgs.yml | 2 - .../Objects/Weapons/Guns/Modules/modules.yml | 10 +-- 7 files changed, 43 insertions(+), 62 deletions(-) diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index a399034b20..f70a4dbaf3 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -2,6 +2,7 @@ using Content.Shared._White.WeaponModules; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Systems; +using Linguini.Syntax.Ast; using Robust.Server.GameObjects; using Robust.Shared.Containers; @@ -33,35 +34,37 @@ public sealed class WeaponModulesSystem : EntitySystem SubscribeLocalEvent(AcceleratorModuleOnInsert); SubscribeLocalEvent(AcceleratorModuleOnEject); } - private bool TryInsertModule(EntityUid module, EntityUid weapon, EntGotInsertedIntoContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) + private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component, EntGotInsertedIntoContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) { - if (TryComp(weapon, out var weaponModulesComponents) && ModulesSlot == args.Container.ID) + if (!TryComp(weapon, out var weaponModulesComponents) || !TryComp(weapon, out var appearanceComponent) || ModulesSlot != args.Container.ID) { - if(!weaponModulesComponents.Modules.Contains(module)) - weaponModulesComponents.Modules.Add(module); - weaponModulesComponent = weaponModulesComponents; - return true; + weaponModulesComponent = null; + appearanceComponent = null; + return false; } + + if(!weaponModulesComponents.Modules.Contains(module)) + weaponModulesComponents.Modules.Add(module); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); weaponModulesComponent = weaponModulesComponents; - return false; + + return true; } private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) { - if (TryComp(weapon, out var weaponModulesComponents) && ModulesSlot == args.Container.ID) + if (!TryComp(weapon, out var weaponModulesComponents) || !TryComp(weapon, out var appearanceComponent) || ModulesSlot != args.Container.ID) { - if(weaponModulesComponents.Modules.Contains(module)) - weaponModulesComponents.Modules.Remove(module); - weaponModulesComponent = weaponModulesComponents; - return true; + weaponModulesComponent = null; + appearanceComponent = null; + return false; } - weaponModulesComponent = weaponModulesComponents; - return false; - } - private void SetAppearance(EntityUid weapon, Enum key, string value, AppearanceComponent appearanceComponent) - { - _appearanceSystem.SetData(weapon, key, value, appearanceComponent); + if(weaponModulesComponents.Modules.Contains(module)) + weaponModulesComponents.Modules.Remove(module); + _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); + weaponModulesComponent = weaponModulesComponents; + return true; } #region InsertModules @@ -69,19 +72,17 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) return; if(!TryComp(weapon, out var appearanceComponent)) return; - SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); - _lightSystem.EnsureLight(weapon); _lightSystem.TryGetLight(weapon, out var light); _appearanceSystem.SetData(weapon, Modules.Light, "none", appearanceComponent); - _lightSystem.SetRadius(weapon, 4F, light); + _lightSystem.SetRadius(weapon, component.Radius, light); _lightSystem.SetEnabled(weapon, true, light); } @@ -89,28 +90,23 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; component.OldProjectileSpeed = gunComp.ProjectileSpeed; - SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); - _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed + 15F); + _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed + component.ProjectileSpeedAdd); } private void FlameHiderModuleOnInsert(EntityUid module, FlameHiderModuleComponent component, EntGotInsertedIntoContainerMessage args) { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - - SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); weaponModulesComponent.UseEffect = true; Dirty(module, weaponModulesComponent); } @@ -119,15 +115,13 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; component.OldSoundGunshot = gunComp.SoundGunshot; - SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); weaponModulesComponent.UseEffect = true; _gunSystem.SetSound(weapon, component.NewSoundGunshot); @@ -138,17 +132,14 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - if (!TryComp(weapon, out var gunComp)) return; component.OldFireRate = gunComp.FireRate; - SetAppearance(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); - _gunSystem.SetFireRate(weapon, component.OldFireRate + 2F); + _gunSystem.SetFireRate(weapon, component.OldFireRate + component.FireRateAdd); } #endregion @@ -160,9 +151,6 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - - SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); _lightSystem.TryGetLight(weapon, out var light); _lightSystem.SetRadius(weapon, 0F, light); _lightSystem.SetEnabled(weapon, false, light); @@ -175,9 +163,6 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - - SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed); } @@ -188,9 +173,6 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - - SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); weaponModulesComponent.UseEffect = false; Dirty(module, weaponModulesComponent); } @@ -202,9 +184,6 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - - SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); weaponModulesComponent.UseEffect = false; _gunSystem.SetSound(weapon, component.OldSoundGunshot!); Dirty(module, weaponModulesComponent); @@ -217,9 +196,6 @@ public sealed class WeaponModulesSystem : EntitySystem if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - - SetAppearance(weapon, ModuleVisualState.Module, "none", appearanceComponent); _gunSystem.SetFireRate(weapon, component.OldFireRate); } #endregion diff --git a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs index 389c84c198..bd6d877ad5 100644 --- a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs @@ -8,4 +8,7 @@ public sealed partial class AcceleratorModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldFireRate; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public float FireRateAdd = 2.4F; } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index 3f8404931b..f048d99832 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -8,4 +8,7 @@ public sealed partial class LaserModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public float OldProjectileSpeed; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public float ProjectileSpeedAdd = 15F; } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index b90bbfe04c..fb05d387e4 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -8,4 +8,7 @@ public sealed partial class LightModuleComponent : BaseModuleComponent { [ViewVariables(VVAccess.ReadWrite), DataField] public bool Enabled; + + [ViewVariables(VVAccess.ReadWrite), DataField] + public float Radius = 4F; } diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 2a160f2936..9f71109abf 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -119,7 +119,6 @@ magState: mag steps: 1 zeroVisible: true - - type: WeaponModulesVisuals - type: PointLight enabled: false autoRot: true @@ -225,7 +224,6 @@ magState: mag steps: 1 zeroVisible: true - - type: WeaponModulesVisuals - type: PointLight enabled: false autoRot: true diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml index 1332894437..7e968d088b 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml @@ -166,7 +166,6 @@ magState: mag steps: 1 zeroVisible: true - - type: WeaponModulesVisuals - type: PointLight enabled: false autoRot: true @@ -286,7 +285,6 @@ magState: mag steps: 6 zeroVisible: true - - type: WeaponModulesVisuals - type: PointLight enabled: false autoRot: true diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml index cca40c558e..c4adde47a5 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -23,7 +23,7 @@ # modules - type: entity id: LightModule - description: Light module for rifles (lector, CV, drozd, WT). + description: Light module for rifles (lecter, CV, drozd, WT). name: "light module" parent: BaseModule components: @@ -36,7 +36,7 @@ - type: entity id: LaserModule - description: Laser module for rifles (lector, CV, drozd, WT). + description: Laser module for rifles (lecter, CV, drozd, WT). name: "laser module" parent: BaseModule components: @@ -49,7 +49,7 @@ - type: entity id: FlameHiderModule - description: Flame Hider module for rifles (lector, CV, drozd, WT). + description: Flame Hider module for rifles (lecter, CV, drozd, WT). name: "flamehider module" parent: BaseModule components: @@ -62,7 +62,7 @@ - type: entity id: SilencerModule - description: Silencer module for rifles (lector, CV, drozd, WT). + description: Silencer module for rifles (lecter, CV, drozd, WT). name: "silencer module" parent: BaseModule components: @@ -75,7 +75,7 @@ - type: entity id: AcceleratorModule - description: Accelerator module for rifles (lector, CV, drozd, WT). + description: Accelerator module for rifles (lecter, CV, drozd, WT). name: "accelerator module" parent: BaseModule components: From 0796ca7beebdffa5c05ee4ff0398037c1cf5a34e Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Mon, 25 Mar 2024 14:40:56 +0500 Subject: [PATCH 23/25] change --- .../WeaponModules/WeaponModulesSystem.cs | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index f70a4dbaf3..b2455b2046 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -34,36 +34,38 @@ public sealed class WeaponModulesSystem : EntitySystem SubscribeLocalEvent(AcceleratorModuleOnInsert); SubscribeLocalEvent(AcceleratorModuleOnEject); } - private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component, EntGotInsertedIntoContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) + private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component, + EntGotInsertedIntoContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent, + [NotNullWhen(true)] out AppearanceComponent? appearanceComponent) { - if (!TryComp(weapon, out var weaponModulesComponents) || !TryComp(weapon, out var appearanceComponent) || ModulesSlot != args.Container.ID) + if (!TryComp(weapon, out weaponModulesComponent) || !TryComp(weapon, out appearanceComponent) || + ModulesSlot != args.Container.ID) { weaponModulesComponent = null; appearanceComponent = null; return false; } - if(!weaponModulesComponents.Modules.Contains(module)) - weaponModulesComponents.Modules.Add(module); + if(!weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Add(module); _appearanceSystem.SetData(weapon, ModuleVisualState.Module, component.AppearanceValue, appearanceComponent); - weaponModulesComponent = weaponModulesComponents; return true; } - private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) + private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent, [NotNullWhen(true)] out AppearanceComponent? appearanceComponent) { - if (!TryComp(weapon, out var weaponModulesComponents) || !TryComp(weapon, out var appearanceComponent) || ModulesSlot != args.Container.ID) + if (!TryComp(weapon, out weaponModulesComponent) || !TryComp(weapon, out appearanceComponent) || ModulesSlot != args.Container.ID) { weaponModulesComponent = null; appearanceComponent = null; return false; } - if(weaponModulesComponents.Modules.Contains(module)) - weaponModulesComponents.Modules.Remove(module); + if(weaponModulesComponent.Modules.Contains(module)) + weaponModulesComponent.Modules.Remove(module); _appearanceSystem.SetData(weapon, ModuleVisualState.Module, "none", appearanceComponent); - weaponModulesComponent = weaponModulesComponents; + return true; } @@ -72,11 +74,9 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) return; - if(!TryComp(weapon, out var appearanceComponent)) return; - _lightSystem.EnsureLight(weapon); _lightSystem.TryGetLight(weapon, out var light); @@ -90,7 +90,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; @@ -104,7 +104,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) return; weaponModulesComponent.UseEffect = true; @@ -115,7 +115,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; @@ -132,7 +132,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent)) + if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) return; if (!TryComp(weapon, out var gunComp)) return; @@ -148,7 +148,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) return; _lightSystem.TryGetLight(weapon, out var light); @@ -160,7 +160,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) return; _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed); @@ -170,7 +170,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) return; weaponModulesComponent.UseEffect = false; @@ -181,7 +181,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) return; weaponModulesComponent.UseEffect = false; @@ -193,7 +193,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent)) + if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) return; _gunSystem.SetFireRate(weapon, component.OldFireRate); From afc0d5f713bc063aef710667d24e024b1f458058 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Mon, 25 Mar 2024 21:18:12 +0500 Subject: [PATCH 24/25] fix --- .../WeaponsModules/WeaponModulesVisuals.cs | 2 - .../WeaponModules/WeaponModulesSystem.cs | 62 ++++++++++--------- .../Systems/SharedGunSystem.Interactions.cs | 15 +++++ .../Weapons/Ranged/Systems/SharedGunSystem.cs | 4 +- .../AcceleratorModuleComponent.cs | 2 - .../WeaponModules/LaserModuleComponent.cs | 2 - .../WeaponModules/LightModuleComponent.cs | 2 - .../WeaponModules/SilencerModuleComponent.cs | 2 - .../WeaponModules/WeaponModulesComponent.cs | 2 +- .../ru-RU/locales-new/autotranslate-57.ftl | 7 ++- .../Prototypes/Recipes/Lathes/security.yml | 2 - .../Objects/Weapons/Guns/Modules/modules.yml | 5 -- 12 files changed, 55 insertions(+), 52 deletions(-) diff --git a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs index 85eb8112af..40f840be23 100644 --- a/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs +++ b/Content.Client/_White/WeaponsModules/WeaponModulesVisuals.cs @@ -8,9 +8,7 @@ namespace Content.Client._White.WeaponsModules; public sealed partial class WeaponModulesVisuals : VisualizerSystem { - [Dependency] private readonly PointLightSystem _lightSystem = default!; - protected override void OnAppearanceChange(EntityUid uid, WeaponModulesComponent component, ref AppearanceChangeEvent args) { base.OnAppearanceChange(uid, component, ref args); diff --git a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs index b2455b2046..1251efa1d0 100644 --- a/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs +++ b/Content.Server/_White/WeaponModules/WeaponModulesSystem.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared._White.WeaponModules; using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Weapons.Ranged.Events; using Content.Shared.Weapons.Ranged.Systems; using Linguini.Syntax.Ast; using Robust.Server.GameObjects; @@ -34,12 +35,12 @@ public sealed class WeaponModulesSystem : EntitySystem SubscribeLocalEvent(AcceleratorModuleOnInsert); SubscribeLocalEvent(AcceleratorModuleOnEject); } + private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component, - EntGotInsertedIntoContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent, - [NotNullWhen(true)] out AppearanceComponent? appearanceComponent) + string containerId, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) { - if (!TryComp(weapon, out weaponModulesComponent) || !TryComp(weapon, out appearanceComponent) || - ModulesSlot != args.Container.ID) + if (!TryComp(weapon, out weaponModulesComponent) || !TryComp(weapon, out var appearanceComponent) || + containerId != ModulesSlot) { weaponModulesComponent = null; appearanceComponent = null; @@ -53,9 +54,9 @@ public sealed class WeaponModulesSystem : EntitySystem return true; } - private bool TryEjectModule(EntityUid module, EntityUid weapon, EntGotRemovedFromContainerMessage args, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent, [NotNullWhen(true)] out AppearanceComponent? appearanceComponent) + private bool TryEjectModule(EntityUid module, EntityUid weapon, string containerId, [NotNullWhen(true)] out WeaponModulesComponent? weaponModulesComponent) { - if (!TryComp(weapon, out weaponModulesComponent) || !TryComp(weapon, out appearanceComponent) || ModulesSlot != args.Container.ID) + if (!TryComp(weapon, out weaponModulesComponent) || !TryComp(weapon, out var appearanceComponent) || containerId != ModulesSlot) { weaponModulesComponent = null; appearanceComponent = null; @@ -74,12 +75,13 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryInsertModule(module, weapon, component, args.Container.ID, out var weaponModulesComponent)) return; - _lightSystem.EnsureLight(weapon); + TryComp(weapon, out var appearanceComponent); + + SharedPointLightComponent light = _lightSystem.EnsureLight(weapon); - _lightSystem.TryGetLight(weapon, out var light); _appearanceSystem.SetData(weapon, Modules.Light, "none", appearanceComponent); _lightSystem.SetRadius(weapon, component.Radius, light); @@ -90,11 +92,11 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) - return; - if (!TryComp(weapon, out var gunComp)) return; + if(!TryInsertModule(module, weapon, component, args.Container.ID, out var weaponModulesComponent)) + return; + component.OldProjectileSpeed = gunComp.ProjectileSpeed; _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed + component.ProjectileSpeedAdd); @@ -104,10 +106,10 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryInsertModule(module, weapon, component, args.Container.ID, out var weaponModulesComponent)) return; - weaponModulesComponent.UseEffect = true; + weaponModulesComponent.WeaponFireEffect = true; Dirty(module, weaponModulesComponent); } @@ -115,14 +117,14 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) - return; - if (!TryComp(weapon, out var gunComp)) return; + if(!TryInsertModule(module, weapon, component, args.Container.ID, out var weaponModulesComponent)) + return; + component.OldSoundGunshot = gunComp.SoundGunshot; - weaponModulesComponent.UseEffect = true; + weaponModulesComponent.WeaponFireEffect = true; _gunSystem.SetSound(weapon, component.NewSoundGunshot); Dirty(module, weaponModulesComponent); @@ -132,11 +134,11 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryInsertModule(module, weapon, component, args, out var weaponModulesComponent, out var appearanceComponent)) - return; - if (!TryComp(weapon, out var gunComp)) return; + if(!TryInsertModule(module, weapon, component, args.Container.ID, out var weaponModulesComponent)) + return; + component.OldFireRate = gunComp.FireRate; _gunSystem.SetFireRate(weapon, component.OldFireRate + component.FireRateAdd); @@ -148,10 +150,12 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryEjectModule(module, weapon, args.Container.ID, out var weaponModulesComponent)) + return; + + if(!_lightSystem.TryGetLight(weapon, out var light)) return; - _lightSystem.TryGetLight(weapon, out var light); _lightSystem.SetRadius(weapon, 0F, light); _lightSystem.SetEnabled(weapon, false, light); } @@ -160,7 +164,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryEjectModule(module, weapon, args.Container.ID, out var weaponModulesComponent)) return; _gunSystem.SetProjectileSpeed(weapon, component.OldProjectileSpeed); @@ -170,10 +174,10 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryEjectModule(module, weapon, args.Container.ID, out var weaponModulesComponent)) return; - weaponModulesComponent.UseEffect = false; + weaponModulesComponent.WeaponFireEffect = false; Dirty(module, weaponModulesComponent); } @@ -181,10 +185,10 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryEjectModule(module, weapon, args.Container.ID, out var weaponModulesComponent)) return; - weaponModulesComponent.UseEffect = false; + weaponModulesComponent.WeaponFireEffect = false; _gunSystem.SetSound(weapon, component.OldSoundGunshot!); Dirty(module, weaponModulesComponent); } @@ -193,7 +197,7 @@ public sealed class WeaponModulesSystem : EntitySystem { EntityUid weapon = args.Container.Owner; - if(!TryEjectModule(module, weapon, args, out var weaponModulesComponent, out var appearanceComponent)) + if(!TryEjectModule(module, weapon, args.Container.ID, out var weaponModulesComponent)) return; _gunSystem.SetFireRate(weapon, component.OldFireRate); diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs index 2e85803d7d..da185c01f0 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs @@ -1,3 +1,4 @@ +using Content.Shared._White.WeaponModules; using Content.Shared.Actions; using Content.Shared.Examine; using Content.Shared.Hands; @@ -21,6 +22,20 @@ public abstract partial class SharedGunSystem args.PushMarkup(Loc.GetString("gun-fire-rate-examine", ("color", FireRateExamineColor), ("fireRate", $"{component.FireRateModified:0.0}"))); + if (TryComp(uid, out var weaponModulesComponent)) + { + if (weaponModulesComponent.Modules.Count == 0) + { + args.PushMarkup(Loc.GetString("gun-modules", ("modules", "Пусто"))); + return; + } + + foreach (var module in weaponModulesComponent.Modules) + { + args.PushMarkup(Loc.GetString("gun-modules", ("modules", Name(module)))); + } + } + if (!TryComp(uid, out var comp)) return; diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index c8afd64540..37d2c21d6d 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -477,8 +477,8 @@ public abstract partial class SharedGunSystem : EntitySystem protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null) { - bool cancelled = TryComp(gun, out var weaponModulesComponent) && weaponModulesComponent.UseEffect; - if(cancelled) return; + bool cancelled = TryComp(gun, out var weaponModulesComponent) && weaponModulesComponent.WeaponFireEffect; // WD EDIT + if(cancelled) return; // WD EDIT END var attemptEv = new GunMuzzleFlashAttemptEvent(); RaiseLocalEvent(gun, ref attemptEv); diff --git a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs index bd6d877ad5..597976a2a4 100644 --- a/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/AcceleratorModuleComponent.cs @@ -6,9 +6,7 @@ [RegisterComponent] public sealed partial class AcceleratorModuleComponent : BaseModuleComponent { - [ViewVariables(VVAccess.ReadWrite), DataField] public float OldFireRate; - [ViewVariables(VVAccess.ReadWrite), DataField] public float FireRateAdd = 2.4F; } diff --git a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs index f048d99832..3fd6a91103 100644 --- a/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LaserModuleComponent.cs @@ -6,9 +6,7 @@ [RegisterComponent] public sealed partial class LaserModuleComponent : BaseModuleComponent { - [ViewVariables(VVAccess.ReadWrite), DataField] public float OldProjectileSpeed; - [ViewVariables(VVAccess.ReadWrite), DataField] public float ProjectileSpeedAdd = 15F; } diff --git a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs index fb05d387e4..136663e886 100644 --- a/Content.Shared/_White/WeaponModules/LightModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/LightModuleComponent.cs @@ -6,9 +6,7 @@ [RegisterComponent] public sealed partial class LightModuleComponent : BaseModuleComponent { - [ViewVariables(VVAccess.ReadWrite), DataField] public bool Enabled; - [ViewVariables(VVAccess.ReadWrite), DataField] public float Radius = 4F; } diff --git a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs index 074a21ae77..d3e72065c8 100644 --- a/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs +++ b/Content.Shared/_White/WeaponModules/SilencerModuleComponent.cs @@ -8,9 +8,7 @@ namespace Content.Shared._White.WeaponModules; [RegisterComponent] public sealed partial class SilencerModuleComponent : BaseModuleComponent { - [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier? OldSoundGunshot; - [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier NewSoundGunshot = new SoundPathSpecifier("/Audio/White/Weapons/Modules/silence.ogg"); } diff --git a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs index 4610382fc9..783648bc3f 100644 --- a/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs +++ b/Content.Shared/_White/WeaponModules/WeaponModulesComponent.cs @@ -13,7 +13,7 @@ public partial class WeaponModulesComponent : Component public List Modules = new(); [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] - public bool UseEffect; + public bool WeaponFireEffect; } [Serializable, NetSerializable] diff --git a/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl b/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl index 22a5530a80..b280261f02 100644 --- a/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl +++ b/Resources/Locale/ru-RU/locales-new/autotranslate-57.ftl @@ -1,10 +1,11 @@ ent-LightModule = модульный фонарик .desc = Излучает свет. -ent-LaserModule = лазерный модуль (улучшенный) - .desc = Улучшенный модуль. Увеличивает скорость ваших пуль. +ent-LaserModule = лазерный модуль + .desc = За счет лазерной обработки пуль, увеличивает их скорость. ent-FlameHiderModule = пламегаситель .desc = Скрывает пламя огня во время выстрела. ent-SilencerModule = глушитель .desc = Скрывает пламя огня и приглушает звук во время выстрела. ent-AcceleratorModule = продвинутый модуль - .desc = Увеличивает скорострельность оружия. \ No newline at end of file + .desc = Разработка NanoTrasen специально для отдела Службы Безопасности. Меняет затворную раму без видимых изменений, за счет этого увеличивает скорострельность оружия. +gun-modules = Установленные модули: [color=cyan]{ $modules }[/color]. \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Lathes/security.yml b/Resources/Prototypes/Recipes/Lathes/security.yml index e8d007cd3a..1a33745634 100644 --- a/Resources/Prototypes/Recipes/Lathes/security.yml +++ b/Resources/Prototypes/Recipes/Lathes/security.yml @@ -248,8 +248,6 @@ Plastic: 15 Steel: 10 Glass: 5 - Plasma: 10 - Silver: 5 - type: latheRecipe id: TargetHuman diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml index c4adde47a5..dd2ec684aa 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Modules/modules.yml @@ -27,7 +27,6 @@ name: "light module" parent: BaseModule components: - - type: Item - type: LightModule value: "light" - type: Sprite @@ -40,7 +39,6 @@ name: "laser module" parent: BaseModule components: - - type: Item - type: LaserModule value: "laser" - type: Sprite @@ -53,7 +51,6 @@ name: "flamehider module" parent: BaseModule components: - - type: Item - type: FlameHiderModule value: "flamehider" - type: Sprite @@ -66,7 +63,6 @@ name: "silencer module" parent: BaseModule components: - - type: Item - type: SilencerModule value: "silencer" - type: Sprite @@ -79,7 +75,6 @@ name: "accelerator module" parent: BaseModule components: - - type: Item - type: AcceleratorModule value: "accelerator" - type: Sprite From 24a0a41bc10f4ff9f2d2742c4eb65d295670e824 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Fri, 29 Mar 2024 22:54:01 +0500 Subject: [PATCH 25/25] add recipes to emagged autolathe --- Resources/Prototypes/Entities/Structures/Machines/lathe.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 6c65f92b0f..00c0b06b35 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -197,6 +197,11 @@ - MagazineBoxRifle - MagazineBoxLightRifle - GrenadeBlast + - LightModuleRecipe + - LaserModuleRecipe + - FlameHiderModuleRecipe + - SilencerModuleRecipe + - AcceleratorModuleRecipe emagDynamicRecipes: - CartridgePistolRubber - CartridgeMagnumRubber