Skip to content

Commit

Permalink
Merge pull request #420 from Xelasto/minorupdate
Browse files Browse the repository at this point in the history
Торговцы
  • Loading branch information
PyotrIgn authored Feb 20, 2024
2 parents 85f0dfc + e4cc130 commit 86ed20d
Show file tree
Hide file tree
Showing 10 changed files with 1,606 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Content.Server.StationEvents.Events;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Server.StationEvents.Components;

[RegisterComponent, Access(typeof(TraderSpawnRule))]
public sealed partial class TraderSpawnRuleComponent : Component
{
[DataField("TraderShuttlePath")]
public string TraderShuttlePath = "Maps/Shuttles/trader.yml";
}
26 changes: 26 additions & 0 deletions Content.Server/ADT/StationEvents/Events/TraderSpawnRule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Robust.Server.GameObjects;
using Robust.Server.Maps;
using Robust.Shared.Map;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.StationEvents.Components;

namespace Content.Server.StationEvents.Events;

public sealed class TraderSpawnRule : StationEventSystem<TraderSpawnRuleComponent>
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly MapLoaderSystem _map = default!;

protected override void Started(EntityUid uid, TraderSpawnRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
base.Started(uid, component, gameRule, args);
var shuttleMap = _mapManager.CreateMap();
var options = new MapLoadOptions
{
LoadMap = true,
};

_map.TryLoad(shuttleMap, component.TraderShuttlePath, out _, options);
}
}

13 changes: 13 additions & 0 deletions Resources/Locale/ru-RU/ADT/Trader/trader.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ent-TraderPDA = КПК торговца
.desc = КПК торговца
.suffix = { "" }
ent-TraderIDCard = ID карта торговца
.desc = ID карта торговца
.suffix = { "" }
ghost-role-information-trader = торговец
ghost-role-information-trader-description = Продавайте экипажу ништяки за кредиты и плазму.
ent-AirlockGlassTraderLocked = { ent-AirlockGlass }
.desc = { ent-AirlockGlass.desc }
ent-SecureWindoorTraderLocked = { ent-WindoorSecure }
.desc = { ent-WindoorSecure.desc }
station-event-trader-spawn-announcement = Станция в ваш сектор прибывает шаттл торговой программы, для налаживания торговых отношений с ТСФ
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/ADT/access/access.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ id-card-access-level-investigator = Следователь СБ
id-card-access-level-magistrate = Магистрат
id-card-access-level-iaa = Агент внутренних дел
id-card-access-level-lawyer = Юридиический
id-card-access-level-trader = Торговец
Loading

0 comments on commit 86ed20d

Please sign in to comment.