-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* Закинул прототипы, переводы для следователя СБ * Update meta.json * закинул мету нормально * закинул спрайты * закинул спрайты * Fix RSI Linter * Add component * опять спрайты * опять спрайты * оопяппяяять спрайты * id card * add sprite * FIX RSI LINTER * FIX * add ftl * add markers job.rsi * add Audio * add play time trakers * fix
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
using Content.Shared.Damage.Components; | ||
using Content.Shared.Damage.Events; | ||
using Content.Shared.Examine; | ||
using Content.Shared.Interaction.Events; | ||
using Content.Shared.Item; | ||
using Content.Shared.ADT.SwitchableWeapon; | ||
Check failure on line 6 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / YAML Linter
Check failure on line 6 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 6 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / Test Packaging
Check failure on line 6 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
|
||
using Content.Shared.Toggleable; | ||
using Content.Shared.Weapons.Melee.Events; | ||
using Robust.Shared.Audio.Systems; | ||
|
||
namespace Content.Server.ADT.SwitchableWeapon; | ||
|
||
public sealed class SwitchableWeaponSystem : EntitySystem | ||
Check failure on line 13 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / YAML Linter
Check failure on line 13 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 13 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / Test Packaging
|
||
{ | ||
[Dependency] private readonly SharedItemSystem _item = default!; | ||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!; | ||
[Dependency] private readonly SharedAudioSystem _audio = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<SwitchableWeaponComponent, UseInHandEvent>(Toggle); | ||
SubscribeLocalEvent<SwitchableWeaponComponent, ExaminedEvent>(OnExamined); | ||
SubscribeLocalEvent<SwitchableWeaponComponent, StaminaDamageOnHitAttemptEvent>(OnStaminaHitAttempt); | ||
SubscribeLocalEvent<SwitchableWeaponComponent, GetMeleeDamageEvent>(OnGetMeleeDamage); | ||
SubscribeLocalEvent<SwitchableWeaponComponent, ComponentAdd>(OnComponentAdded); | ||
} | ||
|
||
private void OnComponentAdded(EntityUid uid, SwitchableWeaponComponent component, ComponentAdd args) | ||
Check failure on line 30 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / YAML Linter
Check failure on line 30 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 30 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / Test Packaging
Check failure on line 30 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
|
||
{ | ||
UpdateState(uid, component); | ||
} | ||
|
||
//Non-stamina damage | ||
private void OnGetMeleeDamage(EntityUid uid, SwitchableWeaponComponent component, ref GetMeleeDamageEvent args) | ||
Check failure on line 36 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / YAML Linter
Check failure on line 36 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 36 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / Test Packaging
Check failure on line 36 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
|
||
{ | ||
args.Damage = component.IsOpen ? component.DamageOpen : component.DamageFolded; | ||
} | ||
|
||
private void OnStaminaHitAttempt(EntityUid uid, SwitchableWeaponComponent component, ref StaminaDamageOnHitAttemptEvent args) | ||
Check failure on line 41 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / YAML Linter
Check failure on line 41 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 41 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / Test Packaging
Check failure on line 41 in Content.Server/ADT/SwitchableWeapon/SwitchableWeaponSystem.cs GitHub Actions / build (ubuntu-latest)
|
||
{ | ||
if (!component.IsOpen) | ||
return; | ||
|
||
//args.HitSoundOverride = component.BonkSound; | ||
} | ||
|
||
private void OnExamined(EntityUid uid, SwitchableWeaponComponent comp, ExaminedEvent args) | ||
{ | ||
var msg = comp.IsOpen | ||
? Loc.GetString("comp-switchable-examined-on") | ||
: Loc.GetString("comp-switchable-examined-off"); | ||
args.PushMarkup(msg); | ||
} | ||
|
||
private void UpdateState(EntityUid uid, SwitchableWeaponComponent comp) | ||
{ | ||
if (TryComp<ItemComponent>(comp.Owner, out var item)) | ||
{ | ||
_item.SetSize(item.Owner, comp.IsOpen ? comp.SizeOpened : comp.SizeClosed, item); | ||
_item.SetHeldPrefix(comp.Owner, comp.IsOpen ? "on" : "off", false, item); | ||
} | ||
|
||
if (TryComp<AppearanceComponent>(comp.Owner, out var appearance)) | ||
_appearance.SetData(comp.Owner, ToggleVisuals.Toggled, comp.IsOpen, appearance); | ||
|
||
// Change stamina damage according to state | ||
if (TryComp<StaminaDamageOnHitComponent>(uid, out var stamComp)) | ||
{ | ||
stamComp.Damage = comp.IsOpen ? comp.StaminaDamageOpen : comp.StaminaDamageFolded; | ||
} | ||
} | ||
|
||
private void Toggle(EntityUid uid, SwitchableWeaponComponent comp, UseInHandEvent args) | ||
{ | ||
comp.IsOpen = !comp.IsOpen; | ||
UpdateState(uid, comp); | ||
|
||
var soundToPlay = comp.IsOpen ? comp.OpenSound : comp.CloseSound; | ||
_audio.PlayPvs(soundToPlay, args.User); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +0,0 @@ | ||
|
||
using Content.Shared.Damage; | ||
using Content.Shared.Item; | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.ADT.SwitchableWeapon; | ||
|
||
[RegisterComponent] | ||
public sealed partial class SwitchableWeaponComponent : Component | ||
{ | ||
[ViewVariables(VVAccess.ReadWrite)][DataField("damageFolded")] | ||
public DamageSpecifier DamageFolded = new(){ | ||
DamageDict = new() | ||
{ | ||
{ "Blunt", 0.0f }, | ||
} | ||
}; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("damageOpen")] | ||
public DamageSpecifier DamageOpen = new(){ | ||
DamageDict = new() | ||
{ | ||
{ "Blunt", 4.0f }, | ||
} | ||
}; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("staminaDamageFolded")] | ||
public float StaminaDamageFolded = 0; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("staminaDamageOpen")] | ||
public float StaminaDamageOpen = 28; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("isOpen")] | ||
public bool IsOpen = false; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("openSound")] | ||
public SoundSpecifier? OpenSound; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("closeSound")] | ||
public SoundSpecifier? CloseSound; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("bonkSound")] | ||
public SoundSpecifier? BonkSound; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("sizeOpened")] | ||
public ProtoId<ItemSizePrototype> SizeOpened = "Normal"; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)][DataField("sizeClosed")] | ||
public ProtoId<ItemSizePrototype> SizeClosed = "Normal"; | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ent-ADTClothingBeltInvestigatorHolster = кобура следователя СБ | ||
.desc = Кобура с табельным оружием следователя СБ - пистолетом с магазинами нелетальных и летальных патронов. | ||
.suffix = { "" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ent-ADTClothingHeadHatsInvestigatorCap = фуражка следователя Службы Безопасности | ||
.desc = Слава NanoTrasen! | ||
.suffix = { "" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ent-ADTClothingNeckSecBadge = жетон Службы Безопасности | ||
.desc = Позолоченный жетон с символикой Службы Безопасности и индивидуальным номером сотрудника. Предмет особой гордости среди офицеров. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ent-ADTClothingOuterCoatInvestigator = бушлат следователя Службы Безопасности | ||
.desc = Один вид этого бушлата повышает вероятность чистосердечного признания подозреваемого на 50%. | ||
.suffix = { "" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ent-ADTClothingUniformInvestigatorSuit = форма следователя Службы Безопасности | ||
.desc = Одежда для того, кто намерен докопаться до сути всех тайн. | ||
.suffix = { "" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ent-ADTInvestigatorPDA = КПК следователя СБ | ||
.desc = Пахнет как чернила и дело, закрытое предварительно из-за смерти подозреваемого от несчастного случая на рабочем месте. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
ent-ADTPathologistIDCard = ID карта патологоанатома | ||
.desc = { ent-IDCardStandard.desc } | ||
ent-ADTRoboticistIDCard = ID карта робототехника | ||
.desc = { ent-IDCardStandard.desc } | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ent-ADTtelescopicBaton = Телескопическая дубинка | ||
.desc = "Большая, опасная и выдвижная дубинка. Может храниться в карманах в сложенном состоянии." | ||
.suffix = { "" } | ||
ent-ADTtelescopicBatonBob = Телескопическая дубинка Боба | ||
.desc = "Эксклюзивная телескопическая дубинка, полностью из золота." | ||
.suffix = { "" } | ||
ent-ADTtelescopicBatonKon = Телескопическая дубинка Йохана | ||
.desc = "Непонятно, кровь это или цвет дубинки.." | ||
.suffix = { "" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
job-description-ADTPathologist = Осматривайте тела мёртвого экипажа, выявляйте причины их смерти и не забывайте клонировать трупы. | ||
job-description-roboticist = Собирайте боргов, мехов, обслуживайте синтетиков и поражайте (либо пугайте) экипаж своими новейшими разработками. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
job-name-ADTPathologist = Патологоанатом | ||
JobADTPathologist = Патологоанатом | ||
job-name-roboticist = робототехник | ||
JobRoboticist = робототехник | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#кобура следователя СБ | ||
|
||
- type: entity | ||
id: ADTClothingBeltInvestigatorHolster | ||
parent: ClothingBeltHolster | ||
suffix: Filled | ||
components: | ||
- type: StorageFill | ||
contents: | ||
- id: WeaponPistolMk58 | ||
- id: MagazinePistol |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +0,0 @@ | ||
- type: entity | ||
parent: ClothingHeadBase | ||
id: ADTClothingHeadUrsHat | ||
name: urs hat | ||
description: A futuristic looking striped hat from "STEP" clothing series. | ||
components: | ||
- type: Sprite | ||
sprite: Clothing/Head/Hats/urs_hat.rsi | ||
- type: Clothing | ||
sprite: Clothing/Head/Hats/urs_hat.rsi | ||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- type: entity | ||
parent: ClothingNeckBase | ||
id: ADTClothingNeckSecBadge | ||
name: sec badge | ||
description: sec badge | ||
components: | ||
- type: Sprite | ||
sprite: ADT/Clothing/Neck/secbadge.rsi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +0,0 @@ | ||
- type: entity | ||
parent: ClothingOuterStorageBase | ||
id: ADTClothingOuterCoatUrs | ||
name: Urs outercoat. | ||
description: Urs outercoat. | ||
components: | ||
- type: Sprite | ||
sprite: ADT/Clothing/OuterClothing/Coats/urs_coat.rsi | ||
- type: Clothing | ||
sprite: ADT/Clothing/OuterClothing/Coats/urs_coat.rsi | ||
- type: TemperatureProtection | ||
coefficient: 0.9 | ||
- type: Armor | ||
modifiers: | ||
coefficients: | ||
Slash: 0.95 | ||
Heat: 0.90 | ||
|
||
- type: entity | ||
parent: ClothingOuterStorageBase | ||
id: ADTClothingKadet | ||
name: kadet greatcoat | ||
description: a greatcoat made for recruits to the security service. It is very similar to the overcoat of the junior ranks of RIA | ||
components: | ||
- type: Sprite | ||
sprite: ADT/Clothing/OuterClothing/Coats/kadet_trenchcoat.rsi | ||
- type: Clothing | ||
sprite: ADT/Clothing/OuterClothing/Coats/kadet_trenchcoat.rsi | ||
- type: Armor | ||
modifiers: | ||
coefficients: | ||
Blunt: 0.8 | ||
Slash: 0.8 | ||
Piercing: 0.7 | ||
Heat: 0.85 | ||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#Комбинезон следователя | ||
|
||
- type: entity | ||
parent: ClothingUniformBase | ||
id: ADTClothingUniformInvestigatorSuit | ||
name: investigator suit | ||
description: The costume of the one who will get to the bottom of all the secrets. | ||
components: | ||
- type: Sprite | ||
sprite: ADT/Clothing/Uniforms/Jumpsuit/investigator_suit.rsi | ||
- type: Clothing | ||
sprite: ADT/Clothing/Uniforms/Jumpsuit/investigator_suit.rsi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- type: entity | ||
id: ADTSpawnPointJobBase | ||
parent: MarkerBase | ||
abstract: true | ||
suffix: Job Spawn ADT | ||
components: | ||
- type: SpawnPoint | ||
spawn_type: Job | ||
- type: Sprite | ||
sprite: ADT/Markers/job.rsi | ||
|
||
- type: entity | ||
id: ADTSpawnPointInvestigator | ||
parent: ADTSpawnPointJobBase | ||
name: Investigator | ||
components: | ||
- type: SpawnPoint | ||
job_id: ADTInvestigator | ||
- type: Sprite | ||
layers: | ||
- state: green | ||
- state: investigator |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# КПК Следователя | ||
|
||
- type: entity | ||
parent: BasePDA | ||
id: ADTInvestigatorPDA | ||
name: investigator PDA | ||
description: It smells like ink and the case is prematurely closed due to the death of a suspect at work. | ||
components: | ||
- type: Pda | ||
id: ADTInvestigatorIDCard | ||
state: pda-investigator | ||
- type: PdaBorderColor | ||
borderColor: "#774705" | ||
- type: Icon | ||
state: pda-investigator |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +0,0 @@ | ||
- type: entity | ||
parent: IDCardStandard | ||
id: MagistratIDCard | ||
name: magistrat ID card | ||
description: magistrat ID card | ||
components: | ||
- type: Sprite | ||
layers: | ||
- state: silver | ||
- state: idlawyer | ||
- type: PresetIdCard | ||
job: Magistrat | ||
|
||
- type: entity | ||
parent: IDCardStandard | ||
id: ADTPathologistIDCard | ||
name: pathologist's ID card | ||
components: | ||
- type: Sprite | ||
sprite: ADT/Objects/Misc/id_cards.rsi | ||
layers: | ||
- state: default | ||
- state: id-pathologist | ||
- type: PresetIdCard | ||
job: ADTPathologist | ||
|
||
- type: entity | ||
parent: IDCardStandard | ||
id: ADTRoboticistIDCard | ||
name: roboticist ID card | ||
components: | ||
- type: Sprite | ||
layers: | ||
- state: default | ||
- state: idroboticist | ||
- type: PresetIdCard | ||
job: ADTRoboticist | ||