@@ -750,7 +750,7 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends a chat message to the given players in range of the source entity.
|
/// Sends a chat message to the given players in range of the source entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void SendInVoiceRange(ChatChannel channel, string message, string wrappedMessage, EntityUid source, ChatTransmitRange range, NetUserId? author = null)
|
public void SendInVoiceRange(ChatChannel channel, string message, string wrappedMessage, EntityUid source, ChatTransmitRange range, NetUserId? author = null)
|
||||||
{
|
{
|
||||||
foreach (var (session, data) in GetRecipients(source, VoiceRange))
|
foreach (var (session, data) in GetRecipients(source, VoiceRange))
|
||||||
{
|
{
|
||||||
|
|||||||
37
Content.Server/White/Halt/HaltComponent.cs
Normal file
37
Content.Server/White/Halt/HaltComponent.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using Robust.Shared.Audio;
|
||||||
|
|
||||||
|
namespace Content.Server.White.Halt;
|
||||||
|
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed partial class HaltComponent : Component
|
||||||
|
{
|
||||||
|
[DataField("color"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public string ChatColor { get; private set; } = Color.Red.ToHex();
|
||||||
|
|
||||||
|
[DataField("locale"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public string ChatLoc { get; private set; } = "chat-manager-entity-say-hailer-wrap-message";
|
||||||
|
|
||||||
|
[DataField("actionEntity")] public EntityUid? ActionEntity;
|
||||||
|
|
||||||
|
public readonly Dictionary<string, SoundSpecifier> PhraseToSoundMap = new()
|
||||||
|
{
|
||||||
|
["halt-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/halt.ogg"),
|
||||||
|
["bobby-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/bobby.ogg"),
|
||||||
|
["compliance-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/compliance.ogg"),
|
||||||
|
["justice-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/justice.ogg"),
|
||||||
|
["running-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/running.ogg"),
|
||||||
|
["dontmove-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/dontmove.ogg"),
|
||||||
|
["floor-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/floor.ogg"),
|
||||||
|
["robocop-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/robocop.ogg"),
|
||||||
|
["god-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/god.ogg"),
|
||||||
|
["freeze-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/freeze.ogg"),
|
||||||
|
["imperial-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/imperial.ogg"),
|
||||||
|
["bash-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/bash.ogg"),
|
||||||
|
["harry-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/harry.ogg"),
|
||||||
|
["asshole-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/asshole.ogg"),
|
||||||
|
["stfu-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/stfu.ogg"),
|
||||||
|
["shutup-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/shutup.ogg"),
|
||||||
|
["super-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/super.ogg"),
|
||||||
|
["dredd-phrase"] = new SoundPathSpecifier("/Audio/Voice/Complionator/dredd.ogg")
|
||||||
|
};
|
||||||
|
}
|
||||||
62
Content.Server/White/Halt/HaltSystem.cs
Normal file
62
Content.Server/White/Halt/HaltSystem.cs
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Content.Shared.Actions;
|
||||||
|
using Content.Server.Chat.Systems;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
using Content.Shared.Chat;
|
||||||
|
using Content.Shared.White.Other;
|
||||||
|
using Robust.Shared.Audio.Systems;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
|
namespace Content.Server.White.Halt
|
||||||
|
{
|
||||||
|
public sealed class HaltSystem : EntitySystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly ChatSystem _chat = default!;
|
||||||
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
SubscribeLocalEvent<HaltComponent, GetItemActionsEvent>(OnGetEquipped);
|
||||||
|
SubscribeLocalEvent<HaltComponent, HaltAction>(Act);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetEquipped(EntityUid uid, HaltComponent component, GetItemActionsEvent args)
|
||||||
|
{
|
||||||
|
if (args.InHands)
|
||||||
|
return;
|
||||||
|
|
||||||
|
args.AddAction(ref component.ActionEntity, "Halt");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Act(EntityUid uid, HaltComponent component, HaltAction args)
|
||||||
|
{
|
||||||
|
if (args.Handled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!component.PhraseToSoundMap.Any())
|
||||||
|
return;
|
||||||
|
|
||||||
|
var randomIndex = _random.Next(component.PhraseToSoundMap.Count);
|
||||||
|
var selectedPhrase = component.PhraseToSoundMap.Keys.ElementAt(randomIndex);
|
||||||
|
var selectedSound = component.PhraseToSoundMap[selectedPhrase];
|
||||||
|
|
||||||
|
_audio.PlayPvs(selectedSound, uid);
|
||||||
|
|
||||||
|
var hMessage = Loc.GetString(selectedPhrase);
|
||||||
|
var wrappedMessage = Loc.GetString(
|
||||||
|
component.ChatLoc,
|
||||||
|
("entityName", args.Performer),
|
||||||
|
("hMessage", FormattedMessage.EscapeText(hMessage)),
|
||||||
|
("color", component.ChatColor)
|
||||||
|
);
|
||||||
|
|
||||||
|
_chat.SendInVoiceRange(ChatChannel.Local, hMessage, wrappedMessage, args.Performer, ChatTransmitRange.Normal);
|
||||||
|
|
||||||
|
args.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,8 +24,9 @@ public sealed class CritSystem : EntitySystem
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
SubscribeLocalEvent<CritComponent, MeleeHitEvent>(HandleHit);
|
|
||||||
SubscribeLocalEvent<CritComponent, ExaminedEvent>(OnExamine);
|
SubscribeLocalEvent<CritComponent, ExaminedEvent>(OnExamine);
|
||||||
|
SubscribeLocalEvent<CritComponent, MeleeHitEvent>(HandleHit);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnExamine(EntityUid uid, CritComponent component, ExaminedEvent args)
|
private void OnExamine(EntityUid uid, CritComponent component, ExaminedEvent args)
|
||||||
@@ -33,7 +34,7 @@ public sealed class CritSystem : EntitySystem
|
|||||||
if (component.IsBloodDagger)
|
if (component.IsBloodDagger)
|
||||||
{
|
{
|
||||||
args.PushMarkup(
|
args.PushMarkup(
|
||||||
"[color=red]Критическая жажда: Кинжал Жажды обладает смертоносной точностью. Его владелец имеет 20% шанс нанести критический урон, поражая врага в его самые уязвимые места.\n" +
|
"[color=red]Критическая жажда: Кинжал Жажды обладает смертоносной точностью. Его владелец имеет 25% шанс нанести критический урон, поражая врага в его самые уязвимые места.\n" +
|
||||||
"Кровавый абсорб: При каждом успешном критическом ударе, кинжал извлекает кровь из цели, восстанавливая здоровье владельцу пропорционально количеству высосанной крови.[/color]"
|
"Кровавый абсорб: При каждом успешном критическом ударе, кинжал извлекает кровь из цели, восстанавливая здоровье владельцу пропорционально количеству высосанной крови.[/color]"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
7
Content.Shared/Mobs/Components/HaltAction.cs
Normal file
7
Content.Shared/Mobs/Components/HaltAction.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
using Content.Shared.Actions;
|
||||||
|
|
||||||
|
namespace Content.Shared.White.Other;
|
||||||
|
|
||||||
|
public sealed partial class HaltAction : InstantActionEvent
|
||||||
|
{
|
||||||
|
}
|
||||||
BIN
Resources/Audio/Voice/Complionator/asshole.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/asshole.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/bash.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/bash.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/bobby.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/bobby.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/compliance.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/compliance.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/dontmove.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/dontmove.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/dredd.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/dredd.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/floor.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/floor.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/freeze.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/freeze.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/god.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/god.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/halt.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/halt.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/harry.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/harry.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/imperial.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/imperial.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/justice.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/justice.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/robocop.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/robocop.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/running.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/running.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/shutup.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/shutup.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/stfu.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/stfu.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Complionator/super.ogg
Normal file
BIN
Resources/Audio/Voice/Complionator/super.ogg
Normal file
Binary file not shown.
20
Resources/Locale/ru-RU/white/hailer.ftl
Normal file
20
Resources/Locale/ru-RU/white/hailer.ftl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
chat-manager-entity-say-hailer-wrap-message = { $entityName } командует, "[font size=13][color={ $color }]{ $hMessage }[/color][/size]"
|
||||||
|
|
||||||
|
halt-phrase = СТОЯТЬ! СТОЯТЬ! СТОЯТЬ!
|
||||||
|
bobby-phrase = Стоять! Во имя Закона!
|
||||||
|
compliance-phrase = Сдаться в ваших интересах.
|
||||||
|
justice-phrase = Приготовьтесь к справедливости!
|
||||||
|
running-phrase = Бег только увеличит ваш срок.
|
||||||
|
dontmove-phrase = Не двигаться, уёбок!
|
||||||
|
floor-phrase = На пол, сука!
|
||||||
|
robocop-phrase = Мёртвый или живой ты пойдешь со мной.
|
||||||
|
god-phrase = Бог создал сегодня для жуликов, которых мы не могли поймать вчера.
|
||||||
|
freeze-phrase = Замри, подонок!
|
||||||
|
imperial-phrase = Стоять, преступная мразь!
|
||||||
|
bash-phrase = Остановись или я тебя ударю.
|
||||||
|
harry-phrase = Сделай мой день.
|
||||||
|
asshole-phrase = Хватит нарушать закон, гадина.
|
||||||
|
stfu-phrase = Вы имеете право завалить ебало.
|
||||||
|
shutup-phrase = Заткнись нахуй!
|
||||||
|
super-phrase = Сейчас ты познаешь гнев золотой сферы.
|
||||||
|
dredd-phrase = Я ЗАКОН!
|
||||||
@@ -315,3 +315,16 @@
|
|||||||
event: !type:ToggleEyesActionEvent
|
event: !type:ToggleEyesActionEvent
|
||||||
useDelay: 1 # so u cant give yourself and observers eyestrain by rapidly spamming the action
|
useDelay: 1 # so u cant give yourself and observers eyestrain by rapidly spamming the action
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: Halt
|
||||||
|
name: Halt!
|
||||||
|
description: Halt!
|
||||||
|
noSpawn: true
|
||||||
|
components:
|
||||||
|
- type: InstantAction
|
||||||
|
useDelay: 5
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Weapons/Melee/stunbaton.rsi
|
||||||
|
state: stunbaton_off
|
||||||
|
event: !type:HaltAction
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
Slash: 0.95
|
Slash: 0.95
|
||||||
Piercing: 0.95
|
Piercing: 0.95
|
||||||
Heat: 0.95
|
Heat: 0.95
|
||||||
|
- type: Halt
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: ClothingMaskGas
|
parent: ClothingMaskGas
|
||||||
|
|||||||
Reference in New Issue
Block a user