-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #420 from Xelasto/minorupdate
Торговцы
- Loading branch information
Showing
10 changed files
with
1,606 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
Content.Server/ADT/StationEvents/Components/TraderSpawnRuleComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
26
Content.Server/ADT/StationEvents/Events/TraderSpawnRule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = Станция в ваш сектор прибывает шаттл торговой программы, для налаживания торговых отношений с ТСФ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.