Voice trigger fixes, death acidifier typos (#24941)
* Fixed length check, added attempt event, added popups on failure * Fixed file name typo, fixed description * Converted to else-if
This commit is contained in:
@@ -32,8 +32,19 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
|
||||
if (component.IsRecording)
|
||||
{
|
||||
if (message.Length >= component.MinLength || message.Length <= component.MaxLength)
|
||||
var ev = new ListenAttemptEvent(args.Source);
|
||||
RaiseLocalEvent(ent, ev);
|
||||
|
||||
if (ev.Cancelled)
|
||||
return;
|
||||
|
||||
if (message.Length >= component.MinLength && message.Length <= component.MaxLength)
|
||||
FinishRecording(ent, args.Source, args.Message);
|
||||
else if (message.Length > component.MaxLength)
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-record-failed-too-long"), ent);
|
||||
else if (message.Length < component.MinLength)
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-record-failed-too-short"), ent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,7 +66,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
var @event = args;
|
||||
args.Verbs.Add(new AlternativeVerb()
|
||||
{
|
||||
Text = Loc.GetString(component.IsRecording ? "verb-trigger-voice-record-stop" : "verb-trigger-voice-record"),
|
||||
Text = Loc.GetString(component.IsRecording ? "verb-trigger-voice-stop" : "verb-trigger-voice-record"),
|
||||
Act = () =>
|
||||
{
|
||||
if (component.IsRecording)
|
||||
|
||||
@@ -2,8 +2,11 @@ examine-trigger-voice = The display reads: "{$keyphrase}"
|
||||
trigger-voice-uninitialized = The display reads: Uninitialized...
|
||||
|
||||
verb-trigger-voice-record = Record
|
||||
verb-trigger-voice-stop = Stop
|
||||
verb-trigger-voice-clear = Clear recording
|
||||
|
||||
popup-trigger-voice-start-recording = Started recording
|
||||
popup-trigger-voice-stop-recording = Stopped recording
|
||||
popup-trigger-voice-recorded = Recorded
|
||||
popup-trigger-voice-record-failed-too-long = Message too long, try again
|
||||
popup-trigger-voice-record-failed-too-short = Message too short, try again
|
||||
popup-trigger-voice-recorded = Recorded successfully
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
parent: BaseSubdermalImplant
|
||||
id: MicroBombImplant
|
||||
name: micro-bomb implant
|
||||
description: This implant detonates the user upon death.
|
||||
description: This implant detonates the user upon activation or upon death.
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: SubdermalImplant
|
||||
|
||||
Reference in New Issue
Block a user