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 0000000000..c4a05dd80e Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/equipped-BACKPACK.png differ 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 0000000000..58e2f14942 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/icon.png differ 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 0000000000..420ab54038 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-left.png differ 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 0000000000..b9ef6c0e9a Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/meta.json b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/meta.json new file mode 100644 index 0000000000..6432748b6f --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/meta.json @@ -0,0 +1,34 @@ +{ + "version": 1, + "license": "CC-BY-NC-SA-3.0", + "copyright": "Taken and modified by Taral from goonstation at commit https://github.com/goonstation/goonstation/pull/2816/commits/b99c5dff45a6527bbf698bc00f7d24b8ca75a806 and then further modified by EmoGarbage404", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "wielded-inhand-left", + "directions": 4 + }, + { + "name": "wielded-inhand-right", + "directions": 4 + }, + { + "name": "equipped-BACKPACK", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-left.png new file mode 100644 index 0000000000..c40ba4c065 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-right.png new file mode 100644 index 0000000000..7775de7e60 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/fireaxeflaming.rsi/wielded-inhand-right.png differ