From 1c7a09b7363d4c1a46db30442793a8f17df4140d Mon Sep 17 00:00:00 2001 From: EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com> Date: Thu, 23 Jun 2022 21:27:28 -0400 Subject: [PATCH] Fire Axe [New syndie item] (#9088) --- .../Components/IgniteOnMeleeHitComponent.cs | 8 +++++ .../Atmos/EntitySystems/FlammableSystem.cs | 15 ++++++++ .../Prototypes/Catalog/uplink_catalog.yml | 8 +++++ .../Objects/Weapons/Melee/fireaxe.yml | 20 ++++++++++- .../fireaxeflaming.rsi/equipped-BACKPACK.png | Bin 0 -> 768 bytes .../Weapons/Melee/fireaxeflaming.rsi/icon.png | Bin 0 -> 334 bytes .../Melee/fireaxeflaming.rsi/inhand-left.png | Bin 0 -> 503 bytes .../Melee/fireaxeflaming.rsi/inhand-right.png | Bin 0 -> 512 bytes .../Melee/fireaxeflaming.rsi/meta.json | 34 ++++++++++++++++++ .../wielded-inhand-left.png | Bin 0 -> 508 bytes .../wielded-inhand-right.png | Bin 0 -> 537 bytes 11 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 Content.Server/Atmos/Components/IgniteOnMeleeHitComponent.cs create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/equipped-BACKPACK.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/icon.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/meta.json create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-left.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-right.png diff --git a/Content.Server/Atmos/Components/IgniteOnMeleeHitComponent.cs b/Content.Server/Atmos/Components/IgniteOnMeleeHitComponent.cs new file mode 100644 index 0000000000..f2f59b3be4 --- /dev/null +++ b/Content.Server/Atmos/Components/IgniteOnMeleeHitComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Server.Atmos.Components; + +[RegisterComponent] +public sealed class IgniteOnMeleeHitComponent : Component +{ + [DataField("fireStacks")] + public float FireStacks { get; set; } +} diff --git a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs index cea9cf7051..f1e0a6cd14 100644 --- a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs +++ b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Atmos.Components; using Content.Server.Stunnable; using Content.Server.Temperature.Components; using Content.Server.Temperature.Systems; +using Content.Server.Weapon.Melee; using Content.Shared.ActionBlocker; using Content.Shared.Alert; using Content.Shared.Atmos; @@ -46,6 +47,20 @@ namespace Content.Server.Atmos.EntitySystems SubscribeLocalEvent(OnIsHotEvent); SubscribeLocalEvent(OnTileFireEvent); SubscribeLocalEvent(IgniteOnCollide); + SubscribeLocalEvent(OnMeleeHit); + } + + private void OnMeleeHit(EntityUid uid, IgniteOnMeleeHitComponent component, MeleeHitEvent args) + { + foreach (var entity in args.HitEntities) + { + if (!TryComp(entity, out var flammable)) + continue; + + flammable.FireStacks += component.FireStacks; + Ignite(entity, flammable); + } + } private void IgniteOnCollide(EntityUid uid, IgniteOnCollideComponent component, StartCollideEvent args) diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 9ead4afbdb..5080ce095d 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -64,6 +64,14 @@ description: A small energy blade conveniently disguised in the form of a pen. price: 2 +- type: uplinkListing + id: UplinkFireAxeFlaming + category: Weapons + itemId: FireAxeFlaming + listingName: Fire Axe + description: A classic-style weapon infused with advanced atmos technology to allow it to set targets on fire. + price: 9 + # Explosives - type: uplinkListing diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml index e9237a5860..668d6efc9a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml @@ -32,4 +32,22 @@ - type: Tool qualities: - Prying - - type: TilePrying \ No newline at end of file + - type: TilePrying + +- type: entity + id: FireAxeFlaming + name: fire axe + parent: FireAxe + description: Why fight fire with an axe when you can fight with fire and axe? + components: + - type: IgniteOnMeleeHit + fireStacks: 2 + - type: Sprite + sprite: Objects/Weapons/Melee/fireaxeflaming.rsi + state: icon + - type: Clothing + size: 20 + sprite: Objects/Weapons/Melee/fireaxeflaming.rsi + quickEquip: false + Slots: + - back \ No newline at end of file diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/equipped-BACKPACK.png b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/equipped-BACKPACK.png new file mode 100644 index 0000000000000000000000000000000000000000..c4a05dd80e7eb5dc92d1099b28a04135514a85cf GIT binary patch literal 768 zcmV+b1ONPqP)Px%x=BPqRCt{2nlWn|K@f$Xk~pyua^xn3D_;=^&Ob1yQ6o?jgAju2gyX`M>XmBA zwVR|cMpX(U0!m|0BS_=lpkfO{j0!ilC5$BtGbxfaClgzDw|jdMnXi>@_s!ec-Q#8e zhG7_nd6w&5f#TK>6u+8Z`1#YYf3Z*|T=xnz>|dB2^t_v)MKIyISD^E5CK{ddZh{aZ zy5MJVSkBU6IUDKZ&&?r(pklEYcz$1JfFD+umrM;clgB0qAxKJzR;!f=I+hUw+LgSO zwA*cV6RXQhSY2Mi@m`Jqz2E^L)I(l6)e_y_3^BgDN9k)vdptjQ4gc0ph7KOk%z#d{ z^dKb4;H&AasSMjbI7zG|Q&>r+@cF%75{G`;8~pacN#rX}j!Vi2a$NfP<=4Y+I$JQ5 z0qshjZf}OTy%{3cIJT1Z08n4s068wzF3<2|{c37%btVKQumQ(=IU3*HV|;gSW#s{& zadn!gU7i5|RPdkrX#kiqAH@?@svbj literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/icon.png b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..58e2f14942656a01fa6681f72aa4b1902b538631 GIT binary patch literal 334 zcmV-U0kQsxP)Px$2uVaiR9J=Wld%edKpe(D#Wk>{AsSqL1MvxtCT9cN+TFtDT6+ZHzz1mS3Bpwn zq;P162A6{NuBFVuD>+b?`%NeR55Mm|{s%}Tk_v%tv#veWKF!Mjfo`+)(CEYe+dyBa zecm3ZX&}&T*5y8E)sIgTtJ@i-X$pl17th98%Red_Z|FFVh(C4(u$-S7X=8wK1LS!w z6aWAo*W%}VFdmg>Zh$mRh0Mdn6PM(-W>N{k4UlD-A`-yz|7+qc7?Og&1Mg*IoBKg1 z#6K+mSpHW%PmNm9dT79P-PWI@MhL+S``Td?MIeMQ&+}So0sufMWjrXQtv8^2Levdg gy}3jpkx1UW0Copq4=@Y+lmGw#07*qoM6N<$f;kF{cK`qY literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..420ab540384e1ef1bf8b6b878bf21556b0366b72 GIT binary patch literal 503 zcmVPx$u}MThRCt{2+A(gzFcb#h-`%Ui(xGBVC5B$1NC=6MwaQXXz!3s7aFR?>ufT%D z89HRhfEZYy;sCD$O%#a%YUk0K{NF^79PB6CLGcd|5fKp))sm^=CgVm&^3SvVs*-zp zW8CP7Jikl12tK)UX*_OpWZDcW>dN1+F2F4e957y(dL z!Z7q|8L0aDd~+&>Yx{GYmcTjdMOOg(LFDc7`)E+#sMd?F+&?`603KdGF8;lI@Q2M7 zt^QK2pQx%`Adi0iq}p8TByPWyN>dASh0hFQuJDP$@v(xin2N+pkQXBZ%V| z<1;ji`>)MlGS t_}_mef5|3`a5FOiaLXbP5fM@Sd;=!A)0+4_NF)FN002ovPDHLkV1fVy+{FL@ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..b9ef6c0e9ae614669f1c33bc0158447b81a5815a GIT binary patch literal 512 zcmV+b0{{JqP)Px$x=BPqRCt{2+A(gzFcb#h-&NPDuym*xQi-8g00|*6vQ}Bj2{=Mv22PSG>J?a! za)u5WG9U&PQgMLSDN#s)lG;!l{%-<=gWtm@68-@qA|fK9o21GP7}eU6KAt9F>G72? zsT6SlNX8GH>=gPXHi_ zA_PgO;=UsQ;QKz5Qda&To;>ND;)6f|$i8)3iw8=sfPC?Q-G!Itx~`RbT+7$zoApKi zR>Q%&KssjS{V7y?_8MytFj2DGXs~(AZQ+(7XfK@ems;i_CZGjJ6d zg(_qQ@=9%iDr5$VPTs3k$_(U{S^-rno`{HuZre8)aoXVd2V@NZ0000Px$wn;=mRCt{2+A&YUKoke?!??J?t_e+;(7~C6nD`aQIrNiwbR)qI@HrghJFu8I zJ1AkeL~|hwEJ_$0pNoaFy=y6Q6v_XWFmUbNd+*wtUKs-b000000DyM6K}F}_!di8; z%MBvWKgbOr&nMF+92JqwJ~3{6XR0KUkgg@p2c)#3}72ileLzVtLJ9RM<08rRIRZ}`k!{WLEWF5 zFHWA>>u6MpPvD#{0}cj*#Pwav%ICaZrGeq|MdbNJo=-|C z3Nl`weHRFksHxNI+iU9d`Xr?!DdoQ}J`xDAtSPm40000000000004lbqB_W~;^yiO z>z$)rav67{_IT;-zL1ufi@5kcV3SE%EoYZZZSlV_w#QBMbEvnWqh!J`baE`>=RbPx$(@8`@RCt{2+A&YUKoke?hta{o2#Y4h5V{d`aFv9__!USU82uKd8%f0kK8J(E zuRvlCBFYUAR;3B{fW*#Znc^9Y?+;5vG&*R=%Ls1%?-*+72C4dbzNqo z#%$EsbzN?>+RDeV(Q5nV+7Vx$RIx3Kg%B)+(B8b%XthUkm*VCD00000000000ASgL z=>n%IcP`CQCs$ZVpFc`&>;=d?UM!?t6*U*<1L9gp)h!pS&gc31obvg6Y(z8gA^00000NkvXXu0mjf$A$Ux literal 0 HcmV?d00001