Merge remote-tracking branch 'upstream/master' into ups
@@ -26,7 +26,7 @@ namespace Content.Client.PDA
|
||||
public const int ProgramContentView = 3;
|
||||
|
||||
|
||||
private string _pdaOwner = Loc.GetString("comp-pda-ui-unknown");
|
||||
private string _pdaOwnerName = Loc.GetString("comp-pda-ui-unknown");
|
||||
private string _owner = Loc.GetString("comp-pda-ui-unknown");
|
||||
private string _jobTitle = Loc.GetString("comp-pda-ui-unassigned");
|
||||
private string _stationName = Loc.GetString("comp-pda-ui-unknown");
|
||||
@@ -96,7 +96,7 @@ namespace Content.Client.PDA
|
||||
|
||||
PdaOwnerButton.OnPressed += _ =>
|
||||
{
|
||||
_clipboard.SetText(_pdaOwner);
|
||||
_clipboard.SetText(_pdaOwnerName);
|
||||
};
|
||||
|
||||
IdInfoButton.OnPressed += _ =>
|
||||
@@ -138,9 +138,9 @@ namespace Content.Client.PDA
|
||||
|
||||
if (state.PdaOwnerInfo.ActualOwnerName != null)
|
||||
{
|
||||
_pdaOwner = state.PdaOwnerInfo.ActualOwnerName;
|
||||
_pdaOwnerName = state.PdaOwnerInfo.ActualOwnerName;
|
||||
PdaOwnerLabel.SetMarkup(Loc.GetString("comp-pda-ui-owner",
|
||||
("actualOwnerName", _pdaOwner)));
|
||||
("actualOwnerName", _pdaOwnerName)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using Content.Client.UserInterface.Fragments;
|
||||
using Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
using Content.Shared.CartridgeLoader;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client._White.CartridgeLoader.Cartridges;
|
||||
|
||||
public sealed partial class MessagesUi : UIFragment
|
||||
{
|
||||
private MessagesUiFragment _fragment;
|
||||
|
||||
public override Control GetUIFragmentRoot()
|
||||
{
|
||||
return _fragment;
|
||||
}
|
||||
|
||||
public override void Setup(BoundUserInterface userInterface, EntityUid? fragmentOwner)
|
||||
{
|
||||
_fragment = new MessagesUiFragment();
|
||||
_fragment.OnMessageSent += note => SendMessagesMessage(MessagesUiAction.Send, note, null, userInterface);
|
||||
_fragment.OnButtonPressed += userUid => SendMessagesMessage(MessagesUiAction.ChangeChat, null, userUid, userInterface);
|
||||
}
|
||||
|
||||
public override void UpdateState(BoundUserInterfaceState state)
|
||||
{
|
||||
if (state is not MessagesUiState messagesState)
|
||||
return;
|
||||
|
||||
_fragment.UpdateState(messagesState.Mode, messagesState.Contents, messagesState.Name);
|
||||
}
|
||||
|
||||
private void SendMessagesMessage(MessagesUiAction action, string? stringInput, int? uidInput, BoundUserInterface userInterface)
|
||||
{
|
||||
var messagesMessage = new MessagesUiMessageEvent(action, stringInput, uidInput);
|
||||
var message = new CartridgeUiMessage(messagesMessage);
|
||||
userInterface.SendMessage(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
using System.Numerics;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Client._White.CartridgeLoader.Cartridges;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class MessagesUiFragment : BoxContainer
|
||||
{
|
||||
public event Action<string>? OnMessageSent;
|
||||
public event Action<int?>? OnButtonPressed;
|
||||
|
||||
private string _searchText = string.Empty;
|
||||
|
||||
public MessagesUiFragment()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
Input.OnTextEntered += _ =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Input.Text))
|
||||
OnMessageSent?.Invoke(Input.Text);
|
||||
Input.Clear();
|
||||
};
|
||||
|
||||
BackButton.OnPressed += _ => OnButtonPressed?.Invoke(null);
|
||||
SearchBar.OnTextChanged += OnSearchTextChanged;
|
||||
|
||||
UpdateState(MessagesUiStateMode.UserList, [], null);
|
||||
}
|
||||
|
||||
public void UpdateState(MessagesUiStateMode mode, List<(MessagesUser, int?)>? contents, string? name)
|
||||
{
|
||||
MessageContainer.DisposeAllChildren();
|
||||
Input.Orphan();
|
||||
BackButton.Orphan();
|
||||
|
||||
SearchBar.Visible = false;
|
||||
|
||||
if (contents == null)
|
||||
return;
|
||||
|
||||
if (mode == MessagesUiStateMode.Chat)
|
||||
{
|
||||
HeaderLabel.Text = name;
|
||||
|
||||
foreach (var (senderName, message) in contents)
|
||||
{
|
||||
AddNote($"{senderName.Name} {message}");
|
||||
}
|
||||
|
||||
OverContainer.AddChild(Input);
|
||||
HeaderBox.AddChild(BackButton);
|
||||
BackButton.SetPositionInParent(0);
|
||||
}
|
||||
else if (mode == MessagesUiStateMode.Error)
|
||||
{
|
||||
HeaderLabel.Text = Loc.GetString("messages-pda-error-header");
|
||||
AddNote(Loc.GetString("messages-pda-error-message"));
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchBar.Visible = true;
|
||||
HeaderLabel.Text = Loc.GetString("messages-pda-chat-choice");
|
||||
foreach (var (messagesUser, userUid) in contents)
|
||||
{
|
||||
AddButton(userUid, messagesUser.Name + ", " + messagesUser.Job, messagesUser.Department);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Adding a button for selecting a chat
|
||||
///</summary>
|
||||
private void AddButton(int? userUid, string userName, string departmentId)
|
||||
{
|
||||
var styleClass = IoCManager.Resolve<IPrototypeManager>().Index<DepartmentPrototype>(departmentId).ButtonStyle;
|
||||
|
||||
var button = new Button
|
||||
{
|
||||
Text = userName,
|
||||
HorizontalExpand = true,
|
||||
ClipText = true,
|
||||
StyleClasses = { styleClass },
|
||||
MinWidth = 60
|
||||
};
|
||||
button.OnPressed += _ => OnButtonPressed?.Invoke(userUid);
|
||||
MessageContainer.AddChild(button);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Adding a text label to the message container
|
||||
///</summary>
|
||||
private void AddNote(string note)
|
||||
{
|
||||
MessageContainer.AddChild(new Label
|
||||
{
|
||||
Text = note,
|
||||
HorizontalExpand = true,
|
||||
ClipText = false
|
||||
});
|
||||
}
|
||||
|
||||
private bool ButtonIsVisible(Button button)
|
||||
{
|
||||
return string.IsNullOrEmpty(_searchText) || button.Text == null || button.Text.Contains(_searchText, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
private void UpdateVisibleButtons()
|
||||
{
|
||||
foreach (var child in MessageContainer.Children)
|
||||
{
|
||||
if (child is Button button)
|
||||
button.Visible = ButtonIsVisible(button);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSearchTextChanged(LineEdit.LineEditEventArgs args)
|
||||
{
|
||||
_searchText = args.Text;
|
||||
|
||||
UpdateVisibleButtons();
|
||||
// Reset scroll bar so they can see the relevant results.
|
||||
MessagesScroll.SetScrollValue(Vector2.Zero);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<cartridges1:MessagesUiFragment
|
||||
xmlns="https://spacestation14.io"
|
||||
xmlns:cartridges1="clr-namespace:Content.Client._White.CartridgeLoader.Cartridges"
|
||||
Margin="1 0 2 0" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
|
||||
<PanelContainer StyleClasses="BackgroundDark"/>
|
||||
<BoxContainer Name="OverContainer" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
|
||||
<BoxContainer Name="HeaderBox">
|
||||
<Button Name="BackButton" Text="{Loc 'messages-pda-ui-back'}" HorizontalExpand="False"/>
|
||||
<Label Name="HeaderLabel"/>
|
||||
</BoxContainer>
|
||||
<LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True" Margin="0 4" />
|
||||
<ScrollContainer Name="MessagesScroll" HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="True">
|
||||
<BoxContainer Orientation="Vertical" Name="MessageContainer" HorizontalExpand="True" VerticalExpand="True"/>
|
||||
</ScrollContainer>
|
||||
<LineEdit Name="Input" HorizontalExpand="True" SetHeight="32"/>
|
||||
</BoxContainer>
|
||||
</cartridges1:MessagesUiFragment>
|
||||
@@ -56,7 +56,7 @@ public sealed class SingletonDeviceNetServerSystem : EntitySystem
|
||||
|
||||
if (!server.Available)
|
||||
{
|
||||
DisconnectServer(uid,server, device);
|
||||
DisconnectServer(uid, server, device);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,12 @@ namespace Content.Server.IoC
|
||||
IoCManager.Register<DiscordWebhook>();
|
||||
IoCManager.Register<ServerDbEntryManager>();
|
||||
IoCManager.Register<ISharedPlaytimeManager, PlayTimeTrackingManager>();
|
||||
|
||||
#if FULL_RELEASE
|
||||
IoCManager.Register<IPlayTimeTrackingManager, GlobalPlayTimeTrackingManager>();
|
||||
#else
|
||||
IoCManager.Register<IPlayTimeTrackingManager, PlayTimeTrackingManager>();
|
||||
#endif
|
||||
|
||||
// WD-EDIT
|
||||
IoCManager.Register<SponsorsManager>();
|
||||
|
||||
@@ -7,8 +7,12 @@ using Content.Server.Ghost;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.PowerCell;
|
||||
using Content.Server.Traits.Assorted;
|
||||
using Content.Shared._White.Item.DelayedKnockdown;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Damage.Events;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
@@ -20,6 +24,8 @@ using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.PowerCell;
|
||||
using Content.Shared.Timing;
|
||||
using Content.Shared.Toggleable;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -54,8 +60,25 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
SubscribeLocalEvent<DefibrillatorComponent, PowerCellSlotEmptyEvent>(OnPowerCellSlotEmpty);
|
||||
SubscribeLocalEvent<DefibrillatorComponent, AfterInteractEvent>(OnAfterInteract);
|
||||
SubscribeLocalEvent<DefibrillatorComponent, DefibrillatorZapDoAfterEvent>(OnDoAfter);
|
||||
|
||||
SubscribeLocalEvent<DefibrillatorComponent, StaminaDamageOnHitAttemptEvent>(OnStaminaHitAttempt); // WD
|
||||
}
|
||||
|
||||
// WD START
|
||||
private void OnStaminaHitAttempt(Entity<DefibrillatorComponent> ent, ref StaminaDamageOnHitAttemptEvent args)
|
||||
{
|
||||
var (uid, comp) = ent;
|
||||
if (comp.Enabled && _powerCell.TryUseActivatableCharge(uid))
|
||||
{
|
||||
if (!_powerCell.HasActivatableCharge(uid))
|
||||
TryDisable(uid, comp);
|
||||
return;
|
||||
}
|
||||
|
||||
args.Cancelled = true;
|
||||
}
|
||||
// WD END
|
||||
|
||||
private void OnUseInHand(EntityUid uid, DefibrillatorComponent component, UseInHandEvent args)
|
||||
{
|
||||
if (args.Handled || !TryComp(uid, out UseDelayComponent? useDelay) || _useDelay.IsDelayed((uid, useDelay)))
|
||||
@@ -159,8 +182,8 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
if (!_powerCell.HasActivatableCharge(uid, user: user))
|
||||
return false;
|
||||
|
||||
if (_mobState.IsAlive(target, mobState))
|
||||
return false;
|
||||
// if (_mobState.IsAlive(target, mobState))
|
||||
// return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -177,6 +200,7 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
return _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.DoAfterDuration, new DefibrillatorZapDoAfterEvent(),
|
||||
uid, target, uid)
|
||||
{
|
||||
BreakOnMove = user == target, // WD EDIT
|
||||
BlockDuplicate = true,
|
||||
BreakOnHandChange = true,
|
||||
NeedHand = true
|
||||
@@ -206,7 +230,13 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
ICommonSession? session = null;
|
||||
|
||||
var dead = true;
|
||||
if (_rotting.IsRotten(target))
|
||||
// WD EDIT START
|
||||
var alive = false;
|
||||
if (_mobState.IsAlive(target))
|
||||
{
|
||||
alive = true;
|
||||
}
|
||||
else if (_rotting.IsRotten(target)) // WD EDIT END
|
||||
{
|
||||
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-rotten"),
|
||||
InGameICChatType.Speak, true);
|
||||
@@ -246,7 +276,7 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
var sound = dead || session == null
|
||||
var sound = !alive && (dead || session == null) // WD EDIT
|
||||
? component.FailureSound
|
||||
: component.SuccessSound;
|
||||
_audio.PlayPvs(sound, uid);
|
||||
|
||||
@@ -88,7 +88,7 @@ public sealed class RenameCommand : IConsoleCommand
|
||||
{
|
||||
if (pda.OwnerName == oldName)
|
||||
{
|
||||
pdaSystem.SetOwner(uid, pda, name);
|
||||
pdaSystem.SetOwnerName(uid, pda, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using Content.Shared.CartridgeLoader;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.Light.Components;
|
||||
using Content.Shared.PDA;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Server.Containers;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -90,12 +91,24 @@ namespace Content.Server.PDA
|
||||
UpdatePdaUi(uid, pda);
|
||||
}
|
||||
|
||||
public void SetOwner(EntityUid uid, PdaComponent pda, string ownerName)
|
||||
public void SetOwnerName(EntityUid uid, PdaComponent pda, string ownerName)
|
||||
{
|
||||
pda.OwnerName = ownerName;
|
||||
UpdatePdaUi(uid, pda);
|
||||
}
|
||||
|
||||
public void SetOwnerJob(EntityUid uid, PdaComponent pda, string ownerJob)
|
||||
{
|
||||
pda.OwnerJob = ownerJob;
|
||||
UpdatePdaUi(uid, pda);
|
||||
}
|
||||
|
||||
public void SetOwnerDepartment(EntityUid uid, PdaComponent pda, string ownerDepartment)
|
||||
{
|
||||
pda.OwnerDepartment = ownerDepartment;
|
||||
UpdatePdaUi(uid, pda);
|
||||
}
|
||||
|
||||
private void OnStationRenamed(StationRenamedEvent ev)
|
||||
{
|
||||
UpdateAllPdaUisOnStation();
|
||||
@@ -172,6 +185,7 @@ namespace Content.Server.PDA
|
||||
new PdaIdInfoText
|
||||
{
|
||||
ActualOwnerName = pda.OwnerName,
|
||||
ActualOwnerJob = pda.OwnerJob, // WD EDIT
|
||||
IdOwner = id?.FullName,
|
||||
JobTitle = id?.JobTitle,
|
||||
StationAlertLevel = pda.StationAlertLevel,
|
||||
|
||||
@@ -54,7 +54,7 @@ public delegate void CalcPlayTimeTrackersCallback(ICommonSession player, HashSet
|
||||
/// Operations like refreshing and sending play time info to clients are deferred until the next frame (note: not tick).
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public sealed class PlayTimeTrackingManager : ISharedPlaytimeManager
|
||||
public sealed class PlayTimeTrackingManager : IPlayTimeTrackingManager, ISharedPlaytimeManager
|
||||
{
|
||||
[Dependency] private readonly IServerDbManager _db = default!;
|
||||
[Dependency] private readonly IServerNetManager _net = default!;
|
||||
|
||||
@@ -12,6 +12,7 @@ using Content.Shared.Access.Systems;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Clothing;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Server.Roles.Jobs;
|
||||
using Content.Shared.Humanoid.Prototypes;
|
||||
using Content.Shared.PDA;
|
||||
using Content.Shared.Preferences;
|
||||
@@ -49,6 +50,7 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
|
||||
[Dependency] private readonly SharedAccessSystem _accessSystem = default!;
|
||||
[Dependency] private readonly IdentitySystem _identity = default!;
|
||||
[Dependency] private readonly MetaDataSystem _metaSystem = default!;
|
||||
[Dependency] private readonly JobSystem _jobs = default!; // WD EDIT
|
||||
|
||||
[Dependency] private readonly ArrivalsSystem _arrivalsSystem = default!;
|
||||
[Dependency] private readonly ContainerSpawnPointSystem _containerSpawnPointSystem = default!;
|
||||
@@ -337,7 +339,14 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
|
||||
_accessSystem.SetAccessToJob(cardId, jobPrototype, extendedAccess);
|
||||
|
||||
if (pdaComponent != null)
|
||||
_pdaSystem.SetOwner(idUid.Value, pdaComponent, characterName);
|
||||
{
|
||||
_pdaSystem.SetOwnerName(idUid.Value, pdaComponent, characterName);
|
||||
//WD EDIT START
|
||||
_pdaSystem.SetOwnerJob(idUid.Value, pdaComponent, jobPrototype.LocalizedName);
|
||||
_jobs.TryGetDepartment(jobPrototype.ID, out var department);
|
||||
_pdaSystem.SetOwnerDepartment(idUid.Value, pdaComponent, department?.ID ?? "Specific");
|
||||
//WD EDIT END
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace Content.Server._White.CartridgeLoader.Cartridges;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class MessagesCartridgeComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The component of the last contacted server
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public EntityUid? LastServer;
|
||||
|
||||
/// <summary>
|
||||
/// The message system user id of the crew the user is chatting with
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public int? ChatUid;
|
||||
|
||||
[DataField]
|
||||
public int? UserUid;
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
using Content.Server._White.Radio.Components;
|
||||
using Content.Server._White.Radio.EntitySystems;
|
||||
using Content.Server.Administration.Commands;
|
||||
using Content.Server.CartridgeLoader;
|
||||
using Content.Shared.CartridgeLoader;
|
||||
using Content.Shared.PDA;
|
||||
using Robust.Shared.Map;
|
||||
using Content.Server.GameTicking;
|
||||
using Robust.Shared.Timing;
|
||||
using Content.Server.DeviceNetwork.Systems;
|
||||
using Content.Shared.DeviceNetwork;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._White.CartridgeLoader.Cartridges;
|
||||
|
||||
public sealed class MessagesCartridgeSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly CartridgeLoaderSystem _cartridgeLoaderSystem = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly GameTicker _gameTicker = default!;
|
||||
[Dependency] private readonly MessagesServerSystem _messagesServerSystem = default!;
|
||||
[Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
|
||||
[Dependency] private readonly SingletonDeviceNetServerSystem _singletonServerSystem = default!;
|
||||
[Dependency] private readonly StationSystem _stationSystem = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, CartridgeMessageEvent>(OnUiMessage);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, CartridgeUiReadyEvent>(OnUiReady);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, CartridgeActivatedEvent>(OnCartActivation);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, CartridgeDeactivatedEvent>(OnCartDeactivation);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, CartridgeAddedEvent>(OnCartInsertion);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, ComponentRemove>(OnRemove);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, MessagesCartridgeComponent component, ComponentInit args)
|
||||
{
|
||||
var stationId = _stationSystem.GetOwningStation(uid);
|
||||
if (stationId.HasValue &&
|
||||
_singletonServerSystem.TryGetActiveServerAddress<MessagesServerComponent>(stationId.Value,
|
||||
out var address) && TryComp(uid, out CartridgeComponent? cartComponent))
|
||||
{
|
||||
SendName(uid, component, cartComponent, address);
|
||||
component.UserUid = cartComponent.LoaderUid?.Id;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRemove(EntityUid uid, MessagesCartridgeComponent component, ComponentRemove args)
|
||||
{
|
||||
if (component.LastServer == null || !TryComp<MessagesServerComponent>(component.LastServer, out var messagesServerComponent) || component.UserUid == null)
|
||||
return;
|
||||
|
||||
messagesServerComponent.NameDict.Remove(component.UserUid.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This gets called when the ui fragment needs to be updated for the first time after activating
|
||||
/// </summary>
|
||||
private void OnUiReady(EntityUid uid, MessagesCartridgeComponent component, CartridgeUiReadyEvent args)
|
||||
{
|
||||
var stationId = _stationSystem.GetOwningStation(uid);
|
||||
if (stationId.HasValue && _singletonServerSystem.TryGetActiveServerAddress<MessagesServerComponent>(stationId.Value, out var address) && TryComp(uid, out CartridgeComponent? cartComponent))
|
||||
SendName(uid, component, cartComponent, address);
|
||||
UpdateUiState(uid, component);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ui messages received here get wrapped by a CartridgeMessageEvent and are relayed from the <see cref="CartridgeLoaderSystem"/>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The cartridge specific ui message event needs to inherit from the CartridgeMessageEvent
|
||||
/// </remarks>
|
||||
private void OnUiMessage(EntityUid uid, MessagesCartridgeComponent component, CartridgeMessageEvent args)
|
||||
{
|
||||
if (args is not MessagesUiMessageEvent messageEvent)
|
||||
return;
|
||||
|
||||
if (messageEvent.Action == MessagesUiAction.Send && TryComp(uid, out CartridgeComponent? cartComponent) && component.UserUid is { } userId && component.ChatUid != null && messageEvent.StringInput != null)
|
||||
{
|
||||
var stationId = _stationSystem.GetOwningStation(uid);
|
||||
if (!stationId.HasValue)
|
||||
return;
|
||||
MessagesMessageData messageData = new()
|
||||
{
|
||||
SenderId = userId,
|
||||
ReceiverId = component.ChatUid.Value,
|
||||
Content = messageEvent.StringInput,
|
||||
Time = _gameTiming.CurTime.Subtract(_gameTicker.RoundStartTimeSpan)
|
||||
};
|
||||
var packet = new NetworkPayload()
|
||||
{
|
||||
[MessagesNetworkKeys.Message] = messageData
|
||||
};
|
||||
_singletonServerSystem.TryGetActiveServerAddress<MessagesServerComponent>(stationId.Value, out var address);
|
||||
_deviceNetworkSystem.QueuePacket(uid, address, packet);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (messageEvent.Action == MessagesUiAction.ChangeChat)
|
||||
component.ChatUid = messageEvent.TargetChatUid;
|
||||
}
|
||||
|
||||
UpdateUiState(uid, component);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On cart insertion, register as background process.
|
||||
/// </summary>
|
||||
private void OnCartInsertion(EntityUid uid, MessagesCartridgeComponent component, CartridgeAddedEvent args)
|
||||
{
|
||||
_cartridgeLoaderSystem.RegisterBackgroundProgram(args.Loader, uid);
|
||||
component.UserUid = args.Loader.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On cartridge activation, connect to messages network.
|
||||
/// </summary>
|
||||
private void OnCartActivation(EntityUid uid, MessagesCartridgeComponent component, CartridgeActivatedEvent args)
|
||||
{
|
||||
_deviceNetworkSystem.ConnectDevice(uid);
|
||||
var stationId = _stationSystem.GetOwningStation(uid);
|
||||
if (stationId.HasValue && _singletonServerSystem.TryGetActiveServerAddress<MessagesServerComponent>(stationId.Value, out var address) && TryComp(uid, out CartridgeComponent? cartComponent))
|
||||
SendName(uid, component, cartComponent, address);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On cartridge deactivation, disconnect from messages network.
|
||||
/// </summary>
|
||||
private void OnCartDeactivation(EntityUid uid, MessagesCartridgeComponent component, CartridgeDeactivatedEvent args)
|
||||
{
|
||||
_deviceNetworkSystem.DisconnectDevice(uid, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// React and respond to packets from the server
|
||||
/// </summary>
|
||||
private void OnPacketReceived(EntityUid uid, MessagesCartridgeComponent component, DeviceNetworkPacketEvent args)
|
||||
{
|
||||
if (!TryComp(uid, out CartridgeComponent? cartComponent))
|
||||
return;
|
||||
component.LastServer = args.Sender;
|
||||
if (args.Data.TryGetValue<MessagesMessageData>(MessagesNetworkKeys.Message, out var message) && cartComponent.LoaderUid != null)
|
||||
{
|
||||
if (message.ReceiverId == cartComponent.LoaderUid.Value.Id)
|
||||
{
|
||||
TryGetName(message.SenderId, component, out var name);
|
||||
|
||||
var subtitleString = Loc.GetString("messages-pda-notification-header", ("name", name));
|
||||
|
||||
_cartridgeLoaderSystem.SendNotification(
|
||||
cartComponent.LoaderUid.Value,
|
||||
subtitleString,
|
||||
message.Content);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateUiState(uid, component);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the user's name in the storage component.
|
||||
/// </summary>
|
||||
private void SendName(EntityUid uid, MessagesCartridgeComponent component, CartridgeComponent cartComponent, string? address)
|
||||
{
|
||||
TryGetMessagesUser(cartComponent, out var messagesUser);
|
||||
|
||||
var packet = new NetworkPayload()
|
||||
{
|
||||
[MessagesNetworkKeys.UserId] = component.UserUid,
|
||||
[MessagesNetworkKeys.NewUser] = messagesUser
|
||||
};
|
||||
_deviceNetworkSystem.QueuePacket(uid, address, packet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the name of the given user from the last contacted server
|
||||
/// </summary>
|
||||
private bool TryGetName(int key, MessagesCartridgeComponent component, out string name)
|
||||
{
|
||||
if (component.LastServer != null && _messagesServerSystem.TryGetUserFromDict(component.LastServer, key, out var messagesUser))
|
||||
{
|
||||
name = messagesUser.Name;
|
||||
return true;
|
||||
}
|
||||
|
||||
name = Loc.GetString("messages-pda-connection-error");
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the user's name, job title and job department
|
||||
/// </summary>
|
||||
public bool TryGetMessagesUser(CartridgeComponent component, out MessagesUser messagesUser)
|
||||
{
|
||||
var pda = component.LoaderUid;
|
||||
if (pda == null)
|
||||
{
|
||||
messagesUser = new MessagesUser(Loc.GetString("messages-pda-unknown-name"), Loc.GetString("messages-pda-unknown-job"), "Specific");
|
||||
return false;
|
||||
}
|
||||
|
||||
var pdaComponent = CompOrNull<PdaComponent>(pda);
|
||||
if (pdaComponent?.OwnerName == null)
|
||||
{
|
||||
messagesUser = new MessagesUser(Loc.GetString("messages-pda-unknown-name"), Loc.GetString("messages-pda-unknown-job"), "Specific");
|
||||
return false;
|
||||
}
|
||||
|
||||
messagesUser = new MessagesUser(pdaComponent.OwnerName, pdaComponent.OwnerJob ?? Loc.GetString("messages-pda-unknown-job"), pdaComponent.OwnerDepartment ?? "Specific");
|
||||
return true;
|
||||
}
|
||||
|
||||
private void UpdateUiState(EntityUid uid, MessagesCartridgeComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return;
|
||||
if (!TryComp(uid, out CartridgeComponent? cartComponent))
|
||||
return;
|
||||
if (cartComponent.LoaderUid == null)
|
||||
return;
|
||||
var loaderUid = cartComponent.LoaderUid.Value;
|
||||
MessagesUiState state;
|
||||
MapId mapId = Transform(uid).MapID;
|
||||
int? currentUserId = component.UserUid;
|
||||
if (currentUserId == null || component.LastServer == null)
|
||||
{
|
||||
state = new MessagesUiState(MessagesUiStateMode.Error, [], null);
|
||||
_cartridgeLoaderSystem.UpdateCartridgeUiState(loaderUid, state);
|
||||
return;
|
||||
}
|
||||
if (component.ChatUid == null) //if no chat is loaded, list users
|
||||
{
|
||||
List<(MessagesUser, int?)> userList = [];
|
||||
|
||||
var nameDict = _messagesServerSystem.GetNameDict(component.LastServer);
|
||||
|
||||
foreach (var nameEntry in nameDict.Keys)
|
||||
{
|
||||
if (nameEntry == currentUserId)
|
||||
continue;
|
||||
userList.Add((nameDict[nameEntry], nameEntry));
|
||||
}
|
||||
|
||||
state = new MessagesUiState(MessagesUiStateMode.UserList, userList, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<MessagesMessageData> messageList = []; //Else, list messages from the current chat
|
||||
|
||||
foreach (var message in _messagesServerSystem.GetMessages(component.LastServer, component.ChatUid.Value, currentUserId.Value))
|
||||
{
|
||||
if (message.SenderId == component.ChatUid && message.ReceiverId == currentUserId || message.ReceiverId == component.ChatUid && message.SenderId == currentUserId)
|
||||
{
|
||||
messageList.Add(message);
|
||||
}
|
||||
}
|
||||
|
||||
messageList.Sort
|
||||
(
|
||||
delegate (MessagesMessageData a, MessagesMessageData b)
|
||||
{
|
||||
return TimeSpan.Compare(a.Time, b.Time);
|
||||
}
|
||||
);
|
||||
|
||||
List<(MessagesUser, int?)> formattedMessageList = [];
|
||||
|
||||
foreach (var message in messageList)
|
||||
{
|
||||
TryGetName(message.SenderId, component, out var name);
|
||||
var stationTime = message.Time.Subtract(_gameTicker.RoundStartTimeSpan);
|
||||
var content = $"{stationTime.ToString("\\[hh\\:mm\\:ss\\]")} {name}: {message.Content}";
|
||||
formattedMessageList.Add((new MessagesUser(content, Loc.GetString("messages-pda-unknown-job"), "Specific"), null));
|
||||
}
|
||||
|
||||
TryGetName(component.ChatUid.Value, component, out var user);
|
||||
state = new MessagesUiState(MessagesUiStateMode.Chat, formattedMessageList, user);
|
||||
}
|
||||
_cartridgeLoaderSystem.UpdateCartridgeUiState(loaderUid, state);
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public sealed class RandomHumanSystem : EntitySystem
|
||||
var cardId = pdaComponent.ContainedId.Value;
|
||||
|
||||
_card.TryChangeFullName(cardId, newProfile.Name, card);
|
||||
_pda.SetOwner(idUid.Value, pdaComponent, newProfile.Name);
|
||||
_pda.SetOwnerName(idUid.Value, pdaComponent, newProfile.Name);
|
||||
|
||||
if (EntityManager.TryGetComponent(cardId, out StationRecordKeyStorageComponent? keyStorage)
|
||||
&& keyStorage.Key is { } key)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
|
||||
|
||||
namespace Content.Server._White.Radio.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Entities with <see cref="MessagesServerComponent"/> are needed to transmit messages using PDAs.
|
||||
/// They also need to be powered by <see cref="ApcPowerReceiverComponent"/>
|
||||
/// in order for them to work on the same map as server.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class MessagesServerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of messages cached by the server.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public List<MessagesMessageData> Messages = [];
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary translating uids to readable names
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public Dictionary<int, MessagesUser> NameDict = [];
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
using System.Linq;
|
||||
using Content.Server._White.CartridgeLoader.Cartridges;
|
||||
using Content.Server._White.Radio.Components;
|
||||
using Content.Server.DeviceNetwork.Systems;
|
||||
using Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
using Content.Shared.CartridgeLoader;
|
||||
using Content.Shared.DeviceNetwork;
|
||||
|
||||
|
||||
namespace Content.Server._White.Radio.EntitySystems;
|
||||
|
||||
public sealed class MessagesServerSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
|
||||
[Dependency] private readonly SingletonDeviceNetServerSystem _singletonServerSystem = default!;
|
||||
[Dependency] private readonly MessagesCartridgeSystem _messagesSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<MessagesServerComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
||||
SubscribeLocalEvent<MessagesServerComponent, ComponentInit>(OnInit);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, MessagesServerComponent component, ComponentInit args)
|
||||
{
|
||||
var query = EntityQueryEnumerator<MessagesCartridgeComponent>();
|
||||
|
||||
while (query.MoveNext(out var entityUid, out var cartridge))
|
||||
{
|
||||
if (!TryComp(entityUid, out CartridgeComponent? cartComponent))
|
||||
continue;
|
||||
|
||||
_messagesSystem.TryGetMessagesUser(cartComponent, out var messagesUser);
|
||||
|
||||
if (cartridge.UserUid == null || messagesUser.Name == Loc.GetString("messages-pda-unknown-name"))
|
||||
continue;
|
||||
|
||||
component.NameDict[cartridge.UserUid.Value] = messagesUser;
|
||||
cartridge.LastServer = uid;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reacts to packets received from clients
|
||||
/// </summary>
|
||||
private void OnPacketReceived(EntityUid uid, MessagesServerComponent component, DeviceNetworkPacketEvent args)
|
||||
{
|
||||
if (!_singletonServerSystem.IsActiveServer(uid))
|
||||
return;
|
||||
if (args.Data.TryGetValue<MessagesUser>(MessagesNetworkKeys.NewUser, out var messagesUser) && args.Data.TryGetValue<int>(MessagesNetworkKeys.UserId, out var userId))
|
||||
{
|
||||
component.NameDict[userId] = messagesUser;
|
||||
|
||||
var packet = new NetworkPayload();
|
||||
_deviceNetworkSystem.QueuePacket(uid, args.SenderAddress, packet);
|
||||
}
|
||||
if (args.Data.TryGetValue<MessagesMessageData>(MessagesNetworkKeys.Message, out var message))
|
||||
SendMessage(uid, component, message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Broadcasts a message into the network
|
||||
/// </summary>
|
||||
private void SendMessage(EntityUid uid, MessagesServerComponent component, MessagesMessageData message)
|
||||
{
|
||||
component.Messages.Add(message);
|
||||
|
||||
var packet = new NetworkPayload()
|
||||
{
|
||||
[MessagesNetworkKeys.Message] = message
|
||||
};
|
||||
|
||||
_deviceNetworkSystem.QueuePacket(uid, null, packet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns user
|
||||
/// </summary>
|
||||
public bool TryGetUserFromDict(EntityUid? uid, int key, out MessagesUser messagesUser)
|
||||
{
|
||||
if (!TryComp(uid, out MessagesServerComponent? component))
|
||||
{
|
||||
messagesUser = new MessagesUser(Loc.GetString("messages-pda-connection-error"), Loc.GetString("messages-pda-unknown-job"), "Specific");
|
||||
return false;
|
||||
}
|
||||
if (component.NameDict.TryGetValue(key, out var keyValue))
|
||||
{
|
||||
messagesUser = keyValue;
|
||||
return true;
|
||||
}
|
||||
messagesUser = new MessagesUser(Loc.GetString("messages-pda-user-missing"), Loc.GetString("messages-pda-unknown-job"), "Specific");
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name dictionary cache
|
||||
/// </summary>
|
||||
public Dictionary<int, MessagesUser> GetNameDict(EntityUid? uid)
|
||||
{
|
||||
if (!TryComp(uid, out MessagesServerComponent? component))
|
||||
return new Dictionary<int, MessagesUser>();
|
||||
return component.NameDict;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns list of messages between the two users
|
||||
/// </summary>
|
||||
public List<MessagesMessageData> GetMessages(EntityUid? uid, int id1, int id2)
|
||||
{
|
||||
if (!TryComp(uid, out MessagesServerComponent? component))
|
||||
return [];
|
||||
return
|
||||
[
|
||||
..component.Messages.Where(message =>
|
||||
message.SenderId == id1 && message.ReceiverId == id2 ||
|
||||
message.SenderId == id2 && message.ReceiverId == id1)
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class MessagesNetworkKeys
|
||||
{
|
||||
public const string NewUser = "new_user";
|
||||
public const string UserId = "user_id";
|
||||
public const string Message = "message";
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server._White.Cult;
|
||||
using Content.Server._White.IncorporealSystem;
|
||||
using Content.Server._White.Other.FastAndFuriousSystem;
|
||||
using Content.Server._White.Wizard.Charging;
|
||||
using Content.Server._White.Wizard.Magic.Amaterasu;
|
||||
using Content.Server._White.Wizard.Magic.Other;
|
||||
@@ -48,6 +48,7 @@ using Content.Shared.Physics;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Revolutionary.Components;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Map;
|
||||
@@ -88,6 +89,7 @@ public sealed class WizardSpellsSystem : EntitySystem
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;
|
||||
[Dependency] private readonly ChargingSystem _charging = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stun = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -191,6 +193,7 @@ public sealed class WizardSpellsSystem : EntitySystem
|
||||
SwapComponent<RevolutionaryComponent>(uid, target);
|
||||
SwapComponent<HeadRevolutionaryComponent>(uid, target);
|
||||
SwapComponent<GlobalAntagonistComponent>(uid, target);
|
||||
SwapComponent<FastAndFuriousComponent>(uid, target);
|
||||
|
||||
_mindSystem.TransferTo(mindId, target, mind: mind);
|
||||
|
||||
@@ -738,8 +741,8 @@ public sealed class WizardSpellsSystem : EntitySystem
|
||||
return false;
|
||||
}
|
||||
|
||||
_stun.TryKnockdown(msg.TargetUid, TimeSpan.FromSeconds(4), true);
|
||||
_throwingSystem.TryThrow(msg.TargetUid, Transform(msg.Performer).Coordinates, 5f);
|
||||
_standing.TryLieDown(msg.TargetUid);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -936,6 +939,10 @@ public sealed class WizardSpellsSystem : EntitySystem
|
||||
if (hasReqs)
|
||||
return;
|
||||
|
||||
if (_inventory.TryGetSlotEntity(args.Performer, "outerClothing", out var entity) &&
|
||||
comp.ClothingWhitelist?.IsValid(entity.Value) is true)
|
||||
return;
|
||||
|
||||
args.Cancelled = true;
|
||||
_popupSystem.PopupEntity(Loc.GetString("magic-component-missing-req"), args.Performer, args.Performer);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -86,6 +87,10 @@ public sealed partial class DefibrillatorComponent : Component
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("readySound")]
|
||||
public SoundSpecifier? ReadySound = new SoundPathSpecifier("/Audio/Items/Defib/defib_ready.ogg");
|
||||
|
||||
// WD EDIT
|
||||
[DataField]
|
||||
public EntityWhitelist? EmaggedAttackWhitelist;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
@@ -2,6 +2,7 @@ using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.GameStates;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.PDA
|
||||
@@ -37,6 +38,8 @@ namespace Content.Shared.PDA
|
||||
[ViewVariables] public bool FlashlightOn;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)] public string? OwnerName;
|
||||
[ViewVariables(VVAccess.ReadWrite)] public string? OwnerJob; // WD EDIT
|
||||
[ViewVariables(VVAccess.ReadWrite)] public string? OwnerDepartment; // WD EDIT
|
||||
[ViewVariables] public string? StationName;
|
||||
[ViewVariables] public string? StationAlertLevel;
|
||||
[ViewVariables] public Color StationAlertColor = Color.White;
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace Content.Shared.PDA
|
||||
public struct PdaIdInfoText
|
||||
{
|
||||
public string? ActualOwnerName;
|
||||
public string? ActualOwnerJob; // WD EDIT
|
||||
public string? IdOwner;
|
||||
public string? JobTitle;
|
||||
public string? StationAlertLevel;
|
||||
|
||||
@@ -27,6 +27,7 @@ public sealed partial class MeleeWeaponComponent : Component
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField]
|
||||
[AutoNetworkedField] // WD EDIT
|
||||
public bool Hidden;
|
||||
|
||||
/// <summary>
|
||||
@@ -75,10 +76,10 @@ public sealed partial class MeleeWeaponComponent : Component
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
||||
public bool CanMiss;
|
||||
|
||||
[DataField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityWhitelist? AttackWhitelist;
|
||||
|
||||
[DataField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityWhitelist? AttackBlacklist;
|
||||
|
||||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
|
||||
|
||||
@@ -554,6 +554,12 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
Dirty(gun);
|
||||
}
|
||||
// WD EDIT
|
||||
public void SetFireMode(GunComponent gun, SelectiveFire available, SelectiveFire selected)
|
||||
{
|
||||
gun.AvailableModes = available;
|
||||
gun.SelectedMode = selected;
|
||||
}
|
||||
|
||||
public void SetUseKey(GunComponent gun, bool useKey)
|
||||
{
|
||||
gun.UseKey = useKey;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using Content.Shared.CartridgeLoader;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class MessagesUiMessageEvent : CartridgeMessageEvent
|
||||
{
|
||||
public readonly MessagesUiAction Action;
|
||||
public readonly int? TargetChatUid;
|
||||
public readonly string? StringInput;
|
||||
|
||||
public MessagesUiMessageEvent(MessagesUiAction action, string? stringInput, int? targetChatUid)
|
||||
{
|
||||
Action = action;
|
||||
TargetChatUid = targetChatUid;
|
||||
StringInput = stringInput;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum MessagesUiAction : byte
|
||||
{
|
||||
Send,
|
||||
ChangeChat
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.CartridgeLoader.Cartridges;
|
||||
|
||||
///<summary>
|
||||
/// The state of the messages app interface.
|
||||
/// Mode switches whether the UI should display a list of other users or a particular chat.
|
||||
/// Contents contains either the names of users and their ids in the messages system or simply a list of message strings.
|
||||
///</summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class MessagesUiState(MessagesUiStateMode mode, List<(MessagesUser, int?)> contents, string? name = null) : BoundUserInterfaceState
|
||||
{
|
||||
public List<(MessagesUser, int?)>? Contents = contents;
|
||||
public MessagesUiStateMode Mode = mode;
|
||||
public string? Name = name;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Enum representing the modes the program's UI can be in
|
||||
///</summary>
|
||||
[Serializable, NetSerializable]
|
||||
public enum MessagesUiStateMode : byte
|
||||
{
|
||||
UserList,
|
||||
Chat,
|
||||
Error
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Data of a single message in the system, containing the ids of the sender and recipient, the text content and the time it was sent.
|
||||
///</summary>
|
||||
[Serializable, NetSerializable]
|
||||
public struct MessagesMessageData
|
||||
{
|
||||
public int SenderId;
|
||||
public int ReceiverId;
|
||||
public string Content;
|
||||
public TimeSpan Time;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class MessagesUser(string name, string job, string department)
|
||||
{
|
||||
public string Name = name;
|
||||
public string Job = job;
|
||||
public string Department = department;
|
||||
}
|
||||
50
Content.Shared/_White/Item/DefibEmagSystem.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using Content.Shared._White.Item.DelayedKnockdown;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Medical;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Shared._White.Item;
|
||||
|
||||
public sealed class DefibEmagSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<DefibrillatorComponent, GotEmaggedEvent>(OnEmag);
|
||||
}
|
||||
|
||||
private void OnEmag(Entity<DefibrillatorComponent> ent, ref GotEmaggedEvent args)
|
||||
{
|
||||
var (uid, comp) = ent;
|
||||
comp.ZapDamage = 55;
|
||||
comp.ZapDelay = TimeSpan.FromSeconds(1);
|
||||
comp.WritheDuration = TimeSpan.FromSeconds(6);
|
||||
var meleeWeapon = new MeleeWeaponComponent
|
||||
{
|
||||
Hidden = true,
|
||||
AttackRate = 0.2f,
|
||||
CanHeavyAttack = false,
|
||||
AttackWhitelist = comp.EmaggedAttackWhitelist,
|
||||
EquipCooldown = 1f,
|
||||
Damage = new DamageSpecifier()
|
||||
};
|
||||
var delayedKnockdown = new DelayedKnockdownOnHitComponent
|
||||
{
|
||||
Delay = TimeSpan.Zero,
|
||||
KnockdownTime = TimeSpan.FromSeconds(1.5)
|
||||
};
|
||||
var staminaDamage = new StaminaDamageOnHitComponent
|
||||
{
|
||||
Damage = 60f,
|
||||
Sound = new SoundCollectionSpecifier("sparks")
|
||||
};
|
||||
AddComp(uid, meleeWeapon, true);
|
||||
AddComp(uid, delayedKnockdown, true);
|
||||
AddComp(uid, staminaDamage, true);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,8 @@ public sealed class DelayedKnockdownOnHitSystem : EntitySystem
|
||||
{
|
||||
var jitterTime = ent.Comp.JitterTime;
|
||||
var stutterTime = ent.Comp.StutterTime;
|
||||
var delay = ent.Comp.Delay;
|
||||
var knockdownTime = ent.Comp.KnockdownTime;
|
||||
foreach (var (uid, _) in args.HitList)
|
||||
{
|
||||
if (!TryComp(uid, out StatusEffectsComponent? statusEffects))
|
||||
@@ -38,12 +40,17 @@ public sealed class DelayedKnockdownOnHitSystem : EntitySystem
|
||||
_jitter.DoJitter(uid, jitterTime, true, status: statusEffects);
|
||||
if (stutterTime > TimeSpan.Zero)
|
||||
_stutter.DoStutter(uid, stutterTime, true, statusEffects);
|
||||
if (delay <= TimeSpan.Zero)
|
||||
{
|
||||
_stun.TryKnockdown(uid, knockdownTime, true, statusEffects);
|
||||
continue;
|
||||
}
|
||||
if (HasComp<KnockedDownComponent>(uid))
|
||||
continue;
|
||||
var delayedKnockdown = EnsureComp<DelayedKnockdownComponent>(uid);
|
||||
delayedKnockdown.KnockdownTime = TimeSpan.FromSeconds(Math.Max(ent.Comp.KnockdownTime.TotalSeconds,
|
||||
delayedKnockdown.KnockdownTime = TimeSpan.FromSeconds(Math.Max(knockdownTime.TotalSeconds,
|
||||
delayedKnockdown.KnockdownTime.TotalSeconds));
|
||||
var knockdownMoment = _timing.CurTime + ent.Comp.Delay;
|
||||
var knockdownMoment = _timing.CurTime + delay;
|
||||
if (knockdownMoment < delayedKnockdown.KnockdownMoment)
|
||||
delayedKnockdown.KnockdownMoment = knockdownMoment;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._White.Wizard.Magic;
|
||||
|
||||
@@ -10,4 +11,7 @@ public sealed partial class MagicComponent : Component
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool RequiresClothes;
|
||||
|
||||
[DataField]
|
||||
public EntityWhitelist? ClothingWhitelist;
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ public abstract class SharedSpellBladeSystem : EntitySystem
|
||||
var gun = EnsureComp<GunComponent>(uid);
|
||||
_gun.SetUseKey(gun, false);
|
||||
_gun.SetClumsyProof(gun, true);
|
||||
_gun.SetFireMode(gun, SelectiveFire.FullAuto, SelectiveFire.FullAuto);
|
||||
_gun.SetSound(uid, new SoundPathSpecifier("/Audio/Weapons/Guns/Gunshots/Magic/staff_healing.ogg"));
|
||||
_gun.SetFireRate(uid, 1.2f);
|
||||
var ammoProvider = EnsureComp<BasicEntityAmmoProviderComponent>(uid);
|
||||
|
||||
@@ -7811,3 +7811,29 @@
|
||||
id: 465
|
||||
time: '2024-08-04T13:54:10.0000000+00:00'
|
||||
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/562
|
||||
- author: Aviu
|
||||
changes:
|
||||
- message: "\u0414\u0435\u0444\u0438\u0431\u0430\u043C\u0438 \u043C\u043E\u0436\u043D\
|
||||
\u043E \u0442\u0435\u043F\u0435\u0440\u044C \u0431\u0438\u0442\u044C \u0436\u0438\
|
||||
\u0432\u044B\u0445."
|
||||
type: Add
|
||||
- message: "\u0414\u0435\u0444\u0438\u0431\u044B \u0442\u0435\u043F\u0435\u0440\u044C\
|
||||
\ \u043C\u043E\u0436\u043D\u043E \u0435\u043C\u0430\u0433\u043D\u0443\u0442\u044C\
|
||||
, \u044D\u0442\u043E \u0434\u0430\u0441\u0442 \u0438\u043C \u0432\u043E\u0437\
|
||||
\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u0431\u0438\u0442\u044C \u0432\
|
||||
\ \u0431\u043E\u0435\u0432\u043E\u043C \u0440\u0435\u0436\u0438\u043C\u0435\
|
||||
\ \u0440\u0430\u0437 \u0432 5 \u0441\u0435\u043A\u0443\u043D\u0434, \u043D\u0430\
|
||||
\u043D\u043E\u0441\u044F 60 \u0441\u0442\u0430\u043C\u0438\u043D\u044B \u0438\
|
||||
\ \u0440\u043E\u043D\u044F\u044F \u043D\u0430 \u043F\u043E\u043B \u043D\u0430\
|
||||
\ 1.5 \u0441\u0435\u043A\u0443\u043D\u0434\u044B. \u0422\u0430\u043A\u0436\u0435\
|
||||
\ \u0443\u0440\u043E\u043D \u043F\u0440\u0438 \u0443\u0434\u0430\u0440\u0435\
|
||||
\ \u0435\u043C\u0430\u0433\u043D\u0443\u0442\u044B\u043C \u0434\u0435\u0444\u0438\
|
||||
\u0431\u043E\u043C \u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0432\u0430\u0435\
|
||||
\u0442\u0441\u044F \u0434\u043E 55, \u0432\u0440\u0435\u043C\u044F \u0441\u0442\
|
||||
\u0430\u043D\u0430 \u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0432\u0430\u0435\
|
||||
\u0442\u0441\u044F \u0434\u043E 6, \u0430 \u043A\u0434 \u0443\u043C\u0435\u043D\
|
||||
\u044C\u0448\u0430\u0435\u0442\u0441\u044F \u0434\u043E 1."
|
||||
type: Add
|
||||
id: 466
|
||||
time: '2024-08-05T13:39:31.0000000+00:00'
|
||||
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/567
|
||||
|
||||
@@ -3,6 +3,7 @@ device-pda-slot-component-slot-name-cartridge = Cartridge
|
||||
default-program-name = Program
|
||||
notekeeper-program-name = Notekeeper
|
||||
news-read-program-name = Station news
|
||||
messages-program-name = Messages
|
||||
|
||||
crew-manifest-program-name = Crew manifest
|
||||
crew-manifest-cartridge-loading = Loading ...
|
||||
|
||||
9
Resources/Locale/en-US/radio/components/pda-messages.ftl
Normal file
@@ -0,0 +1,9 @@
|
||||
messages-pda-error-header = ERROR
|
||||
messages-pda-error-message = An error has occured in the messages system, have you tried turning it off and on again?
|
||||
messages-pda-notification-header = A new message from {$name} has arrived on your PDA
|
||||
messages-pda-connection-error = CONNECTION ERROR
|
||||
messages-pda-unknown-name = Unknown
|
||||
messages-pda-unknown-job = Unassigned
|
||||
messages-pda-user-missing = NAME ENTRY MISSING
|
||||
messages-pda-ui-back = Back
|
||||
messages-pda-chat-choice = Select chat
|
||||
@@ -3,6 +3,7 @@ device-pda-slot-component-slot-name-cartridge = Картридж
|
||||
default-program-name = Программа
|
||||
notekeeper-program-name = Заметки
|
||||
news-read-program-name = Новости станции
|
||||
messages-program-name = Сообщения
|
||||
|
||||
crew-manifest-program-name = Манифест персонала
|
||||
crew-manifest-cartridge-loading = Загрузка ...
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# For the PDA screen
|
||||
comp-pda-ui = ID: [color=white]{ $owner }[/color], [color=yellow]{ CAPITALIZE($jobTitle) }[/color]
|
||||
comp-pda-ui-blank = ID:
|
||||
comp-pda-ui-owner = Владелец: [color=white]{ $actualOwnerName }[/color]
|
||||
comp-pda-ui-owner = Владелец: [color=white]{$actualOwnerName}[/color]
|
||||
comp-pda-io-program-list-button = Программы
|
||||
comp-pda-io-settings-button = Настройки
|
||||
comp-pda-io-program-fallback-title = Программа
|
||||
|
||||
9
Resources/Locale/ru-RU/radio/components/pda-messages.ftl
Normal file
@@ -0,0 +1,9 @@
|
||||
messages-pda-error-header = ОШИБКА
|
||||
messages-pda-error-message = В системе сообщений произошла ошибка, вы пробовали отключить и включить ее снова?
|
||||
messages-pda-notification-header = На ваш ПДА поступило новое сообщение от {$name}
|
||||
messages-pda-connection-error = ОШИБКА СОЕДЕНЕНИЯ
|
||||
messages-pda-unknown-name = Неизвестный
|
||||
messages-pda-unknown-job = Неназначен
|
||||
messages-pda-user-missing = ОТСУТСТВУЕТ ЗАПИСЬ ИМЕНИ
|
||||
messages-pda-ui-back = Назад
|
||||
messages-pda-chat-choice = Выберите чат
|
||||
@@ -17,10 +17,10 @@ ent-ClothingOuterArmorHeavyRed = красный тяжелый бронекос
|
||||
.desc = Тяжело бронированный костюм с красными вставками, способный защитить от высокого урона.
|
||||
.suffix = { "" }
|
||||
ent-ClothingOuterArmorMagusblue = синие доспехи магуса
|
||||
.desc = Синий бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии.
|
||||
.desc = Синий бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии, но позволяет кастовать заклинание электрической дуги.
|
||||
.suffix = { "" }
|
||||
ent-ClothingOuterArmorMagusred = красные доспехи магуса
|
||||
.desc = Красный бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии.
|
||||
.desc = Красный бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии, но позволяет кастовать заклинание огненного шара.
|
||||
.suffix = { "" }
|
||||
ent-ClothingOuterArmorRiot = противоударный костюм
|
||||
.desc = Бронежилет с тяжелыми накладками для защиты в ближнем бою, идеально подходит для борьбы с правонарушителями на станции.
|
||||
|
||||
@@ -4,3 +4,9 @@ ent-NotekeeperCartridge = картридж Заметки
|
||||
ent-NetProbeCartridge = картридж NetProbe
|
||||
.desc = Программа для получения адресов и частот сетевых устройств
|
||||
.suffix = { "" }
|
||||
ent-MessagesCartridge = картридж Сообщений
|
||||
.desc = Программа для обмена сообщениями с другими членами экипажа
|
||||
.suffix = { "" }
|
||||
ent-MessagesCartridgeSyndicate = картридж Сообщений Синдиката
|
||||
.desc = Программа для обмена сообщениями с другими агентами Синдиката
|
||||
.suffix = { "" }
|
||||
@@ -0,0 +1,4 @@
|
||||
ent-MessagesServer = сервер сообщений ПДА
|
||||
.desc = Сервер, который позволяет передавать сообщения с помощью ПДА
|
||||
ent-SyndicateMessagesServer = сервер сообщений ПДА Синдиката
|
||||
.desc = Сервер, который позволяет обмениваться сообщениями с помощью ПДА между оперативниками Синдиката.
|
||||
@@ -101,3 +101,23 @@
|
||||
id: BasicDevice
|
||||
name: device-frequency-prototype-name-basic-device
|
||||
frequency: 1280
|
||||
|
||||
- type: deviceFrequency
|
||||
id: NTMessagesServer
|
||||
name: device-frequency-prototype-name-nt-messages-server
|
||||
frequency: 2790
|
||||
|
||||
- type: deviceFrequency
|
||||
id: NTMessagesClient
|
||||
name: device-frequency-prototype-name-nt-messages-client
|
||||
frequency: 2791
|
||||
|
||||
- type: deviceFrequency
|
||||
id: SyndicateMessagesServer
|
||||
name: device-frequency-prototype-name-syndicate-messages-server
|
||||
frequency: 2792
|
||||
|
||||
- type: deviceFrequency
|
||||
id: SyndicateMessagesClient
|
||||
name: device-frequency-prototype-name-syndicate-messages-client
|
||||
frequency: 2793
|
||||
@@ -222,6 +222,10 @@
|
||||
- type: ClothingSpeedModifier
|
||||
walkModifier: 1
|
||||
sprintModifier: 1
|
||||
- type: Tag
|
||||
tags:
|
||||
- WhitelistChameleon
|
||||
- BlueMagusArmor
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterArmorMagusblue
|
||||
@@ -233,8 +237,10 @@
|
||||
sprite: Clothing/OuterClothing/Armor/magusred.rsi
|
||||
- type: Clothing
|
||||
sprite: Clothing/OuterClothing/Armor/magusred.rsi
|
||||
|
||||
|
||||
- type: Tag
|
||||
tags:
|
||||
- WhitelistChameleon
|
||||
- RedMagusArmor
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterBase
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
- Biological
|
||||
- Inorganic
|
||||
- type: Invisibility
|
||||
- type: ThermalBlocker
|
||||
|
||||
- type: entity
|
||||
id: ActionAGhostShowSolar
|
||||
|
||||
@@ -34,6 +34,54 @@
|
||||
state: news_read
|
||||
- type: NewsReaderCartridge
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: MessagesCartridge
|
||||
name: messages cartridge
|
||||
description: A program for messageing other crew
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Devices/cartridge.rsi
|
||||
state: cart-y
|
||||
- type: UIFragment
|
||||
ui: !type:MessagesUi
|
||||
- type: Cartridge
|
||||
programName: messages-program-name
|
||||
icon:
|
||||
sprite: Objects/Misc/books.rsi
|
||||
state: book_icon
|
||||
- type: MessagesCartridge
|
||||
- type: DeviceNetwork
|
||||
deviceNetId: Wireless
|
||||
transmitFrequencyId: NTMessagesClient
|
||||
receiveFrequencyId: NTMessagesServer
|
||||
autoConnect: false
|
||||
- type: StationLimitedNetwork
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: MessagesCartridgeSyndicate
|
||||
name: syndicate messages cartridge
|
||||
description: A program for messageing other syndicate agents
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Devices/cartridge.rsi
|
||||
state: cart-y
|
||||
- type: UIFragment
|
||||
ui: !type:MessagesUi
|
||||
- type: Cartridge
|
||||
programName: messages-program-name
|
||||
icon:
|
||||
sprite: Objects/Misc/books.rsi
|
||||
state: book_icon
|
||||
- type: MessagesCartridge
|
||||
- type: DeviceNetwork
|
||||
deviceNetId: Wireless
|
||||
transmitFrequencyId: SyndicateMessagesClient
|
||||
receiveFrequencyId: SyndicateMessagesServer
|
||||
autoConnect: false
|
||||
- type: StationLimitedNetwork
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: CrewManifestCartridge
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
preinstalled:
|
||||
- CrewManifestCartridge
|
||||
- NotekeeperCartridge
|
||||
- MessagesCartridge
|
||||
- NewsReaderCartridge
|
||||
- BankCartridge
|
||||
cartridgeSlot:
|
||||
@@ -682,6 +683,7 @@
|
||||
preinstalled:
|
||||
- CrewManifestCartridge
|
||||
- NotekeeperCartridge
|
||||
- MessagesCartridge
|
||||
- NewsReaderCartridge
|
||||
- LogProbeCartridge
|
||||
|
||||
@@ -766,6 +768,7 @@
|
||||
uiKey: enum.PdaUiKey.Key
|
||||
preinstalled:
|
||||
- NotekeeperCartridge
|
||||
- MessagesCartridgeSyndicate
|
||||
cartridgeSlot:
|
||||
priority: -1
|
||||
name: Cartridge
|
||||
@@ -1067,6 +1070,7 @@
|
||||
uiKey: enum.PdaUiKey.Key
|
||||
preinstalled:
|
||||
- NotekeeperCartridge
|
||||
- MessagesCartridgeSyndicate
|
||||
cartridgeSlot:
|
||||
priority: -1
|
||||
name: Cartridge
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
zapHeal:
|
||||
types:
|
||||
Asphyxiation: -40
|
||||
emaggedAttackWhitelist:
|
||||
components:
|
||||
- Stamina
|
||||
- type: DoAfter
|
||||
- type: UseDelay
|
||||
- type: StaticPrice
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
- type: Clothing
|
||||
sprite: White/Objects/Weapons/Guns/Revolvers/inspector-inhands.rsi
|
||||
- type: Item
|
||||
sprite: White/Objects/Weapons/Guns/Revolvers/inspector-inhand.rsi
|
||||
sprite: White/Objects/Weapons/Guns/Revolvers/inspector-inhands.rsi
|
||||
- type: RevolverAmmoProvider
|
||||
capacity: 6
|
||||
chambers: [ True, True, True, True, True, True ]
|
||||
|
||||
@@ -28,3 +28,5 @@
|
||||
deleteOnDrop: true
|
||||
- type: ToolForcePowered
|
||||
- type: DeleteOnChangelingRefund
|
||||
- type: MeleeBlock
|
||||
delay: 12.1
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
- suitStorage
|
||||
- type: DisarmMalus
|
||||
- type: CultItem
|
||||
- type: MeleeBlock
|
||||
delay: 12.1
|
||||
|
||||
- type: entity
|
||||
name: unholy halberd
|
||||
@@ -123,3 +125,5 @@
|
||||
- type: UseDelay
|
||||
delay: 1
|
||||
- type: CultItem
|
||||
- type: MeleeBlock
|
||||
delay: 12.1
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
soundGunshot: /Audio/Weapons/plasma_cutter.ogg
|
||||
fireRate: 1
|
||||
useKey: false
|
||||
selectedMode: FullAuto
|
||||
availableModes:
|
||||
- FullAuto
|
||||
- type: RechargeBasicEntityAmmo
|
||||
rechargeCooldown: 0.5
|
||||
rechargeSound:
|
||||
@@ -95,8 +98,6 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Weapons/Melee/crusher_glaive.rsi
|
||||
- type: UseDelay
|
||||
delay: 1.9
|
||||
- type: LeechOnMarker
|
||||
leech:
|
||||
groups:
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
- Belt
|
||||
- SuitStorage
|
||||
- type: DisarmMalus
|
||||
- type: MeleeBlock
|
||||
delay: 12.1
|
||||
|
||||
- type: entity
|
||||
name: energy katana
|
||||
@@ -164,6 +166,8 @@
|
||||
deconstructionTarget: null
|
||||
graph: SwordGraph
|
||||
node: sword
|
||||
- type: MeleeBlock
|
||||
delay: 12.1
|
||||
|
||||
- type: entity
|
||||
name: cutlass
|
||||
@@ -189,6 +193,8 @@
|
||||
size: Large
|
||||
sprite: Objects/Weapons/Melee/cutlass.rsi
|
||||
- type: DisarmMalus
|
||||
- type: MeleeBlock
|
||||
delay: 12.1
|
||||
|
||||
- type: entity
|
||||
name: The Throngler
|
||||
|
||||
@@ -80,3 +80,69 @@
|
||||
- EncryptionKeySecurity
|
||||
- EncryptionKeyService
|
||||
- EncryptionKeyCommand
|
||||
|
||||
- type: entity
|
||||
id: MessagesServer
|
||||
parent: BaseMachinePowered
|
||||
name: PDA messaging server
|
||||
description: Server that allows PDA messaging to function on the station.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Structures/Machines/server.rsi
|
||||
layers:
|
||||
- state: server
|
||||
- state: variant-research
|
||||
- type: ApcPowerReceiver
|
||||
powerLoad: 200
|
||||
- type: ExtensionCableReceiver
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 600
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 300
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
- !type:PlaySoundBehavior
|
||||
sound:
|
||||
collection: MetalBreak
|
||||
- !type:SpawnEntitiesBehavior
|
||||
spawn:
|
||||
SheetSteel1:
|
||||
min: 1
|
||||
max: 2
|
||||
- type: Appearance
|
||||
- type: AmbientSound
|
||||
volume: -9
|
||||
range: 5
|
||||
sound:
|
||||
path: /Audio/Ambience/Objects/server_fans.ogg
|
||||
- type: MessagesServer
|
||||
- type: SingletonDeviceNetServer
|
||||
- type: DeviceNetwork
|
||||
deviceNetId: Wireless
|
||||
transmitFrequencyId: NTMessagesServer
|
||||
receiveFrequencyId: NTMessagesClient
|
||||
autoConnect: false
|
||||
- type: StationLimitedNetwork
|
||||
|
||||
- type: entity
|
||||
id: SyndicateMessagesServer
|
||||
parent: MessagesServer
|
||||
name: Syndicate PDA messaging server
|
||||
description: Server that allows PDA messaging between Syndicate operatives to function.
|
||||
components:
|
||||
- type: MessagesServer
|
||||
- type: StationLimitedNetwork
|
||||
- type: SingletonDeviceNetServer
|
||||
- type: DeviceNetwork
|
||||
deviceNetId: Wireless
|
||||
transmitFrequencyId: SyndicateMessagesServer
|
||||
receiveFrequencyId: SyndicateMessagesClient
|
||||
autoConnect: false
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobSalvageSpecialist
|
||||
time: 9999999999 # 15 hours 54000
|
||||
time: 54000 # 15 hours
|
||||
|
||||
# Head
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobClown
|
||||
time: 9999999999 # 30 hours as clown required to ascend 108000
|
||||
time: 108000 # 30 hours as clown required to ascend
|
||||
|
||||
- type: loadoutEffectGroup # WD
|
||||
id: MedalClownTimer
|
||||
@@ -15,7 +15,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobClown
|
||||
time: 9999999999 # 10 hours 36000
|
||||
time: 36000 # 10 hours
|
||||
|
||||
# Head
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobJanitor
|
||||
time: 9999999999 # 10 hours 36000
|
||||
time: 36000 # 10 hours
|
||||
|
||||
# Head
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobPassenger
|
||||
time: 9999999999 #10 hrs, silly reward for people who play passenger a lot 36000
|
||||
time: 36000 #10 hrs, silly reward for people who play passenger a lot
|
||||
|
||||
# Face
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobHeadOfPersonnel
|
||||
time: 9999999999 #15 hrs, special reward for HoP mains 54000
|
||||
time: 54000 #15 hrs, special reward for HoP mains
|
||||
|
||||
# Jumpsuit
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobAtmosphericTechnician
|
||||
time: 9999999999 #6 hrs 21600
|
||||
time: 21600 #6 hrs
|
||||
- !type:JobRequirementLoadoutEffect
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobStationEngineer
|
||||
time: 9999999999 #6 hrs 21600
|
||||
time: 21600 #6 hrs
|
||||
- !type:JobRequirementLoadoutEffect
|
||||
requirement:
|
||||
!type:DepartmentTimeRequirement
|
||||
department: Engineering
|
||||
time: 9999999999 # 60 hrs 216000
|
||||
time: 216000 # 60 hrs
|
||||
|
||||
# Head
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobChemist
|
||||
time: 9999999999 #6 hrs 21600
|
||||
time: 21600 #6 hrs
|
||||
- !type:JobRequirementLoadoutEffect
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobMedicalDoctor
|
||||
time: 9999999999 #6 hrs 21600
|
||||
time: 21600 #6 hrs
|
||||
- !type:JobRequirementLoadoutEffect
|
||||
requirement:
|
||||
!type:DepartmentTimeRequirement
|
||||
department: Medical
|
||||
time: 9999999999 # 60 hrs 216000
|
||||
time: 216000 # 60 hrs
|
||||
|
||||
# Head
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:DepartmentTimeRequirement
|
||||
department: Science
|
||||
time: 9999999999 #60 hrs 216000
|
||||
time: 216000 #60 hrs
|
||||
|
||||
# Head
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobWarden
|
||||
time: 9999999999 #6 hrs 21600
|
||||
time: 21600 #6 hrs
|
||||
- !type:JobRequirementLoadoutEffect
|
||||
requirement:
|
||||
!type:DepartmentTimeRequirement
|
||||
department: Security
|
||||
time: 9999999999 # 60 hrs 216000
|
||||
time: 216000 # 60 hrs
|
||||
|
||||
# Head
|
||||
- type: itemLoadout
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobPassenger
|
||||
time: 9999999999 # 50 hours 180000
|
||||
time: 180000 # 50 hours
|
||||
|
||||
# Bottom
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
requirement:
|
||||
!type:RoleTimeRequirement
|
||||
role: JobLibrarian
|
||||
time: 9999999999 # 1 hour of being the biggest nerd on the station 3600
|
||||
time: 3600 # 1 hour of being the biggest nerd on the station
|
||||
|
||||
- type: loadoutEffectGroup
|
||||
id: JensenTimer
|
||||
@@ -15,7 +15,7 @@
|
||||
requirement:
|
||||
!type:DepartmentTimeRequirement
|
||||
department: Cargo
|
||||
time: 9999999999 #5 hours of being a space trucker 18000
|
||||
time: 18000 #5 hours of being a space trucker
|
||||
|
||||
# Basic options
|
||||
# Glasses
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
components:
|
||||
- type: Magic
|
||||
requiresClothes: true
|
||||
clothingWhitelist:
|
||||
tags:
|
||||
- BlueMagusArmor
|
||||
- type: WorldTargetAction
|
||||
itemIconStyle: BigAction
|
||||
useDelay: 60
|
||||
@@ -29,7 +32,7 @@
|
||||
prototype: ProjectileTeslaBall
|
||||
posData: !type:TargetCasterPos
|
||||
- type: VariableUseDelay
|
||||
useDelay: 5
|
||||
useDelay: 10
|
||||
altUseDelay: 5
|
||||
chargeUseDelay: 30
|
||||
|
||||
@@ -63,7 +66,7 @@
|
||||
speech: "EL DRITCH!"
|
||||
- type: VariableUseDelay
|
||||
useDelay: 6
|
||||
altUseDelay: 2
|
||||
altUseDelay: 3
|
||||
chargeUseDelay: 30
|
||||
|
||||
- type: entity
|
||||
@@ -73,6 +76,9 @@
|
||||
components:
|
||||
- type: Magic
|
||||
requiresClothes: true
|
||||
clothingWhitelist:
|
||||
tags:
|
||||
- RedMagusArmor
|
||||
- type: WorldTargetAction
|
||||
itemIconStyle: BigAction
|
||||
useDelay: 60
|
||||
@@ -128,7 +134,7 @@
|
||||
posData: !type:TargetCasterPos
|
||||
speech: "SHIZO NERO!"
|
||||
- type: VariableUseDelay
|
||||
useDelay: 4
|
||||
useDelay: 5
|
||||
altUseDelay: 1
|
||||
chargeUseDelay: 30
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 150
|
||||
damage: 100
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- type: Reflect
|
||||
reflectProb: 0.5
|
||||
reflectProb: 0.25
|
||||
reflects:
|
||||
- Energy
|
||||
- type: ReturnItemOnThrow
|
||||
|
||||
@@ -341,6 +341,7 @@
|
||||
sprite: White/Objects/Weapons/Chaplain/pitchfork.rsi
|
||||
state: icon
|
||||
- type: MeleeWeapon
|
||||
range: 2
|
||||
wideAnimationRotation: -135
|
||||
damage:
|
||||
types:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
sprite: White/Objects/Weapons/Chaplain/hfrequency.rsi
|
||||
- type: MeleeWeapon
|
||||
autoAttack: true
|
||||
attackRate: 4
|
||||
attackRate: 5
|
||||
damage:
|
||||
types:
|
||||
Slash: 10
|
||||
@@ -39,7 +39,7 @@
|
||||
wideAnimationRotation: 135
|
||||
damage:
|
||||
types:
|
||||
Slash: 30
|
||||
Slash: 35
|
||||
- type: Clothing
|
||||
quickEquip: false
|
||||
sprite: White/Objects/Weapons/Chaplain/spellblade.rsi
|
||||
|
||||
@@ -93,3 +93,9 @@
|
||||
|
||||
- type: Tag
|
||||
id: UnoCard
|
||||
|
||||
- type: Tag
|
||||
id: RedMagusArmor
|
||||
|
||||
- type: Tag
|
||||
id: BlueMagusArmor
|
||||
|
||||
|
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 461 B |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 514 B |
|
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -269,3 +269,6 @@ ComfyChairCargo: BrownComfyChair
|
||||
ComfyChairService: GreenComfyChair
|
||||
|
||||
BoxTrashbag: TrashBag
|
||||
|
||||
# 2024-08-05 WD
|
||||
OmntnsHammer: JudgeHammer
|
||||
|
||||