Removed old Loc.GetString() use instances (#4155)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Content.Client.AME.UI
|
|||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Title = "Antimatter Control Unit";
|
Title = Loc.GetString("ame-window-title");
|
||||||
|
|
||||||
MinSize = SetSize = (250, 250);
|
MinSize = SetSize = (250, 250);
|
||||||
|
|
||||||
@@ -39,37 +39,37 @@ namespace Content.Client.AME.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Engine Status") + ": "},
|
new Label {Text = Loc.GetString("ame-window-engine-status-label")},
|
||||||
(InjectionStatus = new Label {Text = "Not Injecting"})
|
(InjectionStatus = new Label {Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label")})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
(ToggleInjection = new Button {Text = "Toggle Injection", StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
|
(ToggleInjection = new Button {Text = Loc.GetString("ame-window-toggle-injection-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Fuel Status") + ": "},
|
new Label {Text = Loc.GetString("ame-window-fuel-status-label")},
|
||||||
(FuelAmount = new Label {Text = "No fuel inserted"})
|
(FuelAmount = new Label {Text = Loc.GetString("ame-window-fuel-not-inserted-text")})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
(EjectButton = new Button {Text = "Eject", StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
|
(EjectButton = new Button {Text = Loc.GetString("ame-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Injection amount") + ": "},
|
new Label {Text = Loc.GetString("ame-window-injection-amount-label")},
|
||||||
(InjectionAmount = new Label {Text = "0"})
|
(InjectionAmount = new Label {Text = "0"})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -77,16 +77,16 @@ namespace Content.Client.AME.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
(IncreaseFuelButton = new Button {Text = "Increase", StyleClasses = {StyleBase.ButtonOpenRight}}),
|
(IncreaseFuelButton = new Button {Text = Loc.GetString("ame-window-increase-fuel-button"), StyleClasses = {StyleBase.ButtonOpenRight}}),
|
||||||
(DecreaseFuelButton = new Button {Text = "Decrease", StyleClasses = {StyleBase.ButtonOpenLeft}}),
|
(DecreaseFuelButton = new Button {Text = Loc.GetString("ame-window-decrease-fuel-button"), StyleClasses = {StyleBase.ButtonOpenLeft}}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
(RefreshPartsButton = new Button {Text = "Refresh Parts", StyleClasses = {StyleBase.ButtonOpenBoth }, Disabled = true }),
|
(RefreshPartsButton = new Button {Text = Loc.GetString("ame-window-refresh-parts-button"), StyleClasses = {StyleBase.ButtonOpenBoth }, Disabled = true }),
|
||||||
new Label { Text = Loc.GetString("Core count") + ": "},
|
new Label { Text = Loc.GetString("ame-window-core-count-label")},
|
||||||
(CoreCount = new Label { Text = "0"}),
|
(CoreCount = new Label { Text = "0"}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ namespace Content.Client.AME.UI
|
|||||||
{
|
{
|
||||||
EjectButton.Disabled = true;
|
EjectButton.Disabled = true;
|
||||||
ToggleInjection.Disabled = true;
|
ToggleInjection.Disabled = true;
|
||||||
FuelAmount.Text = Loc.GetString("No fuel inserted");
|
FuelAmount.Text = Loc.GetString("ame-window-fuel-not-inserted-text");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -152,11 +152,11 @@ namespace Content.Client.AME.UI
|
|||||||
|
|
||||||
if (!castState.Injecting)
|
if (!castState.Injecting)
|
||||||
{
|
{
|
||||||
InjectionStatus.Text = Loc.GetString("Not Injecting");
|
InjectionStatus.Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InjectionStatus.Text = Loc.GetString("Injecting...");
|
InjectionStatus.Text = Loc.GetString("ame-window-engine-injection-status-injecting-label");
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshPartsButton.Disabled = castState.Injecting;
|
RefreshPartsButton.Disabled = castState.Injecting;
|
||||||
|
|||||||
@@ -45,11 +45,11 @@ namespace Content.Client.Access.UI
|
|||||||
Columns = 3,
|
Columns = 3,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Privileged ID:")},
|
new Label {Text = Loc.GetString("id-card-console-window-privileged-id")},
|
||||||
(_privilegedIdButton = new Button()),
|
(_privilegedIdButton = new Button()),
|
||||||
(_privilegedIdLabel = new Label()),
|
(_privilegedIdLabel = new Label()),
|
||||||
|
|
||||||
new Label {Text = Loc.GetString("Target ID:")},
|
new Label {Text = Loc.GetString("id-card-console-window-target-id")},
|
||||||
(_targetIdButton = new Button()),
|
(_targetIdButton = new Button()),
|
||||||
(_targetIdLabel = new Label())
|
(_targetIdLabel = new Label())
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ namespace Content.Client.Access.UI
|
|||||||
// Name
|
// Name
|
||||||
(_fullNameLabel = new Label
|
(_fullNameLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Full name:")
|
Text = Loc.GetString("id-card-console-window-full-name-label")
|
||||||
}),
|
}),
|
||||||
(_fullNameLineEdit = new LineEdit
|
(_fullNameLineEdit = new LineEdit
|
||||||
{
|
{
|
||||||
@@ -79,14 +79,14 @@ namespace Content.Client.Access.UI
|
|||||||
}),
|
}),
|
||||||
(_fullNameSaveButton = new Button
|
(_fullNameSaveButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Save"),
|
Text = Loc.GetString("id-card-console-window-save-button"),
|
||||||
Disabled = true
|
Disabled = true
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
(_jobTitleLabel = new Label
|
(_jobTitleLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Job title:")
|
Text = Loc.GetString("id-card-console-window-job-title-label")
|
||||||
}),
|
}),
|
||||||
(_jobTitleLineEdit = new LineEdit
|
(_jobTitleLineEdit = new LineEdit
|
||||||
{
|
{
|
||||||
@@ -94,7 +94,7 @@ namespace Content.Client.Access.UI
|
|||||||
}),
|
}),
|
||||||
(_jobTitleSaveButton = new Button
|
(_jobTitleSaveButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Save"),
|
Text = Loc.GetString("id-card-console-window-save-button"),
|
||||||
Disabled = true
|
Disabled = true
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@@ -144,14 +144,14 @@ namespace Content.Client.Access.UI
|
|||||||
public void UpdateState(IdCardConsoleBoundUserInterfaceState state)
|
public void UpdateState(IdCardConsoleBoundUserInterfaceState state)
|
||||||
{
|
{
|
||||||
_privilegedIdButton.Text = state.IsPrivilegedIdPresent
|
_privilegedIdButton.Text = state.IsPrivilegedIdPresent
|
||||||
? Loc.GetString("Eject")
|
? Loc.GetString("id-card-console-window-eject-button")
|
||||||
: Loc.GetString("Insert");
|
: Loc.GetString("id-card-console-window-insert-button");
|
||||||
|
|
||||||
_privilegedIdLabel.Text = state.PrivilegedIdName;
|
_privilegedIdLabel.Text = state.PrivilegedIdName;
|
||||||
|
|
||||||
_targetIdButton.Text = state.IsTargetIdPresent
|
_targetIdButton.Text = state.IsTargetIdPresent
|
||||||
? Loc.GetString("Eject")
|
? Loc.GetString("id-card-console-window-eject-button")
|
||||||
: Loc.GetString("Insert");
|
: Loc.GetString("id-card-console-window-insert-button");
|
||||||
|
|
||||||
_targetIdLabel.Text = state.TargetIdName;
|
_targetIdLabel.Text = state.TargetIdName;
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ namespace Content.Client.Access.UI
|
|||||||
_fullNameLineEdit.Editable = interfaceEnabled;
|
_fullNameLineEdit.Editable = interfaceEnabled;
|
||||||
if (!fullNameDirty)
|
if (!fullNameDirty)
|
||||||
{
|
{
|
||||||
_fullNameLineEdit.Text = state.TargetIdFullName ?? "";
|
_fullNameLineEdit.Text = state.TargetIdFullName ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
_fullNameSaveButton.Disabled = !interfaceEnabled || !fullNameDirty;
|
_fullNameSaveButton.Disabled = !interfaceEnabled || !fullNameDirty;
|
||||||
@@ -174,7 +174,7 @@ namespace Content.Client.Access.UI
|
|||||||
_jobTitleLineEdit.Editable = interfaceEnabled;
|
_jobTitleLineEdit.Editable = interfaceEnabled;
|
||||||
if (!jobTitleDirty)
|
if (!jobTitleDirty)
|
||||||
{
|
{
|
||||||
_jobTitleLineEdit.Text = state.TargetIdJobTitle ?? "";
|
_jobTitleLineEdit.Text = state.TargetIdJobTitle ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
_jobTitleSaveButton.Disabled = !interfaceEnabled || !jobTitleDirty;
|
_jobTitleSaveButton.Disabled = !interfaceEnabled || !jobTitleDirty;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
using Content.Shared.Actions.Components;
|
using Content.Shared.Actions.Components;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Content.Client.Actions.Assignments
|
namespace Content.Client.Actions.Assignments
|
||||||
{
|
{
|
||||||
@@ -70,8 +70,6 @@ namespace Content.Client.Actions.Assignments
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var (item, itemStates) in itemActionStates)
|
foreach (var (item, itemStates) in itemActionStates)
|
||||||
{
|
{
|
||||||
foreach (var itemActionState in itemStates)
|
foreach (var itemActionState in itemStates)
|
||||||
@@ -97,7 +95,10 @@ namespace Content.Client.Actions.Assignments
|
|||||||
var assignmentsWithoutItem = new List<KeyValuePair<ActionAssignment, List<(byte Hotbar, byte Slot)>>>();
|
var assignmentsWithoutItem = new List<KeyValuePair<ActionAssignment, List<(byte Hotbar, byte Slot)>>>();
|
||||||
foreach (var assignmentEntry in _assignments)
|
foreach (var assignmentEntry in _assignments)
|
||||||
{
|
{
|
||||||
if (!assignmentEntry.Key.TryGetItemActionWithItem(out var actionType, out var item)) continue;
|
if (!assignmentEntry.Key.TryGetItemActionWithItem(out var actionType, out var item))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// we have this assignment currently tied to an item,
|
// we have this assignment currently tied to an item,
|
||||||
// check if it no longer has an associated item in our dict of states
|
// check if it no longer has an associated item in our dict of states
|
||||||
@@ -110,8 +111,10 @@ namespace Content.Client.Actions.Assignments
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assignmentsWithoutItem.Add(assignmentEntry);
|
assignmentsWithoutItem.Add(assignmentEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// reassign without the item for each assignment we found that no longer has an associated item
|
// reassign without the item for each assignment we found that no longer has an associated item
|
||||||
foreach (var (assignment, slots) in assignmentsWithoutItem)
|
foreach (var (assignment, slots) in assignmentsWithoutItem)
|
||||||
{
|
{
|
||||||
@@ -179,7 +182,12 @@ namespace Content.Client.Actions.Assignments
|
|||||||
// remove this particular assignment from our data structures
|
// remove this particular assignment from our data structures
|
||||||
// (keeping in mind something can be assigned multiple slots)
|
// (keeping in mind something can be assigned multiple slots)
|
||||||
var currentAction = _slots[hotbar, slot];
|
var currentAction = _slots[hotbar, slot];
|
||||||
if (!currentAction.HasValue) return;
|
|
||||||
|
if (!currentAction.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (preventAutoPopulate)
|
if (preventAutoPopulate)
|
||||||
{
|
{
|
||||||
var assignment = currentAction.Value;
|
var assignment = currentAction.Value;
|
||||||
@@ -199,6 +207,7 @@ namespace Content.Client.Actions.Assignments
|
|||||||
actionTypes.Add(itemActionType);
|
actionTypes.Add(itemActionType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var assignmentList = _assignments[currentAction.Value];
|
var assignmentList = _assignments[currentAction.Value];
|
||||||
assignmentList = assignmentList.Where(a => a.Hotbar != hotbar || a.Slot != slot).ToList();
|
assignmentList = assignmentList.Where(a => a.Hotbar != hotbar || a.Slot != slot).ToList();
|
||||||
if (!assignmentList.Any())
|
if (!assignmentList.Any())
|
||||||
@@ -209,6 +218,7 @@ namespace Content.Client.Actions.Assignments
|
|||||||
{
|
{
|
||||||
_assignments[currentAction.Value] = assignmentList;
|
_assignments[currentAction.Value] = assignmentList;
|
||||||
}
|
}
|
||||||
|
|
||||||
_slots[hotbar, slot] = null;
|
_slots[hotbar, slot] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +233,11 @@ namespace Content.Client.Actions.Assignments
|
|||||||
/// if this assignment has been prevented from auto population.</param>
|
/// if this assignment has been prevented from auto population.</param>
|
||||||
public void AutoPopulate(ActionAssignment toAssign, byte currentHotbar, bool force = true)
|
public void AutoPopulate(ActionAssignment toAssign, byte currentHotbar, bool force = true)
|
||||||
{
|
{
|
||||||
if (ShouldPreventAutoPopulate(toAssign, force)) return;
|
if (ShouldPreventAutoPopulate(toAssign, force))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if the assignment to make is an item action with an associated item,
|
// if the assignment to make is an item action with an associated item,
|
||||||
// then first look for currently assigned item actions without an item, to replace with this
|
// then first look for currently assigned item actions without an item, to replace with this
|
||||||
// assignment
|
// assignment
|
||||||
@@ -240,7 +254,7 @@ namespace Content.Client.Actions.Assignments
|
|||||||
{
|
{
|
||||||
var cost = possibility.Slot + _numSlots * (currentHotbar >= possibility.Hotbar
|
var cost = possibility.Slot + _numSlots * (currentHotbar >= possibility.Hotbar
|
||||||
? currentHotbar - possibility.Hotbar
|
? currentHotbar - possibility.Hotbar
|
||||||
: (_numHotbars - currentHotbar) + possibility.Hotbar);
|
: _numHotbars - currentHotbar + possibility.Hotbar);
|
||||||
if (cost < minCost)
|
if (cost < minCost)
|
||||||
{
|
{
|
||||||
hotbar = possibility.Hotbar;
|
hotbar = possibility.Hotbar;
|
||||||
@@ -273,8 +287,10 @@ namespace Content.Client.Actions.Assignments
|
|||||||
AssignSlot(hotbar, slot, toAssign);
|
AssignSlot(hotbar, slot, toAssign);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// slot's empty, assign
|
// slot's empty, assign
|
||||||
AssignSlot(hotbar, slot, toAssign);
|
AssignSlot(hotbar, slot, toAssign);
|
||||||
return;
|
return;
|
||||||
@@ -285,7 +301,10 @@ namespace Content.Client.Actions.Assignments
|
|||||||
|
|
||||||
private bool ShouldPreventAutoPopulate(ActionAssignment assignment, bool force)
|
private bool ShouldPreventAutoPopulate(ActionAssignment assignment, bool force)
|
||||||
{
|
{
|
||||||
if (force) return false;
|
if (force)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (assignment.TryGetAction(out var actionType))
|
if (assignment.TryGetAction(out var actionType))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ namespace Content.Client.Actions
|
|||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner;
|
private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner;
|
||||||
|
|
||||||
|
|
||||||
protected override void Shutdown()
|
protected override void Shutdown()
|
||||||
{
|
{
|
||||||
base.Shutdown();
|
base.Shutdown();
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace Content.Client.Actions.UI
|
|||||||
_actionManager = IoCManager.Resolve<ActionManager>();
|
_actionManager = IoCManager.Resolve<ActionManager>();
|
||||||
_gameHud = IoCManager.Resolve<IGameHud>();
|
_gameHud = IoCManager.Resolve<IGameHud>();
|
||||||
|
|
||||||
Title = Loc.GetString("Actions");
|
Title = Loc.GetString("ui-actionmenu-title");
|
||||||
MinSize = (300, 300);
|
MinSize = (300, 300);
|
||||||
|
|
||||||
Contents.AddChild(new VBoxContainer
|
Contents.AddChild(new VBoxContainer
|
||||||
@@ -83,17 +83,17 @@ namespace Content.Client.Actions.UI
|
|||||||
{
|
{
|
||||||
StyleClasses = { StyleNano.StyleClassActionSearchBox },
|
StyleClasses = { StyleNano.StyleClassActionSearchBox },
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
PlaceHolder = Loc.GetString("Search")
|
PlaceHolder = Loc.GetString("ui-actionmenu-search-bar-placeholder-text")
|
||||||
}),
|
}),
|
||||||
(_filterButton = new MultiselectOptionButton<string>()
|
(_filterButton = new MultiselectOptionButton<string>()
|
||||||
{
|
{
|
||||||
Label = Loc.GetString("Filter")
|
Label = Loc.GetString("ui-actionmenu-filter-buttonr")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(_clearButton = new Button
|
(_clearButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Clear"),
|
Text = Loc.GetString("ui-actionmenu-clear-button"),
|
||||||
}),
|
}),
|
||||||
(_filterLabel = new Label()),
|
(_filterLabel = new Label()),
|
||||||
new ScrollContainer
|
new ScrollContainer
|
||||||
@@ -353,7 +353,8 @@ namespace Content.Client.Actions.UI
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_filterLabel.Visible = true;
|
_filterLabel.Visible = true;
|
||||||
_filterLabel.Text = Loc.GetString("Filters: {0}", string.Join(", ", _filterButton.SelectedLabels));
|
_filterLabel.Text = Loc.GetString("ui-actionmenu-filter-label",
|
||||||
|
("selectedLabels", string.Join(", ", _filterButton.SelectedLabels)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,7 +431,7 @@ namespace Content.Client.Actions.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static string Standardize(string rawText, bool splitOnCaseChange = false)
|
private static string Standardize(string rawText, bool splitOnCaseChange = false)
|
||||||
{
|
{
|
||||||
rawText ??= "";
|
rawText ??= string.Empty;
|
||||||
|
|
||||||
// treat non-alphanumeric characters as whitespace
|
// treat non-alphanumeric characters as whitespace
|
||||||
rawText = NonAlphanumeric.Replace(rawText, " ");
|
rawText = NonAlphanumeric.Replace(rawText, " ");
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ namespace Content.Client.Actions.UI
|
|||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
Scale = (0.5f, 0.5f),
|
Scale = (0.5f, 0.5f),
|
||||||
ToolTip = Loc.GetString("ui-actionmenu-function-lock-action-slots"),
|
ToolTip = Loc.GetString("ui-actionsui-function-lock-action-slots"),
|
||||||
TooltipDelay = CustomTooltipDelay
|
TooltipDelay = CustomTooltipDelay
|
||||||
};
|
};
|
||||||
settingsContainer.AddChild(_lockButton);
|
settingsContainer.AddChild(_lockButton);
|
||||||
@@ -143,7 +143,7 @@ namespace Content.Client.Actions.UI
|
|||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
Scale = (0.5f, 0.5f),
|
Scale = (0.5f, 0.5f),
|
||||||
ToolTip = Loc.GetString("ui-actionmenu-function-open-abilities-menu"),
|
ToolTip = Loc.GetString("ui-actionsui-function-open-abilities-menu"),
|
||||||
TooltipDelay = CustomTooltipDelay
|
TooltipDelay = CustomTooltipDelay
|
||||||
};
|
};
|
||||||
settingsContainer.AddChild(_settingsButton);
|
settingsContainer.AddChild(_settingsButton);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Client.Eui;
|
using Content.Client.Eui;
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Content.Shared.Chemistry.Reagent;
|
using Content.Shared.Chemistry.Reagent;
|
||||||
using Content.Shared.Eui;
|
using Content.Shared.Eui;
|
||||||
@@ -63,7 +63,7 @@ namespace Content.Client.Administration.UI
|
|||||||
{
|
{
|
||||||
_eui = eui;
|
_eui = eui;
|
||||||
|
|
||||||
Title = Loc.GetString("Add reagent...");
|
Title = Loc.GetString("admin-add-reagent-eui-title");
|
||||||
|
|
||||||
Contents.AddChild(new VBoxContainer
|
Contents.AddChild(new VBoxContainer
|
||||||
{
|
{
|
||||||
@@ -74,14 +74,14 @@ namespace Content.Client.Administration.UI
|
|||||||
Columns = 2,
|
Columns = 2,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Cur volume: ")},
|
new Label {Text = Loc.GetString("admin-add-reagent-eui-current-volume-label") + " "},
|
||||||
(_volumeLabel = new Label()),
|
(_volumeLabel = new Label()),
|
||||||
new Label {Text = Loc.GetString("Reagent: ")},
|
new Label {Text = Loc.GetString("admin-add-reagent-eui-reagent-label") + " "},
|
||||||
(_reagentIdEdit = new LineEdit {PlaceHolder = Loc.GetString("Reagent ID...")}),
|
(_reagentIdEdit = new LineEdit {PlaceHolder = Loc.GetString("admin-add-reagent-eui-reagent-id-edit")}),
|
||||||
new Label {Text = Loc.GetString("Amount: ")},
|
new Label {Text = Loc.GetString("admin-add-reagent-eui-amount-label") + " "},
|
||||||
(_amountEdit = new LineEdit
|
(_amountEdit = new LineEdit
|
||||||
{
|
{
|
||||||
PlaceHolder = Loc.GetString("A number..."),
|
PlaceHolder = Loc.GetString("admin-add-reagent-eui-amount-edit"),
|
||||||
HorizontalExpand = true
|
HorizontalExpand = true
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@@ -98,8 +98,8 @@ namespace Content.Client.Administration.UI
|
|||||||
ClipText = true
|
ClipText = true
|
||||||
}),
|
}),
|
||||||
|
|
||||||
(_addButton = new Button {Text = Loc.GetString("Add")}),
|
(_addButton = new Button {Text = Loc.GetString("admin-add-reagent-eui-add-button")}),
|
||||||
(_addCloseButton = new Button {Text = Loc.GetString("Add & Close")})
|
(_addCloseButton = new Button {Text = Loc.GetString("admin-add-reagent-eui-add-close-button")})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,31 +125,32 @@ namespace Content.Client.Administration.UI
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(_reagentIdEdit.Text))
|
if (string.IsNullOrWhiteSpace(_reagentIdEdit.Text))
|
||||||
{
|
{
|
||||||
DoError(Loc.GetString("Must specify reagent ID"));
|
DoError(Loc.GetString("admin-add-reagent-eui-no-reagent-id-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_eui._prototypes.HasIndex<ReagentPrototype>(_reagentIdEdit.Text))
|
if (!_eui._prototypes.HasIndex<ReagentPrototype>(_reagentIdEdit.Text))
|
||||||
{
|
{
|
||||||
DoError(Loc.GetString("'{0}' does not exist.", _reagentIdEdit.Text));
|
DoError(Loc.GetString("admin-add-reagent-eui-reagent-does-not-exist-error",
|
||||||
|
("reagent", _reagentIdEdit.Text)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(_amountEdit.Text))
|
if (string.IsNullOrWhiteSpace(_amountEdit.Text))
|
||||||
{
|
{
|
||||||
DoError(Loc.GetString("Must specify reagent amount"));
|
DoError(Loc.GetString("admin-add-reagent-eui-no-reagent-amount-specified-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!float.TryParse(_amountEdit.Text, out _))
|
if (!float.TryParse(_amountEdit.Text, out _))
|
||||||
{
|
{
|
||||||
DoError(Loc.GetString("Invalid amount"));
|
DoError(Loc.GetString("admin-add-reagent-eui-invalid-amount-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_addButton.Disabled = false;
|
_addButton.Disabled = false;
|
||||||
_addCloseButton.Disabled = false;
|
_addCloseButton.Disabled = false;
|
||||||
_errorLabel.Text = "";
|
_errorLabel.Text = string.Empty;
|
||||||
|
|
||||||
void DoError(string text)
|
void DoError(string text)
|
||||||
{
|
{
|
||||||
@@ -162,7 +163,9 @@ namespace Content.Client.Administration.UI
|
|||||||
|
|
||||||
public void HandleState(AdminAddReagentEuiState state)
|
public void HandleState(AdminAddReagentEuiState state)
|
||||||
{
|
{
|
||||||
_volumeLabel.Text = Loc.GetString("{0}/{1}u", state.CurVolume, state.MaxVolume);
|
_volumeLabel.Text = Loc.GetString("admin-add-reagent-eui-current-and-max-volume-label",
|
||||||
|
("currentVolume", state.CurVolume),
|
||||||
|
("maxVolume" ,state.MaxVolume));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.Administration.UI.Tabs;
|
using Content.Client.Administration.UI.Tabs;
|
||||||
using Content.Client.HUD;
|
using Content.Client.HUD;
|
||||||
@@ -25,15 +25,15 @@ namespace Content.Client.Administration.UI
|
|||||||
public AdminMenuWindow()
|
public AdminMenuWindow()
|
||||||
{
|
{
|
||||||
MinSize = SetSize = (500, 250);
|
MinSize = SetSize = (500, 250);
|
||||||
Title = Loc.GetString("Admin Menu");
|
Title = Loc.GetString("admin-menu-title");
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
MasterTabContainer.SetTabTitle(0, Loc.GetString("Admin"));
|
MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab"));
|
||||||
MasterTabContainer.SetTabTitle(1, Loc.GetString("Adminbus"));
|
MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab"));
|
||||||
MasterTabContainer.SetTabTitle(2, Loc.GetString("Atmos"));
|
MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab"));
|
||||||
MasterTabContainer.SetTabTitle(3, Loc.GetString("Round"));
|
MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab"));
|
||||||
MasterTabContainer.SetTabTitle(4, Loc.GetString("Server"));
|
MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab"));
|
||||||
MasterTabContainer.SetTabTitle(5, Loc.GetString("Players"));
|
MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-players-tab"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void EnteredTree()
|
protected override void EnteredTree()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.Administration.Managers;
|
using Content.Client.Administration.Managers;
|
||||||
using Content.Client.Eui;
|
using Content.Client.Eui;
|
||||||
@@ -207,7 +207,7 @@ namespace Content.Client.Administration.UI
|
|||||||
|
|
||||||
al.AddChild(new Label {Text = name});
|
al.AddChild(new Label {Text = name});
|
||||||
|
|
||||||
var titleControl = new Label {Text = admin.Title ?? Loc.GetString("none")};
|
var titleControl = new Label {Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant()};
|
||||||
if (admin.Title == null) // none
|
if (admin.Title == null) // none
|
||||||
{
|
{
|
||||||
titleControl.StyleClasses.Add(StyleBase.StyleClassItalic);
|
titleControl.StyleClasses.Add(StyleBase.StyleClassItalic);
|
||||||
@@ -228,7 +228,7 @@ namespace Content.Client.Administration.UI
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
italic = true;
|
italic = true;
|
||||||
rank = Loc.GetString("none");
|
rank = Loc.GetString("permissions-eui-edit-no-rank-text").ToLowerInvariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
var rankControl = new Label {Text = rank};
|
var rankControl = new Label {Text = rank};
|
||||||
@@ -248,14 +248,14 @@ namespace Content.Client.Administration.UI
|
|||||||
HorizontalAlignment = Control.HAlignment.Center,
|
HorizontalAlignment = Control.HAlignment.Center,
|
||||||
});
|
});
|
||||||
|
|
||||||
var editButton = new Button {Text = Loc.GetString("Edit")};
|
var editButton = new Button {Text = Loc.GetString("permissions-eui-edit-title-button") };
|
||||||
editButton.OnPressed += _ => OnEditPressed(admin);
|
editButton.OnPressed += _ => OnEditPressed(admin);
|
||||||
al.AddChild(editButton);
|
al.AddChild(editButton);
|
||||||
|
|
||||||
if (!_adminManager.HasFlag(combinedFlags))
|
if (!_adminManager.HasFlag(combinedFlags))
|
||||||
{
|
{
|
||||||
editButton.Disabled = true;
|
editButton.Disabled = true;
|
||||||
editButton.ToolTip = Loc.GetString("You do not have the required flags to edit this admin.");
|
editButton.ToolTip = Loc.GetString("permissions-eui-do-not-have-required-flags-to-edit-admin-tooltip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,14 +271,14 @@ namespace Content.Client.Administration.UI
|
|||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
HorizontalAlignment = Control.HAlignment.Center,
|
HorizontalAlignment = Control.HAlignment.Center,
|
||||||
});
|
});
|
||||||
var editButton = new Button {Text = Loc.GetString("Edit")};
|
var editButton = new Button {Text = Loc.GetString("permissions-eui-edit-admin-rank-button") };
|
||||||
editButton.OnPressed += _ => OnEditRankPressed(kv);
|
editButton.OnPressed += _ => OnEditRankPressed(kv);
|
||||||
_menu.AdminRanksList.AddChild(editButton);
|
_menu.AdminRanksList.AddChild(editButton);
|
||||||
|
|
||||||
if (!_adminManager.HasFlag(rank.Flags))
|
if (!_adminManager.HasFlag(rank.Flags))
|
||||||
{
|
{
|
||||||
editButton.Disabled = true;
|
editButton.Disabled = true;
|
||||||
editButton.ToolTip = Loc.GetString("You do not have the required flags to edit this rank.");
|
editButton.ToolTip = Loc.GetString("permissions-eui-do-not-have-required-flags-to-edit-rank-tooltip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -299,19 +299,19 @@ namespace Content.Client.Administration.UI
|
|||||||
public Menu(PermissionsEui ui)
|
public Menu(PermissionsEui ui)
|
||||||
{
|
{
|
||||||
_ui = ui;
|
_ui = ui;
|
||||||
Title = Loc.GetString("Permissions Panel");
|
Title = Loc.GetString("permissions-eui-menu-title");
|
||||||
|
|
||||||
var tab = new TabContainer();
|
var tab = new TabContainer();
|
||||||
|
|
||||||
AddAdminButton = new Button
|
AddAdminButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Add Admin"),
|
Text = Loc.GetString("permissions-eui-menu-add-admin-button"),
|
||||||
HorizontalAlignment = HAlignment.Right
|
HorizontalAlignment = HAlignment.Right
|
||||||
};
|
};
|
||||||
|
|
||||||
AddAdminRankButton = new Button
|
AddAdminRankButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Add Admin Rank"),
|
Text = Loc.GetString("permissions-eui-menu-add-admin-rank-button"),
|
||||||
HorizontalAlignment = HAlignment.Right
|
HorizontalAlignment = HAlignment.Right
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -320,14 +320,14 @@ namespace Content.Client.Administration.UI
|
|||||||
{
|
{
|
||||||
Children = {AdminsList, AddAdminButton},
|
Children = {AdminsList, AddAdminButton},
|
||||||
};
|
};
|
||||||
TabContainer.SetTabTitle(adminVBox, Loc.GetString("Admins"));
|
TabContainer.SetTabTitle(adminVBox, Loc.GetString("permissions-eui-menu-admins-tab-title"));
|
||||||
|
|
||||||
AdminRanksList = new GridContainer {Columns = 3};
|
AdminRanksList = new GridContainer {Columns = 3};
|
||||||
var rankVBox = new VBoxContainer
|
var rankVBox = new VBoxContainer
|
||||||
{
|
{
|
||||||
Children = { AdminRanksList, AddAdminRankButton}
|
Children = { AdminRanksList, AddAdminRankButton}
|
||||||
};
|
};
|
||||||
TabContainer.SetTabTitle(rankVBox, Loc.GetString("Admin Ranks"));
|
TabContainer.SetTabTitle(rankVBox, Loc.GetString("permissions-eui-menu-admin-ranks-tab-title"));
|
||||||
|
|
||||||
tab.AddChild(adminVBox);
|
tab.AddChild(adminVBox);
|
||||||
tab.AddChild(rankVBox);
|
tab.AddChild(rankVBox);
|
||||||
@@ -360,22 +360,23 @@ namespace Content.Client.Administration.UI
|
|||||||
if (data is { } dat)
|
if (data is { } dat)
|
||||||
{
|
{
|
||||||
var name = dat.UserName ?? dat.UserId.ToString();
|
var name = dat.UserName ?? dat.UserId.ToString();
|
||||||
Title = Loc.GetString("Edit admin {0}", name);
|
Title = Loc.GetString("permissions-eui-edit-admin-window-edit-admin-label",
|
||||||
|
("admin", name));
|
||||||
|
|
||||||
nameControl = new Label {Text = name};
|
nameControl = new Label {Text = name};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Title = Loc.GetString("Add admin");
|
Title = Loc.GetString("permissions-eui-menu-add-admin-button");
|
||||||
|
|
||||||
nameControl = NameEdit = new LineEdit {PlaceHolder = Loc.GetString("Username/User ID")};
|
nameControl = NameEdit = new LineEdit {PlaceHolder = Loc.GetString("permissions-eui-edit-admin-window-name-edit-placeholder") };
|
||||||
}
|
}
|
||||||
|
|
||||||
TitleEdit = new LineEdit {PlaceHolder = Loc.GetString("Custom title, leave blank to inherit rank title.")};
|
TitleEdit = new LineEdit {PlaceHolder = Loc.GetString("permissions-eui-edit-admin-window-title-edit-placeholder") };
|
||||||
RankButton = new OptionButton();
|
RankButton = new OptionButton();
|
||||||
SaveButton = new Button {Text = Loc.GetString("Save"), HorizontalAlignment = HAlignment.Right};
|
SaveButton = new Button {Text = Loc.GetString("permissions-eui-edit-admin-window-save-button"), HorizontalAlignment = HAlignment.Right};
|
||||||
|
|
||||||
RankButton.AddItem(Loc.GetString("No rank"), NoRank);
|
RankButton.AddItem(Loc.GetString("permissions-eui-edit-admin-window-no-rank-button"), NoRank);
|
||||||
foreach (var (rId, rank) in ui._ranks)
|
foreach (var (rId, rank) in ui._ranks)
|
||||||
{
|
{
|
||||||
RankButton.AddItem(rank.Name, rId);
|
RankButton.AddItem(rank.Name, rId);
|
||||||
@@ -454,7 +455,7 @@ namespace Content.Client.Administration.UI
|
|||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
// show remove button.
|
// show remove button.
|
||||||
RemoveButton = new Button {Text = Loc.GetString("Remove")};
|
RemoveButton = new Button {Text = Loc.GetString("permissions-eui-edit-admin-window-remove-flag-button") };
|
||||||
bottomButtons.AddChild(RemoveButton);
|
bottomButtons.AddChild(RemoveButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,7 +528,7 @@ namespace Content.Client.Administration.UI
|
|||||||
|
|
||||||
NameEdit = new LineEdit
|
NameEdit = new LineEdit
|
||||||
{
|
{
|
||||||
PlaceHolder = Loc.GetString("Rank name"),
|
PlaceHolder = Loc.GetString("permissions-eui-edit-admin-rank-window-name-edit-placeholder"),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data != null)
|
if (data != null)
|
||||||
@@ -536,7 +537,7 @@ namespace Content.Client.Administration.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
SaveButton = new Button {
|
SaveButton = new Button {
|
||||||
Text = Loc.GetString("Save"),
|
Text = Loc.GetString("permissions-eui-menu-save-admin-rank-button"),
|
||||||
HorizontalAlignment = HAlignment.Right,
|
HorizontalAlignment = HAlignment.Right,
|
||||||
HorizontalExpand = true
|
HorizontalExpand = true
|
||||||
};
|
};
|
||||||
@@ -568,7 +569,7 @@ namespace Content.Client.Administration.UI
|
|||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
// show remove button.
|
// show remove button.
|
||||||
RemoveButton = new Button {Text = Loc.GetString("Remove")};
|
RemoveButton = new Button {Text = Loc.GetString("permissions-eui-menu-remove-admin-rank-button") };
|
||||||
bottomButtons.AddChild(RemoveButton);
|
bottomButtons.AddChild(RemoveButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ namespace Content.Client.Administration.UI.SetOutfit
|
|||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|
||||||
Title = Loc.GetString("Set Outfit");
|
Title = Loc.GetString("set-outfit-menu-title");
|
||||||
|
|
||||||
ConfirmButton.Text = Loc.GetString("Confirm");
|
ConfirmButton.Text = Loc.GetString("set-outfit-menu-confirm-button");
|
||||||
ConfirmButton.OnPressed += ConfirmButtonOnOnPressed;
|
ConfirmButton.OnPressed += ConfirmButtonOnOnPressed;
|
||||||
SearchBar.OnTextChanged += SearchBarOnOnTextChanged;
|
SearchBar.OnTextChanged += SearchBarOnOnTextChanged;
|
||||||
OutfitList.OnItemSelected += OutfitListOnOnItemSelected;
|
OutfitList.OnItemSelected += OutfitListOnOnItemSelected;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.StationEvents.Managers;
|
using Content.Client.StationEvents.Managers;
|
||||||
@@ -21,7 +21,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab
|
|||||||
protected override void EnteredTree()
|
protected override void EnteredTree()
|
||||||
{
|
{
|
||||||
_data = IoCManager.Resolve<IStationEventManager>().StationEvents.ToList();
|
_data = IoCManager.Resolve<IStationEventManager>().StationEvents.ToList();
|
||||||
_data.Add(_data.Any() ? Loc.GetString("Not loaded") : Loc.GetString("Random"));
|
_data.Add(_data.Any() ? Loc.GetString("station-events-window-not-loaded-text") : Loc.GetString("station-events-window-random-text"));
|
||||||
foreach (var stationEvent in _data)
|
foreach (var stationEvent in _data)
|
||||||
{
|
{
|
||||||
EventsOptions.AddItem(stationEvent);
|
EventsOptions.AddItem(stationEvent);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Content.Client.Arcade.UI;
|
using Content.Client.Arcade.UI;
|
||||||
@@ -114,7 +114,7 @@ namespace Content.Client.Arcade
|
|||||||
|
|
||||||
_pauseButton = new Button
|
_pauseButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Pause"),
|
Text = Loc.GetString("blockgame-menu-button-pause"),
|
||||||
TextAlign = Label.AlignMode.Center
|
TextAlign = Label.AlignMode.Center
|
||||||
};
|
};
|
||||||
_pauseButton.OnPressed += (e) => TryPause();
|
_pauseButton.OnPressed += (e) => TryPause();
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace Content.Client.Atmos.UI
|
|||||||
{
|
{
|
||||||
(_nameLabel = new Label
|
(_nameLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Gas Analyzer"),
|
Text = Loc.GetString("gas-analyzer-window-name"),
|
||||||
FontOverride = font,
|
FontOverride = font,
|
||||||
FontColorOverride = StyleNano.NanoGold,
|
FontColorOverride = StyleNano.NanoGold,
|
||||||
VerticalAlignment = VAlignment.Center
|
VerticalAlignment = VAlignment.Center
|
||||||
@@ -95,7 +95,7 @@ namespace Content.Client.Atmos.UI
|
|||||||
MinSize = (20, 0),
|
MinSize = (20, 0),
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
},
|
},
|
||||||
(refreshButton = new Button {Text = "Refresh"}), //TODO: refresh icon?
|
(refreshButton = new Button {Text = "gas-analyzer-window-refresh-button"}), //TODO: refresh icon?
|
||||||
new Control
|
new Control
|
||||||
{
|
{
|
||||||
MinSize = (2, 0),
|
MinSize = (2, 0),
|
||||||
@@ -149,7 +149,7 @@ namespace Content.Client.Atmos.UI
|
|||||||
{
|
{
|
||||||
_statusContainer.AddChild(new Label
|
_statusContainer.AddChild(new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Error: {0}", state.Error),
|
Text = Loc.GetString("gas-analyzer-window-error-text", ("errorText", state.Error)),
|
||||||
FontColorOverride = Color.Red
|
FontColorOverride = Color.Red
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -157,12 +157,13 @@ namespace Content.Client.Atmos.UI
|
|||||||
|
|
||||||
_statusContainer.AddChild(new Label
|
_statusContainer.AddChild(new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Pressure: {0:0.##} kPa", state.Pressure)
|
Text = Loc.GetString("gas-analyzer-window-pressure-text", ("pressure", $"{state.Pressure:0.##}"))
|
||||||
});
|
});
|
||||||
_statusContainer.AddChild(new Label
|
_statusContainer.AddChild(new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Temperature: {0:0.#}K ({1:0.#}°C)", state.Temperature,
|
Text = Loc.GetString("gas-analyzer-window-temperature-text",
|
||||||
TemperatureHelpers.KelvinToCelsius(state.Temperature))
|
("tempK", $"{state.Temperature:0.#}"),
|
||||||
|
("tempC", $"{TemperatureHelpers.KelvinToCelsius(state.Temperature):0.#}"))
|
||||||
});
|
});
|
||||||
// Return here cause all that stuff down there is gas stuff (so we don't get the seperators)
|
// Return here cause all that stuff down there is gas stuff (so we don't get the seperators)
|
||||||
if (state.Gases == null || state.Gases.Length == 0)
|
if (state.Gases == null || state.Gases.Length == 0)
|
||||||
@@ -222,7 +223,7 @@ namespace Content.Client.Atmos.UI
|
|||||||
});
|
});
|
||||||
tableVal.AddChild(new Label
|
tableVal.AddChild(new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("{0:0.##} mol", gas.Amount)
|
Text = Loc.GetString("gas-analyzer-window-molality-text", ("mol", $"{gas.Amount:0.##}"))
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add to the gas bar //TODO: highlight the currently hover one
|
// Add to the gas bar //TODO: highlight the currently hover one
|
||||||
@@ -230,8 +231,10 @@ namespace Content.Client.Atmos.UI
|
|||||||
var right = (i == state.Gases.Length - 1) ? 0f : 2f;
|
var right = (i == state.Gases.Length - 1) ? 0f : 2f;
|
||||||
gasBar.AddChild(new PanelContainer
|
gasBar.AddChild(new PanelContainer
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("{0}: {1:0.##} mol ({2:0.#}%)", gas.Name, gas.Amount,
|
ToolTip = Loc.GetString("gas-analyzer-window-molality-percentage-text",
|
||||||
(gas.Amount / totalGasAmount) * 100),
|
("gasName", gas.Name),
|
||||||
|
("amount", $"{gas.Amount:0.##}"),
|
||||||
|
("percentage", $"{(gas.Amount / totalGasAmount * 100):0.#}")),
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
SizeFlagsStretchRatio = gas.Amount,
|
SizeFlagsStretchRatio = gas.Amount,
|
||||||
MouseFilter = MouseFilterMode.Pass,
|
MouseFilter = MouseFilterMode.Pass,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.Body.Components;
|
using Content.Shared.Body.Components;
|
||||||
using Content.Shared.Body.Mechanism;
|
using Content.Shared.Body.Mechanism;
|
||||||
using Content.Shared.Body.Part;
|
using Content.Shared.Body.Part;
|
||||||
@@ -23,7 +23,7 @@ namespace Content.Client.Body.UI
|
|||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
Title = Loc.GetString("Body Scanner");
|
Title = Loc.GetString("body-scanner-display-title");
|
||||||
|
|
||||||
var hSplit = new HBoxContainer
|
var hSplit = new HBoxContainer
|
||||||
{
|
{
|
||||||
@@ -57,7 +57,7 @@ namespace Content.Client.Body.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = "Health: "
|
Text = $"{Loc.GetString("body-scanner-display-health-label")} "
|
||||||
},
|
},
|
||||||
(BodyPartHealth = new Label())
|
(BodyPartHealth = new Label())
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ namespace Content.Client.Body.UI
|
|||||||
// TODO BODY Part damage
|
// TODO BODY Part damage
|
||||||
if (part.Owner.TryGetComponent(out IDamageableComponent? damageable))
|
if (part.Owner.TryGetComponent(out IDamageableComponent? damageable))
|
||||||
{
|
{
|
||||||
BodyPartHealth.Text = Loc.GetString("{0} damage", damageable.TotalDamage);
|
BodyPartHealth.Text = Loc.GetString("body-scanner-display-body-part-damage-text",("damage", damageable.TotalDamage));
|
||||||
}
|
}
|
||||||
|
|
||||||
MechanismList.Clear();
|
MechanismList.Clear();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
@@ -18,7 +18,7 @@ namespace Content.Client.Body.UI
|
|||||||
public SurgeryWindow()
|
public SurgeryWindow()
|
||||||
{
|
{
|
||||||
MinSize = SetSize = (300, 400);
|
MinSize = SetSize = (300, 400);
|
||||||
Title = Loc.GetString("Surgery");
|
Title = Loc.GetString("surgery-window-title");
|
||||||
RectClipContent = true;
|
RectClipContent = true;
|
||||||
|
|
||||||
var vSplitContainer = new VBoxContainer
|
var vSplitContainer = new VBoxContainer
|
||||||
@@ -105,7 +105,7 @@ namespace Content.Client.Body.UI
|
|||||||
(DisplayText = new Label
|
(DisplayText = new Label
|
||||||
{
|
{
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
Text = "N/A",
|
Text = Loc.GetString("surgery-window-not-available-button-text"),
|
||||||
}),
|
}),
|
||||||
(new Control
|
(new Control
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
#nullable enable
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
using Content.Shared.Cargo;
|
using Content.Shared.Cargo;
|
||||||
@@ -45,19 +46,19 @@ namespace Content.Client.Cargo.UI
|
|||||||
Owner = owner;
|
Owner = owner;
|
||||||
|
|
||||||
if (Owner.RequestOnly)
|
if (Owner.RequestOnly)
|
||||||
Title = Loc.GetString("Cargo Request Console");
|
Title = Loc.GetString("cargo-console-menu-request-only-title");
|
||||||
else
|
else
|
||||||
Title = Loc.GetString("Cargo Shuttle Console");
|
Title = Loc.GetString("cargo-console-menu-title");
|
||||||
|
|
||||||
var rows = new VBoxContainer();
|
var rows = new VBoxContainer();
|
||||||
|
|
||||||
var accountName = new HBoxContainer();
|
var accountName = new HBoxContainer();
|
||||||
var accountNameLabel = new Label {
|
var accountNameLabel = new Label {
|
||||||
Text = Loc.GetString("Account Name: "),
|
Text = Loc.GetString("cargo-console-menu-account-name-label") + " ",
|
||||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_accountNameLabel = new Label {
|
_accountNameLabel = new Label {
|
||||||
Text = "None" //Owner.Bank.Account.Name
|
Text = Loc.GetString("cargo-console-menu-account-name-none-text") //Owner.Bank.Account.Name
|
||||||
};
|
};
|
||||||
accountName.AddChild(accountNameLabel);
|
accountName.AddChild(accountNameLabel);
|
||||||
accountName.AddChild(_accountNameLabel);
|
accountName.AddChild(_accountNameLabel);
|
||||||
@@ -66,7 +67,7 @@ namespace Content.Client.Cargo.UI
|
|||||||
var points = new HBoxContainer();
|
var points = new HBoxContainer();
|
||||||
var pointsLabel = new Label
|
var pointsLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Points: "),
|
Text = Loc.GetString("cargo-console-menu-points-label") + " ",
|
||||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_pointsLabel = new Label
|
_pointsLabel = new Label
|
||||||
@@ -80,12 +81,12 @@ namespace Content.Client.Cargo.UI
|
|||||||
var shuttleStatus = new HBoxContainer();
|
var shuttleStatus = new HBoxContainer();
|
||||||
var shuttleStatusLabel = new Label
|
var shuttleStatusLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Shuttle Status: "),
|
Text = Loc.GetString("cargo-console-menu-shuttle-status-label") + " ",
|
||||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_shuttleStatusLabel = new Label
|
_shuttleStatusLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Away") // Shuttle.Status
|
Text = Loc.GetString("cargo-console-menu-shuttle-status-away-text") // Shuttle.Status
|
||||||
};
|
};
|
||||||
shuttleStatus.AddChild(shuttleStatusLabel);
|
shuttleStatus.AddChild(shuttleStatusLabel);
|
||||||
shuttleStatus.AddChild(_shuttleStatusLabel);
|
shuttleStatus.AddChild(_shuttleStatusLabel);
|
||||||
@@ -94,12 +95,12 @@ namespace Content.Client.Cargo.UI
|
|||||||
var shuttleCapacity = new HBoxContainer();
|
var shuttleCapacity = new HBoxContainer();
|
||||||
var shuttleCapacityLabel = new Label
|
var shuttleCapacityLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Order Capacity: "),
|
Text = Loc.GetString("cargo-console-menu-order-capacity-label") + " ",
|
||||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_shuttleCapacityLabel = new Label
|
_shuttleCapacityLabel = new Label
|
||||||
{
|
{
|
||||||
Text = "0/20"
|
Text = $"{0}/{20}"
|
||||||
};
|
};
|
||||||
shuttleCapacity.AddChild(shuttleCapacityLabel);
|
shuttleCapacity.AddChild(shuttleCapacityLabel);
|
||||||
shuttleCapacity.AddChild(_shuttleCapacityLabel);
|
shuttleCapacity.AddChild(_shuttleCapacityLabel);
|
||||||
@@ -109,13 +110,13 @@ namespace Content.Client.Cargo.UI
|
|||||||
CallShuttleButton = new Button()
|
CallShuttleButton = new Button()
|
||||||
{
|
{
|
||||||
//Text = Loc.GetString("Call Shuttle"),
|
//Text = Loc.GetString("Call Shuttle"),
|
||||||
Text = Loc.GetString("Activate Telepad"), //Shuttle code pending
|
Text = Loc.GetString("cargo-console-menu-call-shuttle-button"), //Shuttle code pending
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
HorizontalExpand = true
|
HorizontalExpand = true
|
||||||
};
|
};
|
||||||
PermissionsButton = new Button()
|
PermissionsButton = new Button()
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Permissions"),
|
Text = Loc.GetString("cargo-console-menu-permissions-button"),
|
||||||
TextAlign = Label.AlignMode.Center
|
TextAlign = Label.AlignMode.Center
|
||||||
};
|
};
|
||||||
buttons.AddChild(CallShuttleButton);
|
buttons.AddChild(CallShuttleButton);
|
||||||
@@ -125,13 +126,13 @@ namespace Content.Client.Cargo.UI
|
|||||||
var category = new HBoxContainer();
|
var category = new HBoxContainer();
|
||||||
_categories = new OptionButton
|
_categories = new OptionButton
|
||||||
{
|
{
|
||||||
Prefix = Loc.GetString("Categories: "),
|
Prefix = Loc.GetString("cargo-console-menu-categories-label") + " ",
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
SizeFlagsStretchRatio = 1
|
SizeFlagsStretchRatio = 1
|
||||||
};
|
};
|
||||||
_searchBar = new LineEdit
|
_searchBar = new LineEdit
|
||||||
{
|
{
|
||||||
PlaceHolder = Loc.GetString("Search"),
|
PlaceHolder = Loc.GetString("cargo-console-menu-search-bar-placeholder"),
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
SizeFlagsStretchRatio = 1
|
SizeFlagsStretchRatio = 1
|
||||||
};
|
};
|
||||||
@@ -164,14 +165,14 @@ namespace Content.Client.Cargo.UI
|
|||||||
VerticalExpand = true
|
VerticalExpand = true
|
||||||
};
|
};
|
||||||
var rAndOVBox = new VBoxContainer();
|
var rAndOVBox = new VBoxContainer();
|
||||||
var requestsLabel = new Label { Text = Loc.GetString("Requests") };
|
var requestsLabel = new Label { Text = Loc.GetString("cargo-console-menu-requests-label") };
|
||||||
_requests = new VBoxContainer // replace with scroll box so that approval buttons can be added
|
_requests = new VBoxContainer // replace with scroll box so that approval buttons can be added
|
||||||
{
|
{
|
||||||
StyleClasses = { "transparentItemList" },
|
StyleClasses = { "transparentItemList" },
|
||||||
VerticalExpand = true,
|
VerticalExpand = true,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
};
|
};
|
||||||
var ordersLabel = new Label { Text = Loc.GetString("Orders") };
|
var ordersLabel = new Label { Text = Loc.GetString("cargo-console-menu-orders-label") };
|
||||||
_orders = new VBoxContainer
|
_orders = new VBoxContainer
|
||||||
{
|
{
|
||||||
StyleClasses = { "transparentItemList" },
|
StyleClasses = { "transparentItemList" },
|
||||||
@@ -270,7 +271,7 @@ namespace Content.Client.Cargo.UI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_categoryStrings.Add(Loc.GetString("All"));
|
_categoryStrings.Add(Loc.GetString("cargo-console-menu-populate-categories-all-text"));
|
||||||
|
|
||||||
var search = _searchBar.Text.Trim().ToLowerInvariant();
|
var search = _searchBar.Text.Trim().ToLowerInvariant();
|
||||||
foreach (var prototype in Owner.Market.Products)
|
foreach (var prototype in Owner.Market.Products)
|
||||||
@@ -308,10 +309,14 @@ namespace Content.Client.Cargo.UI
|
|||||||
Icon = { Texture = Owner.Market.GetProduct(order.ProductId)?.Icon.Frame0() },
|
Icon = { Texture = Owner.Market.GetProduct(order.ProductId)?.Icon.Frame0() },
|
||||||
ProductName =
|
ProductName =
|
||||||
{
|
{
|
||||||
Text =
|
Text = Loc.GetString(
|
||||||
$"{Owner.Market.GetProduct(order.ProductId)?.Name} (x{order.Amount}) by {order.Requester}"
|
"cargo-console-menu-populate-orders-cargo-order-row-product-name-text",
|
||||||
|
("productName", Owner.Market.GetProduct(order.ProductId)?.Name!),
|
||||||
|
("orderAmount", order.Amount),
|
||||||
|
("orderRequester", order.Requester))
|
||||||
},
|
},
|
||||||
Description = {Text = $"Reasons: {order.Reason}"}
|
Description = {Text = Loc.GetString("cargo-console-menu-order-reason-description",
|
||||||
|
("reason", order.Reason))}
|
||||||
};
|
};
|
||||||
row.Cancel.OnPressed += (args) => { OnOrderCanceled?.Invoke(args); };
|
row.Cancel.OnPressed += (args) => { OnOrderCanceled?.Invoke(args); };
|
||||||
if (order.Approved)
|
if (order.Approved)
|
||||||
@@ -463,14 +468,14 @@ namespace Content.Client.Cargo.UI
|
|||||||
|
|
||||||
Approve = new Button
|
Approve = new Button
|
||||||
{
|
{
|
||||||
Text = "Approve",
|
Text = Loc.GetString("cargo-console-menu-cargo-order-row-approve-button"),
|
||||||
StyleClasses = { StyleNano.StyleClassLabelSubText }
|
StyleClasses = { StyleNano.StyleClassLabelSubText }
|
||||||
};
|
};
|
||||||
hBox.AddChild(Approve);
|
hBox.AddChild(Approve);
|
||||||
|
|
||||||
Cancel = new Button
|
Cancel = new Button
|
||||||
{
|
{
|
||||||
Text = "Cancel",
|
Text = Loc.GetString("cargo-console-menu-cargo-order-row-cancel-button"),
|
||||||
StyleClasses = { StyleNano.StyleClassLabelSubText }
|
StyleClasses = { StyleNano.StyleClassLabelSubText }
|
||||||
};
|
};
|
||||||
hBox.AddChild(Cancel);
|
hBox.AddChild(Cancel);
|
||||||
|
|||||||
@@ -17,22 +17,22 @@ namespace Content.Client.Cargo.UI
|
|||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Title = Loc.GetString("Order Form");
|
Title = Loc.GetString("cargo-console-order-menu-title");
|
||||||
|
|
||||||
var vBox = new VBoxContainer();
|
var vBox = new VBoxContainer();
|
||||||
var gridContainer = new GridContainer { Columns = 2 };
|
var gridContainer = new GridContainer { Columns = 2 };
|
||||||
|
|
||||||
var requesterLabel = new Label { Text = Loc.GetString("Name:") };
|
var requesterLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-requester-label") };
|
||||||
Requester = new LineEdit();
|
Requester = new LineEdit();
|
||||||
gridContainer.AddChild(requesterLabel);
|
gridContainer.AddChild(requesterLabel);
|
||||||
gridContainer.AddChild(Requester);
|
gridContainer.AddChild(Requester);
|
||||||
|
|
||||||
var reasonLabel = new Label { Text = Loc.GetString("Reason:") };
|
var reasonLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-reason-label:") };
|
||||||
Reason = new LineEdit();
|
Reason = new LineEdit();
|
||||||
gridContainer.AddChild(reasonLabel);
|
gridContainer.AddChild(reasonLabel);
|
||||||
gridContainer.AddChild(Reason);
|
gridContainer.AddChild(Reason);
|
||||||
|
|
||||||
var amountLabel = new Label { Text = Loc.GetString("Amount:") };
|
var amountLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-amount-label:") };
|
||||||
Amount = new SpinBox
|
Amount = new SpinBox
|
||||||
{
|
{
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
@@ -49,7 +49,7 @@ namespace Content.Client.Cargo.UI
|
|||||||
|
|
||||||
SubmitButton = new Button()
|
SubmitButton = new Button()
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("OK"),
|
Text = Loc.GetString("cargo-console-order-menu-submit-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
};
|
};
|
||||||
vBox.AddChild(SubmitButton);
|
vBox.AddChild(SubmitButton);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
@@ -18,7 +18,7 @@ namespace Content.Client.Cargo.UI
|
|||||||
MinSize = SetSize = (300, 300);
|
MinSize = SetSize = (300, 300);
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Title = Loc.GetString("Galactic Bank Selection");
|
Title = Loc.GetString("galactic-bank-selection-menu-title");
|
||||||
|
|
||||||
_accounts = new ItemList() { SelectMode = ItemList.ItemListSelectMode.Single };
|
_accounts = new ItemList() { SelectMode = ItemList.ItemListSelectMode.Single };
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ namespace Content.Client.CharacterAppearance
|
|||||||
public MagicMirrorWindow(MagicMirrorBoundUserInterface owner)
|
public MagicMirrorWindow(MagicMirrorBoundUserInterface owner)
|
||||||
{
|
{
|
||||||
SetSize = MinSize = (500, 360);
|
SetSize = MinSize = (500, 360);
|
||||||
Title = Loc.GetString("Magic Mirror");
|
Title = Loc.GetString("magic-mirror-window-title");
|
||||||
|
|
||||||
_hairStylePicker = new HairStylePicker {HorizontalExpand = true};
|
_hairStylePicker = new HairStylePicker {HorizontalExpand = true};
|
||||||
_hairStylePicker.OnHairStylePicked += newStyle => owner.HairSelected(newStyle, false);
|
_hairStylePicker.OnHairStylePicked += newStyle => owner.HairSelected(newStyle, false);
|
||||||
|
|||||||
@@ -92,12 +92,12 @@ namespace Content.Client.CharacterInfo.Components
|
|||||||
|
|
||||||
AddChild(new Placeholder()
|
AddChild(new Placeholder()
|
||||||
{
|
{
|
||||||
PlaceholderText = Loc.GetString("Health & status effects")
|
PlaceholderText = Loc.GetString("character-info-health-and-status-effects-text")
|
||||||
});
|
});
|
||||||
|
|
||||||
AddChild(new Label
|
AddChild(new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Objectives"),
|
Text = Loc.GetString("character-info-objectives-label"),
|
||||||
HorizontalAlignment = HAlignment.Center
|
HorizontalAlignment = HAlignment.Center
|
||||||
});
|
});
|
||||||
ObjectivesContainer = new VBoxContainer();
|
ObjectivesContainer = new VBoxContainer();
|
||||||
@@ -105,7 +105,7 @@ namespace Content.Client.CharacterInfo.Components
|
|||||||
|
|
||||||
AddChild(new Placeholder()
|
AddChild(new Placeholder()
|
||||||
{
|
{
|
||||||
PlaceholderText = Loc.GetString("Antagonist Roles")
|
PlaceholderText = Loc.GetString("character-info-roles-antagonist-text")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,9 @@ namespace Content.Client.Chemistry.Components
|
|||||||
_parent._uiUpdateNeeded = false;
|
_parent._uiUpdateNeeded = false;
|
||||||
|
|
||||||
_label.SetMarkup(Loc.GetString(
|
_label.SetMarkup(Loc.GetString(
|
||||||
"Volume: [color=white]{0}/{1}[/color]",
|
"hypospray-volume-text",
|
||||||
_parent.CurrentVolume, _parent.TotalVolume));
|
("currentVolume", _parent.CurrentVolume),
|
||||||
|
("totalVolume", _parent.TotalVolume)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,12 +71,14 @@ namespace Content.Client.Chemistry.Components
|
|||||||
//Update current volume and injector state
|
//Update current volume and injector state
|
||||||
var modeStringLocalized = _parent.CurrentMode switch
|
var modeStringLocalized = _parent.CurrentMode switch
|
||||||
{
|
{
|
||||||
InjectorToggleMode.Draw => Loc.GetString("Draw"),
|
InjectorToggleMode.Draw => Loc.GetString("injector-draw-text"),
|
||||||
InjectorToggleMode.Inject => Loc.GetString("Inject"),
|
InjectorToggleMode.Inject => Loc.GetString("injector-inject-text"),
|
||||||
_ => Loc.GetString("Invalid")
|
_ => Loc.GetString("injector-invalid-injector-toggle-mode")
|
||||||
};
|
};
|
||||||
_label.SetMarkup(Loc.GetString("Volume: [color=white]{0}/{1}[/color] | [color=white]{2}[/color]",
|
_label.SetMarkup(Loc.GetString("injector-volume-label",
|
||||||
_parent.CurrentVolume, _parent.TotalVolume, modeStringLocalized));
|
("currentVolume", _parent.CurrentVolume),
|
||||||
|
("totalVolume", _parent.TotalVolume),
|
||||||
|
("modeString", modeStringLocalized)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
//Setup window layout/elements
|
//Setup window layout/elements
|
||||||
_window = new ChemMasterWindow
|
_window = new ChemMasterWindow
|
||||||
{
|
{
|
||||||
Title = Loc.GetString("ChemMaster 4000"),
|
Title = Loc.GetString("chem-master-bound-user-interface-title"),
|
||||||
};
|
};
|
||||||
|
|
||||||
_window.OpenCentered();
|
_window.OpenCentered();
|
||||||
@@ -73,7 +73,6 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
SendMessage(new UiActionMessage(action, null, null, null, pillAmount, bottleAmount));
|
SendMessage(new UiActionMessage(action, null, null, null, pillAmount, bottleAmount));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Container")},
|
new Label {Text = Loc.GetString("chem-master-window-container-label")},
|
||||||
new Control {HorizontalExpand = true},
|
new Control {HorizontalExpand = true},
|
||||||
(EjectButton = new Button {Text = Loc.GetString("Eject")})
|
(EjectButton = new Button {Text = Loc.GetString("chem-master-window-eject-button")})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Wrap the container info in a PanelContainer so we can color it's background differently.
|
//Wrap the container info in a PanelContainer so we can color it's background differently.
|
||||||
@@ -91,7 +91,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("No container loaded.")
|
Text = Loc.GetString("chem-master-window-no-container-loaded-text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -106,10 +106,10 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Buffer")},
|
new Label {Text = Loc.GetString("chem-master-window-buffer-text")},
|
||||||
new Control {HorizontalExpand = true},
|
new Control {HorizontalExpand = true},
|
||||||
(BufferTransferButton = new Button {Text = Loc.GetString("Transfer"), Pressed = BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenRight }}),
|
(BufferTransferButton = new Button {Text = Loc.GetString("chem-master-window-transfer-button"), Pressed = BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenRight }}),
|
||||||
(BufferDiscardButton = new Button {Text = Loc.GetString("Discard"), Pressed = !BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenLeft }})
|
(BufferDiscardButton = new Button {Text = Loc.GetString("chem-master-window-discard-button"), Pressed = !BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenLeft }})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Buffer empty.")
|
Text = Loc.GetString("chem-master-window-buffer-empty-text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -148,7 +148,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Packaging ")},
|
new Label {Text = $"{Loc.GetString("chem-master-window-packaging-text")} "},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Pills:")
|
Text = $"{Loc.GetString("chem-master-window-pills-label")} "
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -204,12 +204,12 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
var pillVolume = new Label
|
var pillVolume = new Label
|
||||||
{
|
{
|
||||||
Text = " max 50u/each ",
|
Text = $" {Loc.GetString("chem-master-window-max-pills-volume-text")} ",
|
||||||
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
||||||
};
|
};
|
||||||
PillInfo.AddChild((pillVolume));
|
PillInfo.AddChild((pillVolume));
|
||||||
|
|
||||||
CreatePills = new Button {Text = Loc.GetString("Create")};
|
CreatePills = new Button {Text = Loc.GetString("chem-master-window-create-pill-button") };
|
||||||
PillInfo.AddChild(CreatePills);
|
PillInfo.AddChild(CreatePills);
|
||||||
|
|
||||||
//Bottles
|
//Bottles
|
||||||
@@ -219,7 +219,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Bottles:")
|
Text = Loc.GetString("cham-master-window-bottles-label")
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -241,12 +241,12 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
var bottleVolume = new Label
|
var bottleVolume = new Label
|
||||||
{
|
{
|
||||||
Text = " max 30u/each ",
|
Text = $" {Loc.GetString("chem-master-window-max-bottle-volume-text")} ",
|
||||||
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
||||||
};
|
};
|
||||||
BottleInfo.AddChild((bottleVolume));
|
BottleInfo.AddChild((bottleVolume));
|
||||||
|
|
||||||
CreateBottles = new Button {Text = Loc.GetString("Create")};
|
CreateBottles = new Button {Text = Loc.GetString("chem-master-window-create-bottle-button") };
|
||||||
BottleInfo.AddChild(CreateBottles);
|
BottleInfo.AddChild(CreateBottles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
if (!state.HasBeaker)
|
if (!state.HasBeaker)
|
||||||
{
|
{
|
||||||
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("No container loaded.")});
|
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("chem-master-window-no-container-loaded-text") });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
foreach (var reagent in state.ContainerReagents)
|
foreach (var reagent in state.ContainerReagents)
|
||||||
{
|
{
|
||||||
var name = Loc.GetString("Unknown reagent");
|
var name = Loc.GetString("chem-master-window-unknown-reagent-text");
|
||||||
//Try to the prototype for the given reagent. This gives us it's name.
|
//Try to the prototype for the given reagent. This gives us it's name.
|
||||||
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
|
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
|
||||||
{
|
{
|
||||||
@@ -357,7 +357,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
MakeChemButton("5", ReagentUnit.New(5), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
|
MakeChemButton("5", ReagentUnit.New(5), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
|
||||||
MakeChemButton("10", ReagentUnit.New(10), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
|
MakeChemButton("10", ReagentUnit.New(10), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
|
||||||
MakeChemButton("25", ReagentUnit.New(25), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
|
MakeChemButton("25", ReagentUnit.New(25), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
|
||||||
MakeChemButton("All", ReagentUnit.New(-1), reagent.ReagentId, false, StyleBase.ButtonOpenLeft),
|
MakeChemButton(Loc.GetString("chem-master-window-buffer-all-amount"), ReagentUnit.New(-1), reagent.ReagentId, false, StyleBase.ButtonOpenLeft),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -367,14 +367,14 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
if (!state.BufferReagents.Any())
|
if (!state.BufferReagents.Any())
|
||||||
{
|
{
|
||||||
BufferInfo.Children.Add(new Label {Text = Loc.GetString("Buffer empty.")});
|
BufferInfo.Children.Add(new Label {Text = Loc.GetString("chem-master-window-buffer-empty-text") });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bufferHBox = new HBoxContainer();
|
var bufferHBox = new HBoxContainer();
|
||||||
BufferInfo.AddChild(bufferHBox);
|
BufferInfo.AddChild(bufferHBox);
|
||||||
|
|
||||||
var bufferLabel = new Label {Text = "buffer: "};
|
var bufferLabel = new Label { Text = $"{Loc.GetString("chem-master-window-buffer-label")} " };
|
||||||
bufferHBox.AddChild(bufferLabel);
|
bufferHBox.AddChild(bufferLabel);
|
||||||
var bufferVol = new Label
|
var bufferVol = new Label
|
||||||
{
|
{
|
||||||
@@ -385,7 +385,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
foreach (var reagent in state.BufferReagents)
|
foreach (var reagent in state.BufferReagents)
|
||||||
{
|
{
|
||||||
var name = Loc.GetString("Unknown reagent");
|
var name = Loc.GetString("chem-master-window-unknown-reagent-text");
|
||||||
//Try to the prototype for the given reagent. This gives us it's name.
|
//Try to the prototype for the given reagent. This gives us it's name.
|
||||||
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
|
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
|
||||||
{
|
{
|
||||||
@@ -413,7 +413,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
MakeChemButton("5", ReagentUnit.New(5), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
|
MakeChemButton("5", ReagentUnit.New(5), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
|
||||||
MakeChemButton("10", ReagentUnit.New(10), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
|
MakeChemButton("10", ReagentUnit.New(10), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
|
||||||
MakeChemButton("25", ReagentUnit.New(25), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
|
MakeChemButton("25", ReagentUnit.New(25), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
|
||||||
MakeChemButton("All", ReagentUnit.New(-1), reagent.ReagentId, true, StyleBase.ButtonOpenLeft),
|
MakeChemButton(Loc.GetString("chem-master-window-buffer-all-amount"), ReagentUnit.New(-1), reagent.ReagentId, true, StyleBase.ButtonOpenLeft),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.Chemistry.Dispenser;
|
using Content.Shared.Chemistry.Dispenser;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
@@ -35,7 +35,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
//Setup window layout/elements
|
//Setup window layout/elements
|
||||||
_window = new ReagentDispenserWindow
|
_window = new ReagentDispenserWindow
|
||||||
{
|
{
|
||||||
Title = Loc.GetString("Reagent dispenser"),
|
Title = Loc.GetString("reagent-dispenser-bound-user-interface-title"),
|
||||||
};
|
};
|
||||||
|
|
||||||
_window.OpenCentered();
|
_window.OpenCentered();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
using Content.Shared.Chemistry.Dispenser;
|
using Content.Shared.Chemistry.Dispenser;
|
||||||
using Content.Shared.Chemistry.Reagent;
|
using Content.Shared.Chemistry.Reagent;
|
||||||
@@ -81,7 +81,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Amount")},
|
new Label {Text = Loc.GetString("reagent-dispenser-window-amount-to-dispense-label")},
|
||||||
//Padding
|
//Padding
|
||||||
new Control {MinSize = (20, 0)},
|
new Control {MinSize = (20, 0)},
|
||||||
(DispenseButton1 = new Button {Text = "1", Group = dispenseAmountGroup, StyleClasses = { StyleBase.ButtonOpenRight }}),
|
(DispenseButton1 = new Button {Text = "1", Group = dispenseAmountGroup, StyleClasses = { StyleBase.ButtonOpenRight }}),
|
||||||
@@ -108,9 +108,9 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Container: ")},
|
new Label {Text = Loc.GetString("reagent-dispenser-window-container-label") + " "},
|
||||||
(ClearButton = new Button {Text = Loc.GetString("Clear"), StyleClasses = {StyleBase.ButtonOpenRight}}),
|
(ClearButton = new Button {Text = Loc.GetString("reagent-dispenser-window-clear-button"), StyleClasses = {StyleBase.ButtonOpenRight}}),
|
||||||
(EjectButton = new Button {Text = Loc.GetString("Eject"), StyleClasses = {StyleBase.ButtonOpenLeft}})
|
(EjectButton = new Button {Text = Loc.GetString("reagent-dispenser-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenLeft}})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Wrap the container info in a PanelContainer so we can color it's background differently.
|
//Wrap the container info in a PanelContainer so we can color it's background differently.
|
||||||
@@ -133,7 +133,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("No container loaded.")
|
Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -163,7 +163,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ChemicalList.AddChild(new Button {Text = Loc.GetString("Reagent name not found")});
|
ChemicalList.AddChild(new Button {Text = Loc.GetString("reagent-dispenser-window-reagent-name-not-found-text") });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
if (!state.HasBeaker)
|
if (!state.HasBeaker)
|
||||||
{
|
{
|
||||||
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("No container loaded.")});
|
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text") });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
|
|
||||||
foreach (var reagent in state.ContainerReagents)
|
foreach (var reagent in state.ContainerReagents)
|
||||||
{
|
{
|
||||||
var name = Loc.GetString("Unknown reagent");
|
var name = Loc.GetString("reagent-dispenser-window-unknown-reagent-text");
|
||||||
//Try to the prototype for the given reagent. This gives us it's name.
|
//Try to the prototype for the given reagent. This gives us it's name.
|
||||||
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
|
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
|
||||||
{
|
{
|
||||||
@@ -304,7 +304,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
},
|
},
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = $"{reagent.Quantity}u",
|
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", reagent.Quantity)),
|
||||||
StyleClasses = {StyleNano.StyleClassPowerStateGood}
|
StyleClasses = {StyleNano.StyleClassPowerStateGood}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,7 +319,7 @@ namespace Content.Client.Chemistry.UI
|
|||||||
new Label {Text = $"{name}: "},
|
new Label {Text = $"{name}: "},
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = $"{reagent.Quantity}u",
|
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", reagent.Quantity)),
|
||||||
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
@@ -13,7 +13,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
public AcceptCloningWindow()
|
public AcceptCloningWindow()
|
||||||
{
|
{
|
||||||
|
|
||||||
Title = Loc.GetString("Cloning Machine");
|
Title = Loc.GetString("accept-cloning-window-title");
|
||||||
|
|
||||||
Contents.AddChild(new VBoxContainer
|
Contents.AddChild(new VBoxContainer
|
||||||
{
|
{
|
||||||
@@ -25,7 +25,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
{
|
{
|
||||||
(new Label()
|
(new Label()
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("You are being cloned!\nTransfer your soul to the clone body?")
|
Text = Loc.GetString("accept-cloning-window-prompt-text-part")
|
||||||
}),
|
}),
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
{
|
{
|
||||||
(AcceptButton = new Button
|
(AcceptButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Yes"),
|
Text = Loc.GetString("accept-cloning-window-accept-button"),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
(new Control()
|
(new Control()
|
||||||
@@ -44,7 +44,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
|
|
||||||
(DenyButton = new Button
|
(DenyButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("No"),
|
Text = Loc.GetString("accept-cloning-window-deny-button"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
SetSize = MinSize = (250, 300);
|
SetSize = MinSize = (250, 300);
|
||||||
_scanManager = scanManager;
|
_scanManager = scanManager;
|
||||||
|
|
||||||
Title = Loc.GetString("Cloning Machine");
|
Title = Loc.GetString("cloning-pod-window-title");
|
||||||
|
|
||||||
Contents.AddChild(new VBoxContainer
|
Contents.AddChild(new VBoxContainer
|
||||||
{
|
{
|
||||||
@@ -54,7 +54,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
{
|
{
|
||||||
(CloneButton = new Button
|
(CloneButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Clone")
|
Text = Loc.GetString("cloning-pod-clone-button")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -72,7 +72,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
}),
|
}),
|
||||||
(EjectButton = new Button
|
(EjectButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Eject Body")
|
Text = Loc.GetString("cloning-pod-eject-body-button")
|
||||||
}),
|
}),
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
@@ -80,11 +80,11 @@ namespace Content.Client.Cloning.UI
|
|||||||
{
|
{
|
||||||
new Label()
|
new Label()
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Neural Interface: ")
|
Text = Loc.GetString($"{Loc.GetString("cloning-pod-neural-interface-label")} ")
|
||||||
},
|
},
|
||||||
(_mindState = new Label()
|
(_mindState = new Label()
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("No Activity"),
|
Text = Loc.GetString("cloning-pod-no-activity-text"),
|
||||||
FontColorOverride = Color.Red
|
FontColorOverride = Color.Red
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
|
|
||||||
_cloningProgressBar.MaxValue = state.Maximum;
|
_cloningProgressBar.MaxValue = state.Maximum;
|
||||||
UpdateProgress();
|
UpdateProgress();
|
||||||
_mindState.Text = Loc.GetString(state.MindPresent ? "Consciousness Detected" : "No Activity");
|
_mindState.Text = Loc.GetString(state.MindPresent ? "cloning-pod-mind-present-text" : "cloning-pod-no-activity-text");
|
||||||
_mindState.FontColorOverride = state.MindPresent ? Color.Green : Color.Red;
|
_mindState.FontColorOverride = state.MindPresent ? Color.Green : Color.Red;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ namespace Content.Client.Cloning.UI
|
|||||||
{
|
{
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
Text = "",
|
Text = string.Empty,
|
||||||
ClipText = true
|
ClipText = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Shared.Construction.Prototypes;
|
using Content.Shared.Construction.Prototypes;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -23,7 +23,7 @@ namespace Content.Client.Construction
|
|||||||
{
|
{
|
||||||
if (Prototype == null) return;
|
if (Prototype == null) return;
|
||||||
|
|
||||||
message.AddMarkup(Loc.GetString("Building: [color=cyan]{0}[/color]\n", Prototype.Name));
|
message.AddMarkup(Loc.GetString("construction-ghost-examine-message", ("name", Prototype.Name)));
|
||||||
|
|
||||||
if (!_prototypeManager.TryIndex(Prototype.Graph, out ConstructionGraphPrototype? graph)) return;
|
if (!_prototypeManager.TryIndex(Prototype.Graph, out ConstructionGraphPrototype? graph)) return;
|
||||||
var startNode = graph.Nodes[Prototype.StartNode];
|
var startNode = graph.Nodes[Prototype.StartNode];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Robust.Client.AutoGenerated;
|
using Robust.Client.AutoGenerated;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
@@ -84,9 +84,9 @@ namespace Content.Client.Construction.UI
|
|||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|
||||||
Title = Loc.GetString("Construction");
|
Title = Loc.GetString("construction-menu-title");
|
||||||
|
|
||||||
BuildButton.Text = Loc.GetString("Place construction ghost");
|
BuildButton.Text = Loc.GetString("construction-menu-place-ghost");
|
||||||
RecipesList.OnItemSelected += obj => RecipeSelected?.Invoke(this, obj.ItemList[obj.ItemIndex]);
|
RecipesList.OnItemSelected += obj => RecipeSelected?.Invoke(this, obj.ItemList[obj.ItemIndex]);
|
||||||
RecipesList.OnItemDeselected += _ => RecipeSelected?.Invoke(this, null);
|
RecipesList.OnItemDeselected += _ => RecipeSelected?.Invoke(this, null);
|
||||||
|
|
||||||
@@ -97,11 +97,11 @@ namespace Content.Client.Construction.UI
|
|||||||
PopulateRecipes?.Invoke(this, (SearchBar.Text, Categories[obj.Id]));
|
PopulateRecipes?.Invoke(this, (SearchBar.Text, Categories[obj.Id]));
|
||||||
};
|
};
|
||||||
|
|
||||||
BuildButton.Text = Loc.GetString("Place construction ghost");
|
BuildButton.Text = Loc.GetString("construction-menu-place-ghost");
|
||||||
BuildButton.OnToggled += args => BuildButtonToggled?.Invoke(this, args.Pressed);
|
BuildButton.OnToggled += args => BuildButtonToggled?.Invoke(this, args.Pressed);
|
||||||
ClearButton.Text = Loc.GetString("Clear All");
|
ClearButton.Text = Loc.GetString("construction-menu-clear-all");
|
||||||
ClearButton.OnPressed += _ => ClearAllGhosts?.Invoke(this, EventArgs.Empty);
|
ClearButton.OnPressed += _ => ClearAllGhosts?.Invoke(this, EventArgs.Empty);
|
||||||
EraseButton.Text = Loc.GetString("Eraser Mode");
|
EraseButton.Text = Loc.GetString("construction-menu-eraser-mode");
|
||||||
EraseButton.OnToggled += args => EraseButtonToggled?.Invoke(this, args.Pressed);
|
EraseButton.OnToggled += args => EraseButtonToggled?.Invoke(this, args.Pressed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ namespace Content.Client.Construction.UI
|
|||||||
public void SetRecipeInfo(string name, string description, Texture iconTexture, bool isItem)
|
public void SetRecipeInfo(string name, string description, Texture iconTexture, bool isItem)
|
||||||
{
|
{
|
||||||
BuildButton.Disabled = false;
|
BuildButton.Disabled = false;
|
||||||
BuildButton.Text = Loc.GetString(isItem ? "Place construction ghost" : "Craft");
|
BuildButton.Text = Loc.GetString(isItem ? "construction-menu-place-ghost" : "construction-menu-craft");
|
||||||
TargetName.SetMessage(name);
|
TargetName.SetMessage(name);
|
||||||
TargetDesc.SetMessage(description);
|
TargetDesc.SetMessage(description);
|
||||||
TargetTexture.Texture = iconTexture;
|
TargetTexture.Texture = iconTexture;
|
||||||
|
|||||||
@@ -61,11 +61,11 @@ namespace Content.Client.Crayon
|
|||||||
}
|
}
|
||||||
|
|
||||||
_parent._uiUpdateNeeded = false;
|
_parent._uiUpdateNeeded = false;
|
||||||
_label.SetMarkup(Loc.GetString("Drawing: [color={0}]{1}[/color] ({2}/{3})",
|
_label.SetMarkup(Loc.GetString("crayon-drawing-label",
|
||||||
_parent.Color,
|
("color",_parent.Color),
|
||||||
_parent.SelectedState,
|
("state",_parent.SelectedState),
|
||||||
_parent.Charges,
|
("charges", _parent.Charges),
|
||||||
_parent.Capacity));
|
("capacity",_parent.Capacity)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
using Content.Shared.Crayon;
|
using Content.Shared.Crayon;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
@@ -24,7 +24,7 @@ namespace Content.Client.Crayon.UI
|
|||||||
public CrayonWindow(CrayonBoundUserInterface owner)
|
public CrayonWindow(CrayonBoundUserInterface owner)
|
||||||
{
|
{
|
||||||
MinSize = SetSize = (250, 300);
|
MinSize = SetSize = (250, 300);
|
||||||
Title = Loc.GetString("Crayon");
|
Title = Loc.GetString("crayon-window-title");
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
|
|
||||||
var vbox = new VBoxContainer();
|
var vbox = new VBoxContainer();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Content.Client.Credits
|
|||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Title = Loc.GetString("Credits");
|
Title = Loc.GetString("credits-window-title");
|
||||||
|
|
||||||
var rootContainer = new TabContainer();
|
var rootContainer = new TabContainer();
|
||||||
|
|
||||||
@@ -56,9 +56,9 @@ namespace Content.Client.Credits
|
|||||||
rootContainer.AddChild(patronsList);
|
rootContainer.AddChild(patronsList);
|
||||||
rootContainer.AddChild(licensesList);
|
rootContainer.AddChild(licensesList);
|
||||||
|
|
||||||
TabContainer.SetTabTitle(patronsList, Loc.GetString("Patrons"));
|
TabContainer.SetTabTitle(patronsList, Loc.GetString("credits-window-patrons-tab"));
|
||||||
TabContainer.SetTabTitle(ss14ContributorsList, Loc.GetString("Credits"));
|
TabContainer.SetTabTitle(ss14ContributorsList, Loc.GetString("credits-window-ss14contributorslist-tab"));
|
||||||
TabContainer.SetTabTitle(licensesList, Loc.GetString("Open Source Licenses"));
|
TabContainer.SetTabTitle(licensesList, Loc.GetString("credits-window-licenses-tab"));
|
||||||
|
|
||||||
PopulatePatronsList(patronsList);
|
PopulatePatronsList(patronsList);
|
||||||
PopulateCredits(ss14ContributorsList);
|
PopulateCredits(ss14ContributorsList);
|
||||||
@@ -106,7 +106,7 @@ namespace Content.Client.Credits
|
|||||||
Button patronButton;
|
Button patronButton;
|
||||||
vBox.AddChild(patronButton = new Button
|
vBox.AddChild(patronButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Become a Patron",
|
Text = Loc.GetString("credits-window-become-patron-button"),
|
||||||
HorizontalAlignment = HAlignment.Center
|
HorizontalAlignment = HAlignment.Center
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -163,8 +163,8 @@ namespace Content.Client.Credits
|
|||||||
SeparationOverride = 20,
|
SeparationOverride = 20,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = "Want to get on this list?"},
|
new Label {Text = Loc.GetString("credits-window-contributor-encouragement-label") },
|
||||||
(contributeButton = new Button {Text = "Contribute!"})
|
(contributeButton = new Button {Text = Loc.GetString("credits-window-contribute-button")})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -194,10 +194,10 @@ namespace Content.Client.Credits
|
|||||||
vBox.AddChild(label);
|
vBox.AddChild(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddSection("Space Station 14 Contributors", "GitHub.txt");
|
AddSection(Loc.GetString("credits-window-contributors-section-title"), "GitHub.txt");
|
||||||
AddSection("Space Station 13 Codebases", "SpaceStation13.txt");
|
AddSection(Loc.GetString("credits-window-codebases-section-title"), "SpaceStation13.txt");
|
||||||
AddSection("Original Space Station 13 Remake Team", "OriginalRemake.txt");
|
AddSection(Loc.GetString("credits-window-original-remake-team-section-title"), "OriginalRemake.txt");
|
||||||
AddSection("Special Thanks", "SpecialThanks.txt", true);
|
AddSection(Loc.GetString("credits-window-special-thanks-section-title"), "SpecialThanks.txt", true);
|
||||||
|
|
||||||
contributorsList.AddChild(vBox);
|
contributorsList.AddChild(vBox);
|
||||||
|
|
||||||
@@ -205,6 +205,7 @@ namespace Content.Client.Credits
|
|||||||
IoCManager.Resolve<IUriOpener>().OpenUri(UILinks.GitHub);
|
IoCManager.Resolve<IUriOpener>().OpenUri(UILinks.GitHub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO this doesn't looked used anywhere
|
||||||
private static IEnumerable<string> Lines(TextReader reader)
|
private static IEnumerable<string> Lines(TextReader reader)
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ namespace Content.Client.Disposal.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("State: ")},
|
new Label {Text = $"{Loc.GetString("disposal-mailing-unit-window-state-label")} "},
|
||||||
new Control {MinSize = (4, 0)},
|
new Control {MinSize = (4, 0)},
|
||||||
(_unitState = new Label {Text = Loc.GetString("Ready")})
|
(_unitState = new Label {Text = Loc.GetString("disposal-mailing-unit-window-ready-state")})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new Control {MinSize = (0, 10)},
|
new Control {MinSize = (0, 10)},
|
||||||
@@ -55,7 +55,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Pressure:")},
|
new Label {Text = Loc.GetString("disposal-mailing-unit-pressure-label")},
|
||||||
new Control {MinSize = (4, 0)},
|
new Control {MinSize = (4, 0)},
|
||||||
(_pressureBar = new ProgressBar
|
(_pressureBar = new ProgressBar
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Handle:")},
|
new Label {Text = Loc.GetString("disposal-mailing-unit-handle-label")},
|
||||||
new Control
|
new Control
|
||||||
{
|
{
|
||||||
MinSize = (4, 0),
|
MinSize = (4, 0),
|
||||||
@@ -87,7 +87,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
(Engage = new Button
|
(Engage = new Button
|
||||||
{
|
{
|
||||||
MinSize = (16, 0),
|
MinSize = (16, 0),
|
||||||
Text = Loc.GetString("Engage"),
|
Text = Loc.GetString("disposal-mailing-unit-engage-button"),
|
||||||
ToggleMode = true,
|
ToggleMode = true,
|
||||||
Disabled = true
|
Disabled = true
|
||||||
})
|
})
|
||||||
@@ -99,7 +99,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Eject:")},
|
new Label {Text = Loc.GetString("disposal-mailing-unit-eject-label")},
|
||||||
new Control
|
new Control
|
||||||
{
|
{
|
||||||
MinSize = (4, 0),
|
MinSize = (4, 0),
|
||||||
@@ -108,7 +108,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
(Eject = new Button
|
(Eject = new Button
|
||||||
{
|
{
|
||||||
MinSize = (16, 0),
|
MinSize = (16, 0),
|
||||||
Text = Loc.GetString("Eject Contents"),
|
Text = Loc.GetString("disposal-mailing-unit-eject-button"),
|
||||||
//HorizontalAlignment = HAlignment.Right
|
//HorizontalAlignment = HAlignment.Right
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
(Power = new CheckButton {Text = Loc.GetString("Power")}),
|
(Power = new CheckButton {Text = Loc.GetString("disposal-mailing-unit-power-button")}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -134,7 +134,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Select a destination:")
|
Text = Loc.GetString("disposal-mailing-unit-destination-select-label")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -176,7 +176,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("This unit:")
|
Text = Loc.GetString("disposal-mailing-unit-unit-self-reference")
|
||||||
},
|
},
|
||||||
new Control
|
new Control
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Shared.Disposal.Components;
|
using Content.Shared.Disposal.Components;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
@@ -18,13 +18,13 @@ namespace Content.Client.Disposal.UI
|
|||||||
public DisposalRouterWindow()
|
public DisposalRouterWindow()
|
||||||
{
|
{
|
||||||
MinSize = SetSize = (500, 110);
|
MinSize = SetSize = (500, 110);
|
||||||
Title = Loc.GetString("Disposal Router");
|
Title = Loc.GetString("disposal-router-window-title");
|
||||||
|
|
||||||
Contents.AddChild(new VBoxContainer
|
Contents.AddChild(new VBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Tags:")},
|
new Label {Text = Loc.GetString("disposal-router-window-tags-label")},
|
||||||
new Control {MinSize = (0, 10)},
|
new Control {MinSize = (0, 10)},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
@@ -34,11 +34,11 @@ namespace Content.Client.Disposal.UI
|
|||||||
{
|
{
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
MinSize = (320, 0),
|
MinSize = (320, 0),
|
||||||
ToolTip = Loc.GetString("A comma separated list of tags"),
|
ToolTip = Loc.GetString("disposal-router-window-tag-input-tooltip"),
|
||||||
IsValid = tags => TagRegex.IsMatch(tags)
|
IsValid = tags => TagRegex.IsMatch(tags)
|
||||||
}),
|
}),
|
||||||
new Control {MinSize = (10, 0)},
|
new Control {MinSize = (10, 0)},
|
||||||
(Confirm = new Button {Text = Loc.GetString("Confirm")})
|
(Confirm = new Button {Text = Loc.GetString("disposal-router-window-tag-input-confirm-button")})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Shared.Disposal.Components;
|
using Content.Shared.Disposal.Components;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
@@ -18,13 +18,13 @@ namespace Content.Client.Disposal.UI
|
|||||||
public DisposalTaggerWindow()
|
public DisposalTaggerWindow()
|
||||||
{
|
{
|
||||||
MinSize = SetSize = (500, 110);
|
MinSize = SetSize = (500, 110);
|
||||||
Title = Loc.GetString("Disposal Tagger");
|
Title = Loc.GetString("disposal-tagger-window-title");
|
||||||
|
|
||||||
Contents.AddChild(new VBoxContainer
|
Contents.AddChild(new VBoxContainer
|
||||||
{
|
{
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Label {Text = Loc.GetString("Tag:")},
|
new Label {Text = Loc.GetString("disposal-tagger-window-tag-input-label")},
|
||||||
new Control {MinSize = (0, 10)},
|
new Control {MinSize = (0, 10)},
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ namespace Content.Client.Disposal.UI
|
|||||||
IsValid = tag => TagRegex.IsMatch(tag)
|
IsValid = tag => TagRegex.IsMatch(tag)
|
||||||
}),
|
}),
|
||||||
new Control {MinSize = (10, 0)},
|
new Control {MinSize = (10, 0)},
|
||||||
(Confirm = new Button {Text = Loc.GetString("Confirm")})
|
(Confirm = new Button {Text = Loc.GetString("disposal-tagger-window-tag-confirm-button")})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ namespace Content.Client.DragDrop
|
|||||||
|
|
||||||
if (outOfRange)
|
if (outOfRange)
|
||||||
{
|
{
|
||||||
_playerManager.LocalPlayer?.ControlledEntity?.PopupMessage(Loc.GetString("You can't reach there!"));
|
_playerManager.LocalPlayer?.ControlledEntity?.PopupMessage(Loc.GetString("drag-drop-system-out-of-range-text"));
|
||||||
}
|
}
|
||||||
|
|
||||||
_dragDropHelper.EndDrag();
|
_dragDropHelper.EndDrag();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Client.Examine
|
|||||||
public override void GetData(IEntity user, IEntity target, VerbData data)
|
public override void GetData(IEntity user, IEntity target, VerbData data)
|
||||||
{
|
{
|
||||||
data.Visibility = VerbVisibility.Visible;
|
data.Visibility = VerbVisibility.Visible;
|
||||||
data.Text = Loc.GetString("Examine");
|
data.Text = Loc.GetString("examine-verb-name");
|
||||||
data.IconTexture = "/Textures/Interface/VerbIcons/examine.svg.192dpi.png";
|
data.IconTexture = "/Textures/Interface/VerbIcons/examine.svg.192dpi.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ namespace Content.Client.Ghost
|
|||||||
{
|
{
|
||||||
public class GhostGui : Control
|
public class GhostGui : Control
|
||||||
{
|
{
|
||||||
private readonly Button _returnToBody = new() {Text = Loc.GetString("Return to body")};
|
private readonly Button _returnToBody = new() {Text = Loc.GetString("ghost-gui-return-to-body-button") };
|
||||||
private readonly Button _ghostWarp = new() {Text = Loc.GetString("Ghost Warp")};
|
private readonly Button _ghostWarp = new() {Text = Loc.GetString("ghost-gui-ghost-warp-button") };
|
||||||
private readonly Button _ghostRoles = new() {Text = Loc.GetString("Ghost Roles")};
|
private readonly Button _ghostRoles = new() {Text = Loc.GetString("ghost-gui-ghost-roles-button") };
|
||||||
private readonly GhostComponent _owner;
|
private readonly GhostComponent _owner;
|
||||||
|
|
||||||
public GhostTargetWindow? TargetWindow { get; }
|
public GhostTargetWindow? TargetWindow { get; }
|
||||||
@@ -86,7 +86,7 @@ namespace Content.Client.Ghost
|
|||||||
public GhostTargetWindow(GhostComponent owner, IEntityNetworkManager netManager)
|
public GhostTargetWindow(GhostComponent owner, IEntityNetworkManager netManager)
|
||||||
{
|
{
|
||||||
MinSize = SetSize = (300, 450);
|
MinSize = SetSize = (300, 450);
|
||||||
Title = "Ghost Warp";
|
Title = Loc.GetString("ghost-target-window-title");
|
||||||
_owner = owner;
|
_owner = owner;
|
||||||
_netManager = netManager;
|
_netManager = netManager;
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ namespace Content.Client.Ghost
|
|||||||
{
|
{
|
||||||
var currentButtonRef = new Button
|
var currentButtonRef = new Button
|
||||||
{
|
{
|
||||||
Text = $"Warp: {name}",
|
Text = Loc.GetString("ghost-target-window-current-button", ("name", name)),
|
||||||
TextAlign = Label.AlignMode.Right,
|
TextAlign = Label.AlignMode.Right,
|
||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace Content.Client.Gravity
|
|||||||
|
|
||||||
Owner = ui;
|
Owner = ui;
|
||||||
|
|
||||||
Title = Loc.GetString("Gravity Generator Control");
|
Title = Loc.GetString("gravity-generator-window-title");
|
||||||
|
|
||||||
var vBox = new VBoxContainer
|
var vBox = new VBoxContainer
|
||||||
{
|
{
|
||||||
@@ -79,12 +79,12 @@ namespace Content.Client.Gravity
|
|||||||
};
|
};
|
||||||
Status = new Label
|
Status = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Current Status: " + (Owner.IsOn ? "On" : "Off")),
|
Text = $"{Loc.GetString("gravity-generator-window-status-label")} {Loc.GetString(Owner.IsOn ? "gravity-generator-window-is-on" : "gravity-generator-window-is-off")}",
|
||||||
FontColorOverride = Owner.IsOn ? Color.ForestGreen : Color.Red
|
FontColorOverride = Owner.IsOn ? Color.ForestGreen : Color.Red
|
||||||
};
|
};
|
||||||
Switch = new Button
|
Switch = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString(Owner.IsOn ? "Turn Off" : "Turn On"),
|
Text = Loc.GetString(Owner.IsOn ? "gravity-generator-window-turn-off-button" : "gravity-generator-window-turn-on-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
MinSize = new Vector2(150, 60)
|
MinSize = new Vector2(150, 60)
|
||||||
};
|
};
|
||||||
@@ -97,9 +97,9 @@ namespace Content.Client.Gravity
|
|||||||
|
|
||||||
public void UpdateButton()
|
public void UpdateButton()
|
||||||
{
|
{
|
||||||
Status.Text = Loc.GetString("Current Status: " + (Owner.IsOn ? "On" : "Off"));
|
Status.Text = $"{Loc.GetString("gravity-generator-window-status-label")} {Loc.GetString(Owner.IsOn ? "gravity-generator-window-is-on" : "gravity-generator-window-is-off")}";
|
||||||
Status.FontColorOverride = Owner.IsOn ? Color.ForestGreen : Color.Red;
|
Status.FontColorOverride = Owner.IsOn ? Color.ForestGreen : Color.Red;
|
||||||
Switch.Text = Loc.GetString(Owner.IsOn ? "Turn Off" : "Turn On");
|
Switch.Text = Loc.GetString(Owner.IsOn ? "gravity-generator-window-turn-off-button" : "gravity-generator-window-turn-on-button");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ namespace Content.Client.HUD
|
|||||||
// Escape
|
// Escape
|
||||||
_buttonEscapeMenu = new TopButton(escapeTexture, EngineKeyFunctions.EscapeMenu, _inputManager)
|
_buttonEscapeMenu = new TopButton(escapeTexture, EngineKeyFunctions.EscapeMenu, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open escape menu."),
|
ToolTip = Loc.GetString("game-hud-open-escape-menu-button-tooltip"),
|
||||||
MinSize = (70, 64),
|
MinSize = (70, 64),
|
||||||
StyleClasses = {StyleBase.ButtonOpenRight}
|
StyleClasses = {StyleBase.ButtonOpenRight}
|
||||||
};
|
};
|
||||||
@@ -212,7 +212,7 @@ namespace Content.Client.HUD
|
|||||||
// Character
|
// Character
|
||||||
_buttonCharacterMenu = new TopButton(characterTexture, ContentKeyFunctions.OpenCharacterMenu, _inputManager)
|
_buttonCharacterMenu = new TopButton(characterTexture, ContentKeyFunctions.OpenCharacterMenu, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open character menu."),
|
ToolTip = Loc.GetString("game-hud-open-character-menu-button-tooltip"),
|
||||||
MinSize = topMinSize,
|
MinSize = topMinSize,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
StyleClasses = {StyleBase.ButtonSquare}
|
StyleClasses = {StyleBase.ButtonSquare}
|
||||||
@@ -225,7 +225,7 @@ namespace Content.Client.HUD
|
|||||||
// Inventory
|
// Inventory
|
||||||
_buttonInventoryMenu = new TopButton(inventoryTexture, ContentKeyFunctions.OpenInventoryMenu, _inputManager)
|
_buttonInventoryMenu = new TopButton(inventoryTexture, ContentKeyFunctions.OpenInventoryMenu, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open inventory menu."),
|
ToolTip = Loc.GetString("game-hud-open-inventory-menu-button-tooltip"),
|
||||||
MinSize = topMinSize,
|
MinSize = topMinSize,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
StyleClasses = {StyleBase.ButtonSquare}
|
StyleClasses = {StyleBase.ButtonSquare}
|
||||||
@@ -238,7 +238,7 @@ namespace Content.Client.HUD
|
|||||||
// Crafting
|
// Crafting
|
||||||
_buttonCraftingMenu = new TopButton(craftingTexture, ContentKeyFunctions.OpenCraftingMenu, _inputManager)
|
_buttonCraftingMenu = new TopButton(craftingTexture, ContentKeyFunctions.OpenCraftingMenu, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open crafting menu."),
|
ToolTip = Loc.GetString("game-hud-open-crafting-menu-button-tooltip"),
|
||||||
MinSize = topMinSize,
|
MinSize = topMinSize,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
StyleClasses = {StyleBase.ButtonSquare}
|
StyleClasses = {StyleBase.ButtonSquare}
|
||||||
@@ -251,7 +251,7 @@ namespace Content.Client.HUD
|
|||||||
// Actions
|
// Actions
|
||||||
_buttonActionsMenu = new TopButton(actionsTexture, ContentKeyFunctions.OpenActionsMenu, _inputManager)
|
_buttonActionsMenu = new TopButton(actionsTexture, ContentKeyFunctions.OpenActionsMenu, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open actions menu."),
|
ToolTip = Loc.GetString("game-hud-open-actions-menu-button-tooltip"),
|
||||||
MinSize = topMinSize,
|
MinSize = topMinSize,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
StyleClasses = {StyleBase.ButtonSquare}
|
StyleClasses = {StyleBase.ButtonSquare}
|
||||||
@@ -264,7 +264,7 @@ namespace Content.Client.HUD
|
|||||||
// Admin
|
// Admin
|
||||||
_buttonAdminMenu = new TopButton(adminTexture, ContentKeyFunctions.OpenAdminMenu, _inputManager)
|
_buttonAdminMenu = new TopButton(adminTexture, ContentKeyFunctions.OpenAdminMenu, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open admin menu."),
|
ToolTip = Loc.GetString("game-hud-open-admin-menu-button-tooltip"),
|
||||||
MinSize = topMinSize,
|
MinSize = topMinSize,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
StyleClasses = {StyleBase.ButtonSquare}
|
StyleClasses = {StyleBase.ButtonSquare}
|
||||||
@@ -277,7 +277,7 @@ namespace Content.Client.HUD
|
|||||||
// Sandbox
|
// Sandbox
|
||||||
_buttonSandboxMenu = new TopButton(sandboxTexture, ContentKeyFunctions.OpenSandboxWindow, _inputManager)
|
_buttonSandboxMenu = new TopButton(sandboxTexture, ContentKeyFunctions.OpenSandboxWindow, _inputManager)
|
||||||
{
|
{
|
||||||
ToolTip = Loc.GetString("Open sandbox menu."),
|
ToolTip = Loc.GetString("game-hud-open-sandbox-menu-button-tooltip"),
|
||||||
MinSize = topMinSize,
|
MinSize = topMinSize,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
StyleClasses = {StyleBase.ButtonSquare}
|
StyleClasses = {StyleBase.ButtonSquare}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Client.Changelog;
|
using Content.Client.Changelog;
|
||||||
using Content.Client.Credits;
|
using Content.Client.Credits;
|
||||||
using Content.Client.Links;
|
using Content.Client.Links;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
@@ -26,16 +26,16 @@ namespace Content.Client.Info
|
|||||||
|
|
||||||
var uriOpener = IoCManager.Resolve<IUriOpener>();
|
var uriOpener = IoCManager.Resolve<IUriOpener>();
|
||||||
|
|
||||||
var discordButton = new Button {Text = Loc.GetString("Discord")};
|
var discordButton = new Button {Text = Loc.GetString("server-info-discord-button") };
|
||||||
discordButton.OnPressed += args => uriOpener.OpenUri(UILinks.Discord);
|
discordButton.OnPressed += args => uriOpener.OpenUri(UILinks.Discord);
|
||||||
|
|
||||||
var websiteButton = new Button {Text = Loc.GetString("Website")};
|
var websiteButton = new Button {Text = Loc.GetString("server-info-website-button") };
|
||||||
websiteButton.OnPressed += args => uriOpener.OpenUri(UILinks.Website);
|
websiteButton.OnPressed += args => uriOpener.OpenUri(UILinks.Website);
|
||||||
|
|
||||||
var reportButton = new Button { Text = Loc.GetString("Report Bugs") };
|
var reportButton = new Button { Text = Loc.GetString("server-info-report-button") };
|
||||||
reportButton.OnPressed += args => uriOpener.OpenUri(UILinks.BugReport);
|
reportButton.OnPressed += args => uriOpener.OpenUri(UILinks.BugReport);
|
||||||
|
|
||||||
var creditsButton = new Button { Text = Loc.GetString("Credits") };
|
var creditsButton = new Button { Text = Loc.GetString("server-info-credits-button") };
|
||||||
creditsButton.OnPressed += args => new CreditsWindow().Open();
|
creditsButton.OnPressed += args => new CreditsWindow().Open();
|
||||||
|
|
||||||
var changelogButton = new ChangelogButton
|
var changelogButton = new ChangelogButton
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.HUD;
|
using Content.Client.HUD;
|
||||||
using Content.Client.Items.Managers;
|
using Content.Client.Items.Managers;
|
||||||
@@ -284,7 +284,7 @@ namespace Content.Client.Inventory
|
|||||||
|
|
||||||
public HumanInventoryWindow(IGameHud gameHud)
|
public HumanInventoryWindow(IGameHud gameHud)
|
||||||
{
|
{
|
||||||
Title = Loc.GetString("Your Inventory");
|
Title = Loc.GetString("human-inventory-window-title");
|
||||||
Resizable = false;
|
Resizable = false;
|
||||||
|
|
||||||
var buttonDict = new Dictionary<Slots, ItemSlotButton>();
|
var buttonDict = new Dictionary<Slots, ItemSlotButton>();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.Strip;
|
using Content.Client.Strip;
|
||||||
using Content.Shared.Strip.Components;
|
using Content.Shared.Strip.Components;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
@@ -28,7 +28,7 @@ namespace Content.Client.Inventory
|
|||||||
{
|
{
|
||||||
base.Open();
|
base.Open();
|
||||||
|
|
||||||
_strippingMenu = new StrippingMenu($"{Owner.Owner.Name}'s inventory");
|
_strippingMenu = new StrippingMenu($"{Loc.GetString("strippable-bound-user-interface-stripping-menu-title",("ownerName", Owner.Owner.Name))}");
|
||||||
|
|
||||||
_strippingMenu.OnClose += Close;
|
_strippingMenu.OnClose += Close;
|
||||||
_strippingMenu.OpenCentered();
|
_strippingMenu.OpenCentered();
|
||||||
@@ -76,7 +76,7 @@ namespace Content.Client.Inventory
|
|||||||
{
|
{
|
||||||
foreach (var (id, name) in Handcuffs)
|
foreach (var (id, name) in Handcuffs)
|
||||||
{
|
{
|
||||||
_strippingMenu.AddButton(Loc.GetString("Restraints"), name, (ev) =>
|
_strippingMenu.AddButton(Loc.GetString("strippable-bound-user-interface-stripping-menu-handcuffs-button"), name, (ev) =>
|
||||||
{
|
{
|
||||||
SendMessage(new StrippingHandcuffButtonPressed(id));
|
SendMessage(new StrippingHandcuffButtonPressed(id));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ namespace Content.Client.Kitchen.UI
|
|||||||
{
|
{
|
||||||
var currentlySelectedTimeButton = (Button) _menu.CookTimeButtonVbox.GetChild(cState.ActiveButtonIndex);
|
var currentlySelectedTimeButton = (Button) _menu.CookTimeButtonVbox.GetChild(cState.ActiveButtonIndex);
|
||||||
currentlySelectedTimeButton.Pressed = true;
|
currentlySelectedTimeButton.Pressed = true;
|
||||||
var label = cState.ActiveButtonIndex <= 0 ? Loc.GetString("INSTANT") : cState.CurrentCookTime.ToString();
|
var label = cState.ActiveButtonIndex <= 0 ? Loc.GetString("microwave-bound-user-interface-instant-button") : cState.CurrentCookTime.ToString();
|
||||||
_menu.CookTimeInfoLabel.Text = $"{Loc.GetString("COOK TIME")}: {label}";
|
_menu.CookTimeInfoLabel.Text = $"{Loc.GetString("microwave-bound-user-interface-cook-time-label")}: {label}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
SetSize = MinSize = (512, 256);
|
SetSize = MinSize = (512, 256);
|
||||||
|
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
Title = Loc.GetString("Microwave");
|
Title = Loc.GetString("microwave-menu-title");
|
||||||
DisableCookingPanelOverlay = new PanelContainer
|
DisableCookingPanelOverlay = new PanelContainer
|
||||||
{
|
{
|
||||||
MouseFilter = MouseFilterMode.Stop,
|
MouseFilter = MouseFilterMode.Stop,
|
||||||
@@ -233,14 +233,14 @@ namespace Content.Client.Kitchen.UI
|
|||||||
|
|
||||||
StartButton = new Button
|
StartButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Start"),
|
Text = Loc.GetString("microwave-menu-start-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
};
|
};
|
||||||
|
|
||||||
EjectButton = new Button
|
EjectButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Eject All Contents"),
|
Text = Loc.GetString("microwave-menu-eject-all-text"),
|
||||||
ToolTip = Loc.GetString("This vaporizes all reagents, but ejects any solids."),
|
ToolTip = Loc.GetString("microwave-menu-eject-all-tooltip"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
{
|
{
|
||||||
var newButton = new MicrowaveCookTimeButton
|
var newButton = new MicrowaveCookTimeButton
|
||||||
{
|
{
|
||||||
Text = index <= 0 ? Loc.GetString("INSTANT") : index.ToString(),
|
Text = index <= 0 ? Loc.GetString("microwave-menu-instant-button") : index.ToString(),
|
||||||
CookTime = (uint)index,
|
CookTime = (uint)index,
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
ToggleMode = true,
|
ToggleMode = true,
|
||||||
@@ -286,7 +286,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
|
|
||||||
CookTimeInfoLabel = new Label
|
CookTimeInfoLabel = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("COOK TIME: 1"),
|
Text = Loc.GetString("microwave-menu-cook-time-label", ("time", 1)), // TODO, hardcoded value
|
||||||
Align = Label.AlignMode.Center,
|
Align = Label.AlignMode.Center,
|
||||||
Modulate = Color.White,
|
Modulate = Color.White,
|
||||||
VerticalAlignment = VAlignment.Center
|
VerticalAlignment = VAlignment.Center
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Shared.Chemistry.Reagent;
|
using Content.Shared.Chemistry.Reagent;
|
||||||
using Content.Shared.Kitchen.Components;
|
using Content.Shared.Kitchen.Components;
|
||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
@@ -146,7 +146,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
//Looks like we have a beaker attached.
|
//Looks like we have a beaker attached.
|
||||||
if (reagents.Count <= 0)
|
if (reagents.Count <= 0)
|
||||||
{
|
{
|
||||||
_menu.BeakerContentBox.BoxContents.AddItem(Loc.GetString("Empty"));
|
_menu.BeakerContentBox.BoxContents.AddItem(Loc.GetString("grinder-menu-beaker-content-box-is-empty"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -236,7 +236,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
{
|
{
|
||||||
SetSize = MinSize = (512, 256);
|
SetSize = MinSize = (512, 256);
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
Title = Loc.GetString("All-In-One Grinder 3000");
|
Title = Loc.GetString("grinder-menu-title");
|
||||||
|
|
||||||
var hSplit = new HBoxContainer();
|
var hSplit = new HBoxContainer();
|
||||||
|
|
||||||
@@ -247,14 +247,14 @@ namespace Content.Client.Kitchen.UI
|
|||||||
|
|
||||||
GrindButton = new Button
|
GrindButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Grind"),
|
Text = Loc.GetString("grinder-menu-grind-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
MinSize = (64, 64)
|
MinSize = (64, 64)
|
||||||
};
|
};
|
||||||
|
|
||||||
JuiceButton = new Button
|
JuiceButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Juice"),
|
Text = Loc.GetString("grinder-menu-juice-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
MinSize = (64, 64)
|
MinSize = (64, 64)
|
||||||
};
|
};
|
||||||
@@ -267,7 +267,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
});
|
});
|
||||||
vBoxGrindJuiceButtonPanel.AddChild(JuiceButton);
|
vBoxGrindJuiceButtonPanel.AddChild(JuiceButton);
|
||||||
|
|
||||||
ChamberContentBox = new LabelledContentBox(Loc.GetString("Chamber"), Loc.GetString("Eject Contents"))
|
ChamberContentBox = new LabelledContentBox(Loc.GetString("grinder-menu-chamber-content-box-label"), Loc.GetString("grinder-menu-chamber-content-box-button"))
|
||||||
{
|
{
|
||||||
//Modulate = Color.Red,
|
//Modulate = Color.Red,
|
||||||
VerticalExpand = true,
|
VerticalExpand = true,
|
||||||
@@ -276,7 +276,7 @@ namespace Content.Client.Kitchen.UI
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BeakerContentBox = new LabelledContentBox(Loc.GetString("Beaker"), Loc.GetString("Eject Beaker"))
|
BeakerContentBox = new LabelledContentBox(Loc.GetString("grinder-menu-beaker-content-box-label"), Loc.GetString("grinder-menu-beaker-content-box-button"))
|
||||||
{
|
{
|
||||||
//Modulate = Color.Blue,
|
//Modulate = Color.Blue,
|
||||||
VerticalExpand = true,
|
VerticalExpand = true,
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ namespace Content.Client.LateJoin
|
|||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
var gameTicker = EntitySystem.Get<ClientGameTicker>();
|
var gameTicker = EntitySystem.Get<ClientGameTicker>();
|
||||||
|
Title = Loc.GetString("late-join-gui-title");
|
||||||
|
|
||||||
Title = Loc.GetString("Late Join");
|
|
||||||
|
|
||||||
var jobList = new VBoxContainer();
|
var jobList = new VBoxContainer();
|
||||||
var vBox = new VBoxContainer
|
var vBox = new VBoxContainer
|
||||||
@@ -67,7 +67,8 @@ namespace Content.Client.LateJoin
|
|||||||
category = new VBoxContainer
|
category = new VBoxContainer
|
||||||
{
|
{
|
||||||
Name = department,
|
Name = department,
|
||||||
ToolTip = Loc.GetString("Jobs in the {0} department", department)
|
ToolTip = Loc.GetString("late-join-gui-jobs-amount-in-department-tooltip",
|
||||||
|
("departmentName", department))
|
||||||
};
|
};
|
||||||
|
|
||||||
if (firstCategory)
|
if (firstCategory)
|
||||||
@@ -89,7 +90,7 @@ namespace Content.Client.LateJoin
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("{0} jobs", department)
|
Text = Loc.GetString("late-join-gui-department-jobs-label", ("departmentName", department))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace Content.Client.Lathe.UI
|
|||||||
{
|
{
|
||||||
_icon.Texture = Texture.Transparent;
|
_icon.Texture = Texture.Transparent;
|
||||||
_nameLabel.Text = "-------";
|
_nameLabel.Text = "-------";
|
||||||
_description.Text = "Not producing anything.";
|
_description.Text = "lathequeue-menu-not-producing-text";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PopulateList()
|
public void PopulateList()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
using Robust.Client.AutoGenerated;
|
using Robust.Client.AutoGenerated;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ namespace Content.Client.Lobby
|
|||||||
var gameTicker = EntitySystem.Get<ClientGameTicker>();
|
var gameTicker = EntitySystem.Get<ClientGameTicker>();
|
||||||
if (gameTicker.IsGameStarted)
|
if (gameTicker.IsGameStarted)
|
||||||
{
|
{
|
||||||
_lobby.StartTime.Text = "";
|
_lobby.StartTime.Text = string.Empty;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ namespace Content.Client.Lobby
|
|||||||
|
|
||||||
if (gameTicker.Paused)
|
if (gameTicker.Paused)
|
||||||
{
|
{
|
||||||
text = Loc.GetString("Paused");
|
text = Loc.GetString("lobby-state-paused");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -158,7 +158,7 @@ namespace Content.Client.Lobby
|
|||||||
var seconds = difference.TotalSeconds;
|
var seconds = difference.TotalSeconds;
|
||||||
if (seconds < 0)
|
if (seconds < 0)
|
||||||
{
|
{
|
||||||
text = Loc.GetString(seconds < -5 ? "Right Now?" : "Right Now");
|
text = Loc.GetString(seconds < -5 ? "lobby-state-right-now-question" : "lobby-state-right-now-confirmation");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -166,7 +166,7 @@ namespace Content.Client.Lobby
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_lobby.StartTime.Text = Loc.GetString("Round Starts In: {0}", text);
|
_lobby.StartTime.Text = Loc.GetString("lobby-state-round-start-countdown-text", ("timeLeft", text));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PlayerManagerOnPlayerListUpdated(object? sender, EventArgs e)
|
private void PlayerManagerOnPlayerListUpdated(object? sender, EventArgs e)
|
||||||
@@ -211,14 +211,14 @@ namespace Content.Client.Lobby
|
|||||||
|
|
||||||
if (gameTicker.IsGameStarted)
|
if (gameTicker.IsGameStarted)
|
||||||
{
|
{
|
||||||
_lobby.ReadyButton.Text = Loc.GetString("Join");
|
_lobby.ReadyButton.Text = Loc.GetString("lobby-state-ready-button-join-state");
|
||||||
_lobby.ReadyButton.ToggleMode = false;
|
_lobby.ReadyButton.ToggleMode = false;
|
||||||
_lobby.ReadyButton.Pressed = false;
|
_lobby.ReadyButton.Pressed = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_lobby.StartTime.Text = "";
|
_lobby.StartTime.Text = string.Empty;
|
||||||
_lobby.ReadyButton.Text = Loc.GetString("Ready Up");
|
_lobby.ReadyButton.Text = Loc.GetString("lobby-state-ready-button-ready-up-state");
|
||||||
_lobby.ReadyButton.ToggleMode = true;
|
_lobby.ReadyButton.ToggleMode = true;
|
||||||
_lobby.ReadyButton.Disabled = false;
|
_lobby.ReadyButton.Disabled = false;
|
||||||
_lobby.ReadyButton.Pressed = gameTicker.AreWeReady;
|
_lobby.ReadyButton.Pressed = gameTicker.AreWeReady;
|
||||||
@@ -237,7 +237,7 @@ namespace Content.Client.Lobby
|
|||||||
|
|
||||||
foreach (var session in _playerManager.Sessions.OrderBy(s => s.Name))
|
foreach (var session in _playerManager.Sessions.OrderBy(s => s.Name))
|
||||||
{
|
{
|
||||||
var readyState = "";
|
var readyState = string.Empty;
|
||||||
// Don't show ready state if we're ingame
|
// Don't show ready state if we're ingame
|
||||||
if (!gameTicker.IsGameStarted)
|
if (!gameTicker.IsGameStarted)
|
||||||
{
|
{
|
||||||
@@ -249,10 +249,10 @@ namespace Content.Client.Lobby
|
|||||||
|
|
||||||
readyState = status switch
|
readyState = status switch
|
||||||
{
|
{
|
||||||
LobbyPlayerStatus.NotReady => Loc.GetString("Not Ready"),
|
LobbyPlayerStatus.NotReady => Loc.GetString("lobby-state-player-status-not-ready"),
|
||||||
LobbyPlayerStatus.Ready => Loc.GetString("Ready"),
|
LobbyPlayerStatus.Ready => Loc.GetString("lobby-state-player-status-ready"),
|
||||||
LobbyPlayerStatus.Observer => Loc.GetString("Observer"),
|
LobbyPlayerStatus.Observer => Loc.GetString("lobby-state-player-status-observer"),
|
||||||
_ => "",
|
_ => string.Empty,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.CharacterAppearance;
|
using Content.Client.CharacterAppearance;
|
||||||
using Content.Client.HUD.UI;
|
using Content.Client.HUD.UI;
|
||||||
using Content.Client.Inventory;
|
using Content.Client.Inventory;
|
||||||
@@ -35,12 +35,12 @@ namespace Content.Client.Lobby.UI
|
|||||||
|
|
||||||
var header = new NanoHeading
|
var header = new NanoHeading
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Character")
|
Text = Loc.GetString("lobby-character-preview-panel-header")
|
||||||
};
|
};
|
||||||
|
|
||||||
CharacterSetupButton = new Button
|
CharacterSetupButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Customize"),
|
Text = Loc.GetString("lobby-character-preview-panel-character-setup-button"),
|
||||||
HorizontalAlignment = HAlignment.Left
|
HorizontalAlignment = HAlignment.Left
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ namespace Content.Client.Lobby.UI
|
|||||||
|
|
||||||
vBox.AddChild(header);
|
vBox.AddChild(header);
|
||||||
|
|
||||||
_unloaded = new Label {Text = "Your character preferences have not yet loaded, please stand by."};
|
_unloaded = new Label {Text = Loc.GetString("lobby-character-preview-panel-unloaded-preferences-label")};
|
||||||
|
|
||||||
_loaded = new VBoxContainer {Visible = false};
|
_loaded = new VBoxContainer {Visible = false};
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ namespace Content.Client.Lobby.UI
|
|||||||
foreach (var slot in AllSlots)
|
foreach (var slot in AllSlots)
|
||||||
{
|
{
|
||||||
var itemType = gear.GetGear(slot, profile);
|
var itemType = gear.GetGear(slot, profile);
|
||||||
if (itemType != "")
|
if (itemType != string.Empty)
|
||||||
{
|
{
|
||||||
var item = entityMan.SpawnEntity(itemType, MapCoordinates.Nullspace);
|
var item = entityMan.SpawnEntity(itemType, MapCoordinates.Nullspace);
|
||||||
inventory.SetSlotVisuals(slot, item);
|
inventory.SetSlotVisuals(slot, item);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Content.Client.Changelog;
|
using Content.Client.Changelog;
|
||||||
using Content.Client.EscapeMenu.UI;
|
using Content.Client.EscapeMenu.UI;
|
||||||
@@ -105,8 +105,8 @@ namespace Content.Client.MainMenu
|
|||||||
{
|
{
|
||||||
var invalidReason = Loc.GetString(reason.ToText());
|
var invalidReason = Loc.GetString(reason.ToText());
|
||||||
_userInterfaceManager.Popup(
|
_userInterfaceManager.Popup(
|
||||||
Loc.GetString("Invalid username:\n{0}", invalidReason),
|
Loc.GetString("main-menu-invalid-username-with-reason", ("invalidReason", invalidReason)),
|
||||||
Loc.GetString("Invalid Username"));
|
Loc.GetString("main-menu-invalid-username"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
private void _onConnectFailed(object? _, NetConnectFailArgs args)
|
private void _onConnectFailed(object? _, NetConnectFailArgs args)
|
||||||
{
|
{
|
||||||
_userInterfaceManager.Popup($"Failed to connect:\n{args.Reason}");
|
_userInterfaceManager.Popup(Loc.GetString("main-menu-failed-to-connect",("reason", args.Reason)));
|
||||||
_netManager.ConnectFailed -= _onConnectFailed;
|
_netManager.ConnectFailed -= _onConnectFailed;
|
||||||
_setConnectingState(false);
|
_setConnectingState(false);
|
||||||
}
|
}
|
||||||
@@ -242,12 +242,12 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
var userNameHBox = new HBoxContainer {SeparationOverride = 4};
|
var userNameHBox = new HBoxContainer {SeparationOverride = 4};
|
||||||
vBox.AddChild(userNameHBox);
|
vBox.AddChild(userNameHBox);
|
||||||
userNameHBox.AddChild(new Label {Text = "Username:"});
|
userNameHBox.AddChild(new Label {Text = Loc.GetString("main-menu-username-label") });
|
||||||
|
|
||||||
var currentUserName = _configurationManager.GetCVar(CVars.PlayerName);
|
var currentUserName = _configurationManager.GetCVar(CVars.PlayerName);
|
||||||
UserNameBox = new LineEdit
|
UserNameBox = new LineEdit
|
||||||
{
|
{
|
||||||
Text = currentUserName, PlaceHolder = "Username",
|
Text = currentUserName, PlaceHolder = Loc.GetString("main-menu-username-text"),
|
||||||
HorizontalExpand = true
|
HorizontalExpand = true
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -255,12 +255,12 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
JoinPublicServerButton = new Button
|
JoinPublicServerButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Join Public Server",
|
Text = Loc.GetString("main-menu-join-public-server-button"),
|
||||||
StyleIdentifier = "mainMenu",
|
StyleIdentifier = "mainMenu",
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
#if !FULL_RELEASE
|
#if !FULL_RELEASE
|
||||||
Disabled = true,
|
Disabled = true,
|
||||||
ToolTip = "Cannot connect to public server with a debug build."
|
ToolTip = Loc.GetString("main-menu-join-public-server-button-tooltip")
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
DirectConnectButton = new Button
|
DirectConnectButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Direct Connect",
|
Text = Loc.GetString("main-menu-direct-connect-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
StyleIdentifier = "mainMenu",
|
StyleIdentifier = "mainMenu",
|
||||||
};
|
};
|
||||||
@@ -292,7 +292,7 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
OptionsButton = new Button
|
OptionsButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Options",
|
Text = Loc.GetString("main-menu-options-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
StyleIdentifier = "mainMenu",
|
StyleIdentifier = "mainMenu",
|
||||||
};
|
};
|
||||||
@@ -301,7 +301,7 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
QuitButton = new Button
|
QuitButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Quit",
|
Text = Loc.GetString("main-menu-quit-button"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
StyleIdentifier = "mainMenu",
|
StyleIdentifier = "mainMenu",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ namespace Content.Client.MedicalScanner.UI
|
|||||||
{
|
{
|
||||||
(ScanButton = new Button
|
(ScanButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Scan and Save DNA")
|
Text = Loc.GetString("medical-scanner-window-save-button-text")
|
||||||
}),
|
}),
|
||||||
(_diagnostics = new Label
|
(_diagnostics = new Label
|
||||||
{
|
{
|
||||||
Text = ""
|
Text = string.Empty
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -41,17 +41,17 @@ namespace Content.Client.MedicalScanner.UI
|
|||||||
!state.HasDamage() ||
|
!state.HasDamage() ||
|
||||||
!IoCManager.Resolve<IEntityManager>().TryGetEntity(state.Entity.Value, out var entity))
|
!IoCManager.Resolve<IEntityManager>().TryGetEntity(state.Entity.Value, out var entity))
|
||||||
{
|
{
|
||||||
_diagnostics.Text = Loc.GetString("No patient data.");
|
_diagnostics.Text = Loc.GetString("medical-scanner-window-no-patient-data-text");
|
||||||
ScanButton.Disabled = true;
|
ScanButton.Disabled = true;
|
||||||
SetSize = (250, 100);
|
SetSize = (250, 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text.Append($"{entity.Name}{Loc.GetString("'s health:")}\n");
|
text.Append($"{Loc.GetString("medical-scanner-window-entity-health-text", ("entityName", entity.Name))}\n");
|
||||||
|
|
||||||
foreach (var (@class, classAmount) in state.DamageClasses)
|
foreach (var (@class, classAmount) in state.DamageClasses)
|
||||||
{
|
{
|
||||||
text.Append($"\n{Loc.GetString("{0}: {1}", @class, classAmount)}");
|
text.Append($"\n{Loc.GetString("medical-scanner-window-damage-class-text", ("damageClass", @class), ("amount", classAmount))}");
|
||||||
|
|
||||||
foreach (var type in @class.ToTypes())
|
foreach (var type in @class.ToTypes())
|
||||||
{
|
{
|
||||||
@@ -60,10 +60,10 @@ namespace Content.Client.MedicalScanner.UI
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
text.Append($"\n- {Loc.GetString("{0}: {1}", type, typeAmount)}");
|
text.Append($"\n- {Loc.GetString("medical-scanner-window-damage-type-text", ("damageType",type) ,("amount", typeAmount))}");
|
||||||
}
|
}
|
||||||
|
|
||||||
text.Append("\n");
|
text.Append('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
_diagnostics.Text = text.ToString();
|
_diagnostics.Text = text.ToString();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.Examine;
|
using Content.Client.Examine;
|
||||||
using Content.Client.Message;
|
using Content.Client.Message;
|
||||||
using Content.Shared.PDA;
|
using Content.Shared.PDA;
|
||||||
@@ -65,7 +65,7 @@ namespace Content.Client.PDA
|
|||||||
{
|
{
|
||||||
if (_menu.CurrentLoggedInAccount?.DataBalance < listing.Price)
|
if (_menu.CurrentLoggedInAccount?.DataBalance < listing.Price)
|
||||||
{
|
{
|
||||||
_failPopup = new PDAMenuPopup(Loc.GetString("Insufficient funds!"));
|
_failPopup = new PDAMenuPopup(Loc.GetString("pda-bound-user-interface-insufficient-funds-popup"));
|
||||||
_userInterfaceManager.ModalRoot.AddChild(_failPopup);
|
_userInterfaceManager.ModalRoot.AddChild(_failPopup);
|
||||||
_failPopup.Open(UIBox2.FromDimensions(_menu.Position.X + 150, _menu.Position.Y + 60, 156, 24));
|
_failPopup.Open(UIBox2.FromDimensions(_menu.Position.X + 150, _menu.Position.Y + 60, 156, 24));
|
||||||
_menu.OnClose += () =>
|
_menu.OnClose += () =>
|
||||||
@@ -126,8 +126,9 @@ namespace Content.Client.PDA
|
|||||||
_menu.CurrentLoggedInAccount = msg.Account;
|
_menu.CurrentLoggedInAccount = msg.Account;
|
||||||
var balance = msg.Account.DataBalance;
|
var balance = msg.Account.DataBalance;
|
||||||
var weightedColor = GetWeightedColorString(balance);
|
var weightedColor = GetWeightedColorString(balance);
|
||||||
_menu.BalanceInfo.SetMarkup(Loc.GetString("TC Balance: [color={0}]{1}[/color]", weightedColor, balance));
|
_menu.BalanceInfo.SetMarkup(Loc.GetString("pda-bound-user-interface-tc-balance-popup",
|
||||||
|
("weightedColor",weightedColor),
|
||||||
|
("balance",balance)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.Listings != null)
|
if (msg.Listings != null)
|
||||||
@@ -284,7 +285,7 @@ namespace Content.Client.PDA
|
|||||||
|
|
||||||
_owner = owner;
|
_owner = owner;
|
||||||
_prototypeManager = prototypeManager;
|
_prototypeManager = prototypeManager;
|
||||||
Title = Loc.GetString("PDA");
|
Title = Loc.GetString("comp-pda-ui-menu-title");
|
||||||
|
|
||||||
#region MAIN_MENU_TAB
|
#region MAIN_MENU_TAB
|
||||||
//Main menu
|
//Main menu
|
||||||
@@ -299,13 +300,13 @@ namespace Content.Client.PDA
|
|||||||
|
|
||||||
EjectIDButton = new Button
|
EjectIDButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Eject ID"),
|
Text = Loc.GetString("comp-pda-ui-eject-id-button"),
|
||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
VerticalAlignment = VAlignment.Center
|
VerticalAlignment = VAlignment.Center
|
||||||
};
|
};
|
||||||
EjectPenButton = new Button
|
EjectPenButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Eject Pen"),
|
Text = Loc.GetString("comp-pda-ui-eject-pen-button"),
|
||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
VerticalAlignment = VAlignment.Center
|
VerticalAlignment = VAlignment.Center
|
||||||
};
|
};
|
||||||
@@ -330,7 +331,7 @@ namespace Content.Client.PDA
|
|||||||
|
|
||||||
FlashLightToggleButton = new Button
|
FlashLightToggleButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Toggle Flashlight"),
|
Text = Loc.GetString("comp-pda-ui-toggle-flashlight-button"),
|
||||||
ToggleMode = true,
|
ToggleMode = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -439,9 +440,9 @@ namespace Content.Client.PDA
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Add all the tabs to the Master container.
|
//Add all the tabs to the Master container.
|
||||||
MasterTabContainer.SetTabTitle(0, Loc.GetString("Main Menu"));
|
MasterTabContainer.SetTabTitle(0, Loc.GetString("pda-bound-user-interface-main-menu-tab-title"));
|
||||||
MasterTabContainer.AddChild(UplinkTabContainer);
|
MasterTabContainer.AddChild(UplinkTabContainer);
|
||||||
MasterTabContainer.SetTabTitle(1, Loc.GetString("Uplink"));
|
MasterTabContainer.SetTabTitle(1, Loc.GetString("pda-bound-user-interface-uplink-tab-title"));
|
||||||
Contents.AddChild(MasterTabContainer);
|
Contents.AddChild(MasterTabContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.HUD.UI;
|
using Content.Client.HUD.UI;
|
||||||
using Content.Client.Resources;
|
using Content.Client.Resources;
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
@@ -109,7 +109,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
_offButton = new Button
|
_offButton = new Button
|
||||||
{
|
{
|
||||||
ToggleMode = false,
|
ToggleMode = false,
|
||||||
Text = "Off",
|
Text = Loc.GetString("particle-accelerator-control-menu-off-button"),
|
||||||
StyleClasses = {StyleBase.ButtonOpenRight},
|
StyleClasses = {StyleBase.ButtonOpenRight},
|
||||||
};
|
};
|
||||||
_offButton.OnPressed += args => owner.SendEnableMessage(false);
|
_offButton.OnPressed += args => owner.SendEnableMessage(false);
|
||||||
@@ -117,7 +117,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
_onButton = new Button
|
_onButton = new Button
|
||||||
{
|
{
|
||||||
ToggleMode = false,
|
ToggleMode = false,
|
||||||
Text = "On",
|
Text = Loc.GetString("particle-accelerator-control-menu-on-button"),
|
||||||
StyleClasses = {StyleBase.ButtonOpenLeft},
|
StyleClasses = {StyleBase.ButtonOpenLeft},
|
||||||
};
|
};
|
||||||
_onButton.OnPressed += args => owner.SendEnableMessage(true);
|
_onButton.OnPressed += args => owner.SendEnableMessage(true);
|
||||||
@@ -134,7 +134,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
{
|
{
|
||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
||||||
Text = Loc.GetString("Refer to p.132 of service manual")
|
Text = Loc.GetString("particle-accelerator-control-menu-service-manual-reference")
|
||||||
};
|
};
|
||||||
_drawLabel = new Label();
|
_drawLabel = new Label();
|
||||||
var imgSize = new Vector2(32, 32);
|
var imgSize = new Vector2(32, 32);
|
||||||
@@ -149,7 +149,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Mark 2 Particle Accelerator"),
|
Text = Loc.GetString("particle-accelerator-control-menu-device-version-label"),
|
||||||
FontOverride = font,
|
FontOverride = font,
|
||||||
FontColorOverride = StyleNano.NanoGold,
|
FontColorOverride = StyleNano.NanoGold,
|
||||||
},
|
},
|
||||||
@@ -183,7 +183,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Power: "),
|
Text = Loc.GetString("particle-accelerator-control-menu-power-label") + " ",
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
HorizontalAlignment = HAlignment.Left,
|
HorizontalAlignment = HAlignment.Left,
|
||||||
},
|
},
|
||||||
@@ -197,7 +197,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Strength: "),
|
Text = Loc.GetString("particle-accelerator-control-menu-strength-label") + " ",
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
HorizontalAlignment = HAlignment.Left,
|
HorizontalAlignment = HAlignment.Left,
|
||||||
},
|
},
|
||||||
@@ -219,7 +219,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("PARTICLE STRENGTH\nLIMITER FAILURE"),
|
Text = Loc.GetString("particle-accelerator-control-menu-alarm-control"),
|
||||||
FontColorOverride = Color.Red,
|
FontColorOverride = Color.Red,
|
||||||
Align = Label.AlignMode.Center
|
Align = Label.AlignMode.Center
|
||||||
},
|
},
|
||||||
@@ -272,7 +272,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
},
|
},
|
||||||
(_scanButton = new Button
|
(_scanButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Scan Parts"),
|
Text = Loc.GetString("particle-accelerator-control-menu-scan-parts-button"),
|
||||||
HorizontalAlignment = HAlignment.Center
|
HorizontalAlignment = HAlignment.Center
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Margin = new Thickness(4, 4, 0, 4),
|
Margin = new Thickness(4, 4, 0, 4),
|
||||||
Text = Loc.GetString("Ensure containment field is active before operation"),
|
Text = Loc.GetString("particle-accelerator-control-menu-check-containment-field-warning"),
|
||||||
HorizontalAlignment = HAlignment.Center,
|
HorizontalAlignment = HAlignment.Center,
|
||||||
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
||||||
}
|
}
|
||||||
@@ -299,7 +299,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = "FOO-BAR-BAZ",
|
Text = Loc.GetString("particle-accelerator-control-menu-foo-bar-baz"),
|
||||||
StyleClasses = {StyleBase.StyleClassLabelSubText}
|
StyleClasses = {StyleBase.StyleClassLabelSubText}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -369,7 +369,9 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
_assembled = uiState.Assembled;
|
_assembled = uiState.Assembled;
|
||||||
UpdateUI(uiState.Assembled, uiState.InterfaceBlock, uiState.Enabled,
|
UpdateUI(uiState.Assembled, uiState.InterfaceBlock, uiState.Enabled,
|
||||||
uiState.WirePowerBlock);
|
uiState.WirePowerBlock);
|
||||||
_statusLabel.Text = Loc.GetString($"Status: {(uiState.Assembled ? "Operational" : "Incomplete")}");
|
_statusLabel.Text = Loc.GetString("particle-accelerator-control-menu-status-label",
|
||||||
|
("status", Loc.GetString(uiState.Assembled ? "particle-accelerator-control-menu-status-operational" :
|
||||||
|
"particle-accelerator-control-menu-status-incomplete")));
|
||||||
UpdatePowerState(uiState.State, uiState.Enabled, uiState.Assembled,
|
UpdatePowerState(uiState.State, uiState.Enabled, uiState.Assembled,
|
||||||
uiState.MaxLevel);
|
uiState.MaxLevel);
|
||||||
UpdatePreview(uiState);
|
UpdatePreview(uiState);
|
||||||
@@ -433,7 +435,7 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
|
|
||||||
if (!_assembled)
|
if (!_assembled)
|
||||||
{
|
{
|
||||||
_drawLabel.Text = Loc.GetString("Draw: N/A");
|
_drawLabel.Text = Loc.GetString("particle-accelerator-control-menu-draw-not-available");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,7 +448,9 @@ namespace Content.Client.ParticleAccelerator.UI
|
|||||||
watts = (int) (_lastDraw + val * 5);
|
watts = (int) (_lastDraw + val * 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
_drawLabel.Text = Loc.GetString("Draw: {0:##,##0}/{1:##,##0} W", watts, _lastReceive);
|
_drawLabel.Text = Loc.GetString("particle-accelerator-control-menu-draw",
|
||||||
|
("watts", $"{watts:##,##0}"),
|
||||||
|
("lastReceive", $"{_lastReceive:##,##0}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed class PASegmentControl : Control
|
private sealed class PASegmentControl : Control
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.CharacterAppearance;
|
using Content.Client.CharacterAppearance;
|
||||||
using Content.Client.Lobby.UI;
|
using Content.Client.Lobby.UI;
|
||||||
using Content.Client.Parallax;
|
using Content.Client.Parallax;
|
||||||
@@ -74,7 +74,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Margin = new Thickness(8, 0, 0, 0),
|
Margin = new Thickness(8, 0, 0, 0),
|
||||||
Text = Loc.GetString("Character Setup"),
|
Text = Loc.GetString("character-setup-gui-character-setup-label"),
|
||||||
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
||||||
VAlign = Label.VAlignMode.Center,
|
VAlign = Label.VAlignMode.Center,
|
||||||
},
|
},
|
||||||
@@ -82,12 +82,12 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
HorizontalAlignment = HAlignment.Right,
|
HorizontalAlignment = HAlignment.Right,
|
||||||
Text = Loc.GetString("Save"),
|
Text = Loc.GetString("character-setup-gui-character-setup-save-button"),
|
||||||
StyleClasses = {StyleNano.StyleClassButtonBig},
|
StyleClasses = {StyleNano.StyleClassButtonBig},
|
||||||
}),
|
}),
|
||||||
(CloseButton = new Button
|
(CloseButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Close"),
|
Text = Loc.GetString("character-setup-gui-character-setup-close-button"),
|
||||||
StyleClasses = {StyleNano.StyleClassButtonBig},
|
StyleClasses = {StyleNano.StyleClassButtonBig},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
_createNewCharacterButton = new Button
|
_createNewCharacterButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Create new slot...",
|
Text = Loc.GetString("character-setup-gui-create-new-character-button"),
|
||||||
};
|
};
|
||||||
_createNewCharacterButton.OnPressed += args =>
|
_createNewCharacterButton.OnPressed += args =>
|
||||||
{
|
{
|
||||||
@@ -177,7 +177,8 @@ namespace Content.Client.Preferences.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
_createNewCharacterButton.ToolTip =
|
_createNewCharacterButton.ToolTip =
|
||||||
$"A maximum of {_preferencesManager.Settings!.MaxCharacterSlots} characters are allowed.";
|
Loc.GetString("character-setup-gui-create-new-character-button-tooltip",
|
||||||
|
("maxCharacters", _preferencesManager.Settings!.MaxCharacterSlots));
|
||||||
|
|
||||||
foreach (var (slot, character) in _preferencesManager.Preferences!.Characters)
|
foreach (var (slot, character) in _preferencesManager.Preferences!.Characters)
|
||||||
{
|
{
|
||||||
@@ -261,7 +262,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
};
|
};
|
||||||
var deleteButton = new Button
|
var deleteButton = new Button
|
||||||
{
|
{
|
||||||
Text = "Delete",
|
Text = Loc.GetString("character-setup-gui-character-picker-button-delete-button"),
|
||||||
Visible = !isSelectedCharacter,
|
Visible = !isSelectedCharacter,
|
||||||
};
|
};
|
||||||
deleteButton.OnPressed += _ =>
|
deleteButton.OnPressed += _ =>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
var randomizePanel = HighlightedContainer();
|
var randomizePanel = HighlightedContainer();
|
||||||
var randomizeEverythingButton = new Button
|
var randomizeEverythingButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Randomize everything")
|
Text = Loc.GetString("humanoid-profile-editor-randomize-everything-button")
|
||||||
};
|
};
|
||||||
randomizeEverythingButton.OnPressed += args => { RandomizeEverything(); };
|
randomizeEverythingButton.OnPressed += args => { RandomizeEverything(); };
|
||||||
randomizePanel.AddChild(randomizeEverythingButton);
|
randomizePanel.AddChild(randomizeEverythingButton);
|
||||||
@@ -112,7 +112,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
VerticalExpand = true
|
VerticalExpand = true
|
||||||
};
|
};
|
||||||
var nameLabel = new Label { Text = Loc.GetString("Name:") };
|
var nameLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-name-label") };
|
||||||
_nameEdit = new LineEdit
|
_nameEdit = new LineEdit
|
||||||
{
|
{
|
||||||
MinSize = (270, 0),
|
MinSize = (270, 0),
|
||||||
@@ -121,7 +121,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
_nameEdit.OnTextChanged += args => { SetName(args.Text); };
|
_nameEdit.OnTextChanged += args => { SetName(args.Text); };
|
||||||
var nameRandomButton = new Button
|
var nameRandomButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Randomize"),
|
Text = Loc.GetString("humanoid-profile-editor-name-random-button"),
|
||||||
};
|
};
|
||||||
nameRandomButton.OnPressed += args => RandomizeName();
|
nameRandomButton.OnPressed += args => RandomizeName();
|
||||||
nameHBox.AddChild(nameLabel);
|
nameHBox.AddChild(nameLabel);
|
||||||
@@ -153,7 +153,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
tabContainer.AddChild(appearanceVBox);
|
tabContainer.AddChild(appearanceVBox);
|
||||||
tabContainer.SetTabTitle(0, Loc.GetString("Appearance"));
|
tabContainer.SetTabTitle(0, Loc.GetString("humanoid-profile-editor-appearance-tab"));
|
||||||
|
|
||||||
var sexAndAgeRow = new HBoxContainer
|
var sexAndAgeRow = new HBoxContainer
|
||||||
{
|
{
|
||||||
@@ -166,13 +166,13 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
var sexPanel = HighlightedContainer();
|
var sexPanel = HighlightedContainer();
|
||||||
var sexHBox = new HBoxContainer();
|
var sexHBox = new HBoxContainer();
|
||||||
var sexLabel = new Label { Text = Loc.GetString("Sex:") };
|
var sexLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-sex-label") };
|
||||||
|
|
||||||
var sexButtonGroup = new ButtonGroup();
|
var sexButtonGroup = new ButtonGroup();
|
||||||
|
|
||||||
_sexMaleButton = new Button
|
_sexMaleButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Male"),
|
Text = Loc.GetString("humanoid-profile-editor-sex-male-button"),
|
||||||
Group = sexButtonGroup
|
Group = sexButtonGroup
|
||||||
};
|
};
|
||||||
_sexMaleButton.OnPressed += args =>
|
_sexMaleButton.OnPressed += args =>
|
||||||
@@ -187,7 +187,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
_sexFemaleButton = new Button
|
_sexFemaleButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Female"),
|
Text = Loc.GetString("humanoid-profile-editor-sex-female-button"),
|
||||||
Group = sexButtonGroup
|
Group = sexButtonGroup
|
||||||
};
|
};
|
||||||
_sexFemaleButton.OnPressed += _ =>
|
_sexFemaleButton.OnPressed += _ =>
|
||||||
@@ -213,7 +213,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
var agePanel = HighlightedContainer();
|
var agePanel = HighlightedContainer();
|
||||||
var ageHBox = new HBoxContainer();
|
var ageHBox = new HBoxContainer();
|
||||||
var ageLabel = new Label { Text = Loc.GetString("Age:") };
|
var ageLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-age-label") };
|
||||||
_ageEdit = new LineEdit { MinSize = (40, 0) };
|
_ageEdit = new LineEdit { MinSize = (40, 0) };
|
||||||
_ageEdit.OnTextChanged += args =>
|
_ageEdit.OnTextChanged += args =>
|
||||||
{
|
{
|
||||||
@@ -232,14 +232,14 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
var genderPanel = HighlightedContainer();
|
var genderPanel = HighlightedContainer();
|
||||||
var genderHBox = new HBoxContainer();
|
var genderHBox = new HBoxContainer();
|
||||||
var genderLabel = new Label { Text = Loc.GetString("Pronouns:") };
|
var genderLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-pronouns-label") };
|
||||||
|
|
||||||
_genderButton = new OptionButton();
|
_genderButton = new OptionButton();
|
||||||
|
|
||||||
_genderButton.AddItem(Loc.GetString("He / Him"), (int) Gender.Male);
|
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-male-text"), (int) Gender.Male);
|
||||||
_genderButton.AddItem(Loc.GetString("She / Her"), (int) Gender.Female);
|
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-female-text"), (int) Gender.Female);
|
||||||
_genderButton.AddItem(Loc.GetString("They / Them"), (int) Gender.Epicene);
|
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-epicene-text"), (int) Gender.Epicene);
|
||||||
_genderButton.AddItem(Loc.GetString("It / It"), (int) Gender.Neuter);
|
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-neuter-text"), (int) Gender.Neuter);
|
||||||
|
|
||||||
_genderButton.OnItemSelected += args =>
|
_genderButton.OnItemSelected += args =>
|
||||||
{
|
{
|
||||||
@@ -316,12 +316,12 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
var clothingPanel = HighlightedContainer();
|
var clothingPanel = HighlightedContainer();
|
||||||
var clothingHBox = new HBoxContainer();
|
var clothingHBox = new HBoxContainer();
|
||||||
var clothingLabel = new Label { Text = Loc.GetString("Clothing:") };
|
var clothingLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-clothing-label") };
|
||||||
|
|
||||||
_clothingButton = new OptionButton();
|
_clothingButton = new OptionButton();
|
||||||
|
|
||||||
_clothingButton.AddItem(Loc.GetString("Jumpsuit"), (int) ClothingPreference.Jumpsuit);
|
_clothingButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-jumpsuit"), (int) ClothingPreference.Jumpsuit);
|
||||||
_clothingButton.AddItem(Loc.GetString("Jumpskirt"), (int) ClothingPreference.Jumpskirt);
|
_clothingButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-jumpskirt"), (int) ClothingPreference.Jumpskirt);
|
||||||
|
|
||||||
_clothingButton.OnItemSelected += args =>
|
_clothingButton.OnItemSelected += args =>
|
||||||
{
|
{
|
||||||
@@ -340,13 +340,13 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
var backpackPanel = HighlightedContainer();
|
var backpackPanel = HighlightedContainer();
|
||||||
var backpackHBox = new HBoxContainer();
|
var backpackHBox = new HBoxContainer();
|
||||||
var backpackLabel = new Label { Text = Loc.GetString("Backpack:") };
|
var backpackLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-backpack-label") };
|
||||||
|
|
||||||
_backpackButton = new OptionButton();
|
_backpackButton = new OptionButton();
|
||||||
|
|
||||||
_backpackButton.AddItem(Loc.GetString("Backpack"), (int) BackpackPreference.Backpack);
|
_backpackButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-backpack"), (int) BackpackPreference.Backpack);
|
||||||
_backpackButton.AddItem(Loc.GetString("Satchel"), (int) BackpackPreference.Satchel);
|
_backpackButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-satchel"), (int) BackpackPreference.Satchel);
|
||||||
_backpackButton.AddItem(Loc.GetString("Duffelbag"), (int) BackpackPreference.Duffelbag);
|
_backpackButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-duffelbag"), (int) BackpackPreference.Duffelbag);
|
||||||
|
|
||||||
_backpackButton.OnItemSelected += args =>
|
_backpackButton.OnItemSelected += args =>
|
||||||
{
|
{
|
||||||
@@ -365,7 +365,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
var eyesPanel = HighlightedContainer();
|
var eyesPanel = HighlightedContainer();
|
||||||
var eyesVBox = new VBoxContainer();
|
var eyesVBox = new VBoxContainer();
|
||||||
var eyesLabel = new Label { Text = Loc.GetString("Eye color:") };
|
var eyesLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-eyes-label") };
|
||||||
|
|
||||||
_eyesPicker = new EyeColorPicker();
|
_eyesPicker = new EyeColorPicker();
|
||||||
|
|
||||||
@@ -409,14 +409,14 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
tabContainer.AddChild(jobVBox);
|
tabContainer.AddChild(jobVBox);
|
||||||
|
|
||||||
tabContainer.SetTabTitle(1, Loc.GetString("Jobs"));
|
tabContainer.SetTabTitle(1, Loc.GetString("humanoid-profile-editor-jobs-tab"));
|
||||||
|
|
||||||
_preferenceUnavailableButton.AddItem(
|
_preferenceUnavailableButton.AddItem(
|
||||||
Loc.GetString("Stay in lobby if preference unavailable."),
|
Loc.GetString("humanoid-profile-editor-preference-unavailable-stay-in-lobby-button"),
|
||||||
(int) PreferenceUnavailableMode.StayInLobby);
|
(int) PreferenceUnavailableMode.StayInLobby);
|
||||||
_preferenceUnavailableButton.AddItem(
|
_preferenceUnavailableButton.AddItem(
|
||||||
Loc.GetString("Be an {0} if preference unavailable.",
|
Loc.GetString("humanoid-profile-editor-preference-unavailable-spawn-as-overflow-button",
|
||||||
Loc.GetString(SharedGameTicker.OverflowJobName)),
|
("overflowJob", Loc.GetString(SharedGameTicker.OverflowJobName))),
|
||||||
(int) PreferenceUnavailableMode.SpawnAsOverflow);
|
(int) PreferenceUnavailableMode.SpawnAsOverflow);
|
||||||
|
|
||||||
_preferenceUnavailableButton.OnItemSelected += args =>
|
_preferenceUnavailableButton.OnItemSelected += args =>
|
||||||
@@ -441,7 +441,8 @@ namespace Content.Client.Preferences.UI
|
|||||||
category = new VBoxContainer
|
category = new VBoxContainer
|
||||||
{
|
{
|
||||||
Name = department,
|
Name = department,
|
||||||
ToolTip = Loc.GetString("Jobs in the {0} department", department)
|
ToolTip = Loc.GetString("humanoid-profile-editor-jobs-amount-in-department-tooltip",
|
||||||
|
("departmentName", department))
|
||||||
};
|
};
|
||||||
|
|
||||||
if (firstCategory)
|
if (firstCategory)
|
||||||
@@ -463,7 +464,8 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("{0} jobs", department)
|
Text = Loc.GetString("humanoid-profile-editor-department-jobs-label",
|
||||||
|
("departmentName" ,department))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -526,7 +528,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
tabContainer.AddChild(antagVBox);
|
tabContainer.AddChild(antagVBox);
|
||||||
|
|
||||||
tabContainer.SetTabTitle(2, Loc.GetString("Antags"));
|
tabContainer.SetTabTitle(2, Loc.GetString("humanoid-profile-editor-antags-tab"));
|
||||||
|
|
||||||
_antagPreferences = new List<AntagPreferenceSelector>();
|
_antagPreferences = new List<AntagPreferenceSelector>();
|
||||||
|
|
||||||
@@ -559,15 +561,15 @@ namespace Content.Client.Preferences.UI
|
|||||||
var importExportHBox = new HBoxContainer();
|
var importExportHBox = new HBoxContainer();
|
||||||
var importButton = new Button
|
var importButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Import"),
|
Text = Loc.GetString("humanoid-profile-editor-import-button"),
|
||||||
Disabled = true,
|
Disabled = true,
|
||||||
ToolTip = "Not yet implemented!"
|
ToolTip = Loc.GetString("generic-not-yet-implemented")
|
||||||
};
|
};
|
||||||
var exportButton = new Button
|
var exportButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Export"),
|
Text = Loc.GetString("humanoid-profile-editor-export-button"),
|
||||||
Disabled = true,
|
Disabled = true,
|
||||||
ToolTip = "Not yet implemented!"
|
ToolTip = Loc.GetString("generic-not-yet-implemented")
|
||||||
};
|
};
|
||||||
importExportHBox.AddChild(importButton);
|
importExportHBox.AddChild(importButton);
|
||||||
importExportHBox.AddChild(exportButton);
|
importExportHBox.AddChild(exportButton);
|
||||||
@@ -582,7 +584,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
var panel = HighlightedContainer();
|
var panel = HighlightedContainer();
|
||||||
_saveButton = new Button
|
_saveButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Save"),
|
Text = Loc.GetString("humanoid-profile-editor-save-button"),
|
||||||
HorizontalAlignment = HAlignment.Center
|
HorizontalAlignment = HAlignment.Center
|
||||||
};
|
};
|
||||||
_saveButton.OnPressed += args => { Save(); };
|
_saveButton.OnPressed += args => { Save(); };
|
||||||
@@ -899,10 +901,10 @@ namespace Content.Client.Preferences.UI
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Text, Value
|
// Text, Value
|
||||||
_optionButton.AddItem(Loc.GetString("High"), (int) JobPriority.High);
|
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-high-button"), (int) JobPriority.High);
|
||||||
_optionButton.AddItem(Loc.GetString("Medium"), (int) JobPriority.Medium);
|
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-medium-button"), (int) JobPriority.Medium);
|
||||||
_optionButton.AddItem(Loc.GetString("Low"), (int) JobPriority.Low);
|
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-low-button"), (int) JobPriority.Low);
|
||||||
_optionButton.AddItem(Loc.GetString("Never"), (int) JobPriority.Never);
|
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-never-button"), (int) JobPriority.Never);
|
||||||
|
|
||||||
_optionButton.OnItemSelected += args =>
|
_optionButton.OnItemSelected += args =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
@@ -9,8 +9,8 @@ namespace Content.Client.Research.UI
|
|||||||
{
|
{
|
||||||
private readonly ItemList _servers;
|
private readonly ItemList _servers;
|
||||||
private int _serverCount;
|
private int _serverCount;
|
||||||
private string[] _serverNames = new string[]{};
|
private string[] _serverNames = System.Array.Empty<string>();
|
||||||
private int[] _serverIds = new int[]{};
|
private int[] _serverIds = System.Array.Empty<int>();
|
||||||
private int _selectedServerId = -1;
|
private int _selectedServerId = -1;
|
||||||
|
|
||||||
public ResearchClientBoundUserInterface Owner { get; }
|
public ResearchClientBoundUserInterface Owner { get; }
|
||||||
@@ -21,7 +21,7 @@ namespace Content.Client.Research.UI
|
|||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
Title = Loc.GetString("Research Server Selection");
|
Title = Loc.GetString("research-client-server-selection-menu-title");
|
||||||
|
|
||||||
_servers = new ItemList() {SelectMode = ItemList.ItemListSelectMode.Single};
|
_servers = new ItemList() {SelectMode = ItemList.ItemListSelectMode.Single};
|
||||||
|
|
||||||
@@ -56,10 +56,12 @@ namespace Content.Client.Research.UI
|
|||||||
for (var i = 0; i < _serverCount; i++)
|
for (var i = 0; i < _serverCount; i++)
|
||||||
{
|
{
|
||||||
var id = _serverIds[i];
|
var id = _serverIds[i];
|
||||||
_servers.AddItem($"ID: {id} || {_serverNames[i]}");
|
_servers.AddItem(Loc.GetString("research-client-server-selection-menu-server-entry-text", ("id", id), ("serverName", _serverNames[i])));
|
||||||
if (id == _selectedServerId)
|
if (id == _selectedServerId)
|
||||||
|
{
|
||||||
_servers[id].Selected = true;
|
_servers[id].Selected = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_servers.OnItemSelected += OnItemSelected;
|
_servers.OnItemSelected += OnItemSelected;
|
||||||
_servers.OnItemDeselected += OnItemDeselected;
|
_servers.OnItemDeselected += OnItemDeselected;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace Content.Client.Research.UI
|
|||||||
|
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Title = Loc.GetString("R&D Console");
|
Title = Loc.GetString("research-console-menu-title");
|
||||||
|
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
|
|
||||||
@@ -106,8 +106,8 @@ namespace Content.Client.Research.UI
|
|||||||
SizeFlagsStretchRatio = 3,
|
SizeFlagsStretchRatio = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
_pointLabel = new Label() { Text = Loc.GetString("Research Points") + ": 0" };
|
_pointLabel = new Label() { Text = Loc.GetString("research-console-menu-research-points-text", ("points", 0)) };
|
||||||
_pointsPerSecondLabel = new Label() { Text = Loc.GetString("Points per Second") + ": 0" };
|
_pointsPerSecondLabel = new Label() { Text = Loc.GetString("research-console-menu-points-per-second-text", ("pointsPerSecond", 0)) };
|
||||||
|
|
||||||
var vboxPointsButtons = new VBoxContainer()
|
var vboxPointsButtons = new VBoxContainer()
|
||||||
{
|
{
|
||||||
@@ -116,9 +116,9 @@ namespace Content.Client.Research.UI
|
|||||||
VerticalExpand = true,
|
VerticalExpand = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
ServerSelectionButton = new Button() { Text = Loc.GetString("Server list") };
|
ServerSelectionButton = new Button() { Text = Loc.GetString("research-console-menu-server-selection-button") };
|
||||||
ServerSyncButton = new Button() { Text = Loc.GetString("Sync")};
|
ServerSyncButton = new Button() { Text = Loc.GetString("research-console-menu-server-sync-button") };
|
||||||
UnlockButton = new Button() { Text = Loc.GetString("Unlock"), Disabled = true };
|
UnlockButton = new Button() { Text = Loc.GetString("research-console-menu-server-unlock-button"), Disabled = true };
|
||||||
|
|
||||||
|
|
||||||
vboxPointsButtons.AddChild(ServerSelectionButton);
|
vboxPointsButtons.AddChild(ServerSelectionButton);
|
||||||
@@ -172,9 +172,9 @@ namespace Content.Client.Research.UI
|
|||||||
{
|
{
|
||||||
UnlockButton.Disabled = true;
|
UnlockButton.Disabled = true;
|
||||||
_technologyIcon.Texture = Texture.Transparent;
|
_technologyIcon.Texture = Texture.Transparent;
|
||||||
_technologyName.Text = "";
|
_technologyName.Text = string.Empty;
|
||||||
_technologyDescription.Text = "";
|
_technologyDescription.Text = string.Empty;
|
||||||
_technologyRequirements.Text = "";
|
_technologyRequirements.Text = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -256,16 +256,16 @@ namespace Content.Client.Research.UI
|
|||||||
{
|
{
|
||||||
if (TechnologySelected == null)
|
if (TechnologySelected == null)
|
||||||
{
|
{
|
||||||
_technologyName.Text = "";
|
_technologyName.Text = string.Empty;
|
||||||
_technologyDescription.Text = "";
|
_technologyDescription.Text = string.Empty;
|
||||||
_technologyRequirements.Text = "";
|
_technologyRequirements.Text = string.Empty;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_technologyIcon.Texture = TechnologySelected.Icon.Frame0();
|
_technologyIcon.Texture = TechnologySelected.Icon.Frame0();
|
||||||
_technologyName.Text = TechnologySelected.Name;
|
_technologyName.Text = TechnologySelected.Name;
|
||||||
_technologyDescription.Text = TechnologySelected.Description+$"\n{TechnologySelected.RequiredPoints} " + Loc.GetString("research points");
|
_technologyDescription.Text = TechnologySelected.Description + $"\n{TechnologySelected.RequiredPoints} " + Loc.GetString("research-console-menu-research-points-text").ToLowerInvariant();
|
||||||
_technologyRequirements.Text = Loc.GetString("No technology requirements.");
|
_technologyRequirements.Text = Loc.GetString("research-console-tech-requirements-none");
|
||||||
|
|
||||||
var prototypeMan = IoCManager.Resolve<IPrototypeManager>();
|
var prototypeMan = IoCManager.Resolve<IPrototypeManager>();
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ namespace Content.Client.Research.UI
|
|||||||
var requiredId = TechnologySelected.RequiredTechnologies[i];
|
var requiredId = TechnologySelected.RequiredTechnologies[i];
|
||||||
if (!prototypeMan.TryIndex(requiredId, out TechnologyPrototype? prototype)) continue;
|
if (!prototypeMan.TryIndex(requiredId, out TechnologyPrototype? prototype)) continue;
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
_technologyRequirements.Text = Loc.GetString("Requires") + $": {prototype.Name}";
|
_technologyRequirements.Text = Loc.GetString("research-console-tech-requirements-prototype-name", ("prototypeName", prototype.Name));
|
||||||
else
|
else
|
||||||
_technologyRequirements.Text += $", {prototype.Name}";
|
_technologyRequirements.Text += $", {prototype.Name}";
|
||||||
}
|
}
|
||||||
@@ -285,8 +285,8 @@ namespace Content.Client.Research.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void PopulatePoints()
|
public void PopulatePoints()
|
||||||
{
|
{
|
||||||
_pointLabel.Text = Loc.GetString("Research Points") + $": {Owner.Points}";
|
_pointLabel.Text = Loc.GetString("research-console-menu-research-points-text", ("points", Owner.Points));
|
||||||
_pointsPerSecondLabel.Text = Loc.GetString("Points per second") + $": {Owner.PointsPerSecond}";
|
_pointsPerSecondLabel.Text = Loc.GetString("research-console-menu-points-per-second-text", ("pointsPerSeconds", Owner.PointsPerSecond));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.Message;
|
using Content.Client.Message;
|
||||||
@@ -20,7 +20,7 @@ namespace Content.Client.RoundEnd
|
|||||||
{
|
{
|
||||||
MinSize = SetSize = (520, 580);
|
MinSize = SetSize = (520, 580);
|
||||||
|
|
||||||
Title = Loc.GetString("Round End Summary");
|
Title = Loc.GetString("round-end-summary-window-title");
|
||||||
|
|
||||||
//Round End Window is split into two tabs, one about the round stats
|
//Round End Window is split into two tabs, one about the round stats
|
||||||
//and the other is a list of RoundEndPlayerInfo for each player.
|
//and the other is a list of RoundEndPlayerInfo for each player.
|
||||||
@@ -29,13 +29,13 @@ namespace Content.Client.RoundEnd
|
|||||||
//Also good for serious info.
|
//Also good for serious info.
|
||||||
RoundEndSummaryTab = new VBoxContainer()
|
RoundEndSummaryTab = new VBoxContainer()
|
||||||
{
|
{
|
||||||
Name = Loc.GetString("Round Information")
|
Name = Loc.GetString("round-end-summary-window-round-end-summary-tab-title")
|
||||||
};
|
};
|
||||||
|
|
||||||
//Tab for listing unique info per player.
|
//Tab for listing unique info per player.
|
||||||
PlayerManifestoTab = new VBoxContainer()
|
PlayerManifestoTab = new VBoxContainer()
|
||||||
{
|
{
|
||||||
Name = Loc.GetString("Player Manifesto")
|
Name = Loc.GetString("round-end-summary-window-player-manifesto-tab-title")
|
||||||
};
|
};
|
||||||
|
|
||||||
RoundEndWindowTabs = new TabContainer();
|
RoundEndWindowTabs = new TabContainer();
|
||||||
@@ -46,7 +46,7 @@ namespace Content.Client.RoundEnd
|
|||||||
|
|
||||||
//Gamemode Name
|
//Gamemode Name
|
||||||
var gamemodeLabel = new RichTextLabel();
|
var gamemodeLabel = new RichTextLabel();
|
||||||
gamemodeLabel.SetMarkup(Loc.GetString("Round of [color=white]{0}[/color] has ended.", gm));
|
gamemodeLabel.SetMarkup(Loc.GetString("round-end-summary-window-gamemode-name-label", ("gamemode",gm)));
|
||||||
RoundEndSummaryTab.AddChild(gamemodeLabel);
|
RoundEndSummaryTab.AddChild(gamemodeLabel);
|
||||||
|
|
||||||
//Round end text
|
//Round end text
|
||||||
@@ -59,13 +59,17 @@ namespace Content.Client.RoundEnd
|
|||||||
|
|
||||||
//Duration
|
//Duration
|
||||||
var roundTimeLabel = new RichTextLabel();
|
var roundTimeLabel = new RichTextLabel();
|
||||||
roundTimeLabel.SetMarkup(Loc.GetString("It lasted for [color=yellow]{0} hours, {1} minutes, and {2} seconds.",
|
roundTimeLabel.SetMarkup(Loc.GetString("round-end-summary-window-duration-label",
|
||||||
roundTimeSpan.Hours,roundTimeSpan.Minutes,roundTimeSpan.Seconds));
|
("hours",roundTimeSpan.Hours),
|
||||||
|
("minutes",roundTimeSpan.Minutes),
|
||||||
|
("seconds",roundTimeSpan.Seconds)));
|
||||||
RoundEndSummaryTab.AddChild(roundTimeLabel);
|
RoundEndSummaryTab.AddChild(roundTimeLabel);
|
||||||
|
|
||||||
//Initialize what will be the list of players display.
|
//Initialize what will be the list of players display.
|
||||||
var scrollContainer = new ScrollContainer();
|
var scrollContainer = new ScrollContainer
|
||||||
scrollContainer.VerticalExpand = true;
|
{
|
||||||
|
VerticalExpand = true
|
||||||
|
};
|
||||||
var innerScrollContainer = new VBoxContainer();
|
var innerScrollContainer = new VBoxContainer();
|
||||||
|
|
||||||
//Put observers at the bottom of the list. Put antags on top.
|
//Put observers at the bottom of the list. Put antags on top.
|
||||||
@@ -80,8 +84,9 @@ namespace Content.Client.RoundEnd
|
|||||||
if (playerInfo.Observer)
|
if (playerInfo.Observer)
|
||||||
{
|
{
|
||||||
playerInfoText.SetMarkup(
|
playerInfoText.SetMarkup(
|
||||||
Loc.GetString("[color=gray]{0}[/color] was [color=lightblue]{1}[/color], an observer.",
|
Loc.GetString("round-end-summary-window-player-info-if-observer-text",
|
||||||
playerInfo.PlayerOOCName, playerInfo.PlayerICName));
|
("playerOOCName",playerInfo.PlayerOOCName),
|
||||||
|
("playerICName", playerInfo.PlayerICName)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -89,8 +94,11 @@ namespace Content.Client.RoundEnd
|
|||||||
//For example: their antag goals and if they completed them sucessfully.
|
//For example: their antag goals and if they completed them sucessfully.
|
||||||
var icNameColor = playerInfo.Antag ? "red" : "white";
|
var icNameColor = playerInfo.Antag ? "red" : "white";
|
||||||
playerInfoText.SetMarkup(
|
playerInfoText.SetMarkup(
|
||||||
Loc.GetString("[color=gray]{0}[/color] was [color={1}]{2}[/color] playing role of [color=orange]{3}[/color].",
|
Loc.GetString("round-end-summary-window-player-info-if-not-observer-text",
|
||||||
playerInfo.PlayerOOCName, icNameColor, playerInfo.PlayerICName, Loc.GetString(playerInfo.Role)));
|
("playerOOCName", playerInfo.PlayerOOCName),
|
||||||
|
("icNameColor", icNameColor),
|
||||||
|
("playerICName",playerInfo.PlayerICName),
|
||||||
|
("playerRole", Loc.GetString(playerInfo.Role))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
innerScrollContainer.AddChild(playerInfoText);
|
innerScrollContainer.AddChild(playerInfoText);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.HUD;
|
using Content.Client.HUD;
|
||||||
using Content.Client.Markers;
|
using Content.Client.Markers;
|
||||||
using Content.Shared.Input;
|
using Content.Shared.Input;
|
||||||
@@ -45,48 +45,48 @@ namespace Content.Client.Sandbox
|
|||||||
Resizable = false;
|
Resizable = false;
|
||||||
_gameHud = IoCManager.Resolve<IGameHud>();
|
_gameHud = IoCManager.Resolve<IGameHud>();
|
||||||
|
|
||||||
Title = "Sandbox Panel";
|
Title = Loc.GetString("sandbox-window-title");
|
||||||
|
|
||||||
var vBox = new VBoxContainer { SeparationOverride = 4 };
|
var vBox = new VBoxContainer { SeparationOverride = 4 };
|
||||||
Contents.AddChild(vBox);
|
Contents.AddChild(vBox);
|
||||||
|
|
||||||
RespawnButton = new Button { Text = Loc.GetString("Respawn") };
|
RespawnButton = new Button { Text = Loc.GetString("sandbox-window-respawn-button") };
|
||||||
vBox.AddChild(RespawnButton);
|
vBox.AddChild(RespawnButton);
|
||||||
|
|
||||||
SpawnEntitiesButton = new Button { Text = Loc.GetString("Spawn Entities") };
|
SpawnEntitiesButton = new Button { Text = Loc.GetString("sandbox-window-spawn-entities-button") };
|
||||||
vBox.AddChild(SpawnEntitiesButton);
|
vBox.AddChild(SpawnEntitiesButton);
|
||||||
|
|
||||||
SpawnTilesButton = new Button { Text = Loc.GetString("Spawn Tiles") };
|
SpawnTilesButton = new Button { Text = Loc.GetString("sandbox-window-spawn-tiles-button") };
|
||||||
vBox.AddChild(SpawnTilesButton);
|
vBox.AddChild(SpawnTilesButton);
|
||||||
|
|
||||||
GiveFullAccessButton = new Button { Text = Loc.GetString("Grant Full Access") };
|
GiveFullAccessButton = new Button { Text = Loc.GetString("sandbox-window-grant-full-access-button") };
|
||||||
vBox.AddChild(GiveFullAccessButton);
|
vBox.AddChild(GiveFullAccessButton);
|
||||||
|
|
||||||
GiveAghostButton = new Button { Text = Loc.GetString("Ghost") };
|
GiveAghostButton = new Button { Text = Loc.GetString("sandbox-window-ghost-button") };
|
||||||
vBox.AddChild(GiveAghostButton);
|
vBox.AddChild(GiveAghostButton);
|
||||||
|
|
||||||
ToggleLightButton = new Button { Text = Loc.GetString("Toggle Lights"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().Enabled };
|
ToggleLightButton = new Button { Text = Loc.GetString("sandbox-window-toggle-lights-button"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().Enabled };
|
||||||
vBox.AddChild(ToggleLightButton);
|
vBox.AddChild(ToggleLightButton);
|
||||||
|
|
||||||
ToggleFovButton = new Button { Text = Loc.GetString("Toggle FOV"), ToggleMode = true, Pressed = !IoCManager.Resolve<IEyeManager>().CurrentEye.DrawFov };
|
ToggleFovButton = new Button { Text = Loc.GetString("sandbox-window-toggle-fov-button"), ToggleMode = true, Pressed = !IoCManager.Resolve<IEyeManager>().CurrentEye.DrawFov };
|
||||||
vBox.AddChild(ToggleFovButton);
|
vBox.AddChild(ToggleFovButton);
|
||||||
|
|
||||||
ToggleShadowsButton = new Button { Text = Loc.GetString("Toggle Shadows"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().DrawShadows };
|
ToggleShadowsButton = new Button { Text = Loc.GetString("sandbox-window-toggle-shadows-button"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().DrawShadows };
|
||||||
vBox.AddChild(ToggleShadowsButton);
|
vBox.AddChild(ToggleShadowsButton);
|
||||||
|
|
||||||
ToggleSubfloorButton = new Button { Text = Loc.GetString("Toggle Subfloor"), ToggleMode = true, Pressed = EntitySystem.Get<SubFloorHideSystem>().ShowAll };
|
ToggleSubfloorButton = new Button { Text = Loc.GetString("sandbox-window-toggle-subfloor-button"), ToggleMode = true, Pressed = EntitySystem.Get<SubFloorHideSystem>().ShowAll };
|
||||||
vBox.AddChild(ToggleSubfloorButton);
|
vBox.AddChild(ToggleSubfloorButton);
|
||||||
|
|
||||||
SuicideButton = new Button { Text = Loc.GetString("Suicide") };
|
SuicideButton = new Button { Text = Loc.GetString("sandbox-window-toggle-suicide-button") };
|
||||||
vBox.AddChild(SuicideButton);
|
vBox.AddChild(SuicideButton);
|
||||||
|
|
||||||
ShowMarkersButton = new Button { Text = Loc.GetString("Show Spawns"), ToggleMode = true, Pressed = EntitySystem.Get<MarkerSystem>().MarkersVisible };
|
ShowMarkersButton = new Button { Text = Loc.GetString("sandbox-window-show-spawns-button"), ToggleMode = true, Pressed = EntitySystem.Get<MarkerSystem>().MarkersVisible };
|
||||||
vBox.AddChild(ShowMarkersButton);
|
vBox.AddChild(ShowMarkersButton);
|
||||||
|
|
||||||
ShowBbButton = new Button { Text = Loc.GetString("Show BB"), ToggleMode = true, Pressed = IoCManager.Resolve<IDebugDrawing>().DebugColliders };
|
ShowBbButton = new Button { Text = Loc.GetString("sandbox-window-show-bb-button"), ToggleMode = true, Pressed = IoCManager.Resolve<IDebugDrawing>().DebugColliders };
|
||||||
vBox.AddChild(ShowBbButton);
|
vBox.AddChild(ShowBbButton);
|
||||||
|
|
||||||
MachineLinkingButton = new Button { Text = Loc.GetString("Link machines"), ToggleMode = true };
|
MachineLinkingButton = new Button { Text = Loc.GetString("sandbox-window-link-machines-button"), ToggleMode = true };
|
||||||
vBox.AddChild(MachineLinkingButton);
|
vBox.AddChild(MachineLinkingButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Content.Client.Suspicion
|
|||||||
public override OverlaySpace Space => OverlaySpace.ScreenSpace;
|
public override OverlaySpace Space => OverlaySpace.ScreenSpace;
|
||||||
private readonly Font _font;
|
private readonly Font _font;
|
||||||
|
|
||||||
private readonly string _traitorText = Loc.GetString("Traitor");
|
private readonly string _traitorText = Loc.GetString("traitor-overlay-traitor-text");
|
||||||
|
|
||||||
public TraitorOverlay(
|
public TraitorOverlay(
|
||||||
IEntityManager entityManager,
|
IEntityManager entityManager,
|
||||||
|
|||||||
@@ -71,8 +71,10 @@ namespace Content.Client.Tools.Components
|
|||||||
var fuelCap = _parent.FuelCapacity;
|
var fuelCap = _parent.FuelCapacity;
|
||||||
var fuel = _parent.Fuel;
|
var fuel = _parent.Fuel;
|
||||||
|
|
||||||
_label.SetMarkup(Loc.GetString("Fuel: [color={0}]{1}/{2}[/color]",
|
_label.SetMarkup(Loc.GetString("welder-component-on-examine-detailed-message",
|
||||||
fuel < fuelCap / 4f ? "darkorange" : "orange", Math.Round(fuel), fuelCap));
|
("colorName", fuel < fuelCap / 4f ? "darkorange" : "orange"),
|
||||||
|
("fuelLeft", Math.Round(fuel)),
|
||||||
|
("fuelCapacity", fuelCap)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Client.Message;
|
using Content.Client.Message;
|
||||||
using Content.Client.Resources;
|
using Content.Client.Resources;
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
using Content.Shared.Atmos.Components;
|
using Content.Shared.Atmos.Components;
|
||||||
@@ -90,7 +90,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
|
|||||||
{
|
{
|
||||||
(_lblName = new Label
|
(_lblName = new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Gas Tank"),
|
Text = Loc.GetString("gas-tank-window-label"),
|
||||||
FontOverride = font,
|
FontOverride = font,
|
||||||
FontColorOverride = StyleNano.NanoGold,
|
FontColorOverride = StyleNano.NanoGold,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
@@ -138,7 +138,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
|
|||||||
//internals
|
//internals
|
||||||
_lblInternals = new RichTextLabel
|
_lblInternals = new RichTextLabel
|
||||||
{MinSize = (200, 0), VerticalAlignment = VAlignment.Center};
|
{MinSize = (200, 0), VerticalAlignment = VAlignment.Center};
|
||||||
_btnInternals = new Button {Text = Loc.GetString("Toggle")};
|
_btnInternals = new Button {Text = Loc.GetString("gas-tank-window-internals-toggle-button") };
|
||||||
|
|
||||||
_contentContainer.AddChild(
|
_contentContainer.AddChild(
|
||||||
new HBoxContainer
|
new HBoxContainer
|
||||||
@@ -155,7 +155,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
|
|||||||
|
|
||||||
_contentContainer.AddChild(new Label
|
_contentContainer.AddChild(new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Output Pressure"),
|
Text = Loc.GetString("gas-tank-window-output-pressure-label"),
|
||||||
Align = Label.AlignMode.Center
|
Align = Label.AlignMode.Center
|
||||||
});
|
});
|
||||||
_spbPressure = new FloatSpinBox
|
_spbPressure = new FloatSpinBox
|
||||||
@@ -181,11 +181,11 @@ namespace Content.Client.UserInterface.Atmos.GasTank
|
|||||||
|
|
||||||
public void UpdateState(GasTankBoundUserInterfaceState state)
|
public void UpdateState(GasTankBoundUserInterfaceState state)
|
||||||
{
|
{
|
||||||
_lblPressure.SetMarkup(Loc.GetString("Pressure: {0:0.##} kPa", state.TankPressure));
|
_lblPressure.SetMarkup(Loc.GetString("gas-tank-window-tank-pressure-text", ("tankPressure", $"{state.TankPressure:0.##}")));
|
||||||
_btnInternals.Disabled = !state.CanConnectInternals;
|
_btnInternals.Disabled = !state.CanConnectInternals;
|
||||||
_lblInternals.SetMarkup(Loc.GetString("Internals: [color={0}]{1}[/color]",
|
_lblInternals.SetMarkup(Loc.GetString("gas-tank-window-internal-text",
|
||||||
state.InternalsConnected ? "green" : "red",
|
("colorName" ,state.InternalsConnected ? "green" : "red"),
|
||||||
state.InternalsConnected ? "Connected" : "Disconnected"));
|
("status", state.InternalsConnected ? "Connected" : "Disconnected")));
|
||||||
if (state.OutputPressure.HasValue)
|
if (state.OutputPressure.HasValue)
|
||||||
{
|
{
|
||||||
_spbPressure.Value = state.OutputPressure.Value;
|
_spbPressure.Value = state.OutputPressure.Value;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@@ -106,7 +106,7 @@ namespace Content.Client.Verbs
|
|||||||
|
|
||||||
if (!entity.Uid.IsClientSide())
|
if (!entity.Uid.IsClientSide())
|
||||||
{
|
{
|
||||||
_currentVerbListRoot.List.AddChild(new Label { Text = Loc.GetString("Waiting on Server...") });
|
_currentVerbListRoot.List.AddChild(new Label { Text = Loc.GetString("verb-system-waiting-on-server-text") });
|
||||||
RaiseNetworkEvent(new VerbSystemMessages.RequestVerbsMessage(_currentEntity));
|
RaiseNetworkEvent(new VerbSystemMessages.RequestVerbsMessage(_currentEntity));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ namespace Content.Client.Verbs
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var panel = new PanelContainer();
|
var panel = new PanelContainer();
|
||||||
panel.AddChild(new Label { Text = Loc.GetString("No verbs!") });
|
panel.AddChild(new Label { Text = Loc.GetString("verb-system-no-verbs-text") });
|
||||||
vBox.AddChild(panel);
|
vBox.AddChild(panel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Client.AutoGenerated;
|
using Robust.Client.AutoGenerated;
|
||||||
@@ -100,8 +100,8 @@ namespace Content.Client.Voting.UI
|
|||||||
public sealed class VoteMenuCommand : IConsoleCommand
|
public sealed class VoteMenuCommand : IConsoleCommand
|
||||||
{
|
{
|
||||||
public string Command => "votemenu";
|
public string Command => "votemenu";
|
||||||
public string Description => "Opens the voting menu";
|
public string Description => Loc.GetString("ui-vote-menu-command-description");
|
||||||
public string Help => "Usage: votemenu";
|
public string Help => Loc.GetString("ui-vote-menu-command-help-text");
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace Content.Client.Wires.UI
|
|||||||
}),
|
}),
|
||||||
(_serialLabel = new Label
|
(_serialLabel = new Label
|
||||||
{
|
{
|
||||||
Text = "DEAD-BEEF",
|
Text = Loc.GetString("wires-menu-dead-beef-text"),
|
||||||
FontOverride = fontSmall,
|
FontOverride = fontSmall,
|
||||||
FontColorOverride = Color.Gray,
|
FontColorOverride = Color.Gray,
|
||||||
VerticalAlignment = VAlignment.Center,
|
VerticalAlignment = VAlignment.Center,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Content.Server.Administration;
|
using Content.Server.Administration;
|
||||||
using Content.Server.AI.EntitySystems;
|
using Content.Server.AI.EntitySystems;
|
||||||
@@ -13,9 +13,8 @@ namespace Content.Server.AI.Commands
|
|||||||
public sealed class FactionCommand : IConsoleCommand
|
public sealed class FactionCommand : IConsoleCommand
|
||||||
{
|
{
|
||||||
public string Command => "factions";
|
public string Command => "factions";
|
||||||
public string Description => "Update / list factional relationships for NPCs.";
|
public string Description => Loc.GetString("faction-command-description");
|
||||||
public string Help => "faction <source> <friendly/hostile> target\n" +
|
public string Help => Loc.GetString("faction-command-help-text");
|
||||||
"faction <source> list: hostile factions";
|
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
@@ -35,13 +34,13 @@ namespace Content.Server.AI.Commands
|
|||||||
|
|
||||||
if (args.Length < 2)
|
if (args.Length < 2)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Need more args"));
|
shell.WriteLine(Loc.GetString("shell-wrong-arguments-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Enum.TryParse(args[0], true, out Faction faction))
|
if (!Enum.TryParse(args[0], true, out Faction faction))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid faction"));
|
shell.WriteLine(Loc.GetString("faction-command-invalid-faction-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,40 +51,40 @@ namespace Content.Server.AI.Commands
|
|||||||
case "friendly":
|
case "friendly":
|
||||||
if (args.Length < 3)
|
if (args.Length < 3)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Need to supply a target faction"));
|
shell.WriteLine(Loc.GetString("faction-command-no-target-faction-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Enum.TryParse(args[2], true, out targetFaction))
|
if (!Enum.TryParse(args[2], true, out targetFaction))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid target faction"));
|
shell.WriteLine(Loc.GetString("faction-command-invalid-target-faction-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AiFactionTagSystem>().MakeFriendly(faction, targetFaction);
|
EntitySystem.Get<AiFactionTagSystem>().MakeFriendly(faction, targetFaction);
|
||||||
shell.WriteLine(Loc.GetString("Command successful"));
|
shell.WriteLine(Loc.GetString("shell-command-success"));
|
||||||
break;
|
break;
|
||||||
case "hostile":
|
case "hostile":
|
||||||
if (args.Length < 3)
|
if (args.Length < 3)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Need to supply a target faction"));
|
shell.WriteLine(Loc.GetString("faction-command-no-target-faction-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Enum.TryParse(args[2], true, out targetFaction))
|
if (!Enum.TryParse(args[2], true, out targetFaction))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid target faction"));
|
shell.WriteLine(Loc.GetString("faction-command-invalid-target-faction-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AiFactionTagSystem>().MakeHostile(faction, targetFaction);
|
EntitySystem.Get<AiFactionTagSystem>().MakeHostile(faction, targetFaction);
|
||||||
shell.WriteLine(Loc.GetString("Command successful"));
|
shell.WriteLine(Loc.GetString("shell-command-success"));
|
||||||
break;
|
break;
|
||||||
case "list":
|
case "list":
|
||||||
shell.WriteLine(EntitySystem.Get<AiFactionTagSystem>().GetHostileFactions(faction).ToString());
|
shell.WriteLine(EntitySystem.Get<AiFactionTagSystem>().GetHostileFactions(faction).ToString());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shell.WriteLine(Loc.GetString("Unknown faction arg"));
|
shell.WriteLine(Loc.GetString("faction-command-unknown-faction-argument-error"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ namespace Content.Server.AME.Components
|
|||||||
|
|
||||||
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-controller-component-interact-no-hands-text"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,13 +333,13 @@ namespace Content.Server.AME.Components
|
|||||||
{
|
{
|
||||||
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-controller-component-interact-using-no-hands-text"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hands.GetActiveHand == null)
|
if (hands.GetActiveHand == null)
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("You have nothing on your hand."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-controller-component-interact-using-nothing-in-hands-text"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,19 +348,19 @@ namespace Content.Server.AME.Components
|
|||||||
{
|
{
|
||||||
if (HasJar)
|
if (HasJar)
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("The controller already has a jar loaded."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-controller-component-interact-using-already-has-jar"));
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_jarSlot.Insert(activeHandEntity);
|
_jarSlot.Insert(activeHandEntity);
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("You insert the jar into the fuel slot."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-controller-component-interact-using-success"));
|
||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("You can't put that in the controller..."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-controller-component-interact-using-fail"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Content.Server.AME.Components
|
|||||||
{
|
{
|
||||||
if (!args.User.TryGetComponent<IHandsComponent>(out var hands))
|
if (!args.User.TryGetComponent<IHandsComponent>(out var hands))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-part-component-interact-using-no-hands"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ namespace Content.Server.AME.Components
|
|||||||
var snapPos = mapGrid.TileIndicesFor(args.ClickLocation);
|
var snapPos = mapGrid.TileIndicesFor(args.ClickLocation);
|
||||||
if (mapGrid.GetAnchoredEntities(snapPos).Any(sc => _serverEntityManager.ComponentManager.HasComponent<AMEShieldComponent>(sc)))
|
if (mapGrid.GetAnchoredEntities(snapPos).Any(sc => _serverEntityManager.ComponentManager.HasComponent<AMEShieldComponent>(sc)))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("Shielding is already there!"));
|
Owner.PopupMessage(args.User, Loc.GetString("ame-part-component-shielding-already-present"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ namespace Content.Server.APC.Components
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("Insufficient access!"));
|
user.PopupMessageCursor(Loc.GetString("apc-component-insufficient-access"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,11 +55,15 @@ namespace Content.Server.Access.Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var jobSuffix = string.IsNullOrWhiteSpace(JobTitle) ? "" : $" ({JobTitle})";
|
var jobSuffix = string.IsNullOrWhiteSpace(JobTitle) ? string.Empty : $" ({JobTitle})";
|
||||||
|
|
||||||
Owner.Name = string.IsNullOrWhiteSpace(FullName)
|
Owner.Name = string.IsNullOrWhiteSpace(FullName)
|
||||||
? Loc.GetString("{0}{1}", _originalOwnerName, jobSuffix)
|
? Loc.GetString("access-id-card-component-owner-name-job-title-text",
|
||||||
: Loc.GetString("{0}'s ID card{1}", FullName, jobSuffix);
|
("originalOwnerName", _originalOwnerName),
|
||||||
|
("jobSuffix", jobSuffix))
|
||||||
|
: Loc.GetString("access-id-card-component-owner-full-name-job-title-text",
|
||||||
|
("fullName", FullName),
|
||||||
|
("jobSuffix", jobSuffix));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Content.Server.Access.Components
|
|||||||
{
|
{
|
||||||
if (!user.TryGetComponent(out IHandsComponent? hands))
|
if (!user.TryGetComponent(out IHandsComponent? hands))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(user, Loc.GetString("You have no hands."));
|
Owner.PopupMessage(user, Loc.GetString("access-id-card-console-component-no-hands-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ namespace Content.Server.Access.Components
|
|||||||
|
|
||||||
if (!hands.Drop(hands.ActiveHand, container))
|
if (!hands.Drop(hands.ActiveHand, container))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(user, Loc.GetString("You can't let go of the ID card!"));
|
Owner.PopupMessage(user, Loc.GetString("access-id-card-console-component-cannot-let-go-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
@@ -194,8 +194,8 @@ namespace Content.Server.Access.Components
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
_privilegedIdContainer.ContainedEntity?.Name ?? "",
|
_privilegedIdContainer.ContainedEntity?.Name ?? string.Empty,
|
||||||
_targetIdContainer.ContainedEntity?.Name ?? "");
|
_targetIdContainer.ContainedEntity?.Name ?? string.Empty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -208,8 +208,8 @@ namespace Content.Server.Access.Components
|
|||||||
targetIdComponent.FullName,
|
targetIdComponent.FullName,
|
||||||
targetIdComponent.JobTitle,
|
targetIdComponent.JobTitle,
|
||||||
targetAccessComponent.Tags.ToArray(),
|
targetAccessComponent.Tags.ToArray(),
|
||||||
_privilegedIdContainer.ContainedEntity?.Name ?? "",
|
_privilegedIdContainer.ContainedEntity?.Name ?? string.Empty,
|
||||||
_targetIdContainer.ContainedEntity?.Name ?? "");
|
_targetIdContainer.ContainedEntity?.Name ?? string.Empty);
|
||||||
}
|
}
|
||||||
UserInterface?.SetState(newState);
|
UserInterface?.SetState(newState);
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ namespace Content.Server.Access.Components
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.TryGetComponent<IdCardComponent>(out var idCardComponent) || !user.TryGetComponent(out IHandsComponent? hand))
|
if (!item.HasComponent<IdCardComponent>() || !user.TryGetComponent(out IHandsComponent? hand))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ namespace Content.Server.Access.Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Text = Loc.GetString("Eject Privileged ID");
|
data.Text = Loc.GetString("access-eject-privileged-id-verb-get-data-text");
|
||||||
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png";
|
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png";
|
||||||
data.Visibility = component.PrivilegedIDEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
|
data.Visibility = component.PrivilegedIDEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
|
||||||
}
|
}
|
||||||
@@ -290,7 +290,7 @@ namespace Content.Server.Access.Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Text = Loc.GetString("Eject Target ID");
|
data.Text = Loc.GetString("access-eject-target-id-verb-get-data-text");
|
||||||
data.Visibility = component.TargetIDEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
|
data.Visibility = component.TargetIDEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
|
||||||
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png";
|
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,11 @@ namespace Content.Server.Actions.Actions
|
|||||||
{
|
{
|
||||||
SoundSystem.Play(Filter.Pvs(args.Performer), "/Audio/Weapons/punchmiss.ogg", args.Performer,
|
SoundSystem.Play(Filter.Pvs(args.Performer), "/Audio/Weapons/punchmiss.ogg", args.Performer,
|
||||||
AudioHelpers.WithVariation(0.025f));
|
AudioHelpers.WithVariation(0.025f));
|
||||||
args.Performer.PopupMessageOtherClients(Loc.GetString("{0} fails to disarm {1}!", args.Performer.Name, args.Target.Name));
|
args.Performer.PopupMessageOtherClients(Loc.GetString("disarm-action-popup-message-other-clients",
|
||||||
args.Performer.PopupMessageCursor(Loc.GetString("You fail to disarm {0}!", args.Target.Name));
|
("performerName", args.Performer.Name),
|
||||||
|
("targetName", args.Target.Name)));
|
||||||
|
args.Performer.PopupMessageCursor(Loc.GetString("disarm-action-popup-message-cursor",
|
||||||
|
("targetName", args.Target.Name)));
|
||||||
system.SendLunge(angle, args.Performer);
|
system.SendLunge(angle, args.Performer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,21 +14,21 @@ namespace Content.Server.Administration.Commands
|
|||||||
class ControlMob : IConsoleCommand
|
class ControlMob : IConsoleCommand
|
||||||
{
|
{
|
||||||
public string Command => "controlmob";
|
public string Command => "controlmob";
|
||||||
public string Description => Loc.GetString("Transfers user mind to the specified entity.");
|
public string Description => Loc.GetString("control-mob-command-description");
|
||||||
public string Help => Loc.GetString("Usage: controlmob <mobUid>.");
|
public string Help => Loc.GetString("control-mob-command-help-text");
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
var player = shell.Player as IPlayerSession;
|
var player = shell.Player as IPlayerSession;
|
||||||
if (player == null)
|
if (player == null)
|
||||||
{
|
{
|
||||||
shell.WriteLine("Server cannot do this.");
|
shell.WriteLine("shell-server-cannot");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.Length != 1)
|
if (args.Length != 1)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Wrong number of arguments."));
|
shell.WriteLine(Loc.GetString("shell-wrong-arguments-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
|
|
||||||
if (!int.TryParse(args[0], out var targetId))
|
if (!int.TryParse(args[0], out var targetId))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Argument must be a number."));
|
shell.WriteLine(Loc.GetString("shell-argument-must-be-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,14 +45,14 @@ namespace Content.Server.Administration.Commands
|
|||||||
|
|
||||||
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid entity ID."));
|
shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var target = entityManager.GetEntity(eUid);
|
var target = entityManager.GetEntity(eUid);
|
||||||
if (!target.TryGetComponent(out MindComponent? mindComponent))
|
if (!target.TryGetComponent(out MindComponent? mindComponent))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Target entity is not a mob!"));
|
shell.WriteLine(Loc.GetString("shell-entity-is-not-mob"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ namespace Content.Server.Administration.Commands
|
|||||||
{
|
{
|
||||||
public string Command => "dsay";
|
public string Command => "dsay";
|
||||||
|
|
||||||
public string Description => Loc.GetString("Sends a message to deadchat as an admin");
|
public string Description => Loc.GetString("dsay-command-description");
|
||||||
|
|
||||||
public string Help => Loc.GetString($"Usage: {Command} <message>");
|
public string Help => Loc.GetString("dsay-command-help-text", ("command", Command));
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
var player = shell.Player as IPlayerSession;
|
var player = shell.Player as IPlayerSession;
|
||||||
if (player == null)
|
if (player == null)
|
||||||
{
|
{
|
||||||
shell.WriteLine("Only players can use this command");
|
shell.WriteLine("shell-only-players-can-run-this-command");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
@@ -12,20 +12,10 @@ namespace Content.Server.Administration.Commands
|
|||||||
class DeleteEntitiesWithComponent : IConsoleCommand
|
class DeleteEntitiesWithComponent : IConsoleCommand
|
||||||
{
|
{
|
||||||
public string Command => "deleteewc";
|
public string Command => "deleteewc";
|
||||||
public string Description
|
|
||||||
{
|
public string Description => Loc.GetString("delete-entities-with-component-command-description");
|
||||||
get
|
|
||||||
{
|
public string Help => Loc.GetString("delete-entities-with-component-command-help-text");
|
||||||
return Loc.GetString("Deletes entities with the specified components.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Help
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Loc.GetString("Usage: deleteewc <componentName_1> <componentName_2> ... <componentName_n>\nDeletes any entities with the components specified.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
@@ -52,7 +42,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
shell.WriteLine(Loc.GetString("Deleted {0} entities", count));
|
shell.WriteLine(Loc.GetString("delete-entities-with-component-command-deleted-components",("count", count)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,30 +12,20 @@ namespace Content.Server.Administration.Commands
|
|||||||
class Rejuvenate : IConsoleCommand
|
class Rejuvenate : IConsoleCommand
|
||||||
{
|
{
|
||||||
public string Command => "rejuvenate";
|
public string Command => "rejuvenate";
|
||||||
public string Description
|
|
||||||
{
|
public string Description => Loc.GetString("rejuvenate-command-description");
|
||||||
get
|
|
||||||
{
|
public string Help => Loc.GetString("rejuvenate-command-help-text");
|
||||||
return Loc.GetString("Fully heals a mob.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Help
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Loc.GetString("Usage: rejuvenate <mobUid_1> <mobUid_2> ... <mobUid_n>\nAttempts to heal the user's mob if no arguments are provided.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
var player = shell.Player as IPlayerSession;
|
var player = shell.Player as IPlayerSession;
|
||||||
if (args.Length < 1 && player != null) //Try to heal the users mob if applicable
|
if (args.Length < 1 && player != null) //Try to heal the users mob if applicable
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Healing the user's mob since no arguments were provided."));
|
shell.WriteLine(Loc.GetString("rejuvenate-command-self-heal-message"));
|
||||||
if (player.AttachedEntity == null)
|
if (player.AttachedEntity == null)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("There's no entity attached to the user."));
|
shell.WriteLine(Loc.GetString("rejuvenate-command-no-entity-attached-message"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RejuvenateVerb.PerformRejuvenate(player.AttachedEntity);
|
RejuvenateVerb.PerformRejuvenate(player.AttachedEntity);
|
||||||
@@ -46,7 +36,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
{
|
{
|
||||||
if(!EntityUid.TryParse(arg, out var uid) || !entityManager.TryGetEntity(uid, out var entity))
|
if(!EntityUid.TryParse(arg, out var uid) || !entityManager.TryGetEntity(uid, out var entity))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Could not find entity {0}", arg));
|
shell.WriteLine(Loc.GetString("shell-could-not-find-entity",("entity", arg)));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
RejuvenateVerb.PerformRejuvenate(entity);
|
RejuvenateVerb.PerformRejuvenate(entity);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
using Content.Server.Database;
|
using Content.Server.Database;
|
||||||
using Content.Server.Interfaces;
|
using Content.Server.Interfaces;
|
||||||
@@ -16,14 +16,14 @@ namespace Content.Server.Administration.Commands
|
|||||||
internal class SetAdminOOC : IConsoleCommand
|
internal class SetAdminOOC : IConsoleCommand
|
||||||
{
|
{
|
||||||
public string Command => "setadminooc";
|
public string Command => "setadminooc";
|
||||||
public string Description => Loc.GetString($"Sets the color of your OOC messages. Color must be in hex format, example: {Command} #c43b23");
|
public string Description => Loc.GetString("set-admin-ooc-command-description", ("command", Command));
|
||||||
public string Help => Loc.GetString($"Usage: {Command} <color>");
|
public string Help => Loc.GetString("set-admin-ooc-command-help-text", ("command", Command));
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
if (!(shell.Player is IPlayerSession))
|
if (!(shell.Player is IPlayerSession))
|
||||||
{
|
{
|
||||||
shell.WriteError(Loc.GetString("Only players can use this command"));
|
shell.WriteError(Loc.GetString("shell-only-players-can-run-this-command"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
var color = Color.TryFromHex(colorArg);
|
var color = Color.TryFromHex(colorArg);
|
||||||
if (!color.HasValue)
|
if (!color.HasValue)
|
||||||
{
|
{
|
||||||
shell.WriteError(Loc.GetString("Invalid color hex!"));
|
shell.WriteError(Loc.GetString("shell-invalid-color-hex"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,21 +15,21 @@ namespace Content.Server.Administration.Commands
|
|||||||
{
|
{
|
||||||
public string Command => "setmind";
|
public string Command => "setmind";
|
||||||
|
|
||||||
public string Description => Loc.GetString("Transfers a mind to the specified entity. The entity must have a MindComponent.");
|
public string Description => Loc.GetString("set-mind-command-description", ("requiredComponent", nameof(MindComponent)));
|
||||||
|
|
||||||
public string Help => Loc.GetString("Usage: {0} <entityUid> <username>", Command);
|
public string Help => Loc.GetString("set-mind-command-help-text", ("command", Command));
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
if (args.Length != 2)
|
if (args.Length != 2)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Wrong number of arguments."));
|
shell.WriteLine(Loc.GetString("shell-wrong-arguments-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!int.TryParse(args[0], out var entityUid))
|
if (!int.TryParse(args[0], out var entityUid))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("EntityUid must be a number."));
|
shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,21 +39,21 @@ namespace Content.Server.Administration.Commands
|
|||||||
|
|
||||||
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid entity ID."));
|
shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var target = entityManager.GetEntity(eUid);
|
var target = entityManager.GetEntity(eUid);
|
||||||
|
|
||||||
if (!target.TryGetComponent<MindComponent>(out var mindComponent))
|
if (!target.HasComponent<MindComponent>())
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Target entity does not have a mind (did you forget to make sentient?)"));
|
shell.WriteLine(Loc.GetString("set-mind-command-target-has-no-mind-message"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IPlayerManager>().TryGetSessionByUsername(args[1], out var session))
|
if (!IoCManager.Resolve<IPlayerManager>().TryGetSessionByUsername(args[1], out var session))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Target player does not exist"));
|
shell.WriteLine(Loc.GetString("shell-target-player-does-not-exist"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
var playerCData = session.ContentData();
|
var playerCData = session.ContentData();
|
||||||
if (playerCData == null)
|
if (playerCData == null)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Target player does not have content data (wtf?)"));
|
shell.WriteLine(Loc.GetString("set-mind-command-target-has-no-content-data-message"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ using Content.Shared.Administration;
|
|||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared.Preferences;
|
using Content.Shared.Preferences;
|
||||||
using Content.Shared.Roles;
|
using Content.Shared.Roles;
|
||||||
using NFluidsynth;
|
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
@@ -26,22 +25,21 @@ namespace Content.Server.Administration.Commands
|
|||||||
{
|
{
|
||||||
public string Command => "setoutfit";
|
public string Command => "setoutfit";
|
||||||
|
|
||||||
public string Description =>
|
public string Description => Loc.GetString("set-outfit-command-description", ("requiredComponent", nameof(InventoryComponent)));
|
||||||
Loc.GetString("Sets the outfit of the specified entity. The entity must have an InventoryComponent");
|
|
||||||
|
|
||||||
public string Help => Loc.GetString("Usage: {0} <entityUid> | {0} <entityUid> <outfitId>", Command);
|
public string Help => Loc.GetString("set-outfit-command-help-text", ("command",Command));
|
||||||
|
|
||||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||||
{
|
{
|
||||||
if (args.Length < 1)
|
if (args.Length < 1)
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Wrong number of arguments."));
|
shell.WriteLine(Loc.GetString("shell-wrong-arguments-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!int.TryParse(args[0], out var entityUid))
|
if (!int.TryParse(args[0], out var entityUid))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("EntityUid must be a number."));
|
shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +49,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
|
|
||||||
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid entity ID."));
|
shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,17 +57,15 @@ namespace Content.Server.Administration.Commands
|
|||||||
|
|
||||||
if (!target.TryGetComponent<InventoryComponent>(out var inventoryComponent))
|
if (!target.TryGetComponent<InventoryComponent>(out var inventoryComponent))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Target entity does not have an inventory!"));
|
shell.WriteLine(Loc.GetString("shell-target-entity-does-not-have-message",("missing", "inventory")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.Length == 1)
|
if (args.Length == 1)
|
||||||
{
|
{
|
||||||
if (!(shell.Player is IPlayerSession player))
|
if (shell.Player is not IPlayerSession player)
|
||||||
{
|
{
|
||||||
shell.WriteError(
|
shell.WriteError(Loc.GetString("set-outfit-command-is-not-player-error"));
|
||||||
Loc.GetString(
|
|
||||||
"This does not work from the server console. You must pass the outfit id aswell."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +78,7 @@ namespace Content.Server.Administration.Commands
|
|||||||
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
||||||
if (!prototypeManager.TryIndex<StartingGearPrototype>(args[1], out var startingGear))
|
if (!prototypeManager.TryIndex<StartingGearPrototype>(args[1], out var startingGear))
|
||||||
{
|
{
|
||||||
shell.WriteLine(Loc.GetString("Invalid outfit id"));
|
shell.WriteLine(Loc.GetString("set-outfit-command-invalid-outfit-id-error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +96,10 @@ namespace Content.Server.Administration.Commands
|
|||||||
{
|
{
|
||||||
inventoryComponent.ForceUnequip(slot);
|
inventoryComponent.ForceUnequip(slot);
|
||||||
var gearStr = startingGear.GetGear(slot, profile);
|
var gearStr = startingGear.GetGear(slot, profile);
|
||||||
if (gearStr == "") continue;
|
if (gearStr == string.Empty)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var equipmentEntity = entityManager.SpawnEntity(gearStr, target.Transform.Coordinates);
|
var equipmentEntity = entityManager.SpawnEntity(gearStr, target.Transform.Coordinates);
|
||||||
if (slot == EquipmentSlotDefines.Slots.IDCARD &&
|
if (slot == EquipmentSlotDefines.Slots.IDCARD &&
|
||||||
equipmentEntity.TryGetComponent<PDAComponent>(out var pdaComponent) &&
|
equipmentEntity.TryGetComponent<PDAComponent>(out var pdaComponent) &&
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ namespace Content.Server.Administration.Managers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_chat.SendAdminAnnouncement(Loc.GetString("{0} de-adminned themselves.", session.Name));
|
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-self-de-admin-message", ("exAdminName", session.Name)));
|
||||||
_chat.DispatchServerMessage(session, Loc.GetString("You are now a normal player."));
|
_chat.DispatchServerMessage(session, Loc.GetString("admin-manager-became-normal-player-message"));
|
||||||
|
|
||||||
var plyData = session.ContentData()!;
|
var plyData = session.ContentData()!;
|
||||||
plyData.ExplicitlyDeadminned = true;
|
plyData.ExplicitlyDeadminned = true;
|
||||||
@@ -97,13 +97,13 @@ namespace Content.Server.Administration.Managers
|
|||||||
throw new ArgumentException($"Player {session} is not an admin");
|
throw new ArgumentException($"Player {session} is not an admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
_chat.DispatchServerMessage(session, Loc.GetString("You are now an admin."));
|
_chat.DispatchServerMessage(session, Loc.GetString("admin-manager-became-admin-message"));
|
||||||
|
|
||||||
var plyData = session.ContentData()!;
|
var plyData = session.ContentData()!;
|
||||||
plyData.ExplicitlyDeadminned = false;
|
plyData.ExplicitlyDeadminned = false;
|
||||||
reg.Data.Active = true;
|
reg.Data.Active = true;
|
||||||
|
|
||||||
_chat.SendAdminAnnouncement(Loc.GetString("{0} re-adminned themselves.", session.Name));
|
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-self-re-admin-message", ("newAdminName", session.Name)));
|
||||||
|
|
||||||
SendPermsChangedEvent(session);
|
SendPermsChangedEvent(session);
|
||||||
UpdateAdminStatus(session);
|
UpdateAdminStatus(session);
|
||||||
@@ -124,7 +124,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
{
|
{
|
||||||
// No longer admin.
|
// No longer admin.
|
||||||
_admins.Remove(player);
|
_admins.Remove(player);
|
||||||
_chat.DispatchServerMessage(player, Loc.GetString("You are no longer an admin."));
|
_chat.DispatchServerMessage(player, Loc.GetString("admin-manager-no-longer-admin-message"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -139,7 +139,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
RankId = rankId
|
RankId = rankId
|
||||||
};
|
};
|
||||||
_admins.Add(player, reg);
|
_admins.Add(player, reg);
|
||||||
_chat.DispatchServerMessage(player, Loc.GetString("You are now an admin."));
|
_chat.DispatchServerMessage(player, Loc.GetString("admin-manager-became-admin-message"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
{
|
{
|
||||||
aData.Active = true;
|
aData.Active = true;
|
||||||
|
|
||||||
_chat.DispatchServerMessage(player, Loc.GetString("Your admin permissions have been updated."));
|
_chat.DispatchServerMessage(player, Loc.GetString("admin-manager-admin-permissions-updated-message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
foreach (var session in _playerManager.GetAllPlayers())
|
foreach (var session in _playerManager.GetAllPlayers())
|
||||||
{
|
{
|
||||||
var name = session.Name;
|
var name = session.Name;
|
||||||
var username = session.AttachedEntity?.Name ?? "";
|
var username = session.AttachedEntity?.Name ?? string.Empty;
|
||||||
var antag = session.ContentData()?.Mind?.AllRoles.Any(r => r.Antagonist) ?? false;
|
var antag = session.ContentData()?.Mind?.AllRoles.Any(r => r.Antagonist) ?? false;
|
||||||
|
|
||||||
netMsg.PlayersInfo.Add(new AdminMenuPlayerListMessage.PlayerInfo(name, username, antag));
|
netMsg.PlayersInfo.Add(new AdminMenuPlayerListMessage.PlayerInfo(name, username, antag));
|
||||||
@@ -308,7 +308,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
{
|
{
|
||||||
if (_admins.Remove(e.Session) && _cfg.GetCVar(CCVars.AdminAnnounceLogout))
|
if (_admins.Remove(e.Session) && _cfg.GetCVar(CCVars.AdminAnnounceLogout))
|
||||||
{
|
{
|
||||||
_chat.SendAdminAnnouncement(Loc.GetString("Admin logout: {0}", e.Session.Name));
|
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-admin-logout-message", ("name", e.Session.Name)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +337,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
|
|
||||||
if (_cfg.GetCVar(CCVars.AdminAnnounceLogin))
|
if (_cfg.GetCVar(CCVars.AdminAnnounceLogin))
|
||||||
{
|
{
|
||||||
_chat.SendAdminAnnouncement(Loc.GetString("Admin login: {0}", session.Name));
|
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-admin-login-message", ("name", session.Name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
SendPermsChangedEvent(session);
|
SendPermsChangedEvent(session);
|
||||||
@@ -352,7 +352,7 @@ namespace Content.Server.Administration.Managers
|
|||||||
{
|
{
|
||||||
var data = new AdminData
|
var data = new AdminData
|
||||||
{
|
{
|
||||||
Title = Loc.GetString("Host"),
|
Title = Loc.GetString("admin-manager-admin-data-host-title"),
|
||||||
Flags = AdminFlagsHelper.Everything,
|
Flags = AdminFlagsHelper.Everything,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace Content.Server.Administration.Verbs
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Text = Loc.GetString("Add Reagent...");
|
data.Text = Loc.GetString("admin-add-reagent-verb-get-data-text");
|
||||||
data.CategoryData = VerbCategories.Debug;
|
data.CategoryData = VerbCategories.Debug;
|
||||||
data.Visibility = VerbVisibility.Invisible;
|
data.Visibility = VerbVisibility.Invisible;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Content.Server.Administration.Verbs
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Text = Loc.GetString("Delete");
|
data.Text = Loc.GetString("delete-verb-get-data-text");
|
||||||
data.CategoryData = VerbCategories.Debug;
|
data.CategoryData = VerbCategories.Debug;
|
||||||
data.Visibility = VerbVisibility.Visible;
|
data.Visibility = VerbVisibility.Visible;
|
||||||
data.IconTexture = "/Textures/Interface/VerbIcons/delete.svg.192dpi.png";
|
data.IconTexture = "/Textures/Interface/VerbIcons/delete.svg.192dpi.png";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Content.Server.Advertisements;
|
using Content.Server.Advertisements;
|
||||||
using Content.Server.Chat.Managers;
|
using Content.Server.Chat.Managers;
|
||||||
|
|||||||
@@ -289,7 +289,9 @@ namespace Content.Server.Arcade.Components
|
|||||||
{
|
{
|
||||||
case PlayerAction.Attack:
|
case PlayerAction.Attack:
|
||||||
var attackAmount = _random.Next(2, 6);
|
var attackAmount = _random.Next(2, 6);
|
||||||
_latestPlayerActionMessage = Loc.GetString("You attack {0} for {1}!", _enemyName, attackAmount);
|
_latestPlayerActionMessage = Loc.GetString("space-villain-game-player-attack-message",
|
||||||
|
("enemyName", _enemyName),
|
||||||
|
("attackAmount", attackAmount));
|
||||||
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_attack.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_attack.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
if(!_owner._enemyInvincibilityFlag) _enemyHp -= attackAmount;
|
if(!_owner._enemyInvincibilityFlag) _enemyHp -= attackAmount;
|
||||||
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
||||||
@@ -297,7 +299,9 @@ namespace Content.Server.Arcade.Components
|
|||||||
case PlayerAction.Heal:
|
case PlayerAction.Heal:
|
||||||
var pointAmount = _random.Next(1, 3);
|
var pointAmount = _random.Next(1, 3);
|
||||||
var healAmount = _random.Next(6, 8);
|
var healAmount = _random.Next(6, 8);
|
||||||
_latestPlayerActionMessage = Loc.GetString("You use {0} magic to heal for {1} damage!", pointAmount, healAmount);
|
_latestPlayerActionMessage = Loc.GetString("space-villain-game-player-heal-message",
|
||||||
|
("magicPointAmount", pointAmount),
|
||||||
|
("healAmount", healAmount));
|
||||||
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_heal.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_heal.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
if(!_owner._playerInvincibilityFlag) _playerMp -= pointAmount;
|
if(!_owner._playerInvincibilityFlag) _playerMp -= pointAmount;
|
||||||
_playerHp += healAmount;
|
_playerHp += healAmount;
|
||||||
@@ -305,7 +309,7 @@ namespace Content.Server.Arcade.Components
|
|||||||
break;
|
break;
|
||||||
case PlayerAction.Recharge:
|
case PlayerAction.Recharge:
|
||||||
var chargeAmount = _random.Next(4, 7);
|
var chargeAmount = _random.Next(4, 7);
|
||||||
_latestPlayerActionMessage = Loc.GetString("You regain {0} points", chargeAmount);
|
_latestPlayerActionMessage = Loc.GetString("space-villain-game-player-recharge-message",("regainedPoints", chargeAmount));
|
||||||
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_charge.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_charge.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
_playerMp += chargeAmount;
|
_playerMp += chargeAmount;
|
||||||
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
||||||
@@ -337,7 +341,9 @@ namespace Content.Server.Arcade.Components
|
|||||||
if ((_playerHp > 0 && _playerMp > 0) && (_enemyHp <= 0 || _enemyMp <= 0))
|
if ((_playerHp > 0 && _playerMp > 0) && (_enemyHp <= 0 || _enemyMp <= 0))
|
||||||
{
|
{
|
||||||
_running = false;
|
_running = false;
|
||||||
UpdateUi(Loc.GetString("You won!"), Loc.GetString("{0} dies.", _enemyName), true);
|
UpdateUi(Loc.GetString("space-villain-game-player-wins-message"),
|
||||||
|
Loc.GetString("space-villain-game-enemy-dies-message",("enemyName", _enemyName)),
|
||||||
|
true);
|
||||||
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/win.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/win.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
_owner.ProcessWin();
|
_owner.ProcessWin();
|
||||||
return false;
|
return false;
|
||||||
@@ -348,14 +354,18 @@ namespace Content.Server.Arcade.Components
|
|||||||
if ((_enemyHp > 0 && _enemyMp > 0))
|
if ((_enemyHp > 0 && _enemyMp > 0))
|
||||||
{
|
{
|
||||||
_running = false;
|
_running = false;
|
||||||
UpdateUi(Loc.GetString("You lost!"), Loc.GetString("{0} cheers.", _enemyName), true);
|
UpdateUi(Loc.GetString("space-villain-game-player-loses-message"),
|
||||||
|
Loc.GetString("space-villain-game-enemy-cheers-message",("enemyName", _enemyName)),
|
||||||
|
true);
|
||||||
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (_enemyHp <= 0 || _enemyMp <= 0)
|
if (_enemyHp <= 0 || _enemyMp <= 0)
|
||||||
{
|
{
|
||||||
_running = false;
|
_running = false;
|
||||||
UpdateUi(Loc.GetString("You lost!"), Loc.GetString("{0} dies, but takes you with him.", _enemyName), true);
|
UpdateUi(Loc.GetString("space-villain-game-player-loses-message"),
|
||||||
|
Loc.GetString("space-villain-game-enemy-dies-with-player-message ", ("enemyName", _enemyName)),
|
||||||
|
true);
|
||||||
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -387,14 +397,18 @@ namespace Content.Server.Arcade.Components
|
|||||||
if (_turtleTracker >= 4)
|
if (_turtleTracker >= 4)
|
||||||
{
|
{
|
||||||
var boomAmount = _random.Next(5, 10);
|
var boomAmount = _random.Next(5, 10);
|
||||||
_latestEnemyActionMessage = Loc.GetString("{0} throws a bomb, exploding you for {1} damage!", _enemyName, boomAmount);
|
_latestEnemyActionMessage = Loc.GetString("space-villain-game-enemy-throws-bomb-message",
|
||||||
|
("enemyName", _enemyName),
|
||||||
|
("damageReceived", boomAmount));
|
||||||
if (_owner._playerInvincibilityFlag) return;
|
if (_owner._playerInvincibilityFlag) return;
|
||||||
_playerHp -= boomAmount;
|
_playerHp -= boomAmount;
|
||||||
_turtleTracker--;
|
_turtleTracker--;
|
||||||
}else if (_enemyMp <= 5 && _random.Prob(0.7f))
|
}else if (_enemyMp <= 5 && _random.Prob(0.7f))
|
||||||
{
|
{
|
||||||
var stealAmount = _random.Next(2, 3);
|
var stealAmount = _random.Next(2, 3);
|
||||||
_latestEnemyActionMessage = Loc.GetString("{0} steals {1} of your power!", _enemyName, stealAmount);
|
_latestEnemyActionMessage = Loc.GetString("space-villain-game-enemy-steals-player-power-message",
|
||||||
|
("enemyName", _enemyName),
|
||||||
|
("stolenAmount", stealAmount));
|
||||||
if (_owner._playerInvincibilityFlag) return;
|
if (_owner._playerInvincibilityFlag) return;
|
||||||
_playerMp -= stealAmount;
|
_playerMp -= stealAmount;
|
||||||
_enemyMp += stealAmount;
|
_enemyMp += stealAmount;
|
||||||
@@ -402,13 +416,17 @@ namespace Content.Server.Arcade.Components
|
|||||||
{
|
{
|
||||||
_enemyHp += 4;
|
_enemyHp += 4;
|
||||||
_enemyMp -= 4;
|
_enemyMp -= 4;
|
||||||
_latestEnemyActionMessage = Loc.GetString("{0} heals for 4 health!", _enemyName);
|
_latestEnemyActionMessage = Loc.GetString("space-villain-game-enemy-heals-message",
|
||||||
|
("enemyName", _enemyName),
|
||||||
|
("healedAmount", 4));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var attackAmount = _random.Next(3, 6);
|
var attackAmount = _random.Next(3, 6);
|
||||||
_latestEnemyActionMessage =
|
_latestEnemyActionMessage =
|
||||||
Loc.GetString("{0} attacks you for {1} damage!", _enemyName, attackAmount);
|
Loc.GetString("space-villain-game-enemy-attacks-message",
|
||||||
|
("enemyName", _enemyName),
|
||||||
|
("damageDealt", attackAmount));
|
||||||
if (_owner._playerInvincibilityFlag) return;
|
if (_owner._playerInvincibilityFlag) return;
|
||||||
_playerHp -= attackAmount;
|
_playerHp -= attackAmount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ namespace Content.Server.Atmos.Components
|
|||||||
|
|
||||||
if (IsHoldingPressure())
|
if (IsHoldingPressure())
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("A gush of air blows in your face... Maybe you should reconsider."));
|
Owner.PopupMessage(eventArgs.User, Loc.GetString("firelock-component-is-holding-pressure-message"));
|
||||||
}
|
}
|
||||||
else if (IsHoldingFire())
|
else if (IsHoldingFire())
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("A gush of warm air blows in your face... Maybe you should reconsider."));
|
Owner.PopupMessage(eventArgs.User, Loc.GetString("firelock-component-is-holding-fire-message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ namespace Content.Server.Atmos.Components
|
|||||||
|
|
||||||
_resisting = true;
|
_resisting = true;
|
||||||
|
|
||||||
Owner.PopupMessage(Loc.GetString("You stop, drop, and roll!"));
|
Owner.PopupMessage(Loc.GetString("flammable-component-resist-message"));
|
||||||
stunnable.Paralyze(2f);
|
stunnable.Paralyze(2f);
|
||||||
|
|
||||||
Owner.SpawnTimer(2000, () =>
|
Owner.SpawnTimer(2000, () =>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.Atmos.EntitySystems;
|
using Content.Server.Atmos.EntitySystems;
|
||||||
@@ -231,14 +231,14 @@ namespace Content.Server.Atmos.Components
|
|||||||
|
|
||||||
if (!player.TryGetComponent(out IHandsComponent? handsComponent))
|
if (!player.TryGetComponent(out IHandsComponent? handsComponent))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(player, Loc.GetString("You have no hands."));
|
Owner.PopupMessage(player, Loc.GetString("gas-analyzer-component-player-has-no-hands-message"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var activeHandEntity = handsComponent.GetActiveHand?.Owner;
|
var activeHandEntity = handsComponent.GetActiveHand?.Owner;
|
||||||
if (activeHandEntity == null || !activeHandEntity.TryGetComponent(out GasAnalyzerComponent? gasAnalyzer))
|
if (activeHandEntity == null || !activeHandEntity.TryGetComponent(out GasAnalyzerComponent? gasAnalyzer))
|
||||||
{
|
{
|
||||||
serverMsg.Session.AttachedEntity?.PopupMessage(Loc.GetString("You need a Gas Analyzer in your hand!"));
|
serverMsg.Session.AttachedEntity?.PopupMessage(Loc.GetString("gas-analyzer-component-need-gas-analyzer-in-hand-message"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ namespace Content.Server.Atmos.Components
|
|||||||
{
|
{
|
||||||
if (!eventArgs.CanReach)
|
if (!eventArgs.CanReach)
|
||||||
{
|
{
|
||||||
eventArgs.User.PopupMessage(Loc.GetString("You can't reach there!"));
|
eventArgs.User.PopupMessage(Loc.GetString("gas-analyzer-component-player-cannot-reach-message"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ namespace Content.Server.Atmos.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
data.Visibility = VerbVisibility.Visible;
|
data.Visibility = VerbVisibility.Visible;
|
||||||
data.Text = "Open Control Panel";
|
data.Text = Loc.GetString("control-verb-open-control-panel-text");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Activate(IEntity user, GasTankComponent component)
|
protected override void Activate(IEntity user, GasTankComponent component)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace Content.Server.BarSign
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Owner.Name = Loc.GetString("bar sign");
|
Owner.Name = Loc.GetString("barsign-component-name");
|
||||||
}
|
}
|
||||||
|
|
||||||
Owner.Description = prototype.Description;
|
Owner.Description = prototype.Description;
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ namespace Content.Server.BarSign
|
|||||||
[Prototype("barSign")]
|
[Prototype("barSign")]
|
||||||
public class BarSignPrototype : IPrototype
|
public class BarSignPrototype : IPrototype
|
||||||
{
|
{
|
||||||
private string _description = "";
|
private string _description = string.Empty;
|
||||||
private string _name = "";
|
private string _name = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[DataField("id", required: true)]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
|
|
||||||
[DataField("icon")] public string Icon { get; private set; } = "";
|
[DataField("icon")] public string Icon { get; private set; } = string.Empty;
|
||||||
|
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
public string Name
|
public string Name
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using Content.Server.Atmos;
|
using Content.Server.Atmos;
|
||||||
using Content.Server.Atmos.Components;
|
using Content.Server.Atmos.Components;
|
||||||
@@ -59,7 +59,7 @@ namespace Content.Server.Body.Behavior
|
|||||||
if (_gameTiming.CurTime >= _lastGaspPopupTime + GaspPopupCooldown)
|
if (_gameTiming.CurTime >= _lastGaspPopupTime + GaspPopupCooldown)
|
||||||
{
|
{
|
||||||
_lastGaspPopupTime = _gameTiming.CurTime;
|
_lastGaspPopupTime = _gameTiming.CurTime;
|
||||||
Owner.PopupMessageEveryone(Loc.GetString("Gasp"));
|
Owner.PopupMessageEveryone(Loc.GetString("lung-behavior-gasp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Inhale(CycleDelay);
|
Inhale(CycleDelay);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.UserInterface;
|
using Content.Server.UserInterface;
|
||||||
@@ -56,7 +56,7 @@ namespace Content.Server.Body.Mechanism
|
|||||||
|
|
||||||
if (!part.TryAddMechanism(this))
|
if (!part.TryAddMechanism(this))
|
||||||
{
|
{
|
||||||
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("You can't fit it in!"));
|
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("mechanism-component-cannot-fit-message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ namespace Content.Server.Body.Mechanism
|
|||||||
else // If surgery cannot be performed, show message saying so.
|
else // If surgery cannot be performed, show message saying so.
|
||||||
{
|
{
|
||||||
eventArgs.Target?.PopupMessage(eventArgs.User,
|
eventArgs.Target?.PopupMessage(eventArgs.User,
|
||||||
Loc.GetString("You see no way to install the {0}.", Owner.Name));
|
Loc.GetString("mechanism-component-no-way-to-install-message", ("partName", Owner.Name)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,14 +115,14 @@ namespace Content.Server.Body.Mechanism
|
|||||||
if (!OptionsCache.TryGetValue(key, out var targetObject))
|
if (!OptionsCache.TryGetValue(key, out var targetObject))
|
||||||
{
|
{
|
||||||
BodyCache.Owner.PopupMessage(PerformerCache,
|
BodyCache.Owner.PopupMessage(PerformerCache,
|
||||||
Loc.GetString("You see no useful way to use the {0} anymore.", Owner.Name));
|
Loc.GetString("mechanism-component-no-useful-way-to-use-message",("partName", Owner.Name)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var target = (SharedBodyPartComponent) targetObject;
|
var target = (SharedBodyPartComponent) targetObject;
|
||||||
var message = target.TryAddMechanism(this)
|
var message = target.TryAddMechanism(this)
|
||||||
? Loc.GetString("You jam {0:theName} inside {1:them}.", Owner, PerformerCache)
|
? Loc.GetString("mechanism-component-jam-inside-message",("ownerName", Owner),("them", PerformerCache))
|
||||||
: Loc.GetString("You can't fit it in!");
|
: Loc.GetString("mechanism-component-cannot-fit-message");
|
||||||
|
|
||||||
BodyCache.Owner.PopupMessage(PerformerCache, message);
|
BodyCache.Owner.PopupMessage(PerformerCache, message);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.UserInterface;
|
using Content.Server.UserInterface;
|
||||||
@@ -153,7 +153,7 @@ namespace Content.Server.Body.Part
|
|||||||
else // If surgery cannot be performed, show message saying so.
|
else // If surgery cannot be performed, show message saying so.
|
||||||
{
|
{
|
||||||
eventArgs.Target?.PopupMessage(eventArgs.User,
|
eventArgs.Target?.PopupMessage(eventArgs.User,
|
||||||
Loc.GetString("You see no way to install {0:theName}.", Owner));
|
Loc.GetString("bodypart-component-no-way-to-install-message", ("partName", Owner)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,13 +180,13 @@ namespace Content.Server.Body.Part
|
|||||||
if (!_optionsCache.TryGetValue(key, out var targetObject))
|
if (!_optionsCache.TryGetValue(key, out var targetObject))
|
||||||
{
|
{
|
||||||
_owningBodyCache.Owner.PopupMessage(_surgeonCache,
|
_owningBodyCache.Owner.PopupMessage(_surgeonCache,
|
||||||
Loc.GetString("You see no useful way to attach {0:theName} anymore.", Owner));
|
Loc.GetString("bodypart-component-no-way-to-attach-message", ("partName", Owner)));
|
||||||
}
|
}
|
||||||
|
|
||||||
var target = (string) targetObject!;
|
var target = (string) targetObject!;
|
||||||
var message = _owningBodyCache.TryAddPart(target, this)
|
var message = _owningBodyCache.TryAddPart(target, this)
|
||||||
? Loc.GetString("You attach {0:theName}.", Owner)
|
? Loc.GetString("bodypart-component-attach-success-message",("partName", Owner))
|
||||||
: Loc.GetString("You can't attach {0:theName}!", Owner);
|
: Loc.GetString("bodypart-component-attach-fail-message",("partName", Owner));
|
||||||
|
|
||||||
_owningBodyCache.Owner.PopupMessage(_surgeonCache, message);
|
_owningBodyCache.Owner.PopupMessage(_surgeonCache, message);
|
||||||
}
|
}
|
||||||
@@ -256,7 +256,7 @@ namespace Content.Server.Body.Part
|
|||||||
}
|
}
|
||||||
|
|
||||||
data.Visibility = VerbVisibility.Visible;
|
data.Visibility = VerbVisibility.Visible;
|
||||||
data.Text = Loc.GetString("Attach Body Part");
|
data.Text = Loc.GetString("attach-bodypart-verb-get-data-text");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Activate(IEntity user, BodyPartComponent component)
|
protected override void Activate(IEntity user, BodyPartComponent component)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -97,20 +97,20 @@ namespace Content.Server.Body.Surgery
|
|||||||
|
|
||||||
if (HasIncisionNotClamped())
|
if (HasIncisionNotClamped())
|
||||||
{
|
{
|
||||||
toReturn.Append(Loc.GetString("The skin on {0:their} {1} has an incision, but it is prone to bleeding.",
|
toReturn.Append(Loc.GetString("biological-surgery-data-component-has-incision-not-clamped-message",
|
||||||
Owner, Parent.Name));
|
("owner", Owner),("bodyPart", Parent.Name)));
|
||||||
}
|
}
|
||||||
else if (HasClampedIncisionNotRetracted())
|
else if (HasClampedIncisionNotRetracted())
|
||||||
{
|
{
|
||||||
toReturn.AppendLine(Loc.GetString("The skin on {0:their} {1} has an incision, but it is not retracted.",
|
toReturn.AppendLine(Loc.GetString("biological-surgery-data-component-has-clamped-incision-not-retracted-message",
|
||||||
Owner, Parent.Name));
|
("owner", Owner),("bodyPary", Parent.Name)));
|
||||||
}
|
}
|
||||||
else if (HasFullyOpenIncision())
|
else if (HasFullyOpenIncision())
|
||||||
{
|
{
|
||||||
toReturn.AppendLine(Loc.GetString("There is an incision on {0:their} {1}.\n", Owner, Parent.Name));
|
toReturn.AppendLine(Loc.GetString("biological-surgery-data-component-has-fully-open-incision-message", ("owner", Owner), ("bodyPart", Parent.Name)) + "\n");
|
||||||
foreach (var mechanism in _disconnectedOrgans)
|
foreach (var mechanism in _disconnectedOrgans)
|
||||||
{
|
{
|
||||||
toReturn.AppendLine(Loc.GetString("{0:their} {1} is loose.", Owner, mechanism.Name));
|
toReturn.AppendLine(Loc.GetString("biological-surgery-data-component-part-is-loose-message",("owner", Owner), ("bodyPart", mechanism.Name)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Cut open the skin..."));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-open-skin-message"));
|
||||||
|
|
||||||
if (await SurgeryDoAfter(performer))
|
if (await SurgeryDoAfter(performer))
|
||||||
{
|
{
|
||||||
@@ -237,7 +237,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
{
|
{
|
||||||
if (Parent == null) return;
|
if (Parent == null) return;
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Clamp the vessels..."));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-clamp-vessels-message"));
|
||||||
|
|
||||||
if (await SurgeryDoAfter(performer))
|
if (await SurgeryDoAfter(performer))
|
||||||
{
|
{
|
||||||
@@ -249,7 +249,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
{
|
{
|
||||||
if (Parent == null) return;
|
if (Parent == null) return;
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Retracting the skin..."));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-retract-skin-message"));
|
||||||
|
|
||||||
if (await SurgeryDoAfter(performer))
|
if (await SurgeryDoAfter(performer))
|
||||||
{
|
{
|
||||||
@@ -261,7 +261,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
{
|
{
|
||||||
if (Parent == null) return;
|
if (Parent == null) return;
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Cauterizing the incision..."));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-cauterize-incision-message"));
|
||||||
|
|
||||||
if (await SurgeryDoAfter(performer))
|
if (await SurgeryDoAfter(performer))
|
||||||
{
|
{
|
||||||
@@ -299,7 +299,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Loosening the organ..."));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-loosen-organ-message"));
|
||||||
|
|
||||||
if (!performer.HasComponent<DoAfterComponent>())
|
if (!performer.HasComponent<DoAfterComponent>())
|
||||||
{
|
{
|
||||||
@@ -340,7 +340,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Removing the organ..."));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-remove-organ-message"));
|
||||||
|
|
||||||
if (!performer.HasComponent<DoAfterComponent>())
|
if (!performer.HasComponent<DoAfterComponent>())
|
||||||
{
|
{
|
||||||
@@ -361,7 +361,7 @@ namespace Content.Server.Body.Surgery
|
|||||||
if (Parent == null) return;
|
if (Parent == null) return;
|
||||||
if (container is not SharedBodyComponent body) return;
|
if (container is not SharedBodyComponent body) return;
|
||||||
|
|
||||||
performer.PopupMessage(Loc.GetString("Sawing off the limb!"));
|
performer.PopupMessage(Loc.GetString("biological-surgery-data-component-remove-bodypart-message"));
|
||||||
|
|
||||||
if (await SurgeryDoAfter(performer))
|
if (await SurgeryDoAfter(performer))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -265,7 +265,7 @@ namespace Content.Server.Body.Surgery.Components
|
|||||||
if (PerformerCache == null) return;
|
if (PerformerCache == null) return;
|
||||||
|
|
||||||
BodyCache?.Owner.PopupMessage(PerformerCache,
|
BodyCache?.Owner.PopupMessage(PerformerCache,
|
||||||
Loc.GetString("You see no useful way to use {0:theName}.", Owner));
|
Loc.GetString("surgery-tool-component-not-useful-message", ("bodyPart", Owner)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NotUsefulAnymorePopup()
|
private void NotUsefulAnymorePopup()
|
||||||
@@ -273,7 +273,7 @@ namespace Content.Server.Body.Surgery.Components
|
|||||||
if (PerformerCache == null) return;
|
if (PerformerCache == null) return;
|
||||||
|
|
||||||
BodyCache?.Owner.PopupMessage(PerformerCache,
|
BodyCache?.Owner.PopupMessage(PerformerCache,
|
||||||
Loc.GetString("You see no useful way to use {0:theName} anymore.", Owner));
|
Loc.GetString("surgery-tool-component-not-useful-anymore-message", ("bodyPart", Owner)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -654,12 +654,14 @@ namespace Content.Server.Botany.Components
|
|||||||
{
|
{
|
||||||
if (seeds.Seed == null)
|
if (seeds.Seed == null)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("The packet seems to be empty. You throw it away."));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-empty-seed-packet-message"));
|
||||||
usingItem.QueueDelete();
|
usingItem.QueueDelete();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
user.PopupMessageCursor(Loc.GetString("You plant the {0} {1}.", seeds.Seed.SeedName, seeds.Seed.SeedNoun));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-plant-success-message",
|
||||||
|
("seedName", seeds.Seed.SeedName),
|
||||||
|
("seedNoun", seeds.Seed.SeedNoun)));
|
||||||
|
|
||||||
Seed = seeds.Seed;
|
Seed = seeds.Seed;
|
||||||
Dead = false;
|
Dead = false;
|
||||||
@@ -675,7 +677,7 @@ namespace Content.Server.Botany.Components
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
user.PopupMessageCursor(Loc.GetString("The {0} already has seeds in it!", Owner.Name));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-already-seeded-message", ("name", Owner.Name)));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,14 +685,14 @@ namespace Content.Server.Botany.Components
|
|||||||
{
|
{
|
||||||
if (WeedLevel > 0)
|
if (WeedLevel > 0)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("You remove the weeds from the {0}.", Owner.Name));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-remove-weeds-message",("name", Owner.Name)));
|
||||||
user.PopupMessageOtherClients(Loc.GetString("{0} starts uprooting the weeds.", user.Name));
|
user.PopupMessageOtherClients(Loc.GetString("plant-holder-component-remove-weeds-others-message",("otherName", user.Name)));
|
||||||
WeedLevel = 0;
|
WeedLevel = 0;
|
||||||
UpdateSprite();
|
UpdateSprite();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("This plot is devoid of weeds! It doesn't need uprooting."));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-no-weeds-message"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -700,13 +702,13 @@ namespace Content.Server.Botany.Components
|
|||||||
{
|
{
|
||||||
if (Seed != null)
|
if (Seed != null)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("You remove the plant from the {0}.", Owner.Name));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-remove-plant-message",("name", Owner.Name)));
|
||||||
user.PopupMessageOtherClients(Loc.GetString("{0} removes the plant.", user.Name));
|
user.PopupMessageOtherClients(Loc.GetString("plant-holder-component-remove-plant-others-message",("name", user.Name)));
|
||||||
RemovePlant();
|
RemovePlant();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("There is no plant to remove."));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-no-plant-message"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -731,13 +733,13 @@ namespace Content.Server.Botany.Components
|
|||||||
var split = solution.Drain(amount);
|
var split = solution.Drain(amount);
|
||||||
if (split.TotalVolume == 0)
|
if (split.TotalVolume == 0)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("{0:TheName} is empty!", usingItem));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-empty-message",("owner", usingItem)));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
user.PopupMessageCursor(Loc.GetString(
|
user.PopupMessageCursor(Loc.GetString(sprayed ? "plant-holder-component-spray-message" : "plant-holder-component-transfer-message",
|
||||||
sprayed ? "You spray {0:TheName}" : "You transfer {1}u to {0:TheName}",
|
("owner",Owner),
|
||||||
Owner, split.TotalVolume));
|
("amount",split.TotalVolume)));
|
||||||
|
|
||||||
_solutionContainer?.TryAddSolution(split);
|
_solutionContainer?.TryAddSolution(split);
|
||||||
|
|
||||||
@@ -750,25 +752,25 @@ namespace Content.Server.Botany.Components
|
|||||||
{
|
{
|
||||||
if (Seed == null)
|
if (Seed == null)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("There is nothing to take a sample of!"));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-nothing-to-sample-message"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Sampled)
|
if (Sampled)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("This plant has already been sampled."));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-already-sampled-message"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dead)
|
if (Dead)
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("This plant is dead."));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-dead-plant-message"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var seed = Seed.SpawnSeedPacket(user.Transform.Coordinates);
|
var seed = Seed.SpawnSeedPacket(user.Transform.Coordinates);
|
||||||
seed.RandomOffset(0.25f);
|
seed.RandomOffset(0.25f);
|
||||||
user.PopupMessageCursor(Loc.GetString($"You take a sample from the {Seed.DisplayName}."));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-take-sample-message", ("seedName", Seed.DisplayName)));
|
||||||
Health -= (_random.Next(3, 5) * 10);
|
Health -= (_random.Next(3, 5) * 10);
|
||||||
|
|
||||||
if (_random.Prob(0.3f))
|
if (_random.Prob(0.3f))
|
||||||
@@ -788,8 +790,13 @@ namespace Content.Server.Botany.Components
|
|||||||
|
|
||||||
if (usingItem.HasComponent<ProduceComponent>())
|
if (usingItem.HasComponent<ProduceComponent>())
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("You compost {1:theName} into {0:theName}.", Owner, usingItem));
|
user.PopupMessageCursor(Loc.GetString("plant-holder-component-compost-message",
|
||||||
user.PopupMessageOtherClients(Loc.GetString("{0:TheName} composts {1:theName} into {2:theName}.", user, usingItem, Owner));
|
("owner", Owner),
|
||||||
|
("usingItem", usingItem)));
|
||||||
|
user.PopupMessageOtherClients(Loc.GetString("plant-holder-component-compost-others-message",
|
||||||
|
("user",user),
|
||||||
|
("usingItem", usingItem),
|
||||||
|
("owner", Owner)));
|
||||||
|
|
||||||
if (usingItem.TryGetComponent(out SolutionContainerComponent? solution2))
|
if (usingItem.TryGetComponent(out SolutionContainerComponent? solution2))
|
||||||
{
|
{
|
||||||
@@ -826,45 +833,51 @@ namespace Content.Server.Botany.Components
|
|||||||
|
|
||||||
if (Seed == null)
|
if (Seed == null)
|
||||||
{
|
{
|
||||||
message.AddMarkup(Loc.GetString("It has nothing planted in it.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-nothing-planted-message") + "\n");
|
||||||
}
|
}
|
||||||
else if (!Dead)
|
else if (!Dead)
|
||||||
{
|
{
|
||||||
message.AddMarkup(Loc.GetString($"[color=green]{Seed.DisplayName}[/color] {(Seed.DisplayName.EndsWith('s') ? "are" : "is")} growing here.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-something-already-growing-message",
|
||||||
|
("seedName", Seed.DisplayName),
|
||||||
|
("toBeForm", Seed.DisplayName.EndsWith('s') ? "are" : "is"))
|
||||||
|
+ "\n");
|
||||||
|
|
||||||
if(Health <= Seed.Endurance / 2)
|
if(Health <= Seed.Endurance / 2)
|
||||||
message.AddMarkup(Loc.GetString($"The plant looks [color=red]{(Age > Seed.Lifespan ? "old and wilting" : "unhealthy")}[/color].\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-something-already-growing-low-health-message",
|
||||||
|
("healthState", Loc.GetString(Age > Seed.Lifespan ? "plant-holder-component-plant-old-adjective" :
|
||||||
|
"plant-holder-component-plant-unhealthy-adjective")))
|
||||||
|
+ "\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message.AddMarkup(Loc.GetString("It is full of [color=red]dead plant matter[/color].\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-dead-plant-matter-message") + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(WeedLevel >= 5)
|
if(WeedLevel >= 5)
|
||||||
message.AddMarkup(Loc.GetString("It is filled with [color=green]weeds[/color]!\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-weed-high-level-message") + "\n");
|
||||||
|
|
||||||
if(PestLevel >= 5)
|
if(PestLevel >= 5)
|
||||||
message.AddMarkup(Loc.GetString("It is filled with [color=gray]tiny worms[/color]!\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-pest-high-level-message") + "\n");
|
||||||
|
|
||||||
message.AddMarkup(Loc.GetString($"Water: [color=cyan]{(int)WaterLevel}[/color]\n"));
|
message.AddMarkup(Loc.GetString($"plant-holder-component-water-level-message",("waterLevel", (int)WaterLevel)) + "\n");
|
||||||
message.AddMarkup(Loc.GetString($"Nutrient: [color=orange]{(int)NutritionLevel}[/color]\n"));
|
message.AddMarkup(Loc.GetString($"plant-holder-component-nutrient-level-message", ("nutritionLevel", (int)NutritionLevel)) + "\n");
|
||||||
|
|
||||||
if (DrawWarnings)
|
if (DrawWarnings)
|
||||||
{
|
{
|
||||||
if(Toxins > 40f)
|
if(Toxins > 40f)
|
||||||
message.AddMarkup(Loc.GetString("The [color=red]toxicity level alert[/color] is flashing red.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-toxins-high-warning") + "\n");
|
||||||
|
|
||||||
if(ImproperLight)
|
if(ImproperLight)
|
||||||
message.AddMarkup(Loc.GetString("The [color=yellow]improper light level alert[/color] is blinking.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-light-improper-warning") + "\n");
|
||||||
|
|
||||||
if(ImproperHeat)
|
if(ImproperHeat)
|
||||||
message.AddMarkup(Loc.GetString("The [color=orange]improper temperature level alert[/color] is blinking.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-heat-improper-warning") + "\n");
|
||||||
|
|
||||||
if(ImproperPressure)
|
if(ImproperPressure)
|
||||||
message.AddMarkup(Loc.GetString("The [color=lightblue]improper environment pressure alert[/color] is blinking.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-pressure-improper-warning") + "\n");
|
||||||
|
|
||||||
if(_missingGas > 0)
|
if(_missingGas > 0)
|
||||||
message.AddMarkup(Loc.GetString("The [color=cyan]improper gas environment alert[/color] is blinking.\n"));
|
message.AddMarkup(Loc.GetString("plant-holder-component-gas-missing-warning") + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,18 +32,20 @@ namespace Content.Server.Botany.Components
|
|||||||
|
|
||||||
if (Seed == null)
|
if (Seed == null)
|
||||||
{
|
{
|
||||||
message.AddMarkup(Loc.GetString("It doesn't seem to contain any seeds.\n"));
|
message.AddMarkup(Loc.GetString("seed-component-no-seeds-message") + "\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.AddMarkup(Loc.GetString($"It has a picture of [color=yellow]{Seed.DisplayName}[/color] on the front.\n"));
|
message.AddMarkup(Loc.GetString($"seed-component-description", ("seedName", Seed.DisplayName)) + "\n");
|
||||||
|
|
||||||
if (!Seed.RoundStart)
|
if (!Seed.RoundStart)
|
||||||
message.AddMarkup(Loc.GetString($"It's tagged as variety [color=lightgray]no. {Seed.Uid}[/color].\n"));
|
{
|
||||||
|
message.AddMarkup(Loc.GetString($"seed-component-has-variety-tag", ("seedUid", Seed.Uid)) + "\n");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message.AddMarkup(Loc.GetString($"Plant Yield: [color=lightblue]{Seed.Yield}[/color]\n"));
|
message.AddMarkup(Loc.GetString($"seed-component-plant-yield-text", ("seedYield", Seed.Yield)) + "\n");
|
||||||
message.AddMarkup(Loc.GetString($"Plant Potency: [color=lightblue]{Seed.Potency}[/color]\n"));
|
message.AddMarkup(Loc.GetString($"seed-component-plant-potency-text", ("seedPotency", Seed.Potency)) + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
@@ -31,7 +31,7 @@ namespace Content.Server.Botany.Components
|
|||||||
|
|
||||||
if (eventArgs.Using.TryGetComponent(out ProduceComponent? produce) && produce.Seed != null)
|
if (eventArgs.Using.TryGetComponent(out ProduceComponent? produce) && produce.Seed != null)
|
||||||
{
|
{
|
||||||
eventArgs.User.PopupMessageCursor(Loc.GetString("You extract some seeds from the {0}.", eventArgs.Using.Name));
|
eventArgs.User.PopupMessageCursor(Loc.GetString("seed-extractor-component-interact-message",("name", eventArgs.Using.Name)));
|
||||||
|
|
||||||
eventArgs.Using.QueueDelete();
|
eventArgs.Using.QueueDelete();
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user