Move minds, roles, jobs and objectives to shared (#19679)
This commit is contained in:
@@ -9,10 +9,9 @@ using Content.Shared.Administration.Notes;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Players.PlayTimeTracking;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Players;
|
||||
|
||||
namespace Content.Server.Administration.Notes;
|
||||
|
||||
@@ -33,27 +32,27 @@ public sealed class AdminNotesManager : IAdminNotesManager, IPostInjectInit
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
public bool CanCreate(IPlayerSession admin)
|
||||
public bool CanCreate(ICommonSession admin)
|
||||
{
|
||||
return CanEdit(admin);
|
||||
}
|
||||
|
||||
public bool CanDelete(IPlayerSession admin)
|
||||
public bool CanDelete(ICommonSession admin)
|
||||
{
|
||||
return CanEdit(admin);
|
||||
}
|
||||
|
||||
public bool CanEdit(IPlayerSession admin)
|
||||
public bool CanEdit(ICommonSession admin)
|
||||
{
|
||||
return _admins.HasAdminFlag(admin, AdminFlags.EditNotes);
|
||||
}
|
||||
|
||||
public bool CanView(IPlayerSession admin)
|
||||
public bool CanView(ICommonSession admin)
|
||||
{
|
||||
return _admins.HasAdminFlag(admin, AdminFlags.ViewNotes);
|
||||
}
|
||||
|
||||
public async Task OpenEui(IPlayerSession admin, Guid notedPlayer)
|
||||
public async Task OpenEui(ICommonSession admin, Guid notedPlayer)
|
||||
{
|
||||
var ui = new AdminNotesEui();
|
||||
_euis.OpenEui(ui, admin);
|
||||
@@ -61,7 +60,7 @@ public sealed class AdminNotesManager : IAdminNotesManager, IPostInjectInit
|
||||
await ui.ChangeNotedPlayer(notedPlayer);
|
||||
}
|
||||
|
||||
public async Task OpenUserNotesEui(IPlayerSession player)
|
||||
public async Task OpenUserNotesEui(ICommonSession player)
|
||||
{
|
||||
var ui = new UserNotesEui();
|
||||
_euis.OpenEui(ui, player);
|
||||
@@ -69,7 +68,7 @@ public sealed class AdminNotesManager : IAdminNotesManager, IPostInjectInit
|
||||
await ui.UpdateNotes();
|
||||
}
|
||||
|
||||
public async Task AddAdminRemark(IPlayerSession createdBy, Guid player, NoteType type, string message, NoteSeverity? severity, bool secret, DateTime? expiryTime)
|
||||
public async Task AddAdminRemark(ICommonSession createdBy, Guid player, NoteType type, string message, NoteSeverity? severity, bool secret, DateTime? expiryTime)
|
||||
{
|
||||
message = message.Trim();
|
||||
|
||||
@@ -179,7 +178,7 @@ public sealed class AdminNotesManager : IAdminNotesManager, IPostInjectInit
|
||||
};
|
||||
}
|
||||
|
||||
public async Task DeleteAdminRemark(int noteId, NoteType type, IPlayerSession deletedBy)
|
||||
public async Task DeleteAdminRemark(int noteId, NoteType type, ICommonSession deletedBy)
|
||||
{
|
||||
var note = await GetAdminRemark(noteId, type);
|
||||
if (note == null)
|
||||
@@ -215,7 +214,7 @@ public sealed class AdminNotesManager : IAdminNotesManager, IPostInjectInit
|
||||
NoteDeleted?.Invoke(note);
|
||||
}
|
||||
|
||||
public async Task ModifyAdminRemark(int noteId, NoteType type, IPlayerSession editedBy, string message, NoteSeverity? severity, bool secret, DateTime? expiryTime)
|
||||
public async Task ModifyAdminRemark(int noteId, NoteType type, ICommonSession editedBy, string message, NoteSeverity? severity, bool secret, DateTime? expiryTime)
|
||||
{
|
||||
message = message.Trim();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user