From 5e31ca07968cef190a18290a8d48adb385c55b57 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sun, 22 Sep 2024 15:44:28 +0300 Subject: [PATCH 01/10] add: crossbar --- .../_White/Drawable/DrawableComponent.cs | 16 ++++ .../_White/Drawable/DrawableSystem.cs | 72 ++++++++++++++++ .../objects/weapons/melee/snatcherprod.ftl | 2 + .../objects/weapons/melee/stunprod.ftl | 9 +- .../Entities/Objects/Materials/parts.yml | 5 ++ .../Entities/Objects/Weapons/Gun/crossbow.yml | 77 ++++++++++++++++++ Resources/Prototypes/_White/tags.yml | 5 +- .../Weapons/Guns/crossbow.rsi/base.png | Bin 0 -> 845 bytes .../Weapons/Guns/crossbow.rsi/crossbow.png | Bin 0 -> 7748 bytes .../Weapons/Guns/crossbow.rsi/drawn.png | Bin 0 -> 919 bytes .../Weapons/Guns/crossbow.rsi/inhand-left.png | Bin 0 -> 291 bytes .../Guns/crossbow.rsi/inhand-right.png | Bin 0 -> 547 bytes .../Weapons/Guns/crossbow.rsi/loaded.png | Bin 0 -> 973 bytes .../Guns/crossbow.rsi/loaded_drawn.png | Bin 0 -> 6416 bytes .../Guns/crossbow.rsi/loaded_undrawn.png | Bin 0 -> 7711 bytes .../Weapons/Guns/crossbow.rsi/meta.json | 28 +++++++ .../Weapons/Guns/crossbow.rsi/undraw.png | Bin 0 -> 7429 bytes .../Weapons/Guns/crossbow.rsi/undrawn.png | Bin 0 -> 7429 bytes 18 files changed, 211 insertions(+), 3 deletions(-) create mode 100644 Content.Shared/_White/Drawable/DrawableComponent.cs create mode 100644 Content.Shared/_White/Drawable/DrawableSystem.cs create mode 100644 Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/snatcherprod.ftl create mode 100644 Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/base.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/crossbow.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/inhand-left.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/inhand-right.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_drawn.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_undrawn.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undraw.png create mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undrawn.png diff --git a/Content.Shared/_White/Drawable/DrawableComponent.cs b/Content.Shared/_White/Drawable/DrawableComponent.cs new file mode 100644 index 0000000000..f183d059a1 --- /dev/null +++ b/Content.Shared/_White/Drawable/DrawableComponent.cs @@ -0,0 +1,16 @@ +using Content.Shared.Weapons.Ranged.Components; +using Robust.Shared.Audio; + +namespace Content.Shared._White.Drawable; + +[RegisterComponent] +public sealed partial class DrawableComponent : Component +{ + [ViewVariables] + public bool Drawn; + + [DataField, ViewVariables] + public SoundSpecifier? SoundDraw = new SoundPathSpecifier("/Audio/Weapons/drawbow2.ogg"); + + public BallisticAmmoProviderComponent Provider = default!; +} diff --git a/Content.Shared/_White/Drawable/DrawableSystem.cs b/Content.Shared/_White/Drawable/DrawableSystem.cs new file mode 100644 index 0000000000..b756e7014b --- /dev/null +++ b/Content.Shared/_White/Drawable/DrawableSystem.cs @@ -0,0 +1,72 @@ +using Content.Shared.Interaction.Events; +using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Weapons.Ranged.Systems; +using Robust.Shared.Audio.Systems; +using Robust.Shared.Containers; +using Robust.Shared.Serialization; + +namespace Content.Shared._White.Drawable; + +public sealed class DrawableSystem : EntitySystem +{ + [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + SubscribeLocalEvent(OnItemRemove); + SubscribeLocalEvent(OnAttemptShoot); + SubscribeLocalEvent(OnUse); + } + + private void OnStartup(EntityUid uid, DrawableComponent component, ComponentStartup args) + { + component.Provider = EnsureComp(uid); + } + + private void OnItemRemove(EntityUid uid, DrawableComponent component, EntRemovedFromContainerMessage args) + { + if (!component.Drawn || args.Container.ID != component.Provider.Container.ID) + return; + + component.Drawn = false; + UpdateDrawableAppearance(uid, component); + } + + private void OnAttemptShoot(EntityUid uid, DrawableComponent component, ref AttemptShootEvent args) + { + if (!component.Drawn) + args.Cancelled = true; + } + + private void OnUse(EntityUid uid, DrawableComponent component, UseInHandEvent args) + { + if (component.Drawn || component.Provider.Count == 0) + return; + + args.Handled = true; + + _audio.PlayPredicted(component.SoundDraw, uid, args.User); + component.Drawn = true; + + UpdateDrawableAppearance(uid, component); + } + + private void UpdateDrawableAppearance(EntityUid uid, DrawableComponent component) + { + if (!TryComp(uid, out var appearance)) + return; + + _appearance.SetData(uid, DrawableVisuals.Drawn, component.Drawn, appearance); + } +} + +[Serializable, NetSerializable] +public enum DrawableVisuals : byte +{ + Drawn, + Layer +} diff --git a/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/snatcherprod.ftl b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/snatcherprod.ftl new file mode 100644 index 0000000000..e4b9736f24 --- /dev/null +++ b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/snatcherprod.ftl @@ -0,0 +1,2 @@ +ent-Snatcherprod = хваталка + .desc = Искрится жаждой воровства и коварства. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/prototypes/entities/objects/weapons/melee/stunprod.ftl b/Resources/Locale/ru-RU/prototypes/entities/objects/weapons/melee/stunprod.ftl index 6ea518b4d9..f53c8519f8 100644 --- a/Resources/Locale/ru-RU/prototypes/entities/objects/weapons/melee/stunprod.ftl +++ b/Resources/Locale/ru-RU/prototypes/entities/objects/weapons/melee/stunprod.ftl @@ -1,2 +1,7 @@ -ent-Stunprod = шок-палка - .desc = Электрошокер для незаконного обезвреживания. \ No newline at end of file +ent-StunprodBase = шок-палка + +ent-Stunprod = { ent-StunprodBase } + .desc = Электрошокер для незаконного обезвреживания. + +ent-ProdUnfinished = обмотанный стержень + .desc = Стержень с проводами. \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 8b916f2e2b..cdc08b4036 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -77,6 +77,9 @@ - type: ShortConstruction prototypes: - Grille + - type: Tag # WD EDIT + tags: + - CrossbowBolt - type: entity parent: PartRodMetal @@ -86,6 +89,7 @@ components: - type: Tag tags: + - CrossbowBolt # WD EDIT - RodMetal1 - type: Sprite state: rods @@ -100,6 +104,7 @@ components: - type: Tag tags: + - CrossbowBolt # WD EDIT - RodMetal1 - type: Sprite state: rods diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml new file mode 100644 index 0000000000..01b5c4b260 --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml @@ -0,0 +1,77 @@ +- type: entity + parent: BaseItem + id: WeaponPoweredCrossbow + name: арбалет + description: Опасная штука, страшная вещь. + components: + - type: Sprite + sprite: _White/Objects/Weapons/Guns/crossbow.rsi + state: base + - type: Clothing + quickEquip: false + slots: + - Back + - SuitStorage + - type: Item + size: Huge + sprite: _White/Objects/Weapons/Guns/crossbow.rsi + - type: Gun + forceThrowingAngle: true + angle: 225 + projectileSpeed: 35 + fireRate: 0.5 + soundGunshot: + path: /Audio/Weapons/click.ogg + - type: BallisticAmmoProvider + whitelist: + tags: + - CrossbowBolt + capacity: 1 + soundInsert: + path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg + - type: ContainerContainer + containers: + ballistic-ammo: !type:Container + ents: [] + cell_slot: !type:ContainerSlot + crystal_slot: !type:ContainerSlot + - type: PowerCellSlot + cellSlotId: cell_slot + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + crystal_slot: + name: Кристалл + whitelist: + tags: + - Telecrystal + maxStackAmount: 1 + - type: Drawable + - type: Appearance + - type: Construction + deconstructionTarget: null + graph: WeaponPoweredCrossbowGraph + node: crossbow + +- type: entity + parent: BaseItem + id: WeaponPoweredCrossbowUnfinished + name: часть арбалета + description: Недоделанный арбалет. + components: + - type: Sprite + sprite: _White/Objects/Weapons/Guns/crossbow.rsi + state: crossbow + - type: Item + size: Huge + sprite: _White/Objects/Weapons/Guns/crossbow.rsi + - type: Clothing + quickEquip: false + slots: + - Back + - SuitStorage + - type: Construction + deconstructionTarget: null + graph: WeaponPoweredCrossbowGraph + node: unfinished diff --git a/Resources/Prototypes/_White/tags.yml b/Resources/Prototypes/_White/tags.yml index 62e70f42a9..fe5c58bc48 100644 --- a/Resources/Prototypes/_White/tags.yml +++ b/Resources/Prototypes/_White/tags.yml @@ -1,2 +1,5 @@ - type: Tag - id: EnergySword \ No newline at end of file + id: EnergySword + +- type: Tag + id: CrossbowBolt \ No newline at end of file diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/base.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..62741449a4e23097c24edda78e9f9f5b30d0c208 GIT binary patch literal 845 zcmV-T1G4;yP)Px&2T4RhR9J=0mr-leP!z}i>GtBFY8T2Jj*S+V$_N{yb7K48`f!U7=%d{B(TDcc zZ_w>y#1An0JSfQWBEnw8F@)i0I$8u*l`fl7(Kn9|?Tty3w4J)n1A&~}B>&$%=bn=r z34|-P(ACQSmjKduli~)DK%DcjLb#=z9zhxhfF}i<^Ks|~16Y>TJsDFP2B$y*U3Mxw z5nzn{b_kM|R!JO}0Wj(E2$CTg)Ia-;Ri!(g237YC|7k?LeL#d?-G2ewfc&$qyEu~_8X#ua_y~pBQ z6aa8L8o|p06G7?FpXt8*0q@`4P`Zz-XD8~zw z;{|d)qw6}A%Vi3DCjpGH?pe?GkATlrEu~^662|BA4kqT8u~XSbju*OPnTPP3v7hlg zC(E*67zRL)yi$Hhy^v{Xm1ZJgoQ7jA;e%QoJI}XAt`27^CWqZzEEdtsHhWMXu`oN0 z`}exSM<<^Egz!kyfP5Ex6cD@HVps}#GcT5k1OUlo60KGXUyoj)5t;=6#FYdZW({#A z0cG(HUR0|CAy}4?EXx=ifxh-DgiFPeor?9PDeQl{freSbN^%XIP6uZF*p7xDgb;T| zU|IILNAdhf*%TOyO`CaV6o3gb-gzu3`4pjO{yT z?}`A+G6Dc&*SPS#8Zzp7oL6l2>**FEA;{xF3 z^z=x=!n|cDHYITHj)nmV8&x4KBQEjxn@36c6V&gjIA2F|8`OoPu XhIg*+*v@0x00000NkvXXu0mjf)~I}< literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/crossbow.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/crossbow.png new file mode 100644 index 0000000000000000000000000000000000000000..3dc28e472cf2b0ce530a07341bc11d90304fb25d GIT binary patch literal 7748 zcmeHMcTiK?w+<*(6ai@>5Cf=`kPt#30i=bhV1UpBg%AQnNCG5OMG#PF(xn%rNl}z0 zh=MIB7C@>}t{@hAFCv1z1A4vQdB2%Acjo>6yO~LH&f4Gl_FCUwd*`f46wb_WC-+`% z5D2u>*a&L@e1kXNob13SJt$}i1lrLZgtui_5d6VjJ~UUdCkf05^df;t0c2MYD4_pF z2HEd@{jT%h>4J^hy$_^4p3i>!(Ee-)n56HAE-jqstCY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VPN%st{0TlJ9XCKn zKr5g?x3mHu`ngoHf5-c~lQ!1@kPHe(L;sQt4T1ek7Pfg}{F$u=?0@N@u?6_;hynb5 z*np!8I0<3Dj>4aM0kQr!Uq9F3zc~dM{O=_HNZ)_u`d6-hq`*G{|65)E%Jq*F_($M> ztLy(wF7CgYDH0WU0`do1CGDwCQ$U-=?tH`$3kn9sfZ`+x&4z%5%ge})4*VG=u=!>I zWoC;2Mh=FtsXoUTmk_szy4Qgly&w?lTVt#a-uCgdb*ssHoQS4sLk1$Tw21LMG6_+P z*b`IuGC#{(h-LpUramLbu2p#ny~HBzu^;TB)K3 zO+)gPCluDf+mjOLGhf=i%&_H7YALLwJ6UMelQZK@!eVVT1G(9T<>y?Wp`(GvM%egL zxQ3@X1Yh}Te&8!`a9R)IWKG^EW}Ha-!v4Wu0akiW*R0l90?+brBYS&WgJ!nxY1@+) z-jXtm6K;?DWt*eOUu$AM;73kM%UymRHrc?WLB&)#AjQb%Z1+M`FE)k?ylgLI0ns{* zr)KKBUi+mNKl2>e_0HtIL6s%Nd3JbvMq%suNqYxDjrQ=#29S1PdKRB|nW;}lL5nmA z1S;B-VgW$2VUCmD15N`d<01<^qDblTvM&RZV{f6=u9TMZc>!KG+{fl4rsNT zb{9{#h_HhC1_!01^R>lWG3O=U}{-07#;XPoHq^^hHBk>*D#Y~ zWvB95#8Fe#)m(o6S4_C|*F$s9X*b1=2Z!ts8H%1Y2}=%1G%*alsYtsvy4)jpd-{ga zz_TlQrDL6h2(^+!(=el!(l4BIC12oU`@4L_H54~0`B<7iXFn((AGdu_;M~G1bG55O zP50giYkbx=W?Jq}wPO9}s=bZ*;-85t@!u9564$ory|&?u+E!Zx6hFvV-wa!!>lF4s D--XQV literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png new file mode 100644 index 0000000000000000000000000000000000000000..480133d9c6d068a00482084a3e54f5cdb82aab1f GIT binary patch literal 919 zcmV;I18Dq-P)Px&QAtEWR9J=0m(Ob>Wf;dl?^Z;`fOb}Pn?vgq>|zNGno?wo(1UM?3>NlKnDn6H zp*{IGbn`dtY33m8B@K93$P$Dd5B_Qop+UNYE}LDpW)Bmkov4ktUer%XM@`02R$8iD(V?Gr?Eq?MjuIo~`UijCbdX4t87AVWIDBrw6 zWwXwrxeP#gy(lc(Qm*TgOeUWj==4eplyNo1$oLFTAKzu+ohiQeUZT8S>=Nt;B(qXE zjuUyZP6e=ROObrs`kin-|tsyofTPV@^i zZ>mzM)CCcH7r3qqKxMN|b*IUt*AqN_e3y~&8Seem;(hHe7W2zzI;y4hl8{n%r5y=i z*_J943c}Ge51X@gtjk5m-BoYb8W7W*p@AHT}Rh-DjRiC-DxuUcZ==X7Kucn%ZZ#}^mRjKr8?CC*L8c2if!4! zy0TFh#(YZ6O}|2|wgo_XVTtOkFPNi9&RB*#D#{68Jk|lrw$vb9E$jrqc5RDyuYE?d z)n@P8Vx$u?E0wP6c%DbB13jCs4}>wFQX}JIOio>4yS7DoVTm8^e1%rIP0siT@}VxH z!NI`+0O4K`IAG>Y)m8riA>eRB`VjABKg9DqzN_2@Af1^dXBfvEq3j{l5@c2?0OyW# z=8I)9zpT=kSvs8#j~e#@c;fAG?c+~rJa`DeqsD!nczc{|$HzTMprn-i69^yvW$g{p znOVjzU!w8gAwM_n@#5%30Dfz?DVK_U?t-JCG`vgWfP7IuG)?1AE-*QD1%UScULXwd z{ULH5kW%6wmy^dPEExXY2Y79CbRc0rdinqg;Rr{;;dB%y7#D*I#{(Qe07QXAMKHpJ t{yS(4Hv9Jb)pHE4Lw*tKjdOoFeFjq)ugia+V7LGP002ovPDHLkV1iMPrVs!C literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/inhand-left.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..385c96238dadee703e098eaa0a24a02f4d2c3b2f GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|?s~d7hE&XX zd&`io*?_0@VY$e9gO=`)y?*Zm3e(GrL={Cja#tz*z0cKlqvEkAPy-Mg@VAlYpRQtD z>>1_#ajQst(5Jn-R8{+{U;kRXYoW_$%XIV2<;Ir^mA`)7Dq?PY-tvAv$0QT~$?n4G z`|3J$J9bshdUv&A1^@oLEsJ+W{FO*LUtA{4et+H9nX`7i+r}IbWVQF3?R-XvT|ly= z#Ek#Kqu?@yy5szdRrxO@>029I5s3QCpxbtiFXk-smVL=L-W-@}b71Q8>+dD982bP0l+XkK?Wc0f literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/inhand-right.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..93a062d9ee3eb808eec55f34af0667eaeba3e4cf GIT binary patch literal 547 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%z?|Qm8hE&XX zJIk@F*+9bWKTq+JN4wZJ2J8;@YI$V1Bw*r>)r~WSOT_YaPrIkN+3TWK^AVr@V*j`6 zT-#@}SVXvRZ(Qcdngy&E3K+I9Nbxm@IUHuZz?5OZ5XHdD?!dj^AwveEi422oLmM+t z(HEvAL9?Q71Cf-{qPJz)9UXm@c>+c2mIQtK^LECY=doG8_{Xn* zeU~qi=t(wUe)C}KwMQ}6w{$OhE>WE(?pm@g`%+YQkmjwHhc62EGL-GgSnH~_wDP$2 zeb>;b9!pK4Uf;{Tn_9qKvXQ@cw`k2{kp~k}n>t=RFIreTDPX0@ z&DHOV6~Bgv96Hw&q#3{bt>J4)gHoW{yMMVnWvchfrrEPBUvqHxr=GuDo2MP0zqfwD r@9KSV-TUAEV~7*~z=9Iy&%_U3d6zK%n7AA;))_oq{an^LB{Ts5C8g;5 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded.png new file mode 100644 index 0000000000000000000000000000000000000000..36cb5cf2e7b9c812d55da36393a1ec9cac230be3 GIT binary patch literal 973 zcmV;;12X)HP)Px&heWf;dl)9pc5qqZ^B(PjGsHl<5wsi{>PWSheq3IhRIl}V3# zNUmNyxBVZyqz8}PKv7{Kuyj@^NI_(mMJ-AjNvLkKNH*y%VOKopvxj7|GntvR6*u*P zm&}v*$Mb!@&yROTLpW0zI9v1oO8{DbgW?9DA*N~e6@=TAQxmj)0PuvsG|hh44F*uJ z*IN&L3PbM@Xvp&pg@*y9)H6lUj6_WA@jL(wx->zvG)ua@U!0A$<`YP9XZJs4#M=jK z%54z9VeN>++7XMhQT`1RDy1YSr+Rn7Hki`A8bhy~KQ)N_dR|smSH#+~G^LbpV)xE< z4KWsC%wHbm`=1ZEbRh!3Tah8Q@9q;6j{JIFs?{oMt81=#Gh<4jQ0VG05-=Q^u@IAM z#`|I{#N^XYk^)HDT$Z%CEY3aod|p;oRwVFD0i{&ysjd4n;PbDs5MyL0#2-gZ&Rv}5 z^=5^sF`aMgFJL6E;ODWQm>E;*^*WYifuMO!`9W$^W+Y-VG8E!LXdHmQfBTU+b(On& zC2m~bIB|72Los;V;%qicB~@vIy3eRS%)9TjJbo0N7T=hY5I&r64NwY zSsDb$Hfl>a9OelFOhhLEXgsI^FnDl>sWF|;KL5(sDc?@0l)^5T?y_+jbk5rVUK<_; z;9;Wyv>KCLeue7=4~U+3fgg}wzfT-(rMnpgf$;AG?KoMQ)dA8=EX(rj^{m;lwC=Fk v8;&2xtvJaU?O~dxYki+T#JqCmAE!?NpWoarv42^B00000NkvXXu0mjfIW@wr literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_drawn.png b/Resources/Textures/_White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X8>L zSg&;Rxc1V`Ip8jH;it>3rH5X|(A5iLJXy1j$(ge~wdI(+>Coxh>}D;x8gL~{JEl%( zy?1N(iDAF8J4sR?&wGd5%^Dpu@6671O0NERUOMU4s(IaON9{C6_6^N>Jo@ZeldTf?ZV)5zVd z(LIG9n9BR;v!IXw1N5F!;0QB>ch8h#LVeLDuUVXJMlSHKhCp(TnLG~rFgNYaWf9EX zwJN;KZMkac_BAvz7TQ!^R#slx(Q0qr{CRi*yZ3B2d8qwd%HT^Qx2)w>x%{`e=@zz5 z`X6fGng{1d=)Q(*PYq3D2xPE1c5hBrrR_iYeA1&>FXLTnEBm#(d%1XX&NbXzLR)4Y8$!`^g7y?b<1YwUCg#JMcz(y9CX z^+z2;DmsSg7b}lE-KuM!2COvFg1K{mqcNLp=BU{~AzSLy$Q@gC#fV56&`vVAGCoL2 zw5vYaM*vj@71EW*g mXP!*KSif(Kv(eZds~4VHv(smp&H&gh5CjJu8%zpqtZ~Q<2 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_undrawn.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_undrawn.png new file mode 100644 index 0000000000000000000000000000000000000000..4c96edcc7fee7db82a7b3a6a44f957451304819b GIT binary patch literal 7711 zcmeHKXHZjXw+_A8P^lus2r4B&5<*C55<(~%KtM#AqyeFmgbva>NL7#`MWhHK(h*ct zREmNiDqTPnK@jOmksHu+j%V&SbLY(5@83yg@9e$G^RD%*^}dr8ZK$ukn_HM0008XP z)xj7seu3K;Cp+U#^YvW<0CuVQnwZgz@LoVSs;e!{8ebLbJWe*Ui}q!Y?f1ptRK6#7XenQ!2d~Iwn$qy2k2 zde7Ks7dZ_#CVqJRc9}sy{c^*P=RUD>Ipw9FBgT?H*ss1l*g2o@c`d_6jN9&q;u(j@ z__gm?&&iD`No+7%yZx7;517Lb17hP|`xF&0m-uFVDj5`l6_AK5JKG)55Fev^(}OC0{<|8k}k9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(9mJPiQgIk0^( z0Wz`#8A1-aE>4T%6Bj?X7_ysUt_lD!8|Y#*Ow1n7nszz9ayuBPn^95wRE(Z~_9di( zY$QU{EHEsyImyXtax6harB#1APawgfwV@(2a!!38x7Ob9W}x!vura(=AFYQR~@3^|BgwUL&lnkq;QaJ+G5pYL%6#DJLNsZUnbA9vQ5_JX> zX^$@_ypFnUYHGN=A1yM;4qEX1a*0J-!^3-SaS%-h0dB`=qNVV?epkYh#UZt}Dp*du zF&A;M=N4sUvq%NwUz2T3QsV){Yg*c1Su|uD)5|V2`t$0)Gi+dcRZtS9F_@hs9$h0- zI#$3TTwAWz|Aj>n`Z>PTOO)E+&vo;5&fM@7GFIcVJNgSLD`F4ViNdKCC;t)YNKKQR zB+BB5*hG2x*7Af~6eR7fy_3EG!+CkWt>pcME6E@3@Tz;?en*o_|ELJ4X9QKsCbxNu zHL8^vV4v~PEVZEt%LKrj89Kb1_3G=T_PWLHDdSVFP(yEuKL=p-+l0wx?)(plTr-&; zGgPahz|SoXzTq+XfbYbc5%pZ7cChlEkUl!oPFbKEyb;TJKNG|rTYgv_;L+J5#aYrB Q!{|1Eu9iNg9BmWwKSS8Q1ONa4 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json new file mode 100644 index 0000000000..fa3ce2ddec --- /dev/null +++ b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json @@ -0,0 +1,28 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from paradise at https://github.com/ParadiseSS13/Paradise at 76d0428022d17f3249585d96ac9b69076206efd4", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base" + }, + { + "name": "loaded" + }, + { + "name": "drawn" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undraw.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undraw.png new file mode 100644 index 0000000000000000000000000000000000000000..23ecafa22549a4a2293e36923a0382d647d3dbe8 GIT binary patch literal 7429 zcmeHMc{J4B{~t@TRF;OcU<_>-vsz{{mW+MLPD+f~3^SHlY=uHaWQ`)S#8ZfreXEEl zTiHrlD58xL+3WYAo}QlH?|aVgJm>s=|2=cgo%!7N^1AQ$>%Q-ud(S7@%F<|~@HSx( z2(;0}m|z3^LROog0PxKY4xRylM8<>doH#bb0EjQkhe~HqAeXmhpeKP(9tvrminrUeL9Pd#zdX_LhHZl0iD}iTyd*4zI($XTH;^&rsLH z%GtKbAFe;_KM1z$sc@x)ylXG+o<-53rm{+kT91z;jd{#H26rtl)rP8+ik?J&FSqif zWrxbPO*ri=WQ`TCQ%uQy)qGg&%t|Fl_F=eKG6 ztA@#%cr~gM6RusXHUv@*vm9(PdDDv!ib#Wud%I#|MiK%-gX>XJ7RdgF%$dDP@#vLr zwZUgo(X=xmeyqS9FON7ry}jW{Ye>hJOcxyO%@=NlcBKLQ#rfOVqv>AVA9AaY7u_A~ zYe?bVtA79+9WWs}S3|=t?R*tXdm&_}k^S(xzx@jf8dLCbpJjl{Odm<+qW6V~4y#=( zcXPDAi@AC_BRypv8}yzIwf?9s-cs2#c`fKk?qlYc{=V8nuew~&{T@=i67xDCMLH{u z8A-yhbyJehEGJkyP+~&C1E0g^%UT-5j%F zoAIrg5xB2qAk|j`vZV5zyabCw*CTG_BCWl4qzPIza;BT@pxF%?G74wQ)Wt56M+cS_ z->LNn-leo~+hUCaw=)#gM`apWT@hIm64FX9g2x*~wHHUr;Ee)XjtR;O$hSx^IZBJt z?y-B{I3-!AE`V*!_m0`!yf4)=gB`tK+f@UeJm^&O>3vhAO<_T0?K}I8Y6Es`*v5Ix z<6|PQ%08CzbI#C6yln7?g7G7#WOeD)BSzAGd5K18x=d%a=QHRI&EAeOtz7@6#j%z3 z*1fwus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%BtHDycj`_cQ+Wzg3a69lrhEO129j}+KM ze+qdmP5|qNisV7`rcr?X<7dJCDX0I3Vn89N7?Qds2}Y%0fr@ZPBY`>qx>yv3h)_q6 z+|?2P4V~>n7;z=N_n4*+E_1QzxiWl;FfWZ|nj z#-G`0!T$#zT5ATsZ83n~4;ip^0Xrf5*H-wGuhmWG|MBy49{wLk0HFUJnDVygr%j_7Cv7FF4M6l1U);ayCgU1 zb(cZ=-15#Fm`8NI7Z(?gy)5Jg-hi_bd(&nIG}9d94m&^d0DrN|RVi^Gq$jN_W8wC# zTiatV9C^Nd_`+=O6`bco8*zje|aIl;afqkP!_N`GnNedt?S>25frvGrVE-`0LR`$&Jr z^F?a!8A_kU!h~OJ2H!F?_lalSlC;RXZ3aNwn&Y1Pq{ENPr9cZFw4Sf7FXmkEdwa1m zaBs3J0gUcHW-g>Fy0P3!mwY`cN>J9wsI|NM5}ssy;J_8_1?> oz|gT#QNwQ1ZiuJHt^lt&cVtCAE=t9x08<4rF|Z_*>~{ Date: Thu, 26 Sep 2024 07:36:44 +0300 Subject: [PATCH 02/10] add: crossbar --- .../Projectiles/ProjectileSystem.cs | 12 ++++++++++ .../Ranged/Systems/GunSystem.Ballistic.cs | 11 +++++++++ .../EmbeddableProjectileComponent.cs | 6 +++++ .../Projectiles/SharedProjectileSystem.cs | 9 ++++--- .../Systems/SharedGunSystem.Ballistic.cs | 22 ++++++++++++++++++ .../{ => Guns}/Drawable/DrawableComponent.cs | 2 +- .../{ => Guns}/Drawable/DrawableSystem.cs | 2 +- .../Entities/Objects/Materials/parts.yml | 5 ++++ .../Entities/Objects/Specific/syndicate.yml | 3 +++ .../Ammunition/Projectiles/light_rifle.yml | 3 +++ .../Weapons/{Gun => Guns}/crossbow.yml | 14 ++++++++++- Resources/Prototypes/_White/tags.yml | 5 +++- .../Weapons/Guns/crossbow.rsi/base.png | Bin 845 -> 0 bytes .../Weapons/Guns/crossbow.rsi/drawn.png | Bin 919 -> 7471 bytes .../Weapons/Guns/crossbow.rsi/loaded.png | Bin 973 -> 7372 bytes .../Guns/crossbow.rsi/loaded_drawn.png | Bin 6416 -> 0 bytes .../Guns/crossbow.rsi/loaded_undrawn.png | Bin 7711 -> 0 bytes .../Weapons/Guns/crossbow.rsi/meta.json | 7 ++++-- .../Weapons/Guns/crossbow.rsi/undraw.png | Bin 7429 -> 0 bytes .../Weapons/Guns/crossbow.rsi/undrawn.png | Bin 7429 -> 7082 bytes 20 files changed, 92 insertions(+), 9 deletions(-) rename Content.Shared/_White/{ => Guns}/Drawable/DrawableComponent.cs (89%) rename Content.Shared/_White/{ => Guns}/Drawable/DrawableSystem.cs (97%) rename Resources/Prototypes/_White/Entities/Objects/Weapons/{Gun => Guns}/crossbow.yml (83%) delete mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/base.png delete mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_drawn.png delete mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_undrawn.png delete mode 100644 Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undraw.png diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index 0061b16e47..a11898d199 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Camera; using Content.Shared.Damage; using Content.Shared.Database; +using Content.Shared.Mobs.Components; using Content.Shared.Projectiles; using Robust.Shared.Physics.Events; using Robust.Shared.Player; @@ -17,11 +18,13 @@ public sealed class ProjectileSystem : SharedProjectileSystem [Dependency] private readonly DamageableSystem _damageableSystem = default!; [Dependency] private readonly GunSystem _guns = default!; [Dependency] private readonly SharedCameraRecoilSystem _sharedCameraRecoil = default!; + [Dependency] private readonly DamageableSystem _damageable = default!; // WD EDIT public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnStartCollide); + SubscribeLocalEvent(OnEmbed); } private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref StartCollideEvent args) @@ -77,4 +80,13 @@ private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref St RaiseNetworkEvent(new ImpactEffectEvent(component.ImpactEffect, GetNetCoordinates(xform.Coordinates)), Filter.Pvs(xform.Coordinates, entityMan: EntityManager)); } } + + // WD EDIT START + private void OnEmbed(EntityUid uid, EmbeddableProjectileComponent component, ref EmbedEvent args) + { + var dmg = _damageable.TryChangeDamage(args.Embedded, component.Damage, origin: args.Shooter); + if (dmg is { Empty: false }) + _color.RaiseEffect(Color.Red, new List() { args.Embedded }, Filter.Pvs(args.Embedded, entityManager: EntityManager)); + } + // WD EDIT END } diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs index 798be3fc8e..58dce8e9dd 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs @@ -1,3 +1,5 @@ +using Content.Server.Stack; +using Content.Shared.Stacks; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Events; using Robust.Shared.Map; @@ -6,6 +8,8 @@ namespace Content.Server.Weapons.Ranged.Systems; public sealed partial class GunSystem { + [Dependency] private readonly StackSystem _stack = default!; + protected override void Cycle(EntityUid uid, BallisticAmmoProviderComponent component, MapCoordinates coordinates) { EntityUid? ent = null; @@ -32,4 +36,11 @@ protected override void Cycle(EntityUid uid, BallisticAmmoProviderComponent comp var cycledEvent = new GunCycledEvent(); RaiseLocalEvent(uid, ref cycledEvent); } + + // WD EDIT START + protected override EntityUid GetStackEntity(EntityUid uid, StackComponent stack) + { + return _stack.Split(uid, 1, Transform(uid).Coordinates, stack) ?? uid; + } + // WD EDIT END } diff --git a/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs b/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs index 008b7c2ced..4c9bdc5c89 100644 --- a/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs +++ b/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs @@ -1,4 +1,5 @@ using System.Numerics; +using Content.Shared.Damage; using Robust.Shared.Audio; using Robust.Shared.GameStates; @@ -46,4 +47,9 @@ public sealed partial class EmbeddableProjectileComponent : Component /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? Sound; + + // WD EDIT START + [DataField] + public DamageSpecifier Damage = new(); + // WD EDIT END } diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index f40a7a0363..0928676051 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -4,14 +4,12 @@ using Content.Shared.DoAfter; using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction; -using Content.Shared.Mobs.Components; using Content.Shared.Throwing; using Robust.Shared.Audio.Systems; using Robust.Shared.Map; using Robust.Shared.Network; using Robust.Shared.Physics; using Robust.Shared.Physics.Components; -using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Events; using Robust.Shared.Physics.Systems; using Robust.Shared.Serialization; @@ -115,7 +113,12 @@ private void OnEmbedProjectileHit(EntityUid uid, EmbeddableProjectileComponent c private void Embed(EntityUid uid, EntityUid target, EntityUid? user, EmbeddableProjectileComponent component) { - TryComp(uid, out var physics); + // WD EDIT START + if (!TryComp(uid, out var physics) + || physics.LinearVelocity.Length() < component.MinimumSpeed) + return; + // WD EDIT END + _physics.SetLinearVelocity(uid, Vector2.Zero, body: physics); _physics.SetBodyType(uid, BodyType.Static, body: physics); var xform = Transform(uid); diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index 061a84ee3b..79399d757f 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -2,6 +2,7 @@ using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; +using Content.Shared.Stacks; using Content.Shared.Verbs; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Events; @@ -47,6 +48,20 @@ private void OnBallisticInteractUsing(EntityUid uid, BallisticAmmoProviderCompon if (GetBallisticShots(component) >= component.Capacity) return; + // WD EDIT START + var entity = args.Used; + var doInsert = true; + if (TryComp(args.Used, out StackComponent? stack) && stack.Count > 1) + { + entity = GetStackEntity(args.Used, stack); + doInsert = false; + } + + component.Entities.Add(entity); + if (_netManager.IsServer || doInsert) + Containers.Insert(entity, component.Container); + // WD EDIT END + component.Entities.Add(args.Used); Containers.Insert(args.Used, component.Container); // Not predicted so @@ -284,6 +299,13 @@ public void UpdateBallisticAppearance(EntityUid uid, BallisticAmmoProviderCompon Appearance.SetData(uid, AmmoVisuals.AmmoCount, GetBallisticShots(component), appearance); Appearance.SetData(uid, AmmoVisuals.AmmoMax, component.Capacity, appearance); } + + // WD EDIT START + protected virtual EntityUid GetStackEntity(EntityUid uid, StackComponent stack) + { + return uid; + } + // WD EDIT END } /// diff --git a/Content.Shared/_White/Drawable/DrawableComponent.cs b/Content.Shared/_White/Guns/Drawable/DrawableComponent.cs similarity index 89% rename from Content.Shared/_White/Drawable/DrawableComponent.cs rename to Content.Shared/_White/Guns/Drawable/DrawableComponent.cs index f183d059a1..addaa359f0 100644 --- a/Content.Shared/_White/Drawable/DrawableComponent.cs +++ b/Content.Shared/_White/Guns/Drawable/DrawableComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.Weapons.Ranged.Components; using Robust.Shared.Audio; -namespace Content.Shared._White.Drawable; +namespace Content.Shared._White.Guns.Drawable; [RegisterComponent] public sealed partial class DrawableComponent : Component diff --git a/Content.Shared/_White/Drawable/DrawableSystem.cs b/Content.Shared/_White/Guns/Drawable/DrawableSystem.cs similarity index 97% rename from Content.Shared/_White/Drawable/DrawableSystem.cs rename to Content.Shared/_White/Guns/Drawable/DrawableSystem.cs index b756e7014b..6165c4f9f1 100644 --- a/Content.Shared/_White/Drawable/DrawableSystem.cs +++ b/Content.Shared/_White/Guns/Drawable/DrawableSystem.cs @@ -5,7 +5,7 @@ using Robust.Shared.Containers; using Robust.Shared.Serialization; -namespace Content.Shared._White.Drawable; +namespace Content.Shared._White.Guns.Drawable; public sealed class DrawableSystem : EntitySystem { diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index cdc08b4036..4eabf36558 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -80,6 +80,11 @@ - type: Tag # WD EDIT tags: - CrossbowBolt + - type: EmbeddableProjectile + minimumSpeed: 20 + damage: + types: + Piercing: 15 - type: entity parent: PartRodMetal diff --git a/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml b/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml index 94d1216d90..4ff48e9b43 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/syndicate.yml @@ -21,6 +21,9 @@ - type: Currency price: Telecrystal: 1 + - type: Tag # WD EDIT + tags: + - Telecrystal - type: entity parent: Telecrystal diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml index 3a0df2ac6c..8c66552c81 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml @@ -5,9 +5,12 @@ noSpawn: true components: - type: Projectile + deleteOnCollide: false damage: types: Piercing: 19 + - type: EmbeddableProjectile + embedOnThrow: false - type: entity id: BulletLightRiflePractice diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml similarity index 83% rename from Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml rename to Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml index 01b5c4b260..9bfdd3b9f2 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Gun/crossbow.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml @@ -6,7 +6,10 @@ components: - type: Sprite sprite: _White/Objects/Weapons/Guns/crossbow.rsi - state: base + layers: + - state: crossbow + - state: undrawn + map: [ "enum.DrawableVisuals.Layer" ] - type: Clothing quickEquip: false slots: @@ -49,6 +52,15 @@ maxStackAmount: 1 - type: Drawable - type: Appearance + - type: GenericVisualizer + visuals: + enum.AmmoVisuals.HasAmmo: + enum.DrawableVisuals.Layer: + True: {state: loaded} + enum.DrawableVisuals.Drawn: + enum.DrawableVisuals.Layer: + True: {state: drawn} + False: {state: undrawn} - type: Construction deconstructionTarget: null graph: WeaponPoweredCrossbowGraph diff --git a/Resources/Prototypes/_White/tags.yml b/Resources/Prototypes/_White/tags.yml index fe5c58bc48..5d03ae3edf 100644 --- a/Resources/Prototypes/_White/tags.yml +++ b/Resources/Prototypes/_White/tags.yml @@ -2,4 +2,7 @@ id: EnergySword - type: Tag - id: CrossbowBolt \ No newline at end of file + id: CrossbowBolt + +- type: Tag + id: Telecrystal \ No newline at end of file diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/base.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/base.png deleted file mode 100644 index 62741449a4e23097c24edda78e9f9f5b30d0c208..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 845 zcmV-T1G4;yP)Px&2T4RhR9J=0mr-leP!z}i>GtBFY8T2Jj*S+V$_N{yb7K48`f!U7=%d{B(TDcc zZ_w>y#1An0JSfQWBEnw8F@)i0I$8u*l`fl7(Kn9|?Tty3w4J)n1A&~}B>&$%=bn=r z34|-P(ACQSmjKduli~)DK%DcjLb#=z9zhxhfF}i<^Ks|~16Y>TJsDFP2B$y*U3Mxw z5nzn{b_kM|R!JO}0Wj(E2$CTg)Ia-;Ri!(g237YC|7k?LeL#d?-G2ewfc&$qyEu~_8X#ua_y~pBQ z6aa8L8o|p06G7?FpXt8*0q@`4P`Zz-XD8~zw z;{|d)qw6}A%Vi3DCjpGH?pe?GkATlrEu~^662|BA4kqT8u~XSbju*OPnTPP3v7hlg zC(E*67zRL)yi$Hhy^v{Xm1ZJgoQ7jA;e%QoJI}XAt`27^CWqZzEEdtsHhWMXu`oN0 z`}exSM<<^Egz!kyfP5Ex6cD@HVps}#GcT5k1OUlo60KGXUyoj)5t;=6#FYdZW({#A z0cG(HUR0|CAy}4?EXx=ifxh-DgiFPeor?9PDeQl{freSbN^%XIP6uZF*p7xDgb;T| zU|IILNAdhf*%TOyO`CaV6o3gb-gzu3`4pjO{yT z?}`A+G6Dc&*SPS#8Zzp7oL6l2>**FEA;{xF3 z^z=x=!n|cDHYITHj)nmV8&x4KBQEjxn@36c6V&gjIA2F|8`OoPu XhIg*+*v@0x00000NkvXXu0mjf)~I}< diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png index 480133d9c6d068a00482084a3e54f5cdb82aab1f..86266fa82c48c8c65188ffde4fa67d42ecc3dd07 100644 GIT binary patch literal 7471 zcmeHMc{J4R+aE>t>{P@URAkI%%o5pmgY1f!-B`!WSX(GdlqE_cOA)eX-$HhxB59+Z zNJN$vrAXePo}Qlb{?2*NbI$ww@0mH@neX>nKKFHfuIs+fTxVjfEsX{FcJToK06|j| z0~_`?aO2|H#{Oi6hAsgB0wJMxPAnUI5RlI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AjNhn7jG8Rt&yO|wTYx<{}n1eh9H8kFg|pZ*_!cQrx) delta 897 zcmV-{1AhFkI+q8KBYyw^b5ch_0Itp)=>Px&QAtEWR9J=0m(Ob>Wf;dl?^Z;`fOb}P zn?vgq>|zNGno?wo(1UM?3>NlKnDn6Hp*{IGbn`dtY33m8B@K93$P$Dd5B_Qop+UNY zE}LDpW)Bmkov4ktUe<1*XQaO$jd9qFguxv|}Z{7f4WPFB;on793b1V{~ zA5a`bEP!QOYISuL<7$ez=?SVk&Av|b3o~!3QmNDh5qlT7t_whAvrcuV$)(p5JbiqZ zk?|Ss{nX-p?JpMd%V#>OrS+1KQg)>s31HclDijLAx_`1+=a*kQ0mObn=bIlJWM2LK z%n+KU5r&AojQs3_P>9M#UHA|HZ+);tv(-K`L}|SwG))WEJ$+zpZH;jDD=RDPW_OPS zT1K8+B3LX)^hD zi|yJLiGM_*%ZZ#}^mRjKr8?CC*L8c2if!4!y0TFh#(YZ6O}|2|wgo_XVTtOkFPNi9 z&RB*#D#{68Jk|lrw$vb9E$jrqc5RDyuYE?d)n@P8Vx$u?E0wP6c%DbB13jCs4}>wF zQX}JIOio>4yS7DoVTm8^e1%rIP0siT@}VxH!GFQQ0RZ7%5IA7wP1RNZ0U_XUL;4W! zWk1C8Jie>k1|Xf8C1)7N9HHzX)DmP?Dgft>bLNX>F~6+RnOQoW4v!l50eIr=aqZ(z zX*_rcz@x@}o_KqlY{$nvNuZ>Z{1XTt{$=eA(wSMtE?=VY;2}RZ?(yR2MF4(lw<(v3 zeR}SKqoFjsOXGliQ9m?I<4-OyIduhq_WoWV4DtOTavqRU;vbij$0jTo{@w?8ZFF=X zVLy8M01Dvr^y XQy8zyf1qHv00000NkvXXu0mjfd3~lh diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded.png index 36cb5cf2e7b9c812d55da36393a1ec9cac230be3..f3e97fa1fa693e74cfc4a98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kv(eZds~4VHv(smp&H&gh5CjJu8%zpqtZ~Q<2 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_undrawn.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/loaded_undrawn.png deleted file mode 100644 index 4c96edcc7fee7db82a7b3a6a44f957451304819b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7711 zcmeHKXHZjXw+_A8P^lus2r4B&5<*C55<(~%KtM#AqyeFmgbva>NL7#`MWhHK(h*ct zREmNiDqTPnK@jOmksHu+j%V&SbLY(5@83yg@9e$G^RD%*^}dr8ZK$ukn_HM0008XP z)xj7seu3K;Cp+U#^YvW<0CuVQnwZgz@LoVSs;e!{8ebLbJWe*Ui}q!Y?f1ptRK6#7XenQ!2d~Iwn$qy2k2 zde7Ks7dZ_#CVqJRc9}sy{c^*P=RUD>Ipw9FBgT?H*ss1l*g2o@c`d_6jN9&q;u(j@ z__gm?&&iD`No+7%yZx7;517Lb17hP|`xF&0m-uFVDj5`l6_AK5JKG)55Fev^(}OC0{<|8k}k9 zT>AWZ8fo5{r8$$5^4P=Q$BME=e{B6ZeZ5^a+wS9{hoWkomcdBcYL@DY8avN3md&rn zhI)z8pX1ywOOU1tqFFO4tvsbzf>PohsWsmN76@9(&EVjQDEzfo!36 zjD8&DX?biLHU(F;U;Vh8Do*_7@Uig$)4ptY8rT<{nNaw~A^LKoZE^SMLN@LP0VVH# z*y!uB-AbT;=WdMSwIfDg^wos0m?f3$>9kO>+mq_ir4k|5O)`?n?oPwTCb!koo6ApH zu=`$8=J1%AWUY_7q59PR6l+vQtu;pghM50G3Cf!rG9{i^f;s8uioyzilirs}B2g~x zUlw*~8mk;fk+9-TyA}5zTDW9`oP20N=i0^RdT()rLo8sSKg}kTM=fk$Xd)q65ycm< z3-a_JO{VQwnm@N>VJcOspTt916QMqroV4V2TvT`x$jxcc=&6}Q!HvP z;P23};F=*l#IWbL>ye^<(+z2P9EQR!-*~Yil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ZEt%LKrj89Kb1_3G=T_PWLHDdSVFP(yEuKL=p-+l0wx?)(plTr-&; zGgPahz|SoXzTq+XfbYbc5%pZ7cChlEkUl!oPFbKEyb;TJKNG|rTYgv_;L+J5#aYrB Q!{|1Eu9iNg9BmWwKSS8Q1ONa4 diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json index fa3ce2ddec..b4dbf33fbb 100644 --- a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json +++ b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json @@ -1,14 +1,17 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from paradise at https://github.com/ParadiseSS13/Paradise at 76d0428022d17f3249585d96ac9b69076206efd4", + "copyright": "Taken from paradise at https://github.com/ParadiseSS13/Paradise at 76d0428022d17f3249585d96ac9b69076206efd4. Edit by Spatison", "size": { "x": 32, "y": 32 }, "states": [ { - "name": "base" + "name": "crossbow" + }, + { + "name": "undrawn" }, { "name": "loaded" diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undraw.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undraw.png deleted file mode 100644 index 23ecafa22549a4a2293e36923a0382d647d3dbe8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7429 zcmeHMc{J4B{~t@TRF;OcU<_>-vsz{{mW+MLPD+f~3^SHlY=uHaWQ`)S#8ZfreXEEl zTiHrlD58xL+3WYAo}QlH?|aVgJm>s=|2=cgo%!7N^1AQ$>%Q-ud(S7@%F<|~@HSx( z2(;0}m|z3^LROog0PxKY4xRylM8<>doH#bb0EjQkhe~HqAeXmhpeKP(9tvrminrUeL9Pd#zdX_LhHZl0iD}iTyd*4zI($XTH;^&rsLH z%GtKbAFe;_KM1z$sc@x)ylXG+o<-53rm{+kT91z;jd{#H26rtl)rP8+ik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/10] add: crossbow --- .../Stretched/StretchedVisualizerSystem.cs | 21 ++++ .../Stretched/StretchedVisualsComponent.cs | 14 +++ .../Power/EntitySystems/BatterySystem.cs | 34 ++++++- .../Projectiles/ProjectileSystem.cs | 91 ++++++++++++++++- .../Stunnable/Systems/StunbatonSystem.cs | 40 +------- .../UserInterface/ActivatableUISystem.cs | 4 +- .../Weapons/Ranged/Systems/GunSystem.cs | 6 ++ .../_White/Guns/PoweredComponent.cs | 11 ++ Content.Server/_White/Guns/PoweredSystem.cs | 32 ++++++ .../Projectiles/PenetratedProjectileSystem.cs | 82 +++++++++++++++ Content.Shared/Projectiles/EmbedEvent.cs | 13 +++ .../Projectiles/SharedProjectileSystem.cs | 96 +++++++----------- .../Weapons/Ranged/Components/GunComponent.cs | 5 + .../Systems/SharedGunSystem.Ballistic.cs | 10 +- .../_White/Guns/Drawable/DrawableSystem.cs | 72 ------------- .../StretchedComponent.cs} | 6 +- .../_White/Guns/Stretched/StretchedSystem.cs | 72 +++++++++++++ .../_White/Penetrated/PenetratedComponent.cs | 11 ++ .../_White/Penetrated/PenetratedSystem.cs | 34 +++++++ .../PenetratedProjectileComponent.cs | 16 +++ .../objects/weapons/guns/crossbow.ftl | 4 + Resources/Prototypes/Entities/Mobs/base.yml | 1 + .../Entities/Objects/Materials/parts.yml | 7 +- .../Objects/Misc/improvised_gun_parts.yml | 7 +- .../Ammunition/Projectiles/light_rifle.yml | 3 - .../Objects/Weapons/Guns/crossbow.yml | 38 +++---- .../_White/Recipes/hidden_crafts.yml | 34 ++++++- .../Weapons/Guns/crossbow.rsi/meta.json | 4 +- .../crossbow.rsi/{drawn.png => stretched.png} | Bin .../{undrawn.png => unstrung.png} | Bin 30 files changed, 553 insertions(+), 215 deletions(-) create mode 100644 Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs create mode 100644 Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs create mode 100644 Content.Server/_White/Guns/PoweredComponent.cs create mode 100644 Content.Server/_White/Guns/PoweredSystem.cs create mode 100644 Content.Server/_White/Projectiles/PenetratedProjectileSystem.cs delete mode 100644 Content.Shared/_White/Guns/Drawable/DrawableSystem.cs rename Content.Shared/_White/Guns/{Drawable/DrawableComponent.cs => Stretched/StretchedComponent.cs} (69%) create mode 100644 Content.Shared/_White/Guns/Stretched/StretchedSystem.cs create mode 100644 Content.Shared/_White/Penetrated/PenetratedComponent.cs create mode 100644 Content.Shared/_White/Penetrated/PenetratedSystem.cs create mode 100644 Content.Shared/_White/Projectile/PenetratedProjectileComponent.cs create mode 100644 Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/crossbow.ftl rename Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/{drawn.png => stretched.png} (100%) rename Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/{undrawn.png => unstrung.png} (100%) diff --git a/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs b/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs new file mode 100644 index 0000000000..27f61fa405 --- /dev/null +++ b/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs @@ -0,0 +1,21 @@ +using Content.Shared._White.Guns.Stretched; +using Content.Shared.Weapons.Ranged.Systems; +using Robust.Client.GameObjects; + +namespace Content.Client._White.Guns.Stretched; + +public sealed class StretchedVisualizerSystem : VisualizerSystem +{ + [Dependency] private readonly AppearanceSystem _appearance = default!; + + protected override void OnAppearanceChange(EntityUid uid, StretchedVisualsComponent component, ref AppearanceChangeEvent args) + { + if (args.Sprite == null) + return; + + _appearance.TryGetData(uid, StretchedVisuals.Stretched, out var stretched, args.Component); + _appearance.TryGetData(uid, AmmoVisuals.HasAmmo, out var hasAmmo, args.Component); + + args.Sprite.LayerSetState(StretchedVisuals.Layer, stretched ? component.StretchedState : hasAmmo ? component.LoadedState : component.UnstrungVisible); + } +} diff --git a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs new file mode 100644 index 0000000000..e492dd334a --- /dev/null +++ b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs @@ -0,0 +1,14 @@ +namespace Content.Client._White.Guns.Stretched; + +[RegisterComponent, Access(typeof(StretchedVisualizerSystem))] +public sealed partial class StretchedVisualsComponent : Component +{ + [DataField] + public string? LoadedState; + + [DataField] + public string? StretchedState; + + [DataField] + public string? UnstrungVisible; +} diff --git a/Content.Server/Power/EntitySystems/BatterySystem.cs b/Content.Server/Power/EntitySystems/BatterySystem.cs index 1c5d83b094..2aaa41df0b 100644 --- a/Content.Server/Power/EntitySystems/BatterySystem.cs +++ b/Content.Server/Power/EntitySystems/BatterySystem.cs @@ -1,3 +1,4 @@ +using System.Diagnostics.CodeAnalysis; using Content.Server.Cargo.Systems; using Content.Server.Emp; using Content.Shared.Emp; @@ -5,6 +6,7 @@ using Content.Shared.Examine; using Content.Shared.Rejuvenate; using JetBrains.Annotations; +using Robust.Shared.Containers; using Robust.Shared.Utility; namespace Content.Server.Power.EntitySystems @@ -12,6 +14,8 @@ namespace Content.Server.Power.EntitySystems [UsedImplicitly] public sealed class BatterySystem : EntitySystem { + [Dependency] private readonly SharedContainerSystem _containers = default!; // WD EDIT + public override void Initialize() { base.Initialize(); @@ -113,7 +117,7 @@ private void OnEmpDisabledRemoved(EntityUid uid, BatteryComponent component, ref if (!TryComp(uid, out var charging)) return; - var ev = new ChargerUpdateStatusEvent(); + var ev = new ChargerUpdateStatusEvent(); RaiseLocalEvent(charging.ChargerUid, ref ev); } @@ -197,5 +201,33 @@ public bool IsFull(EntityUid uid, BatteryComponent? battery = null) return battery.CurrentCharge / battery.MaxCharge >= 0.99f; } + + // WD EDIT START + public bool TryGetBatteryComponent(EntityUid uid, [NotNullWhen(true)] out BatteryComponent? battery, + [NotNullWhen(true)] out EntityUid? batteryUid) + { + if (TryComp(uid, out battery)) + { + batteryUid = uid; + return true; + } + + if (!_containers.TryGetContainer(uid, "cell_slot", out var container) + || container is not ContainerSlot slot) + { + battery = null; + batteryUid = null; + return false; + } + + batteryUid = slot.ContainedEntity; + + if (batteryUid != null) + return TryComp(batteryUid, out battery); + + battery = null; + return false; + } + // WD EDIT END } } diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index a11898d199..5a868b6f11 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -1,11 +1,19 @@ using Content.Server.Administration.Logs; using Content.Server.Effects; +using Content.Server.Hands.Systems; using Content.Server.Weapons.Ranged.Systems; +using Content.Shared._White.Penetrated; +using Content.Shared._White.Projectile; using Content.Shared.Camera; using Content.Shared.Damage; using Content.Shared.Database; -using Content.Shared.Mobs.Components; +using Content.Shared.DoAfter; +using Content.Shared.Interaction; using Content.Shared.Projectiles; +using Content.Shared.Throwing; +using Robust.Server.GameObjects; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Events; using Robust.Shared.Player; @@ -19,12 +27,19 @@ public sealed class ProjectileSystem : SharedProjectileSystem [Dependency] private readonly GunSystem _guns = default!; [Dependency] private readonly SharedCameraRecoilSystem _sharedCameraRecoil = default!; [Dependency] private readonly DamageableSystem _damageable = default!; // WD EDIT + [Dependency] private readonly HandsSystem _hands = default!; // WD EDIT + [Dependency] private readonly PhysicsSystem _physics = default!; // WD EDIT + [Dependency] private readonly SharedTransformSystem _transform = default!; // WD EDIT + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; // WD EDIT + [Dependency] private readonly PenetratedSystem _penetrated = default!; // WD EDIT public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnStartCollide); - SubscribeLocalEvent(OnEmbed); + SubscribeLocalEvent(OnEmbed); // WD EDIT + SubscribeLocalEvent(OnEmbedActivate); // WD EDIT + SubscribeLocalEvent(OnEmbedRemove); // WD EDIT } private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref StartCollideEvent args) @@ -88,5 +103,77 @@ private void OnEmbed(EntityUid uid, EmbeddableProjectileComponent component, ref if (dmg is { Empty: false }) _color.RaiseEffect(Color.Red, new List() { args.Embedded }, Filter.Pvs(args.Embedded, entityManager: EntityManager)); } + + private void OnEmbedActivate(EntityUid uid, EmbeddableProjectileComponent component, ActivateInWorldEvent args) + { + if (args.Handled + || !AttemptEmbedRemove(uid, args.User, component)) + return; + + args.Handled = true; + } + + private void OnEmbedRemove(EntityUid uid, EmbeddableProjectileComponent component, RemoveEmbeddedProjectileEvent args) + { + // Whacky prediction issues. + if (args.Cancelled) + return; + + if (component.DeleteOnRemove) + { + QueueDel(uid); + FreePenetrated(uid); + return; + } + + var xform = Transform(uid); + TryComp(uid, out var physics); + _physics.SetBodyType(uid, BodyType.Dynamic, body: physics, xform: xform); + _transform.AttachToGridOrMap(uid, xform); + + // Reset whether the projectile has damaged anything if it successfully was removed + if (TryComp(uid, out var projectile)) + { + projectile.Shooter = null; + projectile.Weapon = null; + projectile.DamagedEntity = false; + } + + FreePenetrated(uid); + + // Land it just coz uhhh yeah + var landEv = new LandEvent(args.User, true); + RaiseLocalEvent(uid, ref landEv); + _physics.WakeBody(uid, body: physics); + + // try place it in the user's hand + _hands.TryPickupAnyHand(args.User, uid); + } + + private bool AttemptEmbedRemove(EntityUid uid, EntityUid user, EmbeddableProjectileComponent? component = null) + { + if (!Resolve(uid, ref component, false) + || component.RemovalTime == null + || !TryComp(uid, out var physics) + || physics.BodyType != BodyType.Static) + return false; + + _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.RemovalTime.Value, + new RemoveEmbeddedProjectileEvent(), eventTarget: uid, target: uid) + { + DistanceThreshold = SharedInteractionSystem.InteractionRange, + }); + + return true; + } + + private void FreePenetrated(EntityUid uid, PenetratedProjectileComponent? penetratedProjectile = null) + { + if (!Resolve(uid, ref penetratedProjectile) + || !penetratedProjectile.PenetratedUid.HasValue) + return; + + _penetrated.FreePenetrated(penetratedProjectile.PenetratedUid.Value); + } // WD EDIT END } diff --git a/Content.Server/Stunnable/Systems/StunbatonSystem.cs b/Content.Server/Stunnable/Systems/StunbatonSystem.cs index 614331fe0a..4b52bf1fb6 100644 --- a/Content.Server/Stunnable/Systems/StunbatonSystem.cs +++ b/Content.Server/Stunnable/Systems/StunbatonSystem.cs @@ -1,4 +1,3 @@ -using System.Diagnostics.CodeAnalysis; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Server.Power.Events; @@ -12,7 +11,6 @@ using Content.Shared.Popups; using Content.Shared.PowerCell.Components; using Content.Shared.Stunnable; -using Robust.Shared.Containers; namespace Content.Server.Stunnable.Systems { @@ -23,8 +21,6 @@ public sealed class StunbatonSystem : SharedStunbatonSystem [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly BatterySystem _battery = default!; [Dependency] private readonly SharedItemToggleSystem _itemToggle = default!; - [Dependency] private readonly SharedContainerSystem _containers = default!; // WD EDIT - public override void Initialize() { base.Initialize(); @@ -42,7 +38,7 @@ private void OnStaminaHitAttempt(Entity entity, ref StaminaD { // WD EDIT START if (!_itemToggle.IsActivated(entity.Owner) - || !TryGetBatteryComponent(entity, out var battery, out var batteryUid) + || !_battery.TryGetBatteryComponent(entity, out var battery, out var batteryUid) || !_battery.TryUseCharge(batteryUid.Value, entity.Comp.EnergyPerUse, battery)) args.Cancelled = true; // WD EDIT END @@ -55,7 +51,7 @@ private void OnExamined(Entity entity, ref ExaminedEvent arg : Loc.GetString("comp-stunbaton-examined-off"); args.PushMarkup(onMsg); - if (TryGetBatteryComponent(entity, out var battery, out _)) // WD EDIT + if (_battery.TryGetBatteryComponent(entity, out var battery, out _)) // WD EDIT { var count = (int) (battery.CurrentCharge / entity.Comp.EnergyPerUse); args.PushMarkup(Loc.GetString("melee-battery-examine", ("color", "yellow"), ("count", count))); @@ -70,7 +66,7 @@ private void ToggleDone(Entity entity, ref ItemToggledEvent private void TryTurnOn(Entity entity, ref ItemToggleActivateAttemptEvent args) { // WD EDIT START - if (!TryGetBatteryComponent(entity, out var battery, out _) + if (!_battery.TryGetBatteryComponent(entity, out var battery, out _) || battery.CurrentCharge < entity.Comp.EnergyPerUse) { @@ -81,7 +77,7 @@ private void TryTurnOn(Entity entity, ref ItemToggleActivate _popup.PopupEntity(Loc.GetString("stunbaton-component-low-charge"), (EntityUid) args.User, (EntityUid) args.User); } - + return; } // WD EDIT END @@ -126,36 +122,10 @@ private void OnPowerCellChanged(Entity entity, ref PowerCell private void CheckCharge(Entity entity) { - if (!TryGetBatteryComponent(entity, out var battery, out _) + if (!_battery.TryGetBatteryComponent(entity, out var battery, out _) || battery.CurrentCharge < entity.Comp.EnergyPerUse) _itemToggle.TryDeactivate(entity.Owner, predicted: false); } - - private bool TryGetBatteryComponent(EntityUid uid, [NotNullWhen(true)] out BatteryComponent? battery, - [NotNullWhen(true)] out EntityUid? batteryUid) - { - if (TryComp(uid, out battery)) - { - batteryUid = uid; - return true; - } - - if (!_containers.TryGetContainer(uid, "cell_slot", out var container) - || container is not ContainerSlot slot) - { - battery = null; - batteryUid = null; - return false; - } - - batteryUid = slot.ContainedEntity; - - if (batteryUid != null) - return TryComp(batteryUid, out battery); - - battery = null; - return false; - } // WD EDIT END } } diff --git a/Content.Server/UserInterface/ActivatableUISystem.cs b/Content.Server/UserInterface/ActivatableUISystem.cs index 5f2314df90..fb726667bb 100644 --- a/Content.Server/UserInterface/ActivatableUISystem.cs +++ b/Content.Server/UserInterface/ActivatableUISystem.cs @@ -1,4 +1,5 @@ using Content.Server.Administration.Managers; +using Content.Server.Projectiles; using Content.Shared.ActionBlocker; using Content.Shared.Ghost; using Content.Shared.Hands; @@ -24,7 +25,7 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnActivate); + SubscribeLocalEvent(OnActivate, after: new[] {typeof(ProjectileSystem)}); SubscribeLocalEvent(OnUseInHand); SubscribeLocalEvent(OnInteractUsing); SubscribeLocalEvent(OnHandDeselected); @@ -87,6 +88,7 @@ private void AddOpenUiVerb(EntityUid uid, ActivatableUIComponent component, GetV private void OnActivate(EntityUid uid, ActivatableUIComponent component, ActivateInWorldEvent args) { + Log.Error("2"); if (args.Handled) return; diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index 7c61aaa200..caaad40952 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -12,6 +12,7 @@ using Content.Shared.Effects; using Content.Shared.Interaction.Components; using Content.Shared.Projectiles; +using Content.Shared.Throwing; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Ranged; using Content.Shared.Weapons.Ranged.Components; @@ -293,7 +294,12 @@ private void ShootOrThrow(EntityUid uid, Vector2 mapDirection, Vector2 gunVeloci { RemoveShootable(uid); // TODO: Someone can probably yeet this a billion miles so need to pre-validate input somewhere up the call stack. + // WD EDIT START + if (gun.ThrowAngle.HasValue) + EnsureComp(uid).Angle = gun.ThrowAngle.Value; + // WD EDIT END ThrowingSystem.TryThrow(uid, mapDirection, gun.ProjectileSpeedModified, user); + RemComp(uid); // WD EDIT return; } diff --git a/Content.Server/_White/Guns/PoweredComponent.cs b/Content.Server/_White/Guns/PoweredComponent.cs new file mode 100644 index 0000000000..da43822bfc --- /dev/null +++ b/Content.Server/_White/Guns/PoweredComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server._White.Guns; + +[RegisterComponent] +public sealed partial class PoweredComponent : Component +{ + [DataField] + public float EnergyPerUse = 180f; + + [DataField] + public float ProjectileSpeedModified = 15f; +} diff --git a/Content.Server/_White/Guns/PoweredSystem.cs b/Content.Server/_White/Guns/PoweredSystem.cs new file mode 100644 index 0000000000..ad5b8c7d71 --- /dev/null +++ b/Content.Server/_White/Guns/PoweredSystem.cs @@ -0,0 +1,32 @@ +using Content.Server.Power.EntitySystems; +using Content.Server.Weapons.Ranged.Systems; +using Content.Shared.Weapons.Ranged.Events; +using Content.Shared.Weapons.Ranged.Systems; + +namespace Content.Server._White.Guns; + +public sealed class PoweredSystem : EntitySystem +{ + [Dependency] private readonly BatterySystem _battery = default!; + [Dependency] private readonly GunSystem _gun = default!; + + public override void Initialize() + { + SubscribeLocalEvent(OnShoot); + SubscribeLocalEvent(OnGunRefreshModifiers); + } + + private void OnShoot(EntityUid uid, PoweredComponent component, AttemptShootEvent args) + { + _gun.RefreshModifiers(uid); + } + + private void OnGunRefreshModifiers(EntityUid uid, PoweredComponent component, ref GunRefreshModifiersEvent args) + { + if (!_battery.TryGetBatteryComponent(uid, out var battery, out var batteryUid) + || !_battery.TryUseCharge(batteryUid.Value, component.EnergyPerUse, battery)) + return; + + args.ProjectileSpeed += component.ProjectileSpeedModified; + } +} diff --git a/Content.Server/_White/Projectiles/PenetratedProjectileSystem.cs b/Content.Server/_White/Projectiles/PenetratedProjectileSystem.cs new file mode 100644 index 0000000000..71bcc4e8cf --- /dev/null +++ b/Content.Server/_White/Projectiles/PenetratedProjectileSystem.cs @@ -0,0 +1,82 @@ +using System.Numerics; +using Content.Shared._White.Penetrated; +using Content.Shared._White.Projectile; +using Content.Shared.Buckle; +using Content.Shared.Damage; +using Content.Shared.Projectiles; +using Content.Shared.Throwing; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; + +namespace Content.Server._White.Projectiles; + +public sealed class PenetratedProjectileSystem : EntitySystem +{ + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly SharedBuckleSystem _buckle = default!; + [Dependency] private readonly DamageableSystem _damageable = default!; + [Dependency] private readonly PenetratedSystem _penetrated = default!; + [Dependency] private readonly SharedProjectileSystem _projectile = default!; + + public override void Initialize() + { + SubscribeLocalEvent(OnEmbed); + SubscribeLocalEvent(OnLand); + SubscribeLocalEvent(OnRemove); + SubscribeLocalEvent(OnEntityTerminating); + } + + private void OnEmbed(EntityUid uid, PenetratedProjectileComponent component, AttemptEmbedEvent args) + { + if (!TryComp(args.Embedded, out PenetratedComponent? penetrated) + || penetrated.IsPinned + || component.PenetratedUid.HasValue + || !TryComp(uid, out PhysicsComponent? physics) + || !TryComp(args.Embedded, out PhysicsComponent? physicEmbedded) + || physics.LinearVelocity.Length() < component.MinimumSpeed) + return; + + component.PenetratedUid = args.Embedded; + penetrated.ProjectileUid = uid; + penetrated.IsPinned = true; + + _buckle.TryUnbuckle(args.Embedded, args.Embedded, true); + _damageable.TryChangeDamage(args.Embedded, component.Damage, origin: args.Shooter); + _physics.SetLinearVelocity(args.Embedded, Vector2.Zero, body: physicEmbedded); + _physics.SetBodyType(args.Embedded, BodyType.Static, body: physicEmbedded); + var xform = Transform(args.Embedded); + _transform.AttachToGridOrMap(args.Embedded, xform); + _transform.SetLocalPosition(args.Embedded, Transform(uid).LocalPosition, xform); + _transform.SetParent(args.Embedded, xform, uid); + _physics.SetLinearVelocity(uid, physics.LinearVelocity / 2, body: physics); + } + + private void OnLand(EntityUid uid, PenetratedProjectileComponent component, ref LandEvent args) + { + FreePenetrated(uid, component); + } + + private void OnEntityTerminating(EntityUid uid, PenetratedProjectileComponent component, ref EntityTerminatingEvent args) + { + FreePenetrated(uid, component); + } + + private void OnRemove(EntityUid uid, PenetratedProjectileComponent component, ComponentRemove args) + { + FreePenetrated(uid, component); + } + + private void FreePenetrated(EntityUid uid, PenetratedProjectileComponent component) + { + if (!component.PenetratedUid.HasValue) + return; + + var penetratedUid = component.PenetratedUid.Value; + _penetrated.FreePenetrated(penetratedUid); + + if (TryComp(uid, out var embeddable)) + _projectile.Embed(uid, penetratedUid, null, embeddable, false); + } +} diff --git a/Content.Shared/Projectiles/EmbedEvent.cs b/Content.Shared/Projectiles/EmbedEvent.cs index 521a691f45..7398d7c83d 100644 --- a/Content.Shared/Projectiles/EmbedEvent.cs +++ b/Content.Shared/Projectiles/EmbedEvent.cs @@ -13,3 +13,16 @@ public readonly record struct EmbedEvent(EntityUid? Shooter, EntityUid Embedded) /// public readonly EntityUid Embedded = Embedded; } + +// WD EDIT START +[ByRefEvent] +public readonly record struct AttemptEmbedEvent(EntityUid? Shooter, EntityUid Embedded) +{ + public readonly EntityUid? Shooter = Shooter; + + /// + /// Entity that is embedded in. + /// + public readonly EntityUid Embedded = Embedded; +} +// WD EDIT END diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index 0928676051..8501ce3662 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -1,4 +1,6 @@ using System.Numerics; +using Content.Shared._White.Penetrated; +using Content.Shared._White.Projectile; using Content.Shared.CombatMode.Pacification; using Content.Shared.Damage; using Content.Shared.DoAfter; @@ -22,8 +24,6 @@ public abstract partial class SharedProjectileSystem : EntitySystem [Dependency] private readonly INetManager _netManager = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; - [Dependency] private readonly SharedHandsSystem _hands = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; @@ -34,63 +34,9 @@ public override void Initialize() SubscribeLocalEvent(PreventCollision); SubscribeLocalEvent(OnEmbedProjectileHit); SubscribeLocalEvent(OnEmbedThrowDoHit); - SubscribeLocalEvent(OnEmbedActivate); - SubscribeLocalEvent(OnEmbedRemove); SubscribeLocalEvent(OnAttemptPacifiedThrow); } - private void OnEmbedActivate(EntityUid uid, EmbeddableProjectileComponent component, ActivateInWorldEvent args) - { - // Nuh uh - if (component.RemovalTime == null) - return; - - if (args.Handled || !TryComp(uid, out var physics) || physics.BodyType != BodyType.Static) - return; - - args.Handled = true; - - _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.RemovalTime.Value, - new RemoveEmbeddedProjectileEvent(), eventTarget: uid, target: uid) - { - DistanceThreshold = SharedInteractionSystem.InteractionRange, - }); - } - - private void OnEmbedRemove(EntityUid uid, EmbeddableProjectileComponent component, RemoveEmbeddedProjectileEvent args) - { - // Whacky prediction issues. - if (args.Cancelled || _netManager.IsClient) - return; - - if (component.DeleteOnRemove) - { - QueueDel(uid); - return; - } - - var xform = Transform(uid); - TryComp(uid, out var physics); - _physics.SetBodyType(uid, BodyType.Dynamic, body: physics, xform: xform); - _transform.AttachToGridOrMap(uid, xform); - - // Reset whether the projectile has damaged anything if it successfully was removed - if (TryComp(uid, out var projectile)) - { - projectile.Shooter = null; - projectile.Weapon = null; - projectile.DamagedEntity = false; - } - - // Land it just coz uhhh yeah - var landEv = new LandEvent(args.User, true); - RaiseLocalEvent(uid, ref landEv); - _physics.WakeBody(uid, body: physics); - - // try place it in the user's hand - _hands.TryPickupAnyHand(args.User, uid); - } - private void OnEmbedThrowDoHit(EntityUid uid, EmbeddableProjectileComponent component, ThrowDoHitEvent args) { if (!component.EmbedOnThrow) @@ -111,18 +57,29 @@ private void OnEmbedProjectileHit(EntityUid uid, EmbeddableProjectileComponent c } } - private void Embed(EntityUid uid, EntityUid target, EntityUid? user, EmbeddableProjectileComponent component) + public void Embed(EntityUid uid, EntityUid target, EntityUid? user, EmbeddableProjectileComponent component, bool raiseEvent = true) // WD EDIT { // WD EDIT START if (!TryComp(uid, out var physics) - || physics.LinearVelocity.Length() < component.MinimumSpeed) + || physics.LinearVelocity.Length() < component.MinimumSpeed + || _netManager.IsClient) return; - // WD EDIT END - _physics.SetLinearVelocity(uid, Vector2.Zero, body: physics); - _physics.SetBodyType(uid, BodyType.Static, body: physics); + var attemptEmbedEvent = new AttemptEmbedEvent(user, target); + RaiseLocalEvent(uid, ref attemptEmbedEvent); + var xform = Transform(uid); - _transform.SetParent(uid, xform, target); + + if (!TryComp(uid, out var penetratedProjectile) + || !penetratedProjectile.PenetratedUid.HasValue + || (penetratedProjectile.PenetratedUid != target + && !HasComp(target))) + { + _physics.SetLinearVelocity(uid, Vector2.Zero, body: physics); + _physics.SetBodyType(uid, BodyType.Static, body: physics); + _transform.SetParent(uid, xform, target); + } + // WD EDIT END if (component.Offset != Vector2.Zero) { @@ -130,6 +87,11 @@ private void Embed(EntityUid uid, EntityUid target, EntityUid? user, EmbeddableP xform); } + // WD EDIT START + if (!raiseEvent) + return; + // WD EDIT END + _audio.PlayPredicted(component.Sound, uid, null); var ev = new EmbedEvent(user, target); RaiseLocalEvent(uid, ref ev); @@ -191,3 +153,13 @@ public record struct ProjectileReflectAttemptEvent(EntityUid ProjUid, Projectile /// [ByRefEvent] public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, EntityUid? Shooter = null); + + +[Serializable, NetSerializable] +public sealed partial class RemoveEmbeddedProjectileEvent : DoAfterEvent +{ + public override DoAfterEvent Clone() + { + return this; + } +} diff --git a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs index 8d7ecae1a8..398076747d 100644 --- a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs +++ b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs @@ -247,6 +247,11 @@ public sealed partial class GunComponent : Component /// [DataField] public bool DoRecoil = true; + + // WD EDIT START + [DataField] + public Angle? ThrowAngle; + // WD EDIT END } [Flags] diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index 79399d757f..1fc1707713 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -60,10 +60,7 @@ private void OnBallisticInteractUsing(EntityUid uid, BallisticAmmoProviderCompon component.Entities.Add(entity); if (_netManager.IsServer || doInsert) Containers.Insert(entity, component.Container); - // WD EDIT END - - component.Entities.Add(args.Used); - Containers.Insert(args.Used, component.Container); + // WD EDIT END // Not predicted so Audio.PlayPredicted(component.SoundInsert, uid, args.User); args.Handled = true; @@ -296,8 +293,11 @@ public void UpdateBallisticAppearance(EntityUid uid, BallisticAmmoProviderCompon if (!Timing.IsFirstTimePredicted || !TryComp(uid, out var appearance)) return; - Appearance.SetData(uid, AmmoVisuals.AmmoCount, GetBallisticShots(component), appearance); + var count = GetBallisticShots(component); // WD EDIT + + Appearance.SetData(uid, AmmoVisuals.AmmoCount, count, appearance); Appearance.SetData(uid, AmmoVisuals.AmmoMax, component.Capacity, appearance); + Appearance.SetData(uid, AmmoVisuals.HasAmmo, count != 0, appearance); // WD EDIT } // WD EDIT START diff --git a/Content.Shared/_White/Guns/Drawable/DrawableSystem.cs b/Content.Shared/_White/Guns/Drawable/DrawableSystem.cs deleted file mode 100644 index 6165c4f9f1..0000000000 --- a/Content.Shared/_White/Guns/Drawable/DrawableSystem.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Content.Shared.Interaction.Events; -using Content.Shared.Weapons.Ranged.Components; -using Content.Shared.Weapons.Ranged.Systems; -using Robust.Shared.Audio.Systems; -using Robust.Shared.Containers; -using Robust.Shared.Serialization; - -namespace Content.Shared._White.Guns.Drawable; - -public sealed class DrawableSystem : EntitySystem -{ - [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SharedAppearanceSystem _appearance = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnItemRemove); - SubscribeLocalEvent(OnAttemptShoot); - SubscribeLocalEvent(OnUse); - } - - private void OnStartup(EntityUid uid, DrawableComponent component, ComponentStartup args) - { - component.Provider = EnsureComp(uid); - } - - private void OnItemRemove(EntityUid uid, DrawableComponent component, EntRemovedFromContainerMessage args) - { - if (!component.Drawn || args.Container.ID != component.Provider.Container.ID) - return; - - component.Drawn = false; - UpdateDrawableAppearance(uid, component); - } - - private void OnAttemptShoot(EntityUid uid, DrawableComponent component, ref AttemptShootEvent args) - { - if (!component.Drawn) - args.Cancelled = true; - } - - private void OnUse(EntityUid uid, DrawableComponent component, UseInHandEvent args) - { - if (component.Drawn || component.Provider.Count == 0) - return; - - args.Handled = true; - - _audio.PlayPredicted(component.SoundDraw, uid, args.User); - component.Drawn = true; - - UpdateDrawableAppearance(uid, component); - } - - private void UpdateDrawableAppearance(EntityUid uid, DrawableComponent component) - { - if (!TryComp(uid, out var appearance)) - return; - - _appearance.SetData(uid, DrawableVisuals.Drawn, component.Drawn, appearance); - } -} - -[Serializable, NetSerializable] -public enum DrawableVisuals : byte -{ - Drawn, - Layer -} diff --git a/Content.Shared/_White/Guns/Drawable/DrawableComponent.cs b/Content.Shared/_White/Guns/Stretched/StretchedComponent.cs similarity index 69% rename from Content.Shared/_White/Guns/Drawable/DrawableComponent.cs rename to Content.Shared/_White/Guns/Stretched/StretchedComponent.cs index addaa359f0..1b0145d874 100644 --- a/Content.Shared/_White/Guns/Drawable/DrawableComponent.cs +++ b/Content.Shared/_White/Guns/Stretched/StretchedComponent.cs @@ -1,13 +1,13 @@ using Content.Shared.Weapons.Ranged.Components; using Robust.Shared.Audio; -namespace Content.Shared._White.Guns.Drawable; +namespace Content.Shared._White.Guns.Stretched; [RegisterComponent] -public sealed partial class DrawableComponent : Component +public sealed partial class StretchedComponent : Component { [ViewVariables] - public bool Drawn; + public bool Stretched; [DataField, ViewVariables] public SoundSpecifier? SoundDraw = new SoundPathSpecifier("/Audio/Weapons/drawbow2.ogg"); diff --git a/Content.Shared/_White/Guns/Stretched/StretchedSystem.cs b/Content.Shared/_White/Guns/Stretched/StretchedSystem.cs new file mode 100644 index 0000000000..393846c71e --- /dev/null +++ b/Content.Shared/_White/Guns/Stretched/StretchedSystem.cs @@ -0,0 +1,72 @@ +using Content.Shared.Interaction.Events; +using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Weapons.Ranged.Systems; +using Robust.Shared.Audio.Systems; +using Robust.Shared.Containers; +using Robust.Shared.Serialization; + +namespace Content.Shared._White.Guns.Stretched; + +public sealed class StretchedSystem : EntitySystem +{ + [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + SubscribeLocalEvent(OnItemRemove); + SubscribeLocalEvent(OnAttemptShoot); + SubscribeLocalEvent(OnUse); + } + + private void OnStartup(EntityUid uid, StretchedComponent component, ComponentStartup args) + { + component.Provider = EnsureComp(uid); + } + + private void OnItemRemove(EntityUid uid, StretchedComponent component, EntRemovedFromContainerMessage args) + { + if (!component.Stretched || args.Container.ID != component.Provider.Container.ID) + return; + + component.Stretched = false; + UpdateDrawableAppearance(uid, component); + } + + private void OnAttemptShoot(EntityUid uid, StretchedComponent component, ref AttemptShootEvent args) + { + if (!component.Stretched) + args.Cancelled = true; + } + + private void OnUse(EntityUid uid, StretchedComponent component, UseInHandEvent args) + { + if (component.Stretched || component.Provider.Count == 0) + return; + + args.Handled = true; + + _audio.PlayPredicted(component.SoundDraw, uid, args.User); + component.Stretched = true; + + UpdateDrawableAppearance(uid, component); + } + + private void UpdateDrawableAppearance(EntityUid uid, StretchedComponent component) + { + if (!TryComp(uid, out var appearance)) + return; + + _appearance.SetData(uid, StretchedVisuals.Stretched, component.Stretched, appearance); + } +} + +[Serializable, NetSerializable] +public enum StretchedVisuals : byte +{ + Stretched, + Layer +} diff --git a/Content.Shared/_White/Penetrated/PenetratedComponent.cs b/Content.Shared/_White/Penetrated/PenetratedComponent.cs new file mode 100644 index 0000000000..f6f82a7031 --- /dev/null +++ b/Content.Shared/_White/Penetrated/PenetratedComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Shared._White.Penetrated; + +[RegisterComponent] +public sealed partial class PenetratedComponent : Component +{ + [DataField] + public EntityUid? ProjectileUid; + + [DataField] + public bool IsPinned; +} diff --git a/Content.Shared/_White/Penetrated/PenetratedSystem.cs b/Content.Shared/_White/Penetrated/PenetratedSystem.cs new file mode 100644 index 0000000000..8506286fe1 --- /dev/null +++ b/Content.Shared/_White/Penetrated/PenetratedSystem.cs @@ -0,0 +1,34 @@ +using Content.Shared._White.Projectile; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; + +namespace Content.Shared._White.Penetrated; + +public sealed class PenetratedSystem : EntitySystem +{ + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + + public void FreePenetrated(EntityUid uid, PenetratedComponent? penetrated = null, PhysicsComponent? physics = null) + { + var xform = Transform(uid); + _transform.AttachToGridOrMap(uid, xform); + + if (Resolve(uid, ref physics, false)) + { + _physics.SetBodyType(uid, BodyType.KinematicController, body: physics, xform: xform); + _physics.WakeBody(uid, body: physics); + } + + if (!Resolve(uid, ref penetrated, false)) + return; + + penetrated.IsPinned = false; + + if (TryComp(penetrated.ProjectileUid, out var penetratedProjectile)) + penetratedProjectile.PenetratedUid = null; + + penetrated.ProjectileUid = null; + } +} diff --git a/Content.Shared/_White/Projectile/PenetratedProjectileComponent.cs b/Content.Shared/_White/Projectile/PenetratedProjectileComponent.cs new file mode 100644 index 0000000000..846a6045c2 --- /dev/null +++ b/Content.Shared/_White/Projectile/PenetratedProjectileComponent.cs @@ -0,0 +1,16 @@ +using Content.Shared.Damage; + +namespace Content.Shared._White.Projectile; + +[RegisterComponent] +public sealed partial class PenetratedProjectileComponent : Component +{ + [DataField] + public float MinimumSpeed = 40f; + + [DataField] + public DamageSpecifier Damage = new(); + + [DataField] + public EntityUid? PenetratedUid; +} diff --git a/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/crossbow.ftl b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/crossbow.ftl new file mode 100644 index 0000000000..352d8731dc --- /dev/null +++ b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/crossbow.ftl @@ -0,0 +1,4 @@ +ent-WeaponPoweredCrossbow = арбалет + .desc = Опасная вещь +ent-WeaponPoweredCrossbowUnfinished = недоделанный арбалет + .desc = Будет опасной вещью \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Mobs/base.yml b/Resources/Prototypes/Entities/Mobs/base.yml index 6f25841f50..acc8726087 100644 --- a/Resources/Prototypes/Entities/Mobs/base.yml +++ b/Resources/Prototypes/Entities/Mobs/base.yml @@ -48,6 +48,7 @@ active: False - type: OwnInteractionVerbs allowedVerbs: [] # TODO: define something here, or don't. + - type: Penetrated # WD EDIT # Used for mobs that have health and can take damage. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 4eabf36558..59e21a567b 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -81,7 +81,12 @@ tags: - CrossbowBolt - type: EmbeddableProjectile - minimumSpeed: 20 + minimumSpeed: 15 + damage: + types: + Piercing: 15 + - type: PenetratedProjectile + minimumSpeed: 30 damage: types: Piercing: 15 diff --git a/Resources/Prototypes/Entities/Objects/Misc/improvised_gun_parts.yml b/Resources/Prototypes/Entities/Objects/Misc/improvised_gun_parts.yml index abf4e0974a..48516cb7ee 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/improvised_gun_parts.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/improvised_gun_parts.yml @@ -27,9 +27,12 @@ - type: Sprite sprite: Objects/Misc/rifle_stock.rsi state: icon + # WD EDIT STRART - type: Construction - graph: RifleStockGraph - node: riflestock + deconstructionTarget: null + graph: WeaponPoweredCrossbowGraph + node: stock + # WD EDIT END - type: Tag tags: - RifleStock diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml index 8c66552c81..3a0df2ac6c 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/light_rifle.yml @@ -5,12 +5,9 @@ noSpawn: true components: - type: Projectile - deleteOnCollide: false damage: types: Piercing: 19 - - type: EmbeddableProjectile - embedOnThrow: false - type: entity id: BulletLightRiflePractice diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml index 9bfdd3b9f2..5218aeb817 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml @@ -1,15 +1,15 @@ - type: entity parent: BaseItem id: WeaponPoweredCrossbow - name: арбалет - description: Опасная штука, страшная вещь. + name: Crossbow + description: It's a dangerous thing. components: - type: Sprite sprite: _White/Objects/Weapons/Guns/crossbow.rsi layers: - state: crossbow - - state: undrawn - map: [ "enum.DrawableVisuals.Layer" ] + - state: unstrung + map: [ "enum.StretchedVisuals.Layer" ] - type: Clothing quickEquip: false slots: @@ -19,12 +19,10 @@ size: Huge sprite: _White/Objects/Weapons/Guns/crossbow.rsi - type: Gun - forceThrowingAngle: true - angle: 225 - projectileSpeed: 35 fireRate: 0.5 soundGunshot: path: /Audio/Weapons/click.ogg + throwAngle: 225 - type: BallisticAmmoProvider whitelist: tags: @@ -44,23 +42,13 @@ slots: cell_slot: name: power-cell-slot-component-slot-name-default - crystal_slot: - name: Кристалл - whitelist: - tags: - - Telecrystal - maxStackAmount: 1 - - type: Drawable + - type: Stretched + - type: Powered - type: Appearance - - type: GenericVisualizer - visuals: - enum.AmmoVisuals.HasAmmo: - enum.DrawableVisuals.Layer: - True: {state: loaded} - enum.DrawableVisuals.Drawn: - enum.DrawableVisuals.Layer: - True: {state: drawn} - False: {state: undrawn} + - type: StretchedVisuals + loadedState: loaded + stretchedState: stretched + unstrungVisible: unstrung - type: Construction deconstructionTarget: null graph: WeaponPoweredCrossbowGraph @@ -69,8 +57,8 @@ - type: entity parent: BaseItem id: WeaponPoweredCrossbowUnfinished - name: часть арбалета - description: Недоделанный арбалет. + name: Unfinished crossbow + description: It's going to be a dangerous thing. components: - type: Sprite sprite: _White/Objects/Weapons/Guns/crossbow.rsi diff --git a/Resources/Prototypes/_White/Recipes/hidden_crafts.yml b/Resources/Prototypes/_White/Recipes/hidden_crafts.yml index 830ecf0e43..a202afb1eb 100644 --- a/Resources/Prototypes/_White/Recipes/hidden_crafts.yml +++ b/Resources/Prototypes/_White/Recipes/hidden_crafts.yml @@ -84,4 +84,36 @@ - !type:SpawnPrototype prototype: Igniter - !type:EmptyAllContainers - - !type:DeleteEntity \ No newline at end of file + - !type:DeleteEntity + +- type: constructionGraph + id: WeaponPoweredCrossbowGraph + start: stock + graph: + - node: stock + edges: + - to: unfinished + steps: + - material: MetalRod + amount: 3 + doAfter: 3 + - node: unfinished + entity: WeaponPoweredCrossbowUnfinished + edges: + - to: crossbow + steps: + - tool: Welding + doAfter: 5 + - material: Cable + amount: 5 + doAfter: 0.5 + - material: Plastic + amount: 3 + doAfter: 0.5 + - material: Cable + amount: 5 + doAfter: 0.5 + - tool: Screwing + doAfter: 1 + - node: crossbow + entity: WeaponPoweredCrossbow \ No newline at end of file diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json index b4dbf33fbb..f6bcd5b43b 100644 --- a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json +++ b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/meta.json @@ -11,13 +11,13 @@ "name": "crossbow" }, { - "name": "undrawn" + "name": "unstrung" }, { "name": "loaded" }, { - "name": "drawn" + "name": "stretched" }, { "name": "inhand-left", diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/stretched.png similarity index 100% rename from Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/drawn.png rename to Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/stretched.png diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undrawn.png b/Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/unstrung.png similarity index 100% rename from Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/undrawn.png rename to Resources/Textures/_White/Objects/Weapons/Guns/crossbow.rsi/unstrung.png From 0717f11ce89f2f9d234ae7d11b2ddd47ec841f7e Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 5 Oct 2024 21:42:24 +0300 Subject: [PATCH 04/10] clean up --- .../Projectiles/ProjectileSystem.cs | 23 +++++++++++-------- .../UserInterface/ActivatableUISystem.cs | 4 +--- .../Ranged/Systems/GunSystem.Ballistic.cs | 2 +- .../Projectiles/SharedProjectileSystem.cs | 3 ++- .../Systems/SharedGunSystem.Ballistic.cs | 2 +- .../Entities/Objects/Materials/parts.yml | 4 +++- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index 5a868b6f11..c69dc13921 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -1,6 +1,7 @@ using Content.Server.Administration.Logs; using Content.Server.Effects; using Content.Server.Hands.Systems; +using Content.Server.UserInterface; using Content.Server.Weapons.Ranged.Systems; using Content.Shared._White.Penetrated; using Content.Shared._White.Projectile; @@ -26,20 +27,24 @@ public sealed class ProjectileSystem : SharedProjectileSystem [Dependency] private readonly DamageableSystem _damageableSystem = default!; [Dependency] private readonly GunSystem _guns = default!; [Dependency] private readonly SharedCameraRecoilSystem _sharedCameraRecoil = default!; - [Dependency] private readonly DamageableSystem _damageable = default!; // WD EDIT - [Dependency] private readonly HandsSystem _hands = default!; // WD EDIT - [Dependency] private readonly PhysicsSystem _physics = default!; // WD EDIT - [Dependency] private readonly SharedTransformSystem _transform = default!; // WD EDIT - [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; // WD EDIT - [Dependency] private readonly PenetratedSystem _penetrated = default!; // WD EDIT + // WD EDIT START + [Dependency] private readonly DamageableSystem _damageable = default!; + [Dependency] private readonly HandsSystem _hands = default!; + [Dependency] private readonly PhysicsSystem _physics = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly PenetratedSystem _penetrated = default!; + // WD EDIT END public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnStartCollide); - SubscribeLocalEvent(OnEmbed); // WD EDIT - SubscribeLocalEvent(OnEmbedActivate); // WD EDIT - SubscribeLocalEvent(OnEmbedRemove); // WD EDIT + // WD EDIT START + SubscribeLocalEvent(OnEmbed); + SubscribeLocalEvent(OnEmbedActivate, before: new[] {typeof(ActivatableUISystem)}); + SubscribeLocalEvent(OnEmbedRemove); + // WD EDIT END } private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref StartCollideEvent args) diff --git a/Content.Server/UserInterface/ActivatableUISystem.cs b/Content.Server/UserInterface/ActivatableUISystem.cs index fb726667bb..5f2314df90 100644 --- a/Content.Server/UserInterface/ActivatableUISystem.cs +++ b/Content.Server/UserInterface/ActivatableUISystem.cs @@ -1,5 +1,4 @@ using Content.Server.Administration.Managers; -using Content.Server.Projectiles; using Content.Shared.ActionBlocker; using Content.Shared.Ghost; using Content.Shared.Hands; @@ -25,7 +24,7 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnActivate, after: new[] {typeof(ProjectileSystem)}); + SubscribeLocalEvent(OnActivate); SubscribeLocalEvent(OnUseInHand); SubscribeLocalEvent(OnInteractUsing); SubscribeLocalEvent(OnHandDeselected); @@ -88,7 +87,6 @@ private void AddOpenUiVerb(EntityUid uid, ActivatableUIComponent component, GetV private void OnActivate(EntityUid uid, ActivatableUIComponent component, ActivateInWorldEvent args) { - Log.Error("2"); if (args.Handled) return; diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs index 58dce8e9dd..c75b4e6f82 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.Ballistic.cs @@ -8,7 +8,7 @@ namespace Content.Server.Weapons.Ranged.Systems; public sealed partial class GunSystem { - [Dependency] private readonly StackSystem _stack = default!; + [Dependency] private readonly StackSystem _stack = default!; // WD EDIT protected override void Cycle(EntityUid uid, BallisticAmmoProviderComponent component, MapCoordinates coordinates) { diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index 8501ce3662..bbbd1886ab 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -154,7 +154,7 @@ public record struct ProjectileReflectAttemptEvent(EntityUid ProjUid, Projectile [ByRefEvent] public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, EntityUid? Shooter = null); - +// WD EDIT START [Serializable, NetSerializable] public sealed partial class RemoveEmbeddedProjectileEvent : DoAfterEvent { @@ -163,3 +163,4 @@ public override DoAfterEvent Clone() return this; } } +// WD EDIT END diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index 1fc1707713..ec1b4c5ce7 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -295,7 +295,7 @@ public void UpdateBallisticAppearance(EntityUid uid, BallisticAmmoProviderCompon var count = GetBallisticShots(component); // WD EDIT - Appearance.SetData(uid, AmmoVisuals.AmmoCount, count, appearance); + Appearance.SetData(uid, AmmoVisuals.AmmoCount, count, appearance); // WD EDIT Appearance.SetData(uid, AmmoVisuals.AmmoMax, component.Capacity, appearance); Appearance.SetData(uid, AmmoVisuals.HasAmmo, count != 0, appearance); // WD EDIT } diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 59e21a567b..db3d9d3541 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -77,7 +77,8 @@ - type: ShortConstruction prototypes: - Grille - - type: Tag # WD EDIT + # WD EDIT START + - type: Tag tags: - CrossbowBolt - type: EmbeddableProjectile @@ -90,6 +91,7 @@ damage: types: Piercing: 15 + # WD EDIT END - type: entity parent: PartRodMetal From f434a2cd219ca0a61fa6c5631a56a3b1b35cb2b3 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 5 Oct 2024 22:07:36 +0300 Subject: [PATCH 05/10] AI rewie --- .../_White/Guns/Stretched/StretchedVisualizerSystem.cs | 5 ++++- .../_White/Guns/Stretched/StretchedVisualsComponent.cs | 2 +- Content.Server/Projectiles/ProjectileSystem.cs | 7 ++++++- Content.Server/_White/Guns/PoweredComponent.cs | 3 +++ Content.Shared/Projectiles/SharedProjectileSystem.cs | 6 ------ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs b/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs index 27f61fa405..d6e094e5ac 100644 --- a/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs +++ b/Content.Client/_White/Guns/Stretched/StretchedVisualizerSystem.cs @@ -16,6 +16,9 @@ protected override void OnAppearanceChange(EntityUid uid, StretchedVisualsCompon _appearance.TryGetData(uid, StretchedVisuals.Stretched, out var stretched, args.Component); _appearance.TryGetData(uid, AmmoVisuals.HasAmmo, out var hasAmmo, args.Component); - args.Sprite.LayerSetState(StretchedVisuals.Layer, stretched ? component.StretchedState : hasAmmo ? component.LoadedState : component.UnstrungVisible); + // StretchedState: Weapon is stretched and ready to fire + // LoadedState: Weapon is loaded but not stretched + // UnstrungState: Weapon is neither stretched nor loaded + args.Sprite.LayerSetState(StretchedVisuals.Layer, stretched ? component.StretchedState : hasAmmo ? component.LoadedState : component.UnstrungState); } } diff --git a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs index e492dd334a..849cb45f68 100644 --- a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs +++ b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs @@ -10,5 +10,5 @@ public sealed partial class StretchedVisualsComponent : Component public string? StretchedState; [DataField] - public string? UnstrungVisible; + public string? UnstrungState; } diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index c69dc13921..eef12ea496 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -131,8 +131,13 @@ private void OnEmbedRemove(EntityUid uid, EmbeddableProjectileComponent componen return; } + if (!TryComp(uid, out var physics)) + { + FreePenetrated(uid); + return; + } + var xform = Transform(uid); - TryComp(uid, out var physics); _physics.SetBodyType(uid, BodyType.Dynamic, body: physics, xform: xform); _transform.AttachToGridOrMap(uid, xform); diff --git a/Content.Server/_White/Guns/PoweredComponent.cs b/Content.Server/_White/Guns/PoweredComponent.cs index da43822bfc..e32670a0e6 100644 --- a/Content.Server/_White/Guns/PoweredComponent.cs +++ b/Content.Server/_White/Guns/PoweredComponent.cs @@ -6,6 +6,9 @@ public sealed partial class PoweredComponent : Component [DataField] public float EnergyPerUse = 180f; + /// + /// Modifies the speed of projectiles fired from this powered weapon. + /// [DataField] public float ProjectileSpeedModified = 15f; } diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index bbbd1886ab..ca920830eb 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -114,12 +114,6 @@ public void SetShooter(EntityUid id, ProjectileComponent component, EntityUid sh Dirty(id, component); } - [Serializable, NetSerializable] - private sealed partial class RemoveEmbeddedProjectileEvent : DoAfterEvent - { - public override DoAfterEvent Clone() => this; - } - /// /// Prevent players with the Pacified status effect from throwing embeddable projectiles. /// From 6c8993e4d10a992ae70c5094ff32624bccf708e0 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 5 Oct 2024 22:52:08 +0300 Subject: [PATCH 06/10] fix --- .../_White/Guns/Stretched/StretchedVisualsComponent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs index 849cb45f68..b9092cadc9 100644 --- a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs +++ b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs @@ -3,12 +3,12 @@ namespace Content.Client._White.Guns.Stretched; [RegisterComponent, Access(typeof(StretchedVisualizerSystem))] public sealed partial class StretchedVisualsComponent : Component { - [DataField] + [DataField(required: true)] public string? LoadedState; - [DataField] + [DataField(required: true)] public string? StretchedState; - [DataField] + [DataField(required: true)] public string? UnstrungState; } From 8c68cea9a3777a185adae16924389d20800bdf7d Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:14:11 +0300 Subject: [PATCH 07/10] fix --- .../_White/Guns/Stretched/StretchedVisualsComponent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs index b9092cadc9..97b1e6865e 100644 --- a/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs +++ b/Content.Client/_White/Guns/Stretched/StretchedVisualsComponent.cs @@ -4,11 +4,11 @@ namespace Content.Client._White.Guns.Stretched; public sealed partial class StretchedVisualsComponent : Component { [DataField(required: true)] - public string? LoadedState; + public string LoadedState = string.Empty; [DataField(required: true)] - public string? StretchedState; + public string StretchedState = string.Empty; [DataField(required: true)] - public string? UnstrungState; + public string UnstrungState = string.Empty; } From 49bcc6001041b540aba36579946b8e164faaeab5 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:23:47 +0300 Subject: [PATCH 08/10] fix :( --- .../_White/Entities/Objects/Weapons/Guns/crossbow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml index 5218aeb817..137cacf0de 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/crossbow.yml @@ -48,7 +48,7 @@ - type: StretchedVisuals loadedState: loaded stretchedState: stretched - unstrungVisible: unstrung + unstrungState: unstrung - type: Construction deconstructionTarget: null graph: WeaponPoweredCrossbowGraph From 705415e9bcfa9c010c8aab995638cbd952ee2281 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:43:24 +1000 Subject: [PATCH 09/10] Update tags.yml --- Resources/Prototypes/_White/tags.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/_White/tags.yml b/Resources/Prototypes/_White/tags.yml index c6c0d6d20f..20f3f26ddd 100644 --- a/Resources/Prototypes/_White/tags.yml +++ b/Resources/Prototypes/_White/tags.yml @@ -11,4 +11,4 @@ id: NeuroStabilization - type: Tag - id: MindSlav + id: MindSlave From 9d3c80478c58c0e88c84b486560358ee8191f28b Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:39:32 +0300 Subject: [PATCH 10/10] fix --- .../Projectiles/ProjectileSystem.cs | 30 ------------------ .../Projectiles/SharedProjectileSystem.cs | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index eef12ea496..5c49ce68b5 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -1,7 +1,6 @@ using Content.Server.Administration.Logs; using Content.Server.Effects; using Content.Server.Hands.Systems; -using Content.Server.UserInterface; using Content.Server.Weapons.Ranged.Systems; using Content.Shared._White.Penetrated; using Content.Shared._White.Projectile; @@ -9,7 +8,6 @@ using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.DoAfter; -using Content.Shared.Interaction; using Content.Shared.Projectiles; using Content.Shared.Throwing; using Robust.Server.GameObjects; @@ -32,7 +30,6 @@ public sealed class ProjectileSystem : SharedProjectileSystem [Dependency] private readonly HandsSystem _hands = default!; [Dependency] private readonly PhysicsSystem _physics = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly PenetratedSystem _penetrated = default!; // WD EDIT END @@ -42,7 +39,6 @@ public override void Initialize() SubscribeLocalEvent(OnStartCollide); // WD EDIT START SubscribeLocalEvent(OnEmbed); - SubscribeLocalEvent(OnEmbedActivate, before: new[] {typeof(ActivatableUISystem)}); SubscribeLocalEvent(OnEmbedRemove); // WD EDIT END } @@ -109,15 +105,6 @@ private void OnEmbed(EntityUid uid, EmbeddableProjectileComponent component, ref _color.RaiseEffect(Color.Red, new List() { args.Embedded }, Filter.Pvs(args.Embedded, entityManager: EntityManager)); } - private void OnEmbedActivate(EntityUid uid, EmbeddableProjectileComponent component, ActivateInWorldEvent args) - { - if (args.Handled - || !AttemptEmbedRemove(uid, args.User, component)) - return; - - args.Handled = true; - } - private void OnEmbedRemove(EntityUid uid, EmbeddableProjectileComponent component, RemoveEmbeddedProjectileEvent args) { // Whacky prediction issues. @@ -160,23 +147,6 @@ private void OnEmbedRemove(EntityUid uid, EmbeddableProjectileComponent componen _hands.TryPickupAnyHand(args.User, uid); } - private bool AttemptEmbedRemove(EntityUid uid, EntityUid user, EmbeddableProjectileComponent? component = null) - { - if (!Resolve(uid, ref component, false) - || component.RemovalTime == null - || !TryComp(uid, out var physics) - || physics.BodyType != BodyType.Static) - return false; - - _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.RemovalTime.Value, - new RemoveEmbeddedProjectileEvent(), eventTarget: uid, target: uid) - { - DistanceThreshold = SharedInteractionSystem.InteractionRange, - }); - - return true; - } - private void FreePenetrated(EntityUid uid, PenetratedProjectileComponent? penetratedProjectile = null) { if (!Resolve(uid, ref penetratedProjectile) diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index ca920830eb..c5f024b424 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -7,6 +7,7 @@ using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction; using Content.Shared.Throwing; +using Content.Shared.UserInterface; using Robust.Shared.Audio.Systems; using Robust.Shared.Map; using Robust.Shared.Network; @@ -26,6 +27,7 @@ public abstract partial class SharedProjectileSystem : EntitySystem [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; // WD EDIT public override void Initialize() { @@ -35,6 +37,7 @@ public override void Initialize() SubscribeLocalEvent(OnEmbedProjectileHit); SubscribeLocalEvent(OnEmbedThrowDoHit); SubscribeLocalEvent(OnAttemptPacifiedThrow); + SubscribeLocalEvent(OnEmbedActivate, before: new[] {typeof(ActivatableUISystem)}); // WD EDI } private void OnEmbedThrowDoHit(EntityUid uid, EmbeddableProjectileComponent component, ThrowDoHitEvent args) @@ -121,6 +124,34 @@ private void OnAttemptPacifiedThrow(Entity ent, r { args.Cancel("pacified-cannot-throw-embed"); } + + // WD EDIT START + private void OnEmbedActivate(EntityUid uid, EmbeddableProjectileComponent component, ActivateInWorldEvent args) + { + if (args.Handled + || !AttemptEmbedRemove(uid, args.User, component)) + return; + + args.Handled = true; + } + + private bool AttemptEmbedRemove(EntityUid uid, EntityUid user, EmbeddableProjectileComponent? component = null) + { + if (!Resolve(uid, ref component, false) + || component.RemovalTime == null + || !TryComp(uid, out var physics) + || physics.BodyType != BodyType.Static) + return false; + + _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.RemovalTime.Value, + new RemoveEmbeddedProjectileEvent(), eventTarget: uid, target: uid) + { + DistanceThreshold = SharedInteractionSystem.InteractionRange, + }); + + return true; + } + // WD EDIT END } [Serializable, NetSerializable]