Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe. This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown. * Fix a bunch of warnings * More warning fixes * Use new DateTime serializer to get rid of ISerializationHooks in changelog code. * Get rid of some more ISerializationHooks for enums * And a little more * Apply suggestions from code review Co-authored-by: 0x6273 <0x40@keemail.me> --------- Co-authored-by: 0x6273 <0x40@keemail.me>
This commit is contained in:
committed by
GitHub
parent
d0c174388c
commit
68ce53ae17
@@ -93,7 +93,7 @@ namespace Content.Server.GameTicking
|
||||
{
|
||||
if (job == null)
|
||||
{
|
||||
var playerSession = _playerManager.GetSessionByUserId(netUser);
|
||||
var playerSession = _playerManager.GetSessionById(netUser);
|
||||
_chatManager.DispatchServerMessage(playerSession, Loc.GetString("job-not-available-wait-in-lobby"));
|
||||
}
|
||||
else
|
||||
@@ -110,13 +110,13 @@ namespace Content.Server.GameTicking
|
||||
if (job == null)
|
||||
continue;
|
||||
|
||||
SpawnPlayer(_playerManager.GetSessionByUserId(player), profiles[player], station, job, false);
|
||||
SpawnPlayer(_playerManager.GetSessionById(player), profiles[player], station, job, false);
|
||||
}
|
||||
|
||||
RefreshLateJoinAllowed();
|
||||
|
||||
// Allow rules to add roles to players who have been spawned in. (For example, on-station traitors)
|
||||
RaiseLocalEvent(new RulePlayerJobsAssignedEvent(assignedJobs.Keys.Select(x => _playerManager.GetSessionByUserId(x)).ToArray(), profiles, force));
|
||||
RaiseLocalEvent(new RulePlayerJobsAssignedEvent(assignedJobs.Keys.Select(x => _playerManager.GetSessionById(x)).ToArray(), profiles, force));
|
||||
}
|
||||
|
||||
private void SpawnPlayer(ICommonSession player, EntityUid station, string? jobId = null, bool lateJoin = true, bool silent = false)
|
||||
|
||||
Reference in New Issue
Block a user