Content update for NetEntities (#18935)
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Content.Server.GameTicking.Commands
|
||||
[AnyCommand]
|
||||
sealed class JoinGameCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public string Command => "joingame";
|
||||
@@ -36,9 +37,8 @@ namespace Content.Server.GameTicking.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var ticker = EntitySystem.Get<GameTicker>();
|
||||
var stationSystem = EntitySystem.Get<StationSystem>();
|
||||
var stationJobs = EntitySystem.Get<StationJobsSystem>();
|
||||
var ticker = _entManager.System<GameTicker>();
|
||||
var stationJobs = _entManager.System<StationJobsSystem>();
|
||||
|
||||
if (ticker.PlayerGameStatuses.TryGetValue(player.UserId, out var status) && status == PlayerGameStatus.JoinedGame)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ namespace Content.Server.GameTicking.Commands
|
||||
shell.WriteError(Loc.GetString("shell-argument-must-be-number"));
|
||||
}
|
||||
|
||||
var station = new EntityUid(sid);
|
||||
var station = _entManager.GetEntity(new NetEntity(sid));
|
||||
var jobPrototype = _prototypeManager.Index<JobPrototype>(id);
|
||||
if(stationJobs.TryGetJobSlot(station, jobPrototype, out var slots) == false || slots == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user