fucking upsteram
This commit is contained in:
@@ -96,12 +96,6 @@
|
|||||||
ButtonText="Опции"
|
ButtonText="Опции"
|
||||||
Margin="0 7 0 7" />
|
Margin="0 7 0 7" />
|
||||||
|
|
||||||
<buttons:OhioLobbyTextButton
|
|
||||||
Name="AHelpButton"
|
|
||||||
Access="Public"
|
|
||||||
ButtonText="AHelp"
|
|
||||||
Margin="0 7 0 8" />
|
|
||||||
|
|
||||||
<buttons:OhioLobbyTextButton
|
<buttons:OhioLobbyTextButton
|
||||||
Name="DiscordButton"
|
Name="DiscordButton"
|
||||||
Access="Public"
|
Access="Public"
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ public abstract partial class SharedBorgSystem : EntitySystem
|
|||||||
[Dependency] protected readonly SharedContainerSystem Container = default!;
|
[Dependency] protected readonly SharedContainerSystem Container = default!;
|
||||||
[Dependency] protected readonly ItemSlotsSystem ItemSlots = default!;
|
[Dependency] protected readonly ItemSlotsSystem ItemSlots = default!;
|
||||||
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
||||||
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
|
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!; //Honk
|
||||||
[Dependency] protected readonly IRobustRandom RobustRandom = default!;
|
[Dependency] protected readonly IRobustRandom RobustRandom = default!; //Honk
|
||||||
|
|
||||||
|
private HashSet<TTSVoicePrototype> _voices = new();
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
@@ -35,22 +37,35 @@ public abstract partial class SharedBorgSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<BorgChassisComponent, EntInsertedIntoContainerMessage>(OnInserted);
|
SubscribeLocalEvent<BorgChassisComponent, EntInsertedIntoContainerMessage>(OnInserted);
|
||||||
SubscribeLocalEvent<BorgChassisComponent, EntRemovedFromContainerMessage>(OnRemoved);
|
SubscribeLocalEvent<BorgChassisComponent, EntRemovedFromContainerMessage>(OnRemoved);
|
||||||
SubscribeLocalEvent<BorgChassisComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovementSpeedModifiers);
|
SubscribeLocalEvent<BorgChassisComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovementSpeedModifiers);
|
||||||
SubscribeLocalEvent<SharedTTSComponent, ComponentStartup>(RandomTTS);
|
|
||||||
|
//Honk
|
||||||
|
SubscribeLocalEvent<SharedTTSComponent, ComponentInit>(RandomTTS);
|
||||||
|
GenerateVoiceList();
|
||||||
|
//Honk
|
||||||
|
|
||||||
InitializeRelay();
|
InitializeRelay();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RandomTTS(EntityUid uid, SharedTTSComponent component, ComponentStartup args)
|
//Honk
|
||||||
|
private void RandomTTS(EntityUid uid, SharedTTSComponent component, ComponentInit args)
|
||||||
{
|
{
|
||||||
if (TryComp<BorgChassisComponent>(uid, out _))
|
if (!HasComp<BorgChassisComponent>(uid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var voiceList = PrototypeManager.EnumeratePrototypes<TTSBorgVoicePrototype>().ToHashSet();
|
var voiceId = RobustRandom.Pick(_voices);
|
||||||
var voice = RobustRandom.Pick(voiceList);
|
|
||||||
component.VoicePrototypeId = voice.ID;
|
|
||||||
|
|
||||||
|
component.VoicePrototypeId = voiceId.ID;
|
||||||
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GenerateVoiceList()
|
||||||
|
{
|
||||||
|
_voices = PrototypeManager.EnumeratePrototypes<TTSVoicePrototype>()
|
||||||
|
.Where(x => x.BorgVoice)
|
||||||
|
.ToHashSet();
|
||||||
|
}
|
||||||
|
//Honk
|
||||||
|
|
||||||
private void OnItemSlotInsertAttempt(EntityUid uid, BorgChassisComponent component, ref ItemSlotInsertAttemptEvent args)
|
private void OnItemSlotInsertAttempt(EntityUid uid, BorgChassisComponent component, ref ItemSlotInsertAttemptEvent args)
|
||||||
{
|
{
|
||||||
if (args.Cancelled)
|
if (args.Cancelled)
|
||||||
|
|||||||
@@ -129,6 +129,9 @@
|
|||||||
- type: TypingIndicator
|
- type: TypingIndicator
|
||||||
proto: robot
|
proto: robot
|
||||||
- type: TTS
|
- type: TTS
|
||||||
|
- type: Speech
|
||||||
|
speechVerb: Robotic
|
||||||
|
speechSounds: Borg
|
||||||
- type: UnblockableSpeech
|
- type: UnblockableSpeech
|
||||||
- type: FootstepModifier
|
- type: FootstepModifier
|
||||||
footstepSoundCollection:
|
footstepSoundCollection:
|
||||||
|
|||||||
Reference in New Issue
Block a user