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 0000000000..dfd3bb9ace Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double.png differ 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 0000000000..9c19655cd4 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/e_sword_double_blade.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/icon.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/icon.png new file mode 100644 index 0000000000..74d2e95a5b Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/icon.png differ 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 0000000000..96d2136fce Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left-blade.png differ 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 0000000000..2f06869cd1 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right-blade.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right-blade.png new file mode 100644 index 0000000000..18b785e11c Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right-blade.png differ 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 0000000000..ebaeb95b41 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/inhand-right.png differ 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 0000000000..0160cafd5d Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-right.png new file mode 100644 index 0000000000..727fa419de Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/e_sword_double.rsi/wielded-inhand-right.png differ