diff --git a/Content.Client/LateJoin/LateJoinGui.cs b/Content.Client/LateJoin/LateJoinGui.cs index ac0a7a4aa99..47bdbfa4165 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) // Corvax-Next-Centcomm + ) { var jobList = new BoxContainer { diff --git a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs index f662d6a578c..58dcae5bad1 100644 --- a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs +++ b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs @@ -1,10 +1,15 @@ +using System.Linq; // Corvax-Next-Centcomm using Content.Server.Objectives.Components; using Content.Server.Revolutionary.Components; using Content.Server.Shuttles.Systems; +using Content.Server.Station.Components; // Corvax-Next-Centcomm using Content.Shared.CCVar; using Content.Shared.Mind; using Content.Shared.Objectives.Components; +using Content.Shared.Roles; // Corvax-Next-Centcomm +using Content.Shared.Roles.Jobs; // Corvax-Next-Centcomm using Robust.Shared.Configuration; +using Robust.Shared.Prototypes; // Corvax-Next-Centcomm 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!; // Corvax-Next-Centcomm + [Dependency] private readonly IPrototypeManager _prototype = default!; // Corvax-Next-Centcomm + + private static readonly ProtoId _ccDep = "CentralCommandCorvax"; // Corvax-Next-Centcomm public override void Initialize() { @@ -60,9 +69,41 @@ private void OnPersonAssigned(EntityUid uid, PickRandomPersonComponent comp, ref return; } + // Corvax-Next-Centcomm-Start + FilterCentCom(allHumans); + + if (allHumans.Count == 0) + { + args.Cancelled = true; + return; + } + // Corvax-Next-Centcomm-End + _target.SetTarget(uid, _random.Pick(allHumans), target); + } + // Corvax-Next-Centcomm-Start + private void FilterCentCom(List minds) + { + var centcom = _prototype.Index(_ccDep); + foreach (var mindId in minds.ToArray()) + { + if (!_roleSystem.MindHasRole(mindId, out var job) || job.Value.Comp1.JobPrototype == null) + { + continue; + } + + if (!centcom.Roles.Contains(job.Value.Comp1.JobPrototype.Value)) + { + continue; + } + + minds.Remove(mindId); + } + } + // Corvax-Next-Centcomm-End + 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; } + // Corvax-Next-Centcomm-Start + FilterCentCom(allHumans); + + if (allHumans.Count == 0) + { + args.Cancelled = true; + return; + } + // Corvax-Next-Centcomm-End + var allHeads = new HashSet>(); foreach (var person in allHumans) { diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index 6c4bdc08148..88f18ad0307 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; // Corvax-Next-Centcomm 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._CorvaxNext.Arrivals.CentcommSystem _centcommSystem = default!; // Corvax-Next-Centcomm + private const float ShuttleSpawnBuffer = 1f; @@ -86,7 +89,7 @@ public override void Initialize() SubscribeLocalEvent(OnRoundStart); SubscribeLocalEvent(OnRoundCleanup); SubscribeLocalEvent(OnStationStartup); - SubscribeLocalEvent(OnCentcommShutdown); + //SubscribeLocalEvent(OnCentcommShutdown);// Corvax-Next-Centcomm SubscribeLocalEvent(OnStationInit); SubscribeLocalEvent(OnEmergencyFTL); @@ -396,6 +399,8 @@ public void AnnounceShuttleDock(ShuttleDockResult result, bool extended) // TODO: Need filter extensions or something don't blame me. _audio.PlayGlobal(audioFile, Filter.Broadcast(), true); + + _centcommSystem.EnableFtl(_centcommSystem.CentComMapUid); // // Corvax-Next-Centcomm } private void OnStationInit(EntityUid uid, StationCentcommComponent component, MapInitEvent args) @@ -495,90 +500,34 @@ private void SetupEmergencyShuttle() } } +// Corvax-Next-Centcomm-Start private void AddCentcomm(EntityUid station, StationCentcommComponent component) { - DebugTools.Assert(LifeStage(station) >= EntityLifeStage.MapInitialized); + var centcom = EntityManager.System(); + 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; - } + centcom.EnsureCentcom(true); - 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 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)}"); + component.MapEntity = centcom.CentComMapUid; + component.Entity = centcom.CentComGrid; + component.ShuttleIndex = centcom.ShuttleIndex; + Log.Info($"Attached centcomm grid {ToPrettyString(centcom.CentComGrid)} on map {ToPrettyString(centcom.CentComMapUid)} for station {ToPrettyString(station)}"); } 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; } +// Corvax-Next-Centcomm-End private void AddEmergencyShuttle(Entity ent) { @@ -611,7 +560,7 @@ 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; - } + _centcommSystem.ShuttleIndex += Comp(shuttle.Value).LocalAABB.Width + ShuttleSpawnBuffer; // Corvax-Next-Centcomm + ent.Comp2.ShuttleIndex = _centcommSystem.ShuttleIndex; // Corvax-Next-Centcomm ent.Comp1.EmergencyShuttle = shuttle; EnsureComp(shuttle.Value); diff --git a/Content.Server/_CorvaxNext/Arrivals/CentcommSystem.cs b/Content.Server/_CorvaxNext/Arrivals/CentcommSystem.cs new file mode 100644 index 00000000000..f5a6e6fceca --- /dev/null +++ b/Content.Server/_CorvaxNext/Arrivals/CentcommSystem.cs @@ -0,0 +1,361 @@ +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._CorvaxNext.Abilities; +using Content.Shared._CorvaxNext.CentComm; +using Content.Shared.Cargo.Components; +using Content.Shared.CCVar; +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._CorvaxNext.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!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly EntityLookupSystem _lookup = 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(); + SubscribeLocalEvent(OnFtlActionUsed); + SubscribeLocalEvent(OnPreGameMapLoad, after: new[] { typeof(StationSystem) }); + SubscribeLocalEvent(OnCentComInit, before: new[] { typeof(EmergencyShuttleSystem) }); + SubscribeLocalEvent(OnCentComEndRound); + SubscribeLocalEvent(OnCleanup); + SubscribeLocalEvent(OnFTLCompleted); + SubscribeLocalEvent(OnFtlAnnounce); + SubscribeLocalEvent(OnLoadingMaps); + _cfg.OnValueChanged(CCVars.GridFill, OnGridFillChange); + + _stationCentComMapPool = _prototypeManager.Index(StationCentComMapPool); + } + + private void OnLoadingMaps(LoadingMapsEvent ev) + { + if (!_cfg.GetCVar(CCVars.GridFill)) + return; + EnsureCentcom(true); + } + + private void OnCentComEndRound(RoundEndedEvent ev) + { + if (CentComMapUid.IsValid() && _shuttleSystem.TryAddFTLDestination(CentComMap, true, out var ftl)) + { + EnableFtl((CentComMapUid, ftl)); + } + } + + private readonly HashSet> _iFfConsoleEntities = new(); + private void OnFtlAnnounce(FtlCentComAnnounce ev) + { + if (!CentComGrid.IsValid()) + { + return; // not loaded centcom + } + + var shuttleName = "Неизвестный"; + + _iFfConsoleEntities.Clear(); + _lookup.GetGridEntities(ev.Source, _iFfConsoleEntities); + + foreach (var (owner,iff) in _iFfConsoleEntities) + { + 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 OnGridFillChange(bool obj) + { + if (obj) + { + EnsureCentcom(); + } + } + + private void OnCleanup(RoundRestartCleanupEvent ev) + { + Log.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 = "CorvaxCentcomm"; + + + public void EnsureCentcom(bool force = false) + { + if (!force && (_gameTicker.RunLevel != GameRunLevel.InRound || !_cfg.GetCVar(CCVars.GridFill))) + return; + + Log.Info("EnsureCentcom"); + if (CentComGrid.IsValid()) + { + return; + } + + Log.Info("Start load centcom"); + + if (CentComMap == MapId.Nullspace) + { + CentComMap = _mapManager.CreateMap(); + } + + CentComMapUid = _mapManager.GetMapEntityId(CentComMap); + + var mapId = _stationCentComMapPool.Pick(_random); + 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), Loc.GetString("map-name-centcomm")); + + if (ent == null) + { + Log.Warning("No CentComm map found, skipping setup."); + return; + } + + CentComGrid = ent.Value; + if (_shuttle.TryAddFTLDestination(CentComMap, true, false, false, out var ftl)) + { + ftl.RequireCoordinateDisk = false; + DisableFtl((CentComMapUid, ftl)); + } + + 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) + { + if(!Resolve(ent, ref ent.Comp)) + return; + + var d = new EntityWhitelist + { + RequireAll = false, + Components = new[] { "AllowFtlToCentCom" } + }; + + ent.Comp.RequireCoordinateDisk = false; + ent.Comp.BeaconsOnly = false; + + _shuttle.SetFTLWhitelist(ent, d); + } + + public void EnableFtl(Entity ent) + { + if(!Resolve(ent, ref ent.Comp)) + return; + ent.Comp.RequireCoordinateDisk = false; + ent.Comp.BeaconsOnly = false; + + _shuttle.SetFTLWhitelist(ent, null); + } + + private void OnCentComInit(RoundStartingEvent ev) + { + if (!_cfg.GetCVar(CCVars.GridFill)) + return; + + EnsureCentcom(true); + } + + 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.Shared/_CorvaxNext/Abilities/CentcomFTLAction.cs b/Content.Shared/_CorvaxNext/Abilities/CentcomFTLAction.cs new file mode 100644 index 00000000000..38fabf07e90 --- /dev/null +++ b/Content.Shared/_CorvaxNext/Abilities/CentcomFTLAction.cs @@ -0,0 +1,8 @@ +using Content.Shared.Actions; + +namespace Content.Shared._CorvaxNext.Abilities; + +public sealed partial class CentcomFtlAction : InstantActionEvent +{ + +} diff --git a/Content.Shared/_CorvaxNext/CentComm/AllowFtlToCentComComponent.cs b/Content.Shared/_CorvaxNext/CentComm/AllowFtlToCentComComponent.cs new file mode 100644 index 00000000000..f04b9653a98 --- /dev/null +++ b/Content.Shared/_CorvaxNext/CentComm/AllowFtlToCentComComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._CorvaxNext.CentComm; + +[RegisterComponent, NetworkedComponent] +public sealed partial class AllowFtlToCentComComponent : Component +{ + +} diff --git a/Content.Shared/_CorvaxNext/CentComm/FtlActionComponent.cs b/Content.Shared/_CorvaxNext/CentComm/FtlActionComponent.cs new file mode 100644 index 00000000000..bb1040e5e5e --- /dev/null +++ b/Content.Shared/_CorvaxNext/CentComm/FtlActionComponent.cs @@ -0,0 +1,8 @@ +using Content.Shared.Actions; + +namespace Content.Shared._CorvaxNext.Abilities; + +public sealed partial class CentcomFtlAction : InstantActionEvent +{ + +} diff --git a/Content.Shared/_CorvaxNext/Shuttles/Components/CentcommShuttleComponent.cs b/Content.Shared/_CorvaxNext/Shuttles/Components/CentcommShuttleComponent.cs new file mode 100644 index 00000000000..ec873378aca --- /dev/null +++ b/Content.Shared/_CorvaxNext/Shuttles/Components/CentcommShuttleComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Shared._CorvaxNext.Shuttles.Components; + +[RegisterComponent] +public sealed partial class CentcommShuttleComponent : 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/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/roles/departments.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/roles/departments.ftl new file mode 100644 index 00000000000..4689e7ce738 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/roles/departments.ftl @@ -0,0 +1,2 @@ +department-CentCom-name = Центральное Командование +department-CentCom-desc = Только по вайтлисту. diff --git a/Resources/Maps/Shuttles/ert_corvaxcentcomm.yml b/Resources/Maps/Shuttles/ert_corvaxcentcomm.yml index 20a974fbd5c..19729a2a646 100644 --- a/Resources/Maps/Shuttles/ert_corvaxcentcomm.yml +++ b/Resources/Maps/Shuttles/ert_corvaxcentcomm.yml @@ -561,6 +561,7 @@ entities: chunkSize: 4 - type: GasTileOverlay - type: RadiationGridResistance + - type: AllowFtlToCentCom - type: IFF color: '#02BD58FF' flags: Hide diff --git a/Resources/Maps/corvax_centcomm.yml b/Resources/Maps/corvax_centcomm.yml index 0f6d9f2d64a..706c10d41ca 100644 --- a/Resources/Maps/corvax_centcomm.yml +++ b/Resources/Maps/corvax_centcomm.yml @@ -5837,6 +5837,8 @@ entities: - 0 - 0 chunkSize: 4 + - type: BecomesStation + id: centcommcorvax - uid: 5 components: - type: MetaData @@ -46294,6 +46296,18 @@ entities: - type: Transform pos: 62.5,31.5 parent: 2 +- proto: SpawnPointCCOperator + entities: + - uid: 4942 + components: + - type: Transform + pos: 61.5,26.5 + parent: 2 + - uid: 7129 + components: + - type: Transform + pos: 65.5,26.5 + parent: 2 - proto: SpeedLoaderMagnumAP entities: - uid: 2534 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/Entities/Stations/nanotrasen.yml b/Resources/Prototypes/Entities/Stations/nanotrasen.yml index 09f3bda7075..1dccd0fef49 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..192d7c56400 100644 --- a/Resources/Prototypes/Maps/centcomm.yml +++ b/Resources/Prototypes/Maps/centcomm.yml @@ -1,10 +1,10 @@ - type: gameMap - id: CentComm + id: CorvaxCentcomm 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,6 @@ nameGenerator: !type:NanotrasenNameGenerator prefixCreator: 'TG' + - type: StationJobs + availableJobs: + CCOperator: [ 2, 2] diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Markers/Spawners/jobs.yml b/Resources/Prototypes/_CorvaxNext/Entities/Markers/Spawners/jobs.yml new file mode 100644 index 00000000000..a7c77049278 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Markers/Spawners/jobs.yml @@ -0,0 +1,11 @@ +- type: entity + id: SpawnPointCCOperator + parent: SpawnPointJobBase + name: ЦК Оператор + components: + - type: SpawnPoint + job_id: CCOperator + - type: Sprite + layers: + - state: green + - state: captain diff --git a/Resources/Prototypes/_CorvaxNext/Roles/Jobs/CentCom/centcom_official.yml b/Resources/Prototypes/_CorvaxNext/Roles/Jobs/CentCom/centcom_official.yml new file mode 100644 index 00000000000..6fa1aae38a8 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Roles/Jobs/CentCom/centcom_official.yml @@ -0,0 +1,38 @@ +- type: job + id: CCOperator + name: Оператор ЦК + description: Оператор Центрального Командования. Истинный бюрократ. + playTimeTracker: JobCentralCommandOperator + setPreference: true + startingGear: OperatorGear + 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: OperatorGear + equipment: + jumpsuit: ClothingUniformJumpsuitCentcomOfficer + shoes: ClothingShoesBootsJack + eyes: ClothingEyesGlassesSunglasses + head: ClothingHeadHatBeretCentcomNaval + id: CentcomPDA + ears: ClothingHeadsetCentCom + pocket1: PenCentcom + pocket2: BoxFolderCentComClipboard + gloves: ClothingHandsGlovesCombat + storage: + back: + - Flash diff --git a/Resources/Prototypes/_CorvaxNext/Roles/Jobs/departments.yml b/Resources/Prototypes/_CorvaxNext/Roles/Jobs/departments.yml new file mode 100644 index 00000000000..dceb0486679 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Roles/Jobs/departments.yml @@ -0,0 +1,7 @@ +- type: department + id: CentralCommandCorvax + name: department-CentCom-name + description: department-CentCom-desc + color: "#13db0f" + roles: + - CCOperator diff --git a/Resources/Prototypes/_CorvaxNext/Roles/Jobs/play_time_trackers.yml b/Resources/Prototypes/_CorvaxNext/Roles/Jobs/play_time_trackers.yml new file mode 100644 index 00000000000..a8d4ca5e8e6 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Roles/Jobs/play_time_trackers.yml @@ -0,0 +1,2 @@ +- type: playTimeTracker + id: JobCentralCommandOperator diff --git a/Resources/Prototypes/_CorvaxNext/centcomm_pool.yml b/Resources/Prototypes/_CorvaxNext/centcomm_pool.yml new file mode 100644 index 00000000000..6ec42f0b95a --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/centcomm_pool.yml @@ -0,0 +1,6 @@ +- type: weightedRandom + id: DefaultCentcomPool + weights: + CorvaxCentcomm: 1 +# CentCommv2: 0.35 // soon +# CentCommv3: 0.7 // soon 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