forked from space-syndicate/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
161c75f
commit 2a440cc
Showing
18 changed files
with
210 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Content.Shared/_CorvaxNext/TelescopicBaton/Components/TelescopicBatonComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Content.Shared._CorvaxNext.TelescopicBaton; | ||
|
||
[RegisterComponent] | ||
public sealed partial class TelescopicBatonComponent : Component | ||
{ | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
Content.Shared/_CorvaxNext/TelescopicBaton/Systems/TelescopicBatonSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using Content.Shared.Damage.Events; | ||
using Content.Shared.Examine; | ||
using Content.Shared.Item; | ||
using Content.Shared.Standing; | ||
using Content.Shared.Item.ItemToggle; | ||
using Content.Shared.Item.ItemToggle.Components; | ||
using Content.Shared.Stunnable; | ||
|
||
namespace Content.Shared._CorvaxNext.TelescopicBaton; | ||
|
||
public sealed class TelescopicBatonSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedItemSystem _item = default!; | ||
[Dependency] private readonly SharedStunSystem _stun = default!; | ||
[Dependency] private readonly ItemToggleSystem _itemToggle = default!; | ||
[Dependency] private readonly StandingStateSystem _standing = default!; | ||
// [Dependency] private readonly SharedLayingDownSystem _layingDown = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TelescopicBatonComponent, ExaminedEvent>(OnExamined); | ||
SubscribeLocalEvent<TelescopicBatonComponent, StaminaDamageOnHitAttemptEvent>(OnStaminaHitAttempt); | ||
SubscribeLocalEvent<TelescopicBatonComponent, ItemToggledEvent>(ToggleDone); | ||
SubscribeLocalEvent<TelescopicBatonComponent, StaminaMeleeHitEvent>(OnHit); | ||
} | ||
|
||
private void OnHit(Entity<TelescopicBatonComponent> ent, ref StaminaMeleeHitEvent args) | ||
{ | ||
/* foreach (var (uid, _) in args.HitList) | ||
{ | ||
if (TryComp<LayingDownComponent>(uid, out var layingDownComponent)) | ||
{ | ||
_layingDown.TryLieDown(uid, layingDownComponent, null, DropHeldItemsBehavior.NoDrop); | ||
} | ||
}*/ | ||
} | ||
|
||
private void OnStaminaHitAttempt(Entity<TelescopicBatonComponent> entity, ref StaminaDamageOnHitAttemptEvent args) | ||
{ | ||
if (!_itemToggle.IsActivated(entity.Owner)) | ||
args.Cancelled = true; | ||
} | ||
|
||
private void OnExamined(Entity<TelescopicBatonComponent> entity, ref ExaminedEvent args) | ||
{ | ||
var onMsg = _itemToggle.IsActivated(entity.Owner) | ||
? Loc.GetString("comp-telescopicbaton-examined-on") | ||
: Loc.GetString("comp-telescopicbaton-examined-off"); | ||
args.PushMarkup(onMsg); | ||
} | ||
|
||
private void ToggleDone(Entity<TelescopicBatonComponent> entity, ref ItemToggledEvent args) | ||
{ | ||
_item.SetHeldPrefix(entity.Owner, args.Activated ? "on" : "off"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
loadout-group-self-defence-devices = Self defence devices |
1 change: 1 addition & 0 deletions
1
Resources/Locale/en-US/_corvaxnext/objectives/conditions/steal-target-groups.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
steal-target-groups-telescopic-baton = telescopic baton |
5 changes: 5 additions & 0 deletions
5
.../en-US/ss14-ru/prototypes/_corvaxnext/entities/objects/weapons/melee/telescopic_baton.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ent-TelescopicBaton = telescopic baton | ||
.desc = A compact yet reliable personal defense weapon. | ||
comp-telescopicbaton-examined-on = The baton is extended. | ||
comp-telescopicbaton-examined-off = The baton is collapsed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
loadout-group-self-defence-devices = Средства самообороны |
1 change: 1 addition & 0 deletions
1
Resources/Locale/ru-RU/_corvaxnext/objectives/conditions/steal-target-groups.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
steal-target-groups-telescopic-baton = телескопическая дубинка |
5 changes: 5 additions & 0 deletions
5
.../ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/weapons/melee/telescopic_baton.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ent-TelescopicBaton = телескопическая дубинка | ||
.desc = Компактное, но надежное оружие личной обороны. | ||
comp-telescopicbaton-examined-on = Дубинка разложена. | ||
comp-telescopicbaton-examined-off = Дубинка сложена. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
Resources/Prototypes/_CorvaxNext/Entities/Objects/Weapons/telescopic_baton.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
- type: entity | ||
parent: BaseItem | ||
id: TelescopicBaton | ||
name: telescopic baton | ||
description: A compact yet robust personal defense weapon. | ||
components: | ||
- type: TelescopicBaton | ||
- type: Sprite | ||
sprite: _CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi | ||
layers: | ||
- state: telescopic_baton_off | ||
map: [ "enum.ToggleVisuals.Layer" ] | ||
- type: ItemToggleSize | ||
activatedSize: Large | ||
activatedShape: | ||
- 0, 0, 3, 0 | ||
- type: ItemToggle | ||
soundActivate: | ||
path: /Audio/Weapons/telescopicon.ogg | ||
params: | ||
volume: -5 | ||
soundDeactivate: | ||
path: /Audio/Weapons/telescopicoff.ogg | ||
params: | ||
volume: -5 | ||
- type: Appearance | ||
- type: GenericVisualizer | ||
visuals: | ||
enum.ToggleVisuals.Toggled: | ||
enum.ToggleVisuals.Layer: | ||
True: {state: telescopic_baton_on} | ||
False: {state: telescopic_baton_off} | ||
- type: ToggleableLightVisuals | ||
spriteLayer: blade | ||
inhandVisuals: | ||
left: | ||
- state: on-inhand-left | ||
right: | ||
- state: on-inhand-right | ||
- type: DisarmMalus | ||
malus: 0.225 | ||
- type: MeleeWeapon | ||
angle: 0 | ||
attackRate: 1.2 | ||
wideAnimationRotation: -135 | ||
damage: | ||
types: | ||
Blunt: 0 | ||
bluntStaminaDamageFactor: 0.0 | ||
- type: ItemToggleMeleeWeapon | ||
activatedDamage: | ||
types: | ||
Blunt: 1.5 | ||
deactivatedSecret: true | ||
- type: StaminaDamageOnHit | ||
damage: 16 | ||
sound: /Audio/Weapons/boxingpunch1.ogg | ||
- type: UseDelay | ||
delay: 0.4 | ||
- type: Item | ||
heldPrefix: on- | ||
sprite: _CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi | ||
size: Small | ||
storedRotation: 44 | ||
shape: | ||
- 0, 0, 1, 0 | ||
- type: Clothing | ||
quickEquip: false | ||
slots: | ||
- Belt | ||
- type: StaticPrice | ||
price: 350 |
11 changes: 11 additions & 0 deletions
11
Resources/Prototypes/_CorvaxNext/Loadouts/Miscellaneous/SelfDefenceDevices.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- type: loadout | ||
id: TelescopicBaton | ||
storage: | ||
back: | ||
- TelescopicBaton | ||
|
||
- type: loadout | ||
id: Flash | ||
storage: | ||
back: | ||
- Flash |
10 changes: 10 additions & 0 deletions
10
Resources/Prototypes/_CorvaxNext/Loadouts/loadout_groups.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Resources/Prototypes/_CorvaxNext/Objectives/stealTargetGroups.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- type: stealTargetGroup | ||
id: TelescopicBaton | ||
name: steal-target-groups-telescopic-baton | ||
sprite: | ||
sprite: _CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi | ||
state: telescopic_baton_on |
25 changes: 25 additions & 0 deletions
25
Resources/Textures/_CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi/meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"version": 1, | ||
"license": "CC-BY-SA-3.0", | ||
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/4397d63a55dac7d0536eb9bcc0a0f68634858c50 | Edited by PuroSlavKing (Github)", | ||
"size": { | ||
"x": 32, | ||
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "telescopic_baton_off" | ||
}, | ||
{ | ||
"name": "telescopic_baton_on" | ||
}, | ||
{ | ||
"name": "on-inhand-left", | ||
"directions": 4 | ||
}, | ||
{ | ||
"name": "on-inhand-right", | ||
"directions": 4 | ||
} | ||
] | ||
} |
Binary file added
BIN
+356 Bytes
...tures/_CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi/on-inhand-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+366 Bytes
...ures/_CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi/on-inhand-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+202 Bytes
..._CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi/telescopic_baton_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+252 Bytes
.../_CorvaxNext/Objects/Weapons/Melee/telescopic_baton.rsi/telescopic_baton_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.