diff --git a/Content.Client/LateJoin/LateJoinGui.cs b/Content.Client/LateJoin/LateJoinGui.cs index ac0a7a4aa99..f2c15593aad 100644 --- a/Content.Client/LateJoin/LateJoinGui.cs +++ b/Content.Client/LateJoin/LateJoinGui.cs @@ -84,7 +84,9 @@ private void RebuildUI() if (!_gameTicker.DisallowedLateJoin && _gameTicker.StationNames.Count == 0) Logger.Warning("No stations exist, nothing to display in late-join GUI"); - foreach (var (id, name) in _gameTicker.StationNames) + foreach (var (id, name) in _gameTicker.StationNames + .OrderBy(x=> x.Value.Contains("Central Command") ? 1 : -1) //backmen: centcom + ) { var jobList = new BoxContainer { diff --git a/Content.Server/Backmen/Arrivals/CentcommSystem.cs b/Content.Server/Backmen/Arrivals/CentcommSystem.cs new file mode 100644 index 00000000000..44a959edc3b --- /dev/null +++ b/Content.Server/Backmen/Arrivals/CentcommSystem.cs @@ -0,0 +1,373 @@ +using System.Numerics; +using Content.Server.Chat.Systems; +using Content.Server.GameTicking; +using Content.Server.GameTicking.Events; +using Content.Server.Maps; +using Content.Server.Popups; +using Content.Server.Power.EntitySystems; +using Content.Server.Salvage.Expeditions; +using Content.Server.Shuttles; +using Content.Server.Shuttles.Components; +using Content.Server.Shuttles.Events; +using Content.Server.Shuttles.Systems; +using Content.Server.Station.Components; +using Content.Server.Station.Systems; +using Content.Shared.Backmen.Abilities; +using Content.Shared._FishStation.CentComm; +using Content.Shared.Cargo.Components; +using Content.Shared.CCVar; +using Content.Shared.Emag.Components; +using Content.Shared.Emag.Systems; +using Content.Shared.GameTicking; +using Content.Shared.Random; +using Content.Shared.Random.Helpers; +using Content.Shared.Shuttles.Components; +using Content.Shared.Whitelist; +using Robust.Server.GameObjects; +using Robust.Server.Maps; +using Robust.Shared.Audio; +using Robust.Shared.Audio.Systems; +using Robust.Shared.Configuration; +using Robust.Shared.Map; +using Robust.Shared.Player; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; +using Robust.Shared.Utility; + +namespace Content.Server.Backmen.Arrivals; + +public sealed class FtlCentComAnnounce : EntityEventArgs +{ + public Entity Source { get; set; } +} + +public sealed class CentcommSystem : EntitySystem +{ + [Dependency] private readonly PopupSystem _popup = default!; + [Dependency] private readonly ShuttleSystem _shuttleSystem = default!; + [Dependency] private readonly StationSystem _stationSystem = default!; + [Dependency] private readonly IMapManager _mapManager = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly GameTicker _gameTicker = default!; + [Dependency] private readonly ShuttleSystem _shuttle = default!; + [Dependency] private readonly IConfigurationManager _cfg = default!; + [Dependency] private readonly ShuttleConsoleSystem _console = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly MetaDataSystem _metaDataSystem = default!; + private ISawmill _sawmill = default!; + + + public EntityUid CentComGrid { get; private set; } = EntityUid.Invalid; + public MapId CentComMap { get; private set; } = MapId.Nullspace; + public EntityUid CentComMapUid { get; private set; } = EntityUid.Invalid; + public float ShuttleIndex { get; set; } = 0; + + private WeightedRandomPrototype _stationCentComMapPool = default!; + + public override void Initialize() + { + base.Initialize(); + _sawmill = Logger.GetSawmill("centcom"); + SubscribeLocalEvent(OnFtlActionUsed); + SubscribeLocalEvent(OnPreGameMapLoad, after: new[] { typeof(StationSystem) }); + SubscribeLocalEvent(OnCentComInit, before: new[] { typeof(EmergencyShuttleSystem) }); + SubscribeLocalEvent(OnCentComEndRound); + SubscribeLocalEvent(OnCleanup); + SubscribeLocalEvent(OnShuttleConsoleEmaged); + SubscribeLocalEvent(OnFTLCompleted); + SubscribeLocalEvent(OnFtlAnnounce); + _cfg.OnValueChanged(CCVars.GridFill, OnGridFillChange); + + _stationCentComMapPool = _prototypeManager.Index(StationCentComMapPool); + } + + private void OnCentComEndRound(RoundEndedEvent ev) + { + if (CentComMapUid.IsValid() && _shuttleSystem.TryAddFTLDestination(CentComMap, true, out var ftl)) + { + EnableFtl((CentComMapUid, ftl)); + } + } + + private void OnFtlAnnounce(FtlCentComAnnounce ev) + { + if (!CentComGrid.IsValid()) + { + return; // not loaded centcom + } + + var transformQuery = EntityQueryEnumerator(); + + var shuttleName = "Неизвестный"; + + while (transformQuery.MoveNext(out var owner, out var transformComponent, out var iff)) + { + if (transformComponent.GridUid != ev.Source) + { + continue; + } + + var f = iff.AllowedFlags; + if (f.HasFlag(IFFFlags.Hide)) + { + continue; + } + + var name = MetaData(ev.Source).EntityName; + if (string.IsNullOrWhiteSpace(name)) + { + continue; + } + + shuttleName = name; + } + + if (_gameTicker.RunLevel != GameRunLevel.InRound) + { + return; // Do not announce out of round + } + + _chat.DispatchStationAnnouncement(CentComGrid, + $"Внимание! Радары обнаружили {shuttleName} шаттл, входящий в космическое пространство объекта Центрального Командования!", + "Радар", colorOverride: Color.Crimson); + } + + private void OnFTLCompleted(ref FTLCompletedEvent ev) + { + if (!CentComGrid.IsValid()) + { + return; // not loaded centcom + } + + if (ev.MapUid != _mapManager.GetMapEntityId(CentComMap)) + { + return; // not centcom + } + + if (!TryComp(ev.Entity, out var shuttleComponent)) + { + return; + } + + QueueLocalEvent(new FtlCentComAnnounce + { + Source = (ev.Entity, shuttleComponent!) + }); + } + + private static readonly SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks"); + + [ValidatePrototypeId] + private const string StationShuttleConsole = "ComputerShuttle"; + + private void OnShuttleConsoleEmaged(Entity ent, ref GotEmaggedEvent args) + { + if (Prototype(ent)?.ID != StationShuttleConsole) + { + return; + } + + if (!this.IsPowered(ent, EntityManager)) + return; + + var shuttle = Transform(ent).GridUid; + if (!HasComp(shuttle)) + return; + + if (!(HasComp(shuttle) || HasComp(shuttle))) + return; + + _audio.PlayPvs(SparkSound, ent); + _popupSystem.PopupEntity(Loc.GetString("shuttle-console-component-upgrade-emag-requirement"), ent); + args.Handled = true; + EnsureComp(shuttle.Value); // для обновления консоли нужно чтобы компонент был до вызыва RefreshShuttleConsoles + _console.RefreshShuttleConsoles(); + } + + private void OnGridFillChange(bool obj) + { + if (obj) + { + EnsureCentcom(true); + } + } + + private void OnCleanup(RoundRestartCleanupEvent ev) + { + _sawmill.Info("OnCleanup"); + QueueDel(CentComGrid); + CentComGrid = EntityUid.Invalid; + + if (_mapManager.MapExists(CentComMap)) + _mapManager.DeleteMap(CentComMap); + + CentComMap = MapId.Nullspace; + CentComMapUid = EntityUid.Invalid; + ShuttleIndex = 0; + } + + [ValidatePrototypeId] + private const string StationCentComMapPool = "DefaultCentcomPool"; + + [ValidatePrototypeId] + private const string StationCentComMapDefault = "centcommcorvax"; + + + public void EnsureCentcom(bool force = false) + { + if (!_cfg.GetCVar(CCVars.GridFill) && !force) + { + return; + } + + _sawmill.Info("EnsureCentcom"); + if (CentComGrid.IsValid()) + { + return; + } + + _sawmill.Info("Start load centcom"); + + if (CentComMap == MapId.Nullspace) + { + CentComMap = _mapManager.CreateMap(); + } + + CentComMapUid = _mapManager.GetMapEntityId(CentComMap); + + var mapId = _stationCentComMapPool.Pick(); + if (!_prototypeManager.TryIndex(mapId, out var map)) + { + mapId = StationCentComMapDefault; + map = _prototypeManager.Index(StationCentComMapDefault); + } + + + var ent = _gameTicker.LoadGameMap( + map, CentComMap, new MapLoadOptions() + { + LoadMap = false + }, "Central Command").FirstOrNull(HasComp); + + _metaDataSystem.SetEntityName(_mapManager.GetMapEntityId(CentComMap), "CentCom"); + + if (ent != null) + { + CentComGrid = ent.Value; + if (_shuttle.TryAddFTLDestination(CentComMap, true, out var ftl)) + { + DisableFtl((CentComMapUid,ftl)); + } + } + else + { + _sawmill.Warning("No CentComm map found, skipping setup."); + return; + } + + var q = EntityQueryEnumerator(); + while (q.MoveNext(out var station)) + { + station.MapEntity = CentComMapUid; + station.Entity = CentComGrid; + station.ShuttleIndex = ShuttleIndex; + } + } + + // ReSharper disable once MemberCanBePrivate.Global + public void DisableFtl(Entity ent) + { + var d = new EntityWhitelist(); + d.RequireAll = false; + d.Components = new[] { "AllowFtlToCentCom" }; + d.UpdateRegistrations(); + _shuttle.SetFTLWhitelist(ent, d); + } + + public void EnableFtl(Entity ent) + { + _shuttle.SetFTLWhitelist(ent, null); + } + + private void OnCentComInit(RoundStartingEvent ev) + { + { + return; + } + } + + private void OnPreGameMapLoad(PreGameMapLoad ev) + { + if (!_stationCentComMapPool.Weights.ContainsKey(ev.GameMap.ID)) + { + if(ev.GameMap.ID != StationCentComMapDefault) // fallback + return; + } + + ev.Options.Offset = new Vector2(0, 0); + } + + private void OnFtlActionUsed(EntityUid uid, ActorComponent component, CentcomFtlAction args) + { + var grid = Transform(args.Performer); + if (grid.GridUid == null) + { + return; + } + + if (!TryComp(args.Performer, out var pilotComponent) || pilotComponent.Console == null) + { + _popup.PopupEntity(Loc.GetString("centcom-ftl-action-no-pilot"), args.Performer, args.Performer); + return; + } + + TransformComponent shuttle; + + if (TryComp(pilotComponent.Console, out var droneConsoleComponent) && + droneConsoleComponent.Entity != null) + { + shuttle = Transform(droneConsoleComponent.Entity.Value); + } + else + { + shuttle = grid; + } + + + if (!TryComp(shuttle.GridUid, out var comp) || HasComp(shuttle.GridUid) || ( + HasComp(shuttle.GridUid) && + !( + HasComp(shuttle.GridUid) || + HasComp(shuttle.GridUid) + ) + )) + { + return; + } + + var stationUid = _stationSystem.GetStations().FirstOrNull(HasComp); + + if (!TryComp(stationUid, out var centcomm) || + centcomm.Entity == null || !centcomm.Entity.Value.IsValid() || Deleted(centcomm.Entity)) + { + _popup.PopupEntity(Loc.GetString("centcom-ftl-action-no-station"), args.Performer, args.Performer); + return; + } +/* + if (shuttle.MapUid == centcomm.MapEntity) + { + _popup.PopupEntity(Loc.GetString("centcom-ftl-action-at-centcomm"), args.Performer, args.Performer); + return; + } +*/ + if (!_shuttleSystem.CanFTL(shuttle.GridUid.Value, out var reason)) + { + _popup.PopupEntity(reason, args.Performer, args.Performer); + return; + } + + _shuttleSystem.FTLToDock(shuttle.GridUid.Value, comp, centcomm.Entity.Value); + } +} diff --git a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs index 8dcbf191b36..f251afed936 100644 --- a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs +++ b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs @@ -1,10 +1,15 @@ +using System.Linq; using Content.Server.Objectives.Components; using Content.Server.Revolutionary.Components; using Content.Server.Shuttles.Systems; +using Content.Server.Station.Components; using Content.Shared.CCVar; using Content.Shared.Mind; using Content.Shared.Objectives.Components; +using Content.Shared.Roles; +using Content.Shared.Roles.Jobs; using Robust.Shared.Configuration; +using Robust.Shared.Prototypes; using Robust.Shared.Random; namespace Content.Server.Objectives.Systems; @@ -19,6 +24,10 @@ public sealed class KillPersonConditionSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedMindSystem _mind = default!; [Dependency] private readonly TargetObjectiveSystem _target = default!; + [Dependency] private readonly SharedRoleSystem _roleSystem = default!; + [Dependency] private readonly IPrototypeManager _prototype = default!; + + private static readonly ProtoId _ccDep = "CentCom"; public override void Initialize() { @@ -60,9 +69,41 @@ private void OnPersonAssigned(EntityUid uid, PickRandomPersonComponent comp, ref return; } + // start-backmen: centcom + FilterCentCom(allHumans); + + if (allHumans.Count == 0) + { + args.Cancelled = true; + return; + } + // end-backmen: centcom + _target.SetTarget(uid, _random.Pick(allHumans), target); + } + // start-backmen: centcom + private void FilterCentCom(List minds) + { + var centcom = _prototype.Index(_ccDep); + foreach (var mindId in minds.ToArray()) + { + if (!TryComp(mindId, out var job) || job.Prototype == null) + { + continue; + } + + if (!centcom.Roles.Contains(job.Prototype)) + { + continue; + } + + minds.Remove(mindId); + } + } + // end-backmen: centcom + private void OnHeadAssigned(EntityUid uid, PickRandomHeadComponent comp, ref ObjectiveAssignedEvent args) { // invalid prototype @@ -84,6 +125,16 @@ private void OnHeadAssigned(EntityUid uid, PickRandomHeadComponent comp, ref Obj return; } + // start-backmen: centcom + FilterCentCom(allHumans); + + if (allHumans.Count == 0) + { + args.Cancelled = true; + return; + } + // end-backmen: centcom + var allHeads = new List(); foreach (var person in allHumans) { diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index 6c4bdc08148..e4e4ba175f7 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -35,6 +35,7 @@ using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Player; +using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -69,6 +70,8 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem [Dependency] private readonly StationSystem _station = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; + [Dependency] private readonly Content.Server.Backmen.Arrivals.CentcommSystem _centcommSystem = default!; + private const float ShuttleSpawnBuffer = 1f; @@ -81,13 +84,14 @@ public override void Initialize() { _emergencyShuttleEnabled = _configManager.GetCVar(CCVars.EmergencyShuttleEnabled); // Don't immediately invoke as roundstart will just handle it. - Subs.CVar(_configManager, CCVars.EmergencyShuttleEnabled, SetEmergencyShuttleEnabled); + + //Subs.CVar(_configManager, CCVars.EmergencyShuttleEnabled, SetEmergencyShuttleEnabled); + _configManager.OnValueChanged(CCVars.EmergencyShuttleEnabled, value => SetEmergencyShuttleEnabled(value), true); SubscribeLocalEvent(OnRoundStart); - SubscribeLocalEvent(OnRoundCleanup); - SubscribeLocalEvent(OnStationStartup); - SubscribeLocalEvent(OnCentcommShutdown); - SubscribeLocalEvent(OnStationInit); + SubscribeLocalEvent(OnStationStartup); + //SubscribeLocalEvent(OnCentcommShutdown); // backmen: centcom + SubscribeLocalEvent(OnCentcommInit); SubscribeLocalEvent(OnEmergencyFTL); SubscribeLocalEvent(OnEmergencyFTLComplete); @@ -495,90 +499,27 @@ private void SetupEmergencyShuttle() } } - private void AddCentcomm(EntityUid station, StationCentcommComponent component) +// start-backmen: centcom + private void AddCentcomm(StationCentcommComponent component) { - DebugTools.Assert(LifeStage(station) >= EntityLifeStage.MapInitialized); - if (component.MapEntity != null || component.Entity != null) - { - Log.Warning("Attempted to re-add an existing centcomm map."); - return; - } - - // Check for existing centcomms and just point to that - var query = AllEntityQuery(); - while (query.MoveNext(out var otherComp)) - { - if (otherComp == component) - continue; - - if (!Exists(otherComp.MapEntity) || !Exists(otherComp.Entity)) - { - Log.Error($"Discovered invalid centcomm component?"); - ClearCentcomm(otherComp); - continue; - } - - component.MapEntity = otherComp.MapEntity; - component.Entity = otherComp.Entity; - component.ShuttleIndex = otherComp.ShuttleIndex; - return; - } - - if (string.IsNullOrEmpty(component.Map.ToString())) - { - Log.Warning("No CentComm map found, skipping setup."); - return; - } - - var map = _mapSystem.CreateMap(out var mapId); - var grid = _map.LoadGrid(mapId, component.Map.ToString(), new MapLoadOptions() - { - LoadMap = false, - }); - - if (!Exists(map)) - { - Log.Error($"Failed to set up centcomm map!"); - QueueDel(grid); - return; - } - - if (!Exists(grid)) - { - Log.Error($"Failed to set up centcomm grid!"); - QueueDel(map); - return; - } + var centcom = EntityManager.System(); - var xform = Transform(grid.Value); - if (xform.ParentUid != map || xform.MapUid != map) - { - Log.Error($"Centcomm grid is not parented to its own map?"); - QueueDel(map); - QueueDel(grid); - return; - } - - component.MapEntity = map; - _metaData.SetEntityName(map, Loc.GetString("map-name-centcomm")); - component.Entity = grid; - _shuttle.TryAddFTLDestination(mapId, true, out _); - Log.Info($"Created centcomm grid {ToPrettyString(grid)} on map {ToPrettyString(map)} for station {ToPrettyString(station)}"); + centcom.EnsureCentcom(true); + component.MapEntity = centcom.CentComMapUid; + component.Entity = centcom.CentComGrid; + component.ShuttleIndex = centcom.ShuttleIndex; } public HashSet GetCentcommMaps() { - var query = AllEntityQuery(); - var maps = new HashSet(Count()); + var maps = new HashSet(); - while (query.MoveNext(out var comp)) - { - if (comp.MapEntity != null) - maps.Add(comp.MapEntity.Value); - } + if(_centcommSystem.CentComMapUid.IsValid()) + maps.Add(_centcommSystem.CentComMapUid); return maps; } +// end-backmen: centcom private void AddEmergencyShuttle(Entity ent) { @@ -622,18 +563,8 @@ private void AddEmergencyShuttle(Entity(shuttle.Value).LocalAABB.Width + ShuttleSpawnBuffer; - - // Update indices for all centcomm comps pointing to same map - var query = AllEntityQuery(); - - while (query.MoveNext(out var comp)) - { - if (comp == ent.Comp2 || comp.MapEntity != ent.Comp2.MapEntity) - continue; - - comp.ShuttleIndex = ent.Comp2.ShuttleIndex; - } + centcomm.ShuttleIndex = _centcommSystem.ShuttleIndex; + _centcommSystem.ShuttleIndex += _mapManager.GetGrid(shuttle.Value).LocalAABB.Width + ShuttleSpawnBuffer; ent.Comp1.EmergencyShuttle = shuttle; EnsureComp(shuttle.Value); diff --git a/Content.Shared/Access/Components/IdCardConsoleComponent.cs b/Content.Shared/Access/Components/IdCardConsoleComponent.cs index 4f1c27fb4d3..7c6da919fc2 100644 --- a/Content.Shared/Access/Components/IdCardConsoleComponent.cs +++ b/Content.Shared/Access/Components/IdCardConsoleComponent.cs @@ -10,8 +10,8 @@ namespace Content.Shared.Access.Components; [Access(typeof(SharedIdCardConsoleSystem))] public sealed partial class IdCardConsoleComponent : Component { - public const int MaxFullNameLength = 30; - public const int MaxJobTitleLength = 30; + public const int MaxFullNameLength = 64; + public const int MaxJobTitleLength = 64; public static string PrivilegedIdCardSlotId = "IdCardConsole-privilegedId"; public static string TargetIdCardSlotId = "IdCardConsole-targetId"; diff --git a/Content.Shared/Backmen/Abilities/CentcomFTLAction.cs b/Content.Shared/Backmen/Abilities/CentcomFTLAction.cs new file mode 100644 index 00000000000..4726504f5cc --- /dev/null +++ b/Content.Shared/Backmen/Abilities/CentcomFTLAction.cs @@ -0,0 +1,8 @@ +using Content.Shared.Actions; + +namespace Content.Shared.Backmen.Abilities; + +public sealed partial class CentcomFtlAction : InstantActionEvent +{ + +} diff --git a/Content.Shared/Backmen/Shuttles/Components/CentcommShuttleComponent.cs b/Content.Shared/Backmen/Shuttles/Components/CentcommShuttleComponent.cs new file mode 100644 index 00000000000..f68f2f63df5 --- /dev/null +++ b/Content.Shared/Backmen/Shuttles/Components/CentcommShuttleComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Shared.Backmen.Shuttles.Components; + +[RegisterComponent] +public sealed partial class CentcommShuttleComponent : Component +{ + +} diff --git a/Content.Shared/_CorvaxNext/CentComm/AllowFtlToCentComComponent.cs b/Content.Shared/_CorvaxNext/CentComm/AllowFtlToCentComComponent.cs new file mode 100644 index 00000000000..84f27ade33b --- /dev/null +++ b/Content.Shared/_CorvaxNext/CentComm/AllowFtlToCentComComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._FishStation.CentComm; + +[RegisterComponent, NetworkedComponent] +public sealed partial class AllowFtlToCentComComponent : Component +{ + +} diff --git a/Resources/Locale/ru-RU/backmen/actions/centcomm_actions.ftl b/Resources/Locale/ru-RU/backmen/actions/centcomm_actions.ftl new file mode 100644 index 00000000000..b218b75ede1 --- /dev/null +++ b/Resources/Locale/ru-RU/backmen/actions/centcomm_actions.ftl @@ -0,0 +1,5 @@ +centcom-ftl-action-at-centcomm = Вы уже находитесь на ЦентКомме +centcom-ftl-action-no-station = Станция ЦентКомма не найдена +centcom-ftl-action-no-pilot = Вы не пилотируете шаттл +centcom-ftl-action-name = Ключ навигации ЦентКомма +centcom-ftl-action-description = Позволяет совершить прыжок на станцию ЦентКомма diff --git a/Resources/Prototypes/Backmen/Entities/Markers/Spawners/jobs.yml b/Resources/Prototypes/Backmen/Entities/Markers/Spawners/jobs.yml new file mode 100644 index 00000000000..5db3f183456 --- /dev/null +++ b/Resources/Prototypes/Backmen/Entities/Markers/Spawners/jobs.yml @@ -0,0 +1,23 @@ +- type: entity + id: SpawnPointCCOperator + parent: SpawnPointJobBase + name: ЦК Оператор + components: + - type: SpawnPoint + job_id: CCOperator + - type: Sprite + layers: + - state: green + - state: captain + +- type: entity + id: SpawnPointCCSecurity + parent: SpawnPointJobBase + name: ЦК Охрана + components: + - type: SpawnPoint + job_id: CCSecurity + - type: Sprite + layers: + - state: green + - state: captain diff --git a/Resources/Prototypes/Backmen/Roles/play_time_trackers.yml b/Resources/Prototypes/Backmen/Roles/play_time_trackers.yml new file mode 100644 index 00000000000..f0bdc69734e --- /dev/null +++ b/Resources/Prototypes/Backmen/Roles/play_time_trackers.yml @@ -0,0 +1,5 @@ +- type: playTimeTracker + id: JobCentralCommandOperator + +- type: playTimeTracker + id: JobCentralCommandSecurity diff --git a/Resources/Prototypes/Corvax/Roles/Jobs/CentCom/centcom_official.yml b/Resources/Prototypes/Corvax/Roles/Jobs/CentCom/centcom_official.yml new file mode 100644 index 00000000000..6940b72220b --- /dev/null +++ b/Resources/Prototypes/Corvax/Roles/Jobs/CentCom/centcom_official.yml @@ -0,0 +1,78 @@ +- type: job + id: CCOperator + name: Оператор ЦК + description: Оператор Центрального Командования. Истинный бюрократ. + playTimeTracker: JobCentralCommandOperator + setPreference: true + startingGear: CCOperator + icon: "JobIconNanotrasen" + supervisors: job-supervisors-centcom2 # Corvax-JobSupervisors + whitelisted: true + canBeAntag: false + weight: 1 + requireAdminNotify: true + joinNotifyCrew: true + setHideFromConsole: true + accessGroups: + - AllAccess + access: + - CentralCommand + special: + - !type:AddImplantSpecial + implants: [ MindShieldImplant, TrackingImplant ] + +- type: job + id: CCSecurity + name: Служба Безопасности ЦентКом + description: Не звонит вам и не просит последние три цифры с карты. + playTimeTracker: JobCentralCommandSecurity + setPreference: true + startingGear: OfficerCentCom + icon: "JobIconNanotrasen" + supervisors: job-supervisors-centcom2 # Corvax-JobSupervisors + whitelisted: true + canBeAntag: false + weight: 1 + requireAdminNotify: true + joinNotifyCrew: true + setHideFromConsole: true + accessGroups: + - AllAccess + access: + - CentralCommand + special: + - !type:AddImplantSpecial + implants: [ MindShieldImplant, TrackingImplant ] + +- type: startingGear + id: Operator + equipment: + jumpsuit: ClothingUniformJumpsuitCentcomOfficer + back: ClothingBackpackFilled + shoes: ClothingShoesBootsJack + eyes: ClothingEyesGlassesSunglasses + head: ClothingHeadHatBeretCentcomNaval + id: CentcomPDA + ears: ClothingHeadsetCentCom + pocket1: PenCentcom + pocket2: BoxFolderCentComClipboard + gloves: ClothingHandsGlovesCombat + satchel: ClothingBackpackSatchelFilled + duffelbag: ClothingBackpackDuffelFilled + +- type: startingGear + id: OfficerCentCom + equipment: + jumpsuit: ClothingUniformJumpsuitHoSAlt + back: ClothingBackpackFilled + mask: ClothingMaskGasSecurity + shoes: ClothingShoesBootsJack + eyes: ClothingEyesGlassesSecurity + gloves: ClothingHandsGlovesCombat + outerClothing: ClothingOuterArmorBasic + suitstorage: WeaponPistolMk58 + head: ClothingHeadHatBeretHoS + id: CentcomPDA + ears: ClothingHeadsetCentCom + belt: ClothingBeltSecurity + pocket2: MagazinePistol diff --git a/Resources/Prototypes/Corvax/Roles/Jobs/Command/centcom_admiral.yml b/Resources/Prototypes/Corvax/Roles/Jobs/Command/centcom_admiral.yml deleted file mode 100644 index a652fc346ea..00000000000 --- a/Resources/Prototypes/Corvax/Roles/Jobs/Command/centcom_admiral.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Just equipment preset, no custom role - -- type: startingGear - id: CentcomAdmiralGear - equipment: - jumpsuit: ClothingUniformJumpsuitCentcomAdmiral - shoes: ClothingShoesBootsJack - head: ClothingHeadCapCentcomNaval - eyes: ClothingEyesGlassesSunglasses - gloves: ClothingHandsGlovesCentcomNaval - outerClothing: ClothingOuterArmorCentcomCarapace - neck: ClothingNeckCloakCentcomAdmiral - id: CentcomPDA - ears: ClothingHeadsetCentCom - pocket1: RubberStampCentcom diff --git a/Resources/Prototypes/Corvax/Roles/Jobs/departments.yml b/Resources/Prototypes/Corvax/Roles/Jobs/departments.yml new file mode 100644 index 00000000000..d01d0e9e767 --- /dev/null +++ b/Resources/Prototypes/Corvax/Roles/Jobs/departments.yml @@ -0,0 +1,8 @@ +- type: department + id: Центральное Командование + description: Лучшие из лучших. Только по вайтлисту. + color: "#13db0f" + roles: + - CCSecurity + - CCOperator + - CCIntern diff --git a/Resources/Prototypes/Entities/Stations/nanotrasen.yml b/Resources/Prototypes/Entities/Stations/nanotrasen.yml index c2a4bfb11a8..4181cfa85f2 100644 --- a/Resources/Prototypes/Entities/Stations/nanotrasen.yml +++ b/Resources/Prototypes/Entities/Stations/nanotrasen.yml @@ -36,7 +36,11 @@ - BaseStation - BaseStationAlertLevels - BaseStationNanotrasen - categories: [ HideSpawnMenu ] + - BaseStationCargo #Backmen + - BaseStationJobsSpawning #Backmen + - BaseStationRecords #Backmen + - BaseStationShuttles #Backmen + noSpawn: true components: - type: Transform diff --git a/Resources/Prototypes/Maps/centcomm.yml b/Resources/Prototypes/Maps/centcomm.yml index 47dc5ca1f3e..328d193a295 100644 --- a/Resources/Prototypes/Maps/centcomm.yml +++ b/Resources/Prototypes/Maps/centcomm.yml @@ -1,10 +1,10 @@ - type: gameMap - id: CentComm + id: centcommcorvax mapName: 'Central Command' - mapPath: /Maps/centcomm.yml - minPlayers: 10 + mapPath: /Maps/corvax_centcomm.yml + minPlayers: 0 stations: - centcomm: + centcommcorvax: stationProto: NanotrasenCentralCommand components: - type: StationNameSetup @@ -12,3 +12,7 @@ nameGenerator: !type:NanotrasenNameGenerator prefixCreator: 'TG' + - type: StationJobs + availableJobs: + CCOperator: [ 2, 2] + CCSecurity: [ 3, 3] diff --git a/Resources/Prototypes/_CorvaxNext/centcomm_pool.yml b/Resources/Prototypes/_CorvaxNext/centcomm_pool.yml new file mode 100644 index 00000000000..b71bb291523 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/centcomm_pool.yml @@ -0,0 +1,6 @@ +- type: weightedRandom + id: DefaultCentcomPool + weights: + centcommcorvax: 1 +# CentCommv2: 0.35 // soon +# CentCommv3: 0.7 // soon diff --git a/Resources/Prototypes/_CorvaxNext/idcardconsole.yml b/Resources/Prototypes/_CorvaxNext/idcardconsole.yml new file mode 100644 index 00000000000..e2e6e5fad0d --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/idcardconsole.yml @@ -0,0 +1,60 @@ +- type: entity + parent: ComputerId + id: CCComputerId + name: Консоль ID карт ЦК + description: Terminal for programming Nanotrasen employee ID cards to access parts of the station. + components: + - type: IdCardConsole + accessLevels: + - CentralCommand + - Armory + - Atmospherics + - Bar + - Brig + - Blueshield + - Detective + - Captain + - Cargo + - Chapel + - Chemistry + - ChiefEngineer + - ChiefMedicalOfficer + - Command + - Cryogenics + - Engineering + - External + - HeadOfPersonnel + - HeadOfSecurity + - Hydroponics + - Janitor + - Kitchen + - Lawyer + - Magistrat + - Maintenance + - Medical + - NanotrasenRepresentive + - Quartermaster + - Research + - ResearchDirector + - Salvage + - Security + - Service + - Theatre + privilegedIdSlot: + name: id-card-console-privileged-id + ejectSound: /Audio/Machines/id_swipe.ogg + insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - IdCard + targetIdSlot: + name: id-card-console-target-id + ejectSound: /Audio/Machines/id_swipe.ogg + insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + ejectOnBreak: true + swap: false + whitelist: + components: + - IdCard diff --git a/Resources/Textures/Interface/Misc/job_icons.rsi/Nanotrasen.png b/Resources/Textures/Interface/Misc/job_icons.rsi/Nanotrasen.png index ff24b4c04c1..8a0814ffb50 100644 Binary files a/Resources/Textures/Interface/Misc/job_icons.rsi/Nanotrasen.png and b/Resources/Textures/Interface/Misc/job_icons.rsi/Nanotrasen.png differ