Аспектики (#838)
This commit is contained in:
@@ -8,6 +8,8 @@ using Content.Shared._White.Telescope;
|
|||||||
using Content.Shared.Humanoid;
|
using Content.Shared.Humanoid;
|
||||||
using Content.Shared.Movement.Components;
|
using Content.Shared.Movement.Components;
|
||||||
using Content.Shared.Movement.Systems;
|
using Content.Shared.Movement.Systems;
|
||||||
|
using Content.Server.Chat.Managers;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server._White.AspectsSystem.Aspects;
|
namespace Content.Server._White.AspectsSystem.Aspects;
|
||||||
|
|
||||||
@@ -16,6 +18,8 @@ public sealed class ImmersiveAspect : AspectSystem<ImmersiveAspectComponent>
|
|||||||
|
|
||||||
[Dependency] private readonly SharedContentEyeSystem _eye = default!;
|
[Dependency] private readonly SharedContentEyeSystem _eye = default!;
|
||||||
[Dependency] private readonly SharedTelescopeSystem _telescope = default!;
|
[Dependency] private readonly SharedTelescopeSystem _telescope = default!;
|
||||||
|
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||||
|
[Dependency] private readonly ISharedPlayerManager _playerManager = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -44,6 +48,9 @@ public sealed class ImmersiveAspect : AspectSystem<ImmersiveAspectComponent>
|
|||||||
|
|
||||||
FuckUpEye(entity, 0.6f);
|
FuckUpEye(entity, 0.6f);
|
||||||
AddTelescope(entity);
|
AddTelescope(entity);
|
||||||
|
_playerManager.TryGetSessionByEntity(entity, out var session);
|
||||||
|
if (session != null)
|
||||||
|
_chatManager.DispatchServerMessage(session, Loc.GetString("immersive-aspect-desc"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +83,9 @@ public sealed class ImmersiveAspect : AspectSystem<ImmersiveAspectComponent>
|
|||||||
|
|
||||||
FuckUpEye(ev.Mob, 0.6f);
|
FuckUpEye(ev.Mob, 0.6f);
|
||||||
AddTelescope(ev.Mob);
|
AddTelescope(ev.Mob);
|
||||||
|
_playerManager.TryGetSessionByEntity(ev.Mob, out var session);
|
||||||
|
if (session != null)
|
||||||
|
_chatManager.DispatchServerMessage(session, Loc.GetString("immersive-aspect-desc"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Content.Server._White.AspectsSystem.Aspects
|
|||||||
private float _timeElapsedForTraitor;
|
private float _timeElapsedForTraitor;
|
||||||
|
|
||||||
private float _wacky;
|
private float _wacky;
|
||||||
private const float WackyAaa = 60;
|
private const float WackyAaa = 430;
|
||||||
|
|
||||||
protected override void Started(EntityUid uid, TraitoredAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
protected override void Started(EntityUid uid, TraitoredAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,7 @@ namespace Content.Server._White.AspectsSystem.Aspects
|
|||||||
if (!HasTraitorGameRule())
|
if (!HasTraitorGameRule())
|
||||||
ForceEndSelf(uid, gameRule);
|
ForceEndSelf(uid, gameRule);
|
||||||
|
|
||||||
_wacky = _random.Next(300, 360);
|
_wacky = _random.Next(720, 860);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ActiveTick(EntityUid uid, TraitoredAspectComponent component, GameRuleComponent gameRule, float frameTime)
|
protected override void ActiveTick(EntityUid uid, TraitoredAspectComponent component, GameRuleComponent gameRule, float frameTime)
|
||||||
@@ -74,9 +74,7 @@ namespace Content.Server._White.AspectsSystem.Aspects
|
|||||||
var traitors = _traitorRuleSystem.GetOtherTraitorMindsAliveAndConnected(null);
|
var traitors = _traitorRuleSystem.GetOtherTraitorMindsAliveAndConnected(null);
|
||||||
|
|
||||||
if (traitors.Count == 0)
|
if (traitors.Count == 0)
|
||||||
{
|
return;
|
||||||
ForceEndSelf(uid, rule);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var traitor in traitors)
|
foreach (var traitor in traitors)
|
||||||
{
|
{
|
||||||
@@ -86,9 +84,9 @@ namespace Content.Server._White.AspectsSystem.Aspects
|
|||||||
var traitorMind = traitor.Mind.OwnedEntity;
|
var traitorMind = traitor.Mind.OwnedEntity;
|
||||||
|
|
||||||
if (traitorMind == null)
|
if (traitorMind == null)
|
||||||
return;
|
continue;
|
||||||
|
|
||||||
_chatManager.DispatchServerMessage(session, "Внимание, коммуникации синдиката перехвачены, вас раскрыли!");
|
_chatManager.DispatchServerMessage(session, "Внимание, коммуникации синдиката были перехвачены, скоро вас раскроют!");
|
||||||
_audio.PlayEntity("/Audio/White/Aspects/palevo.ogg", traitorMind.Value, traitorMind.Value);
|
_audio.PlayEntity("/Audio/White/Aspects/palevo.ogg", traitorMind.Value, traitorMind.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,18 +95,20 @@ namespace Content.Server._White.AspectsSystem.Aspects
|
|||||||
{
|
{
|
||||||
var traitors = _traitorRuleSystem.GetOtherTraitorMindsAliveAndConnected(null);
|
var traitors = _traitorRuleSystem.GetOtherTraitorMindsAliveAndConnected(null);
|
||||||
|
|
||||||
var msg = "Станция, служба контрразведки НаноТрейзен рассекретила секретную передачу Синдиката и выяснила имена проникниших на вашу станцию агентов. Агенты имеют следующие имена: \n";
|
var msg = "Станция, служба контрразведки НаноТрейзен рассекретила передачу Синдиката и выяснила проникниших на вашу станцию агентов. Агенты имеют следующие имена: \n";
|
||||||
|
|
||||||
foreach (var traitor in traitors)
|
foreach (var traitor in traitors)
|
||||||
{
|
{
|
||||||
var name = traitor.Mind.CharacterName;
|
var name = traitor.Mind.CharacterName;
|
||||||
if (!string.IsNullOrEmpty(name))
|
if (!string.IsNullOrEmpty(name))
|
||||||
{
|
{
|
||||||
msg += $" {name} - УБЕЙТЕ ЕГО НАХУЙ\n";
|
msg += $" {name}\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_chatSystem.DispatchGlobalAnnouncement(msg, "Мяукиман Крысус", colorOverride: Color.Aquamarine);
|
msg = msg + "\nОфицерскому составу - немедленно устранить вышеперечисленных агентов.";
|
||||||
|
|
||||||
|
_chatSystem.DispatchGlobalAnnouncement(msg, "Центральное Командование", colorOverride: Color.Aquamarine);
|
||||||
|
|
||||||
ForceEndSelf(uid, rule);
|
ForceEndSelf(uid, rule);
|
||||||
}
|
}
|
||||||
|
|||||||
1
Resources/Locale/ru-RU/_white/aspects.ftl
Normal file
1
Resources/Locale/ru-RU/_white/aspects.ftl
Normal file
@@ -0,0 +1 @@
|
|||||||
|
immersive-aspect-desc = Для осмотра своего окружение, нажмите клавишу присмотреться/прицелиться (по умолчанию - Пробел).
|
||||||
@@ -24,18 +24,19 @@
|
|||||||
path: /Audio/White/Aspects/accent.ogg
|
path: /Audio/White/Aspects/accent.ogg
|
||||||
- type: FastAndFuriousAspect
|
- type: FastAndFuriousAspect
|
||||||
|
|
||||||
- type: entity
|
# Not funny
|
||||||
id: RandomAppearanceAspect
|
# - type: entity
|
||||||
parent: BaseGameRule
|
# id: RandomAppearanceAspect
|
||||||
noSpawn: true
|
# parent: BaseGameRule
|
||||||
components:
|
# noSpawn: true
|
||||||
- type: Aspect
|
# components:
|
||||||
name: Random appearance
|
# - type: Aspect
|
||||||
description: Экипаж перестал узнавать друг-друга в лицо
|
# name: Random appearance
|
||||||
weight: 3
|
# description: Экипаж перестал узнавать друг-друга в лицо
|
||||||
startAudio:
|
# weight: 3
|
||||||
path: /Audio/White/Aspects/accent.ogg
|
# startAudio:
|
||||||
- type: RandomAppearanceAspect
|
# path: /Audio/White/Aspects/accent.ogg
|
||||||
|
# - type: RandomAppearanceAspect
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: BombassAspect
|
id: BombassAspect
|
||||||
|
|||||||
Reference in New Issue
Block a user