Remove misc Startup/Shutdown overrides (#8113)
Co-authored-by: ike709 <ike709@github.com>
This commit is contained in:
@@ -53,6 +53,8 @@ namespace Content.Server.Ghost.Roles
|
||||
SubscribeLocalEvent<GhostTakeoverAvailableComponent, MindAddedMessage>(OnMindAdded);
|
||||
SubscribeLocalEvent<GhostTakeoverAvailableComponent, MindRemovedMessage>(OnMindRemoved);
|
||||
SubscribeLocalEvent<GhostTakeoverAvailableComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||
SubscribeLocalEvent<GhostRoleComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<GhostRoleComponent, ComponentShutdown>(OnShutdown);
|
||||
_playerManager.PlayerStatusChanged += PlayerStatusChanged;
|
||||
}
|
||||
|
||||
@@ -266,6 +268,18 @@ namespace Content.Server.Ghost.Roles
|
||||
_ghostRoles.Clear();
|
||||
_nextRoleIdentifier = 0;
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, GhostRoleComponent role, ComponentInit args)
|
||||
{
|
||||
if (role.RoleRules == "")
|
||||
role.RoleRules = Loc.GetString("ghost-role-component-default-rules");
|
||||
RegisterGhostRole(role);
|
||||
}
|
||||
|
||||
private void OnShutdown(EntityUid uid, GhostRoleComponent role, ComponentShutdown args)
|
||||
{
|
||||
UnregisterGhostRole(role);
|
||||
}
|
||||
}
|
||||
|
||||
[AnyCommand]
|
||||
|
||||
Reference in New Issue
Block a user