Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Doublechest committed Jul 10, 2024
1 parent 4bde71b commit 8f309d0
Show file tree
Hide file tree
Showing 409 changed files with 69,528 additions and 1,220 deletions.
5 changes: 3 additions & 2 deletions Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ private bool TryPilot(EntityUid user, EntityUid uid)
{
if (!_tags.HasTag(user, "CanPilot") ||
!TryComp<ShuttleConsoleComponent>(uid, out var component) ||
!this.IsPowered(uid, EntityManager) ||
!Transform(uid).Anchored ||
// !this.IsPowered(uid, EntityManager) || Stories
// !Transform(uid).Anchored || Stories
!_blocker.CanInteract(user, uid))
{
Logger.Error("111");
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Station/Systems/StationSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public Filter GetInOwningStation(EntityUid source, float range = 32f)
/// <summary>
/// Retrieves a filter for everything in a particular station or near its member grids.
/// </summary>
public Filter GetInStation(StationDataComponent dataComponent, float range = 32f)
public Filter GetInStation(StationDataComponent dataComponent, float range = 256f) // Stories. Маппил, а оказалось, что консоль связи должна быть не дальше 32. Увеличим.
{
// Could also use circles if you wanted.
var bounds = new ValueList<Box2>(dataComponent.Grids.Count);
Expand Down
17 changes: 17 additions & 0 deletions Content.Server/Stories/Prison/Components/PrisonComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Content.Server.Stories.Prison;

[RegisterComponent]
public sealed partial class PrisonComponent : Component
{
/// <summary>
/// Станция, к которой приписана тюрьма.
/// </summary>
[DataField]
public EntityUid? Station;

/// <summary>
/// Тюремные шаттлы.
/// </summary>
[DataField]
public List<EntityUid> Shuttles = new();
}
11 changes: 11 additions & 0 deletions Content.Server/Stories/Prison/Components/PrisonShuttleComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Content.Server.Stories.Prison;

[RegisterComponent]
public sealed partial class PrisonShuttleComponent : Component
{
/// <summary>
/// Тюрьма, которой принадлежит шаттл.
/// </summary>
[DataField]
public EntityUid? Prison;
}
17 changes: 17 additions & 0 deletions Content.Server/Stories/Prison/Components/StationPrisonComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Content.Server.Maps;
using Robust.Shared.Prototypes;

namespace Content.Server.Stories.Prison;

[RegisterComponent]
public sealed partial class StationPrisonComponent : Component
{
[DataField]
public ProtoId<GameMapPrototype> GameMap = "StoriesPrison";

/// <summary>
/// Тюрьма, приписанная к станции.
/// </summary>
[DataField]
public EntityUid? Prison;
}
55 changes: 55 additions & 0 deletions Content.Server/Stories/Prison/PrisonSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Content.Server.GameTicking;
using Content.Server.Station.Systems;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;

namespace Content.Server.Stories.Prison;

public sealed partial class PrisonSystem : EntitySystem
{
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly MapSystem _map = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly StationSystem _station = default!;
private ISawmill _sawmill = default!;

public override void Initialize()
{
_sawmill = Logger.GetSawmill("prison");
SubscribeLocalEvent<StationPrisonComponent, MapInitEvent>(OnStationInit);
}

private void OnStationInit(EntityUid uid, StationPrisonComponent component, MapInitEvent args)
{
var prototype = _prototypeManager.Index(component.GameMap);

_map.CreateMap(out var mapId, false);
_gameTicker.LoadGameMap(prototype, mapId, null);

var prison = _station.GetStationInMap(mapId);

if (prison == null)
{
_mapManager.DeleteMap(mapId);
_sawmill.Error("Failed to find prison station");
return;
}

var prisonComp = EnsureComp<PrisonComponent>(prison.Value);
prisonComp.Station = uid;
component.Prison = prison;

// Тюремные шаттлы могут быть на карте.
foreach (var grid in _mapManager.GetAllGrids(mapId))
if (TryComp<PrisonShuttleComponent>(grid.Owner, out var shuttle))
{
_station.AddGridToStation(prison.Value, grid.Owner);
shuttle.Prison = component.Prison;
prisonComp.Shuttles.Add(grid.Owner);
}

_mapManager.DoMapInitialize(mapId);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ent-ClothingBackpackSpacePrisonFilled = { ent-ClothingBackpackSpacePrison }
.desc = { ent-ClothingBackpackSpacePrison.desc }
ent-ClothingBackpackJediNtFilled = { ent-ClothingBackpackJediNt }
.desc = { ent-ClothingBackpackJediNt.desc }
ent-ClothingBackpackIAAFilled = { ent-ClothingBackpack }
.desc = { ent-ClothingBackpack.desc }
ent-ClothingBackpackPsychologistFilled = { ent-ClothingBackpackMedical }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ent-ClothingBackpackDuffelSpacePrisonFilled = { ent-ClothingBackpackDuffelSpacePrison }
.desc = { ent-ClothingBackpackDuffelSpacePrison.desc }
ent-ClothingBackpackDuffelIAAFilled = { ent-ClothingBackpackDuffel }
.desc = { ent-ClothingBackpackDuffel.desc }
ent-ClothingBackpackDuffelPsychologistFilled = { ent-ClothingBackpackDuffelMedical }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
ent-LockerJediNtFilled = { ent-LockerJediNt }
.suffix = Заполненный
.desc = { ent-LockerJediNt.desc }

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
ent-ClothingHeadsetIAA = гарнитура АВД
.desc = Гарнитура агента внутренних дел, чтобы услышать последние слова капитана.
ent-ClothingHeadsetPrison = гарнитура космической тюрьмы
.desc = Гарнитура, используемая сотрудниками космической тюрьмы.
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
ent-ClothingHeadsetJediNtAlt = полноразмерная гарнитура стража клинка
.desc = Почему тут нет командной частоты?
ent-ClothingHeadsetPrisonAlt = полноразмерная гарнитура ГКТ
.desc = { ent-ClothingHeadsetAlt.desc }
.desc = Почему тут нет командной частоты?

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
ent-ClothingOuterCoatJedi = накидка джедая
.desc = Длинный вид одежды, который свободно лежит на плечах, охватывая шею, но не имеет капюшона.
ent-ClothingOuterCoatHoSP = пальто начальника космической тюрьмы
.desc = Прочное холщовое пальто, разработанное и созданное компанией TX Fabrication Corp. Его ношение заставляет сочувствовать судьбе тибетцев.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@ ent-ClothingUniformJumpsuitJedi = роба джедая
.desc = Свободная роба, носимая членами Ордена джедаев.
ent-ClothingUniformJumpsuitJediNt = униформа стража клинка
.desc = Специальная униформа никак не повышающая точность владения мечом.
ent-ClothingUniformJumpsuitSP = комбинезон космической тюрьмы
.desc = Комбинезон из прочного материала, обеспечивающий надежную защиту.
ent-ClothingUniformJumpsuitHoSP = комбинезон главы космической тюрьмы
.desc = Комбинезон из прочного материала, обеспечивающий надежную защиту.
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
ent-EncryptionKeyIAA = ключ шифрования авд
.desc = Ключ шифрования, используемый самым дотошным человеком.
ent-EncryptionKeyPrison = ключ шифрования космической тюрьмы
.desc = Ключ шифрования
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
ent-JediNtPDA = КПК стража клинка
.desc = Черный, чтобы скрыть повреждения от неправильного использования светового меча.
ent-HeadOfSPPDA = КПК главы космической тюрьмы
.desc = Синий, чтобы скрыть пятна крови пассажира.
ent-SpacePrisonOfficerPDA = КПК офицера космической тюрьмы
.desc = Синий, чтобы скрыть пятна крови пассажира.
ent-SpacePrisonEngineerPDA = КПК инженера космической тюрьмы
.desc = Синий, чтобы скрыть пятна крови пассажира.
ent-SpacePrisonMedicPDA = КПК медика космической тюрьмы
.desc = Синий, чтобы скрыть пятна крови пассажира.
ent-IAAPDA = КПК агента внутрених дел
.desc = Корпорация и прибыль - лучшие друзья.
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
ent-HeadOfSPIDCard = ID карта главы космической тюрьмы
.desc = { ent-IDCardStandard.desc }
ent-SpacePrisonOfficerIDCard = ID карта офицера космической тюрьмы
.desc = { ent-HeadOfSPIDCard.desc }
ent-SpacePrisonEngineerIDCard = ID карта инженера космической тюрьмы
.desc = { ent-HeadOfSPIDCard.desc }
ent-SpacePrisonMedicIDCard = ID карта медика космической тюрьмы
.desc = { ent-HeadOfSPIDCard.desc }
ent-IAAIDCard = ID карта агента внутрених дел
.desc = { ent-HeadOfSPIDCard.desc }
.desc = { ent-PRISONIDCardHeadOfPrison.desc }
ent-JediNtIDCard = ID карта стража клинка
.desc = Карта, необходимая для доступа в различные области станции.
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ent-RubberStampHoSP = печать главы космической тюрьмы
.suffix = НЕ МАППИТЬ
.desc = { ent-RubberStampBase.desc }
ent-RubberStampIAA = печать агента внутрених дел
.suffix = НЕ МАППИТЬ
.desc = { ent-RubberStampBase.desc }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
ent-HoSPSabre = сабля главы космической тюрьмы
.desc = Парадное оружие, принадлежащее главе космической тюрьмы.
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
ent-LockerJediNt = шкаф стража клинка
.desc = Арсенал моды каждого стража клинка.
ent-LockerSpacePrison = шкаф офицера космической тюрьмы
.desc = { ent-LockerBaseSecure.desc }
ent-LockerWardenOfSP = шкаф главы космической тюрьмы
.desc = { ent-LockerSpacePrison.desc }
2 changes: 1 addition & 1 deletion Resources/Locale/ru-RU/stories/job/department.ftl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
department-SpacePrison = Космическая Тюрьма
department-Prison = Космическая Тюрьма
12 changes: 4 additions & 8 deletions Resources/Locale/ru-RU/stories/job/job-names.ftl
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
job-name-hosp = глава космической тюрьмы
job-name-space-prison-officer = офицер космической тюрьмы
job-name-space-prison-engineer = инженер космической тюрьмы
job-name-space-prison-medic = медик космической тюрьмы
job-name-iaa = агент внутрених дел
# Role timers - Make these alphabetical or I cut you
JobHeadOfSpacePrison = глава космической тюрьмы
JobSpacePrisonOfficer = офицер космической тюрьмы
JobSpacePrisonEngineer = инженер космической тюрьмы
JobSpacePrisonMedic = медик космической тюрьмы
JobHeadOfSpacePrison = глава тюрьмы
JobSpacePrisonOfficer = офицер тюрьмы
JobSpacePrisonEngineer = инженер тюрьмы
JobSpacePrisonMedic = медик тюрьмы
JobIAA = агент внутрених дел
1 change: 0 additions & 1 deletion Resources/Locale/ru-RU/stories/job/job-supervisors.ftl
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
job-supervisors-hosp = главе космической тюрьмы
1 change: 0 additions & 1 deletion Resources/Locale/ru-RU/stories/paper/stamp-component.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
stamp-component-stamped-name-hosp = Глава космической тюрьмы
stamp-component-stamped-name-iaa = Агент внутрених дел
stamp-component-stamped-name-psychologist = Психолог
Loading

0 comments on commit 8f309d0

Please sign in to comment.