Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into lockers
  • Loading branch information
ITamiokiI committed Dec 6, 2024
2 parents 7b28a80 + 5c6b83b commit 57842b5
Show file tree
Hide file tree
Showing 138 changed files with 170,842 additions and 540 deletions.
1 change: 1 addition & 0 deletions Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public sealed class PostMapInitTest
"Cog",
// ADT-Start
"ADT_FrontierHalloween",
"ADT_FrontierNewYear",
"ADT_Frontier",
"ADT_TrainHalloween",
"ADT_SalternHalloween",
Expand Down
1 change: 0 additions & 1 deletion Content.Server/ADT/DNALocker/Systems/DNALockerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public void ExplodeEntity(EntityUid uid, DNALockerComponent component, EntityUid

private void OnEquip(EntityUid uid, DNALockerComponent component, GotEquippedEvent args)
{
Log.Debug($"{args.Slot}");
if (!component.IsLocked)
{
LockEntity(uid, component, args.Equipee);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Content.Server.ADT.Eye.Blinding;

[RegisterComponent]
[Access(typeof(DamageEyesOnFlashSystem))]
public sealed partial class DamageEyesOnFlashedComponent : Component
{
[DataField]
public int FlashDamage = 1;

public TimeSpan NextDamage = TimeSpan.Zero;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Server.ADT.Eye.Blinding;

[RegisterComponent]
public sealed partial class NoEyeDamageOnFlashComponent : Component
{
}
4 changes: 4 additions & 0 deletions Content.Server/ADT/Eye/Blinding/FlashedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace Content.Server.ADT.Eye.Blinding;

[ByRefEvent]
public record struct FlashedEvent(EntityUid? User, EntityUid? Used);
27 changes: 27 additions & 0 deletions Content.Server/ADT/Eye/Blinding/Systems/DamageEyesOnFlashSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Content.Shared.Eye.Blinding.Systems;
using Robust.Shared.Timing;

namespace Content.Server.ADT.Eye.Blinding;

public sealed class DamageEyesOnFlashSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly BlindableSystem _blindable = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DamageEyesOnFlashedComponent, FlashedEvent>(OnFlashed);
}

private void OnFlashed(EntityUid uid, DamageEyesOnFlashedComponent comp, ref FlashedEvent args)
{
if (HasComp<NoEyeDamageOnFlashComponent>(args.Used))
return;
if (_timing.CurTime < comp.NextDamage)
return;

_blindable.AdjustEyeDamage(uid, comp.FlashDamage);
comp.NextDamage = _timing.CurTime + TimeSpan.FromSeconds(3);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public void OnAfterAssign(Entity<StealDnaConditionComponent> condition, ref Obje
}
private void OnGetProgress(EntityUid uid, StealDnaConditionComponent comp, ref ObjectiveGetProgressEvent args)
{
if (args.Mind.OwnedEntity.HasValue)
if (args.Mind.CurrentEntity.HasValue)
{
var ling = args.Mind.OwnedEntity.Value;
var ling = args.Mind.CurrentEntity.Value;
args.Progress = GetProgress(ling, args.MindId, args.Mind, comp);
}
else
Expand Down
35 changes: 22 additions & 13 deletions Content.Server/Corvax/Sponsors/SponsorsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,31 @@ private void OnDisconnect(object? sender, NetDisconnectedArgs e)
{
if (!string.IsNullOrEmpty(_apiUrl))
{
var url = $"{_apiUrl}/sponsors/{userId.ToString()}";
var response = await _httpClient.GetAsync(url);
if (response.StatusCode == HttpStatusCode.NotFound)
return null;

if (response.StatusCode != HttpStatusCode.OK)
try // ADT TWEAK
{
var errorText = await response.Content.ReadAsStringAsync();
_sawmill.Error(
"Failed to get player sponsor OOC color from API: [{StatusCode}] {Response}",
response.StatusCode,
errorText);
var url = $"{_apiUrl}/sponsors/{userId.ToString()}";
var response = await _httpClient.GetAsync(url);

if (response.StatusCode == HttpStatusCode.NotFound)
return null;

if (response.StatusCode != HttpStatusCode.OK)
{
var errorText = await response.Content.ReadAsStringAsync();
_sawmill.Error(
"Failed to get player sponsor OOC color from API: [{StatusCode}] {Response}",
response.StatusCode,
errorText);
return null;
}

return await response.Content.ReadFromJsonAsync<SponsorInfo>();
}
catch (HttpRequestException) // ADT TWEAK
{
_sawmill.Error("No internet connection or network error while fetching sponsor info.");
return null;
}

return await response.Content.ReadFromJsonAsync<SponsorInfo>();
}

return null;
Expand Down
6 changes: 6 additions & 0 deletions Content.Server/Flash/FlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Robust.Shared.Audio;
using Robust.Shared.Random;
using InventoryComponent = Content.Shared.Inventory.InventoryComponent;
using Content.Server.ADT.Eye.Blinding;

namespace Content.Server.Flash
{
Expand Down Expand Up @@ -142,6 +143,11 @@ public void Flash(EntityUid target,
("user", Identity.Entity(user.Value, EntityManager))), target, target);
}

// ADT tweak start
var targetEv = new FlashedEvent(user, used);
RaiseLocalEvent(target, ref targetEv);
// ADT tweak end

if (melee)
{
var ev = new AfterFlashedEvent(target, user, used);
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Holiday/Christmas/RandomGiftComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public sealed partial class RandomGiftComponent : Component
/// <summary>
/// Whether or not the gift should be limited only to actual items.
/// </summary>
[DataField("insaneMode", required: true), ViewVariables(VVAccess.ReadWrite)]
public bool InsaneMode;
[DataField("insaneMode"), ViewVariables(VVAccess.ReadWrite)] // По умолчанию тип bool с required: true
public string? InsaneMode;

/// <summary>
/// What entities are allowed to examine this gift to see its contents.
Expand Down
26 changes: 23 additions & 3 deletions Content.Server/Holiday/Christmas/RandomGiftSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public sealed class RandomGiftSystem : EntitySystem

private readonly List<string> _possibleGiftsSafe = new();
private readonly List<string> _possibleGiftsUnsafe = new();
// ADT
private readonly List<string> _possibleGiftsUnsafeADT = new();
// END

/// <inheritdoc/>
public override void Initialize()
Expand Down Expand Up @@ -73,8 +76,14 @@ private void OnUseInHand(EntityUid uid, RandomGiftComponent component, UseInHand

private void OnGiftMapInit(EntityUid uid, RandomGiftComponent component, MapInitEvent args)
{
if (component.InsaneMode)
if (component.InsaneMode == "Unsafe")
component.SelectedEntity = _random.Pick(_possibleGiftsUnsafe);
else if (component.InsaneMode == "Safe")
component.SelectedEntity = _random.Pick(_possibleGiftsSafe);
// ADT
else if (component.InsaneMode == "ADTUnsafe")
component.SelectedEntity = _random.Pick(_possibleGiftsUnsafeADT);
// END
else
component.SelectedEntity = _random.Pick(_possibleGiftsSafe);
}
Expand All @@ -89,6 +98,9 @@ private void BuildIndex()
{
_possibleGiftsSafe.Clear();
_possibleGiftsUnsafe.Clear();
// ADT
_possibleGiftsUnsafeADT.Clear();
// END
var itemCompName = _componentFactory.GetComponentName(typeof(ItemComponent));
var mapGridCompName = _componentFactory.GetComponentName(typeof(MapGridComponent));
var physicsCompName = _componentFactory.GetComponentName(typeof(PhysicsComponent));
Expand All @@ -97,12 +109,20 @@ private void BuildIndex()
{
if (proto.Abstract || proto.HideSpawnMenu || proto.Components.ContainsKey(mapGridCompName) || !proto.Components.ContainsKey(physicsCompName))
continue;

_possibleGiftsUnsafe.Add(proto.ID);

// ADT
if (proto.Components.TryGetValue("Physics", out var value))
{
if (value.Mapping.Count > 0)
if (object.Equals(value.Mapping[0].Value?.ToString(), "Dynamic"))
_possibleGiftsUnsafeADT.Add(proto.ID);
else
continue;
}
// END
if (!proto.Components.ContainsKey(itemCompName))
continue;

_possibleGiftsSafe.Add(proto.ID);
}
}
Expand Down
24 changes: 24 additions & 0 deletions Resources/Audio/ADT/Voice/Human/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- files: ["female_sigh.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original sound by https://freesound.org/people/biawinter/sounds/408090/ - cleaned up, converted to ogg by https://github.com/BasiaBelov"
source: "https://freesound.org/people/biawinter/sounds/408090/"

- files: ["male_sigh.ogg"]
license: "CC-BY-NC-3.0"
copyright: "Original sound by https://freesound.org/people/Kash15/sounds/409785/ - cleaned up, converted to ogg by https://github.com/BasiaBelov"
source: "https://freesound.org/people/Kash15/sounds/409785/"

- files: ["sneeze_female.ogg", "sneeze_male.ogg", "sneeze_neutral.ogg"]
license: "CC-BY-SA-3.0"
copyright: "Sounds by https://github.com/TauCetiStation/TauCetiClassic/pull/12835"
source: "https://github.com/Project-IS12/IS12-Warfare"

- files: ["spit_1.ogg", "spit_2.ogg"]
license: "CC0-1.0"
copyright: "Sounds by https://github.com/TauCetiStation/TauCetiClassic/pull/12835"
source: "https://github.com/Project-IS12/IS12-Warfare"

- files: ["female_laugh.ogg"]
license: "CC0-1.0"
copyright: "https://zvukogram.com/zvuk/86551/ edited by discord:filokini"
source: "https://zvukogram.com/zvuk/86551/"
Binary file added Resources/Audio/ADT/Voice/Human/female_laugh.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Voice/Human/female_sigh.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Voice/Human/male_sigh.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Voice/Human/sneeze_female.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Voice/Human/sneeze_male.ogg
Binary file not shown.
Binary file not shown.
Binary file added Resources/Audio/ADT/Voice/Human/spit_1.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Voice/Human/spit_2.ogg
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/ADT/paper/stamp-component.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
stamp-component-stamped-name-magistrat = Магистрат
stamp-component-stamped-name-remake = ПЕРЕДЕЛАТЬ
stamp-component-stamped-name-dv = Dar-Vaxed

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,5 @@ ent-ADTClothingUniformSwimsuitWinth = купальник ведьмочки
.desc = Точно не для повседневного ношения, так ведь?..
.suffix = Хеллоуин
ent-ADTClothingUniformJumpsuitCamisoleQM = укороченный камзол квартирмейстера
.desc = Камзол, который одновременно хорош как для работы так и для отдыха.
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
ent-ADTDrinkFlaskArmy = Армейская Фляга
.desc = Довольно качественная фляга.
ent-ADTDrinkFlaskDV = фляга Dar-Vaxed
.desc = Фляжка премиум-класса, выполненый из титана с выгравированным на ней символом DV.
.suffix = ДВ
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
ent-TapeRecorderTranscript = транскрипция записи
ent-ADTBoxFolderDV = чёрно-оранжевая папка
.desc = Папка выполненый под стиль Dar-Vaxed.
.suffix = ДВ
ent-ADTBoxFolderClipboardDV = планшет Dar-Vaxed
.desc = Стильный планшет, обитый чёрной кожей. Сотрудники Dar-Vaxed часто носят, но редко используют.
.suffix = ДВ
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ ent-ADTPenRD = перьевая ручка научного руководите
.desc = Элегантная перьевая ручка для научного руководителя станции.
ent-ADTPenHos = перьевая ручка главы службы безопасности
.desc = Элегантная перьевая ручка для главы службы безопасности станции.
ent-ADTPenCapDV = перьевая ручка Dar-Vaxed
.desc = Особая ручка для важных лиц компании Dar-Vaxed.
ent-ADTPenDV = ручка Dar-Vaxed
.desc = Эксклюзивная ручка стелезованный под чёрно-оранжевый стиль Dar-Vaxed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ ent-RubberStampMagisrat = Печать магистрата
.desc = Выглядит угрожающее. От нее веет неоспоримой мощью и величием.
ent-ADTRubberStampRemake = печать ПЕРЕДЕЛАТЬ
.desc = Увидеть её после того, как долго подготавливал документ - настоящее мучениею
ent-ADTRubberStampDV = штамп Dar-Vaxed
.desc = Штамп для представителей компании Dar-Vaxed.
.suffix = ДВ, DO NOT MAP
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ ent-ADTZippo = Зажигалка Zippo
.desc = Необычная стальная зажигалка Zippo. Зажигайте со вкусом.
ent-ADTZippoExec = Зажигалка We-Ya Gold
.desc = Замечательная зажигалка Zippo, выполненная в фирменных черно-золотых тонах.
ent-ADTZippoDV = Зажигалка DV Titanium
.desc = Надёжная металлическая зажигалка зиппо с титановым покрытием, рассчитан на долгий срок службы. Является продуктом коллаборации Dar-Vaxed и We-Ya Gold.
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,11 @@ ent-ADTPosterContrabandUmaRabbit = Ума - кролик
ent-ADTPosterContrabandUmaOnBeach = Пляжный сезон!
.desc = Плакат призывающий экипаж опробывать исскуственные пляжи на станции (пляж не доступен на некоторых станциях).
.suffix = { "Спонсорское, Ума" }
ent-ADTPosterWhatDVLegit = Что такое Dar-Vaxed?
.desc = Dar-Vaxed - это многопрофильный холдинговая компания, специализирующийся на производстве гражданской и военной продукции. Ассортимент компании включает: спецодежды, скафандры, костюмы и униформы, а так-же швейные машины и швейные инструменты.
.suffix = ДВ
ent-ADTPosterUnclePrazLegit = ТЫ нам нужен!
.desc = Рекламный плакат, стилизованный под военную пропаганду, описывает все преимущества работы в холдинговой компании Dar-Vaxed. В нем упоминаются нелепые вещи, такие как: "льготы для многодетных работников, страхование жизни, защита прав работника". Создано при поддержке проекта по обмену специалистами корпорации NanoTrasen.
.suffix = ДВ
4 changes: 2 additions & 2 deletions Resources/Locale/ru-RU/anomaly/anomaly.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ anomaly-particles-sigma = Сигма-частицы
anomaly-scanner-component-scan-complete = Сканирование завершено!
anomaly-scanner-ui-title = сканер аномалий
anomaly-scanner-no-anomaly = Нет просканированной аномалии.
anomaly-scanner-severity-percentage = Текущая опасность: [color=gray]{ $percent }[/color]
anomaly-scanner-severity-percentage-unknown = Текущая опасность: [color=red]ОШИБКА[/color]
anomaly-scanner-severity-percentage = Потенциальная опасность: [color=gray]{ $percent }[/color]
anomaly-scanner-severity-percentage-unknown = Потенциальная опасность: [color=red]ОШИБКА[/color]
anomaly-scanner-stability-low = Текущее состояние аномалии: [color=gold]Распад[/color]
anomaly-scanner-stability-medium = Текущее состояние аномалии: [color=forestgreen]Стабильное[/color]
anomaly-scanner-stability-high = Текущее состояние аномалии: [color=crimson]Рост[/color]
Expand Down
Loading

0 comments on commit 57842b5

Please sign in to comment.