From 422a84e029de9275878463508b9b8dfef14d5dd4 Mon Sep 17 00:00:00 2001 From: FacePluslll <34409891+FacePluslll@users.noreply.github.com> Date: Sun, 18 Jun 2023 14:35:23 -0500 Subject: [PATCH] Adds Double bladed Esword (#17227) * Changed Energy Sword system to allow Wieldable eswords Needed to add conditions to allow the wielding system to handle the esword if the component existed in the entity. The normal eswords work just fine still. * Adds sprites for double bladed esword * added double bladed esword to yml * Add double bladed esword to uplink catalog * fixed sprites on right handed wielding * decresed speed a little and added a wielding time * Reduced damage * Damage change * Balence change * edited attack speed and heavy windup * fixed readability issue and removed unwanted brackets * reflectProp to .75 Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * wieldTime to 0 Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * litDisarmMalus to .7 Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * changed heat and slash damage to 9 and structural damage to 20 * changed uplink desc --------- Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> --- .../Melee/EnergySword/EnergySwordSystem.cs | 22 +++++ .../Locale/en-US/store/uplink-catalog.ftl | 3 + .../Prototypes/Catalog/uplink_catalog.yml | 11 +++ .../Objects/Weapons/Melee/e_sword.yml | 43 +++++++++ .../e_sword_double.rsi/e_sword_double.png | Bin 0 -> 149 bytes .../e_sword_double_blade.png | Bin 0 -> 813 bytes .../Weapons/Melee/e_sword_double.rsi/icon.png | Bin 0 -> 345 bytes .../e_sword_double.rsi/inhand-left-blade.png | Bin 0 -> 694 bytes .../Melee/e_sword_double.rsi/inhand-left.png | Bin 0 -> 313 bytes .../e_sword_double.rsi/inhand-right-blade.png | Bin 0 -> 722 bytes .../Melee/e_sword_double.rsi/inhand-right.png | Bin 0 -> 330 bytes .../Melee/e_sword_double.rsi/meta.json | 86 ++++++++++++++++++ .../wielded-inhand-left.png | Bin 0 -> 330 bytes .../wielded-inhand-right.png | Bin 0 -> 318 bytes 14 files changed, 165 insertions(+) create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double_blade.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/icon.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left-blade.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right-blade.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/meta.json create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-left.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-right.png diff --git a/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs b/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs index 5251befeb4..b24c42b137 100644 --- a/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs +++ b/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs @@ -10,6 +10,8 @@ using Content.Shared.Toggleable; using Content.Shared.Tools.Components; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; +using Content.Shared.Wieldable; +using Content.Shared.Wieldable.Components; using Robust.Shared.Player; using Robust.Shared.Random; @@ -34,6 +36,9 @@ public sealed class EnergySwordSystem : EntitySystem SubscribeLocalEvent(OnIsHotEvent); SubscribeLocalEvent(TurnOff); SubscribeLocalEvent(TurnOn); + + SubscribeLocalEvent(TurnOffonUnwielded); + SubscribeLocalEvent(TurnOnonWielded); } private void OnMapInit(EntityUid uid, EnergySwordComponent comp, MapInitEvent args) @@ -58,6 +63,9 @@ public sealed class EnergySwordSystem : EntitySystem args.Handled = true; + if (TryComp(uid, out var wieldableComp)) + return; + if (comp.Activated) { var ev = new EnergySwordDeactivatedEvent(); @@ -72,6 +80,20 @@ public sealed class EnergySwordSystem : EntitySystem UpdateAppearance(uid, comp); } + private void TurnOffonUnwielded(EntityUid uid, EnergySwordComponent comp, ItemUnwieldedEvent args) + { + var ev = new EnergySwordDeactivatedEvent(); + RaiseLocalEvent(uid, ref ev); + UpdateAppearance(uid, comp); + } + + private void TurnOnonWielded(EntityUid uid, EnergySwordComponent comp, ref ItemWieldedEvent args) + { + var ev = new EnergySwordActivatedEvent(); + RaiseLocalEvent(uid, ref ev); + UpdateAppearance(uid, comp); + } + private void TurnOff(EntityUid uid, EnergySwordComponent comp, ref EnergySwordDeactivatedEvent args) { if (TryComp(uid, out ItemComponent? item)) diff --git a/Resources/Locale/en-US/store/uplink-catalog.ftl b/Resources/Locale/en-US/store/uplink-catalog.ftl index 914e23187f..89b001afd2 100644 --- a/Resources/Locale/en-US/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/store/uplink-catalog.ftl @@ -14,6 +14,9 @@ uplink-rifle-mosin-desc = A bolt action service rifle that has seen many wars. N uplink-esword-name = Energy Sword uplink-esword-desc = A very dangerous energy sword that can reflect shots. Can be stored in pockets when turned off. Makes a lot of noise when used or turned on. +uplink-esword-double-name = Double Bladed Energy Sword +uplink-esword-double-desc = A much more expensive counter part to the normal energy sword: with a much higher reflection chance, larger attack angle, higher structural damage, and faster swing, all at the cost of lower heat and slash damage. Makes a lot of noise when used or turned on. + uplink-edagger-name = Energy Dagger uplink-edagger-desc = A small energy blade conveniently disguised in the form of a pen. diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 54b55fdd16..1a2841e41f 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -85,6 +85,17 @@ categories: - UplinkWeapons +- type: listing + id: UplinkEswordDouble + name: uplink-esword-double-name + description: uplink-esword-double-desc + icon: { sprite: /Textures/Objects/Weapons/Melee/e_sword_double.rsi, state: icon } + productEntity: EnergySwordDouble + cost: + Telecrystal: 16 + categories: + - UplinkWeapons + # Explosives - type: listing diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml index b1d0566978..a2fefa39fd 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml @@ -161,3 +161,46 @@ - type: Item size: 5 sprite: Objects/Weapons/Melee/e_cutlass.rsi + +- type: entity + name: Double Bladed Energy Sword + parent: EnergySword + id: EnergySwordDouble + description: Syndicate Command Interns thought that having one blade on the energy sword was not enough. This can be stored in pockets. + components: + - type: Wieldable + wieldTime: 0 + - type: EnergySword + litDamageBonus: + types: + Slash: 9 + Heat: 9 + Structural: 20 + Blunt: -4.5 + litDisarmMalus: 0.7 + - type: MeleeWeapon + attackRate: 1.6 + angle: 100 + heavyWindupModifier: .9 + heavyDamageModifier: 1.5 + soundHit: + path: /Audio/Weapons/eblade1.ogg + damage: + types: + Blunt: 4.5 + - type: Sprite + sprite: Objects/Weapons/Melee/e_sword_double.rsi + layers: + - state: e_sword_double + - state: e_sword_double_blade + color: "#FFFFFF" + visible: false + shader: unshaded + map: [ "blade" ] + - type: Item + size: 10 + sprite: Objects/Weapons/Melee/e_sword_double.rsi + - type: Reflect + enabled: true + reflectProb: .75 + spread: 75 diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd3bb9ace240d3fec0f3f1c84f93381e6e63098 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvp#Yx{*8>L*$jHdJxw)B`m`F=Y zCnO{sw`2$g$}*M&`2{mLJiCzwmm;Z28|A;$MTNR$AFp{JYD@<);T3K0RTG0C&vH) literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double_blade.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double_blade.png new file mode 100644 index 0000000000000000000000000000000000000000..9c19655cd432ab094929111268992fd01ef3bf77 GIT binary patch literal 813 zcmV+|1JeA7P)-`gByp z-2czh)@G)??x6(G{pz}(<3Mm9s8wC}_tbT3XF%WuxHg;q63uDuoAhc^iyQ;t9pLh& zsVN7*)h;mnY{^`%O95JbO#?nIfc_jXa1ZpZd$Vfnw5|Ix8={n09z;l7)%>e!#F93k5Kn=ca+tY8<9zhGf?>hiI02}}g z6@gK>ioguqd%sp-77i?21Fyh=g}WgB=@cAL*aadIM&T*~Nn!*JC>=!Jdp81CuedPp z`Uj=?EW5iPop2)ZNf#)O*SNnq0^21^g7S zf&+lFgadzz&op;8fF~_@UDtG7N87dr z;1sxbv4HP<3XiEpN8mdjh9L38cJav;>SmG<+^tQmQHm_X5S> r*8&fRPX&s=;rAnyQgDE(Bpl!e1&0s?{ZN&700000NkvXXu0mjfU=WAa literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left-blade.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left-blade.png new file mode 100644 index 0000000000000000000000000000000000000000..96d2136fcee81af9b021fb3144b10847b3de644a GIT binary patch literal 694 zcmV;n0!jUeP)Px%a7jc#RCt{2-NBB6Fc5&@lK3immWxlrm?zC=p+bP2TB^(wt zQ`^$1ad4dj0000000000N7uD(z#h!=?B(Bm-<$QzDF$F1N3We9hM}A1+28N?m-EZA zIOl8z!ejvA85UU0v~^w8_|r5!2SJ_>1JZTfF$TbUuXez)EUxeSPMe{_FcfQBD*m=@ z?smKVh!Y0HVuD;`K&fQ#a7k-1#&PtI$D>pz)wXTw`DvQe^QJjKTLYc5x%`~_ULLO3 zYt{I<98fAoik#fqz;^MIa!;-ybp>ck!zYrIDgT9T7n+ie}`GE)HrHIOSa>Sxs?~m@Hka)hB9gW(aIO5OJBL ztR$;F7@;3znWU^K4VBcT<91qYW(eG(JTO&BW>KpePe$1WxV?L~Be*sbn5*i>eVb$R+b_+g{$c=@p>uwk+~Yi{(fzz42!YIq5F7 z8)m4|wa5XolXH2{{FA2q`zUw800000000000001>ImMUat*Y~W!~Dm)_g0s4 zSo1vla7Y#v&*M1ybzPr_w63eSu7J)teQjoI)hgp!bh;FGda$R?cW&oN*rGnawQR%o zlsu1mv&fGnDEDjMwdKmXPeI$Ugrj!suycubEaBMG&ZVT}|4(u59QWzAw!1g=DajK6 c008)4U+Y5bGX#XK`Tzg`07*qoM6N<$f>`}Y*Z=?k literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..2f06869cd1aae35826369f58f0b6a0406f2455f0 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|K6|=2hE&XX zd+Q)?vjIPx%j7da6RCt{2+d*=|AQZ;&$Bb9ewQM|1j>l=T!F6&Nx^QS;@uk)=K%)QOjGNjT z0=z)S4-o(W00000008jrT<->aiWp-mf9Ab+n;3u)!d>G;M22D5MEhQmJN|q=-@SLe zUT+m(jgH7|gsQeqZk>O*T+H`Qr_=5SAf=Q~5`QW{GOBJwoBTC+TH;!Y?ON)reQiX*OQtd%_^b|S#=a*i!RADj3!T%s2&owG^+qBpSk4|Ft04g&-|_V=9;^K{8=qK zyXRsq@-yi~9xvujupM`roCX|l_iL_nJt?NHp%n#NXt!EE3Y>n=8y_n|%AvLcZ zLP)yP%f2j6}Et1b6gfval_e-0mDfLJ~TdK~2 zJ!Ld|sd_%3N2hCLr)OK~e32b2!mV=py*zBxmKM*w2Zb%>BWUTYRttZf)%pn5jwQcp zUpwzy${kC7ZDr@OCbOhJ@w{#?o4lbtES>-W0KkrY0Z?Y#ECd+mKL7v#07*qoM6N<$ Ef~NCO2mk;8 literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..ebaeb95b413585f29f10de4f483bedba356a9736 GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zSv*}FLn`LH zy>&46h=M@t!e)yKKLx9`3%=9L@9pW>FxAZzwMRn=Q`w_dQ{IENQ(Is-%8WBc;B z`)T6a)8!NE)6T2;23P-?DY4jN`Ls&Sr`M|0YW_TZHf564bC)IOc|P1*z3SAq+{fFV zpI;IBe($q6$7>kVKi-S~&B~*=G$l{VOny?AVOO!=wA7cj%M2rJ)vh18w6OEAo}?5* afndB`UeXuyX09C|i#=WaT-G@yGywpTL5v>& literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/meta.json b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/meta.json new file mode 100644 index 0000000000..d7ae4a0ad3 --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/meta.json @@ -0,0 +1,86 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "e_sword_double" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "wielded-inhand-left", + "directions": 4 + }, + { + "name": "wielded-inhand-right", + "directions": 4 + }, + { + "name": "e_sword_double_blade", + "delays": [ + [ + 0.1, + 0.1 + ] + ] + }, + { + "name": "inhand-left-blade", + "directions": 4, + "delays": [ + [ + 0.1, + 0.1 + ], + [ + 0.1, + 0.1 + ], + [ + 0.1, + 0.1 + ], + [ + 0.1, + 0.1 + ] + ] + }, + { + "name": "inhand-right-blade", + "directions": 4, + "delays": [ + [ + 0.1, + 0.1 + ], + [ + 0.1, + 0.1 + ], + [ + 0.1, + 0.1 + ], + [ + 0.1, + 0.1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..0160cafd5d512663c027b8047be3827af6020248 GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zSv*}FLn`LH zy>+&?*+8J};Y~fAY^?`xq?Ykbca!Z9vIu6}bm!=slY%EFi3XMl2i$Xi)FAlS(0=)O zC7?+_aKQa%)i#H7H@!85lBWc9@f72h4eG1C6R`E!q)`Be1aX>DV<`-AA>>Ed6vZPi))anhrG zMwj%G^UqdayX>dcGU4>mPUZRcBvUt^vwZpcpLV@7(2AI&ys>2!wqJv-FM_P~boFyt I=akR{0QaAXmjD0& literal 0 HcmV?d00001