Re-organize all projects (#4166)
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Interfaces.Chat
|
||||
{
|
||||
public interface IChatManager
|
||||
{
|
||||
void Initialize();
|
||||
|
||||
/// <summary>
|
||||
/// Dispatch a server announcement to every connected player.
|
||||
/// </summary>
|
||||
void DispatchServerAnnouncement(string message);
|
||||
|
||||
/// <summary>
|
||||
/// Station announcement to every player
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="sender"></param>
|
||||
void DispatchStationAnnouncement(string message, string sender = "CentComm");
|
||||
|
||||
void DispatchServerMessage(IPlayerSession player, string message);
|
||||
|
||||
void EntitySay(IEntity source, string message);
|
||||
void EntityMe(IEntity source, string action);
|
||||
|
||||
void SendOOC(IPlayerSession player, string message);
|
||||
void SendAdminChat(IPlayerSession player, string message);
|
||||
void SendDeadChat(IPlayerSession player, string message);
|
||||
void SendAdminDeadChat(IPlayerSession player, string message);
|
||||
|
||||
void SendHookOOC(string sender, string message);
|
||||
|
||||
delegate string TransformChat(IEntity speaker, string message);
|
||||
void RegisterChatTransform(TransformChat handler);
|
||||
void SendAdminAnnouncement(string message);
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Doors;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using System;
|
||||
|
||||
namespace Content.Server.Interfaces.GameObjects.Components.Doors
|
||||
{
|
||||
public interface IDoorCheck
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when the door's State variable is changed to a new variable that it was not equal to before.
|
||||
/// </summary>
|
||||
void OnStateChange(SharedDoorComponent.DoorState doorState) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when the door is determining whether it is able to open.
|
||||
/// </summary>
|
||||
/// <returns>True if the door should open, false if it should not.</returns>
|
||||
bool OpenCheck() => true;
|
||||
|
||||
/// <summary>
|
||||
/// Called when the door is determining whether it is able to close.
|
||||
/// </summary>
|
||||
/// <returns>True if the door should close, false if it should not.</returns>
|
||||
bool CloseCheck() => true;
|
||||
|
||||
/// <summary>
|
||||
/// Called when the door is determining whether it is able to deny.
|
||||
/// </summary>
|
||||
/// <returns>True if the door should deny, false if it should not.</returns>
|
||||
bool DenyCheck() => true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the door's safety is on.
|
||||
/// </summary>
|
||||
/// <returns>True if safety is on, false if it is not.</returns>
|
||||
bool SafetyCheck() => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the door should close automatically.
|
||||
/// </summary>
|
||||
/// <returns>True if the door should close automatically, false if it should not.</returns>
|
||||
bool AutoCloseCheck() => false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an override for the amount of time to pry open the door, or null if there is no override.
|
||||
/// </summary>
|
||||
/// <returns>Float if there is an override, null otherwise.</returns>
|
||||
float? GetPryTime() => null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an override for the amount of time before the door automatically closes, or null if there is no override.
|
||||
/// </summary>
|
||||
/// <returns>TimeSpan if there is an override, null otherwise.</returns>
|
||||
TimeSpan? GetCloseSpeed() => null;
|
||||
|
||||
/// <summary>
|
||||
/// A check to determine whether or not a click on the door should interact with it with the intent to open/close.
|
||||
/// </summary>
|
||||
/// <returns>True if the door's IActivate should not run, false otherwise.</returns>
|
||||
bool BlockActivate(ActivateEventArgs eventArgs) => false;
|
||||
|
||||
/// <summary>
|
||||
/// Called when somebody begins to pry open the door.
|
||||
/// </summary>
|
||||
/// <param name="eventArgs">The eventArgs of the InteractUsing method that called this function.</param>
|
||||
void OnStartPry(InteractUsingEventArgs eventArgs) { }
|
||||
|
||||
/// <summary>
|
||||
/// Check representing whether or not the door can be pried open.
|
||||
/// </summary>
|
||||
/// <param name="eventArgs">The eventArgs of the InteractUsing method that called this function.</param>
|
||||
/// <returns>True if the door can be pried open, false if it cannot.</returns>
|
||||
bool CanPryCheck(InteractUsingEventArgs eventArgs) => true;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Server.GameObjects.Components.Items.Storage;
|
||||
using Content.Shared.GameObjects.Components.Items;
|
||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Interfaces.GameObjects.Components.Items
|
||||
{
|
||||
public interface IHandsComponent : ISharedHandsComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Invoked when the hand contents changes or when a hand is added/removed.
|
||||
/// </summary>
|
||||
event Action? OnItemChanged;
|
||||
|
||||
/// <summary>
|
||||
/// The hands in this component.
|
||||
/// </summary>
|
||||
IEnumerable<string> Hands { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The hand name of the currently active hand.
|
||||
/// </summary>
|
||||
string? ActiveHand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enumerates over every held item.
|
||||
/// </summary>
|
||||
IEnumerable<ItemComponent> GetAllHeldItems();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the item held by a hand.
|
||||
/// </summary>
|
||||
/// <param name="handName">The name of the hand to get.</param>
|
||||
/// <returns>The item in the held, null if no item is held</returns>
|
||||
ItemComponent? GetItem(string handName);
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to get an item in a hand.
|
||||
/// </summary>
|
||||
/// <param name="handName">The name of the hand to get.</param>
|
||||
/// <param name="item">The item in the held, null if no item is held</param>
|
||||
/// <returns>Whether it was holding an item</returns>
|
||||
bool TryGetItem(string handName, [NotNullWhen(true)] out ItemComponent? item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets item held by the current active hand
|
||||
/// </summary>
|
||||
ItemComponent? GetActiveHand { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Puts an item into any empty hand, preferring the active hand.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to put in a hand.</param>
|
||||
/// <param name="mobCheck">Whether to perform an ActionBlocker check to the entity.</param>
|
||||
/// <returns>True if the item was inserted, false otherwise.</returns>
|
||||
bool PutInHand(ItemComponent item, bool mobCheck = true);
|
||||
|
||||
/// <summary>
|
||||
/// Puts an item into a specific hand.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to put in the hand.</param>
|
||||
/// <param name="index">The name of the hand to put the item into.</param>
|
||||
/// <param name="fallback">
|
||||
/// If true and the provided hand is full, the method will fall back to <see cref="PutInHand(ItemComponent)" />
|
||||
/// <param name="mobCheck">Whether to perform an ActionBlocker check to the entity.</param>
|
||||
/// </param>
|
||||
/// <returns>True if the item was inserted into a hand, false otherwise.</returns>
|
||||
bool PutInHand(ItemComponent item, string index, bool fallback=true, bool mobCheck = true);
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if an item can be put in any hand.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to check for.</param>
|
||||
/// <param name="mobCheck">Whether to perform an ActionBlocker check to the entity.</param>
|
||||
/// <returns>True if the item can be inserted, false otherwise.</returns>
|
||||
bool CanPutInHand(ItemComponent item, bool mobCheck = true);
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if an item can be put in the specified hand.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to check for.</param>
|
||||
/// <param name="index">The name for the hand to check for.</param>
|
||||
/// <param name="mobCheck">Whether to perform an ActionBlocker check to the entity.</param>
|
||||
/// <returns>True if the item can be inserted, false otherwise.</returns>
|
||||
bool CanPutInHand(ItemComponent item, string index, bool mobCheck = true);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the hand slot holding the specified entity, if any.
|
||||
/// </summary>
|
||||
/// <param name="entity">The entity to look for in our hands.</param>
|
||||
/// <param name="handName">
|
||||
/// The name of the hand slot if the entity is indeed held,
|
||||
/// <see langword="null" /> otherwise.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// true if the entity is held, false otherwise
|
||||
/// </returns>
|
||||
bool TryHand(IEntity entity, [NotNullWhen(true)] out string? handName);
|
||||
|
||||
/// <summary>
|
||||
/// Drops the item contained in the slot to the same position as our entity.
|
||||
/// </summary>
|
||||
/// <param name="slot">The slot of which to drop to drop the item.</param>
|
||||
/// <param name="mobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
|
||||
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
|
||||
/// <returns>True on success, false if something blocked the drop.</returns>
|
||||
bool Drop(string slot, bool mobChecks = true, bool doDropInteraction = true, bool intentional = true);
|
||||
|
||||
/// <summary>
|
||||
/// Drops an item held by one of our hand slots to the same position as our owning entity.
|
||||
/// </summary>
|
||||
/// <param name="entity">The item to drop.</param>
|
||||
/// <param name="mobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
|
||||
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
|
||||
/// <returns>True on success, false if something blocked the drop.</returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// Thrown if <see cref="entity"/> is null.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown if <see cref="entity"/> is not actually held in any hand.
|
||||
/// </exception>
|
||||
bool Drop(IEntity entity, bool mobChecks = true, bool doDropInteraction = true, bool intentional = true);
|
||||
|
||||
/// <summary>
|
||||
/// Drops the item in a slot.
|
||||
/// </summary>
|
||||
/// <param name="slot">The slot to drop the item from.</param>
|
||||
/// <param name="coords"></param>
|
||||
/// <param name="doMobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
|
||||
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
|
||||
/// <returns>True if an item was dropped, false otherwise.</returns>
|
||||
bool Drop(string slot, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
|
||||
|
||||
/// <summary>
|
||||
/// Drop the specified entity in our hands to a certain position.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// There are no checks whether or not the user is within interaction range of the drop location
|
||||
/// or whether the drop location is occupied.
|
||||
/// </remarks>
|
||||
/// <param name="entity">The entity to drop, must be held in one of the hands.</param>
|
||||
/// <param name="coords">The coordinates to drop the entity at.</param>
|
||||
/// <param name="doMobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
|
||||
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
|
||||
/// <returns>
|
||||
/// True if the drop succeeded,
|
||||
/// false if it failed (due to failing to eject from our hand slot, etc...)
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// Thrown if <see cref="entity"/> is null.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown if <see cref="entity"/> is not actually held in any hand.
|
||||
/// </exception>
|
||||
bool Drop(IEntity entity, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
|
||||
|
||||
/// <summary>
|
||||
/// Drop the item contained in a slot into another container.
|
||||
/// </summary>
|
||||
/// <param name="slot">The slot of which to drop the entity.</param>
|
||||
/// <param name="targetContainer">The container to drop into.</param>
|
||||
/// <param name="doMobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop(IEntity)"/> for the mob or not.</param>
|
||||
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
|
||||
/// <returns>True on success, false if something was blocked (insertion or removal).</returns>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// Thrown if dry-run checks reported OK to remove and insert,
|
||||
/// but practical remove or insert returned false anyways.
|
||||
/// This is an edge-case that is currently unhandled.
|
||||
/// </exception>
|
||||
bool Drop(string slot, BaseContainer targetContainer, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
|
||||
|
||||
/// <summary>
|
||||
/// Drops an item in one of the hands into a container.
|
||||
/// </summary>
|
||||
/// <param name="entity">The item to drop.</param>
|
||||
/// <param name="targetContainer">The container to drop into.</param>
|
||||
/// <param name="doMobChecks">Whether to check the <see cref="ActionBlockerSystem.CanDrop()"/> for the mob or not.</param>
|
||||
/// <param name="doDropInteraction">Whether to perform Dropped interactions.</param>
|
||||
/// <returns>True on success, false if something was blocked (insertion or removal).</returns>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// Thrown if dry-run checks reported OK to remove and insert,
|
||||
/// but practical remove or insert returned false anyways.
|
||||
/// This is an edge-case that is currently unhandled.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// Thrown if <see cref="entity"/> is null.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown if <see cref="entity"/> is not actually held in any hand.
|
||||
/// </exception>
|
||||
bool Drop(IEntity entity, BaseContainer targetContainer, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true);
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the item in the specified hand can be dropped.
|
||||
/// </summary>
|
||||
/// <param name="name">The hand to check for.</param>
|
||||
/// <param name="mobCheck">Whether to perform an ActionBlocker check to the entity.</param>
|
||||
/// <returns>
|
||||
/// True if the item can be dropped, false if the hand is empty or the item in the hand cannot be dropped.
|
||||
/// </returns>
|
||||
bool CanDrop(string name, bool mobCheck = true);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new hand to this hands component.
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the hand to add.</param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// Thrown if a hand with specified name already exists.
|
||||
/// </exception>
|
||||
void AddHand(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Removes a hand from this hands component.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If the hand contains an item, the item is dropped.
|
||||
/// </remarks>
|
||||
/// <param name="name">The name of the hand to remove.</param>
|
||||
void RemoveHand(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether a hand with the specified name exists.
|
||||
/// </summary>
|
||||
/// <param name="name">The hand name to check.</param>
|
||||
/// <returns>True if the hand exists, false otherwise.</returns>
|
||||
bool HasHand(string name);
|
||||
|
||||
void HandleSlotModifiedMaybe(ContainerModifiedMessage message);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Interfaces.GameObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements behavior when an entity is disarmed.
|
||||
/// </summary>
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IDisarmedAct
|
||||
{
|
||||
/// <summary>
|
||||
/// Behavior when the entity is disarmed.
|
||||
/// Return true to prevent the default disarm behavior,
|
||||
/// or rest of IDisarmedAct behaviors that come after this one from happening.
|
||||
/// </summary>
|
||||
bool Disarmed(DisarmedActEventArgs eventArgs);
|
||||
|
||||
/// <summary>
|
||||
/// Priority for this disarm act.
|
||||
/// Used to determine act execution order.
|
||||
/// </summary>
|
||||
int Priority => 0;
|
||||
}
|
||||
|
||||
public class DisarmedActEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity being disarmed.
|
||||
/// </summary>
|
||||
public IEntity? Target { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The entity performing the disarm.
|
||||
/// </summary>
|
||||
public IEntity? Source { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Probability for push/knockdown.
|
||||
/// </summary>
|
||||
public float PushProbability { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Content.Server.Interfaces.GameObjects
|
||||
{
|
||||
public interface IPressureProtection
|
||||
{
|
||||
public float HighPressureMultiplier { get; }
|
||||
public float LowPressureMultiplier { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Construction;
|
||||
using Robust.Shared.Analyzers;
|
||||
|
||||
namespace Content.Server.Interfaces.GameObjects
|
||||
{
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IRefreshParts
|
||||
{
|
||||
void RefreshParts(IEnumerable<MachinePartComponent> parts);
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Content.Server.Interfaces.Chat;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Interfaces.GameObjects
|
||||
{
|
||||
[RequiresExplicitImplementation]
|
||||
public interface ISuicideAct
|
||||
{
|
||||
public SuicideKind Suicide(IEntity victim, IChatManager chat);
|
||||
}
|
||||
|
||||
public enum SuicideKind
|
||||
{
|
||||
Special, //Doesn't damage the mob, used for "weird" suicides like gibbing
|
||||
|
||||
//Damage type suicides
|
||||
Blunt,
|
||||
Slash,
|
||||
Piercing,
|
||||
Heat,
|
||||
Shock,
|
||||
Cold,
|
||||
Poison,
|
||||
Radiation,
|
||||
Asphyxiation,
|
||||
Bloodloss
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Mobs;
|
||||
using Content.Shared.Preferences;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.Interfaces.GameTicking
|
||||
{
|
||||
/// <summary>
|
||||
/// The game ticker is responsible for managing the round-by-round system of the game.
|
||||
/// </summary>
|
||||
public interface IGameTicker
|
||||
{
|
||||
GameRunLevel RunLevel { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The map loaded by the GameTicker on round start.
|
||||
/// </summary>
|
||||
MapId DefaultMap { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The GridId loaded by the GameTicker on round start.
|
||||
/// </summary>
|
||||
GridId DefaultGridId { get; }
|
||||
|
||||
event Action<GameRunLevelChangedEventArgs> OnRunLevelChanged;
|
||||
event Action<GameRuleAddedEventArgs> OnRuleAdded;
|
||||
|
||||
void Initialize();
|
||||
void Update(FrameEventArgs frameEventArgs);
|
||||
|
||||
void RestartRound();
|
||||
void StartRound(bool force = false);
|
||||
void EndRound(string roundEndText = "");
|
||||
|
||||
void Respawn(IPlayerSession targetPlayer);
|
||||
void MakeObserve(IPlayerSession player);
|
||||
void MakeJoinGame(IPlayerSession player, string? jobId = null);
|
||||
void ToggleReady(IPlayerSession player, bool ready);
|
||||
void ToggleDisallowLateJoin(bool disallowLateJoin);
|
||||
|
||||
/// <summary>proxy to GamePreset (actual handler)</summary>
|
||||
bool OnGhostAttempt(Mind mind, bool canReturnGlobal);
|
||||
|
||||
EntityCoordinates GetLateJoinSpawnPoint();
|
||||
EntityCoordinates GetJobSpawnPoint(string jobId);
|
||||
EntityCoordinates GetObserverSpawnPoint();
|
||||
|
||||
void EquipStartingGear(IEntity entity, StartingGearPrototype startingGear, HumanoidCharacterProfile? profile);
|
||||
|
||||
// GameRule system.
|
||||
T AddGameRule<T>() where T : GameRule, new();
|
||||
bool HasGameRule(string? type);
|
||||
bool HasGameRule(Type? type);
|
||||
void RemoveGameRule(GameRule rule);
|
||||
IEnumerable<GameRule> ActiveGameRules { get; }
|
||||
|
||||
bool TryGetPreset(string name, [NotNullWhen(true)] out Type? type);
|
||||
void SetStartPreset(Type type, bool force = false);
|
||||
void SetStartPreset(string name, bool force = false);
|
||||
|
||||
/// <returns>true if changed, false otherwise</returns>
|
||||
bool PauseStart(bool pause = true);
|
||||
|
||||
/// <returns>true if paused, false otherwise</returns>
|
||||
bool TogglePause();
|
||||
|
||||
bool DelayStart(TimeSpan time);
|
||||
|
||||
Dictionary<string, int> GetAvailablePositions();
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Access;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains access levels that can be checked to see if somebody has access with an <see cref="AccessReader"/>.
|
||||
/// </summary>
|
||||
public interface IAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// The set of access tags this thing has.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This set may be read-only. Check <see cref="IsReadOnly"/> if you want to mutate it.
|
||||
/// </remarks>
|
||||
ISet<string> Tags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Tags"/> list is read-only.
|
||||
/// </summary>
|
||||
bool IsReadOnly { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the set of access tags we have with the provided set.
|
||||
/// </summary>
|
||||
/// <param name="newTags">The new access tags</param>
|
||||
/// <exception cref="NotSupportedException">If this access tag list is read-only.</exception>
|
||||
void SetTags(IEnumerable<string> newTags);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using Content.Server.GameObjects.EntitySystems.DeviceNetwork;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Package based device network allowing devices to communicate with eachother
|
||||
/// </summary>
|
||||
public interface IDeviceNetwork
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers a device with the device network
|
||||
/// </summary>
|
||||
/// <param name="netId"><see cref="NetworkUtils"/>The id of the network to register with</param>
|
||||
/// <param name="frequency">The frequency the device receives packages on. Wired networks use frequency 0</param>
|
||||
/// <param name="messageHandler">The delegate that gets called when the device receives a message</param>
|
||||
/// <param name="receiveAll">If the device should receive all packages on its frequency or only ones addressed to itself</param>
|
||||
/// <returns></returns>
|
||||
public DeviceNetworkConnection Register(int netId, int frequency, OnReceiveNetMessage messageHandler, bool receiveAll = false);
|
||||
/// <see cref="Register(int, int, OnReceiveNetMessage, bool)"/>
|
||||
public DeviceNetworkConnection Register(int netId, OnReceiveNetMessage messageHandler, bool receiveAll = false);
|
||||
|
||||
public void Update();
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
public interface IDeviceNetworkConnection
|
||||
{
|
||||
public int Frequency { get; }
|
||||
/// <summary>
|
||||
/// Sends a package to a specific device
|
||||
/// </summary>
|
||||
/// <param name="frequency">The frequency the package should be send on</param>
|
||||
/// <param name="address">The target devices address</param>
|
||||
/// <param name="payload"></param>
|
||||
/// <returns></returns>
|
||||
public bool Send(int frequency, string address, Dictionary<string, string> payload);
|
||||
/// <see cref="Send(int, string, Dictionary{string, string})"/>
|
||||
public bool Send(string address, Dictionary<string, string> payload);
|
||||
/// <summary>
|
||||
/// Sends a package to all devices
|
||||
/// </summary>
|
||||
/// <param name="frequency">The frequency the package should be send on</param>
|
||||
/// <param name="payload"></param>
|
||||
/// <returns></returns>
|
||||
public bool Broadcast(int frequency, Dictionary<string, string> payload);
|
||||
/// <see cref="Broadcast(int, Dictionary{string, string})"/>
|
||||
public bool Broadcast(Dictionary<string, string> payload);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for objects such as radios meant to have an effect when speech is
|
||||
/// heard. Requires component reference.
|
||||
/// </summary>
|
||||
public interface IListen : IComponent
|
||||
{
|
||||
int ListenRange { get; }
|
||||
|
||||
bool CanListen(string message, IEntity source);
|
||||
|
||||
void Listen(string message, IEntity speaker);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
public interface IMoMMILink
|
||||
{
|
||||
void SendOOCMessage(string sender, string message);
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
public interface IRadio
|
||||
{
|
||||
IReadOnlyList<int> Channels { get; }
|
||||
|
||||
void Receive(string message, int channel, IEntity speaker);
|
||||
|
||||
void Broadcast(string message, IEntity speaker);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Shared.Interfaces;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
public interface IServerNotifyManager : ISharedNotifyManager
|
||||
{
|
||||
void Initialize();
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.Preferences;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
public interface IServerPreferencesManager
|
||||
{
|
||||
void Init();
|
||||
|
||||
void OnClientConnected(IPlayerSession session);
|
||||
void OnClientDisconnected(IPlayerSession session);
|
||||
|
||||
bool HavePreferencesLoaded(IPlayerSession session);
|
||||
Task WaitPreferencesLoaded(IPlayerSession session);
|
||||
|
||||
PlayerPreferences GetPreferences(NetUserId userId);
|
||||
IEnumerable<KeyValuePair<NetUserId, ICharacterProfile>> GetSelectedProfilesForPlayers(List<NetUserId> userIds);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared.GameObjects.Components.PDA;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Interfaces.PDA
|
||||
{
|
||||
public interface IPDAUplinkManager
|
||||
{
|
||||
public IReadOnlyDictionary<string, UplinkListingData> FetchListings { get; }
|
||||
|
||||
void Initialize();
|
||||
|
||||
public bool AddNewAccount(UplinkAccount acc);
|
||||
|
||||
public bool ChangeBalance(UplinkAccount acc, int amt);
|
||||
|
||||
public bool TryPurchaseItem(
|
||||
UplinkAccount? acc,
|
||||
string itemId,
|
||||
EntityCoordinates spawnCoords,
|
||||
[NotNullWhen(true)] out IEntity? purchasedItem);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user