* new Dev map * добавлена генерация узора ключей раундстартом * каменная стена подгон KREKSa фиксы * add verbs to lock comp * more Loc work * some popups, logic to lock and unlock locks * return old Dev * ability to add locks into doors * check to locked lock, to insert or remove locks * doors examine * key can uses directly to door * really lockable! * lockable crates! * Bruh... Really big update * Key sprites, long wall template * KeyRingComponent * lock entity start * lockpicking! * Shiny 1 * Update keys.yml * Отображение только для держащего в руке * Final --------- Co-authored-by: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using Content.Server.Parallax;
|
|
using Content.Server.Station.Components;
|
|
using Content.Server.Station.Events;
|
|
using Content.Server.Station.Systems;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.CrystallPunk.SpawnMapBiome;
|
|
public sealed partial class StationBiomeSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly BiomeSystem _biome = default!;
|
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
|
[Dependency] private readonly IPrototypeManager _proto = default!;
|
|
[Dependency] private readonly StationSystem _station = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<StationBiomeComponent, StationPostInitEvent>(OnStationPostInit);
|
|
}
|
|
|
|
private void OnStationPostInit(Entity<StationBiomeComponent> map, ref StationPostInitEvent args)
|
|
{
|
|
if (!TryComp(map, out StationDataComponent? dataComp))
|
|
return;
|
|
|
|
var station = _station.GetLargestGrid(dataComp);
|
|
if (station == null) return;
|
|
|
|
var mapId = Transform(station.Value).MapID;
|
|
var mapUid = _mapManager.GetMapEntityId(mapId);
|
|
|
|
_biome.EnsurePlanet(mapUid, _proto.Index(map.Comp.Biome), map.Comp.Seed);
|
|
}
|
|
}
|