* dehardcode nodeTreeControl part 1 * finish * demiplane map system setup * link map entity with station data! * random demiplane map generation * redesign demiplane map node tree * center * map generate v2 * location generation * modifier generation * missing location icons * ui polish * data refactor * fix line color * ejectabling * split demiplane component into two * blocker attempt * revoking * fix frontier calculation * dimensit * demiplane core room spawning * demiplane cool destruction * Update round_end.yml * progression works now! * Update CP14NodeTree.cs * Update CP14NodeTree.cs * documentation pass * fix abusing, some balance pass * demiplane naming fix * см * location names * delete old keys * Update buy.yml * Update migration.yml * fix guidebook * Update misc.yml * Update misc.yml
35 lines
979 B
C#
35 lines
979 B
C#
using Content.Shared._CP14.DemiplaneTraveling;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client._CP14.DemiplaneTraveling;
|
|
|
|
public sealed class CP14DemiplaneMapBoundUserInterface : BoundUserInterface
|
|
{
|
|
private CP14DemiplaneMapWindow? _window;
|
|
|
|
public CP14DemiplaneMapBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_window = this.CreateWindow<CP14DemiplaneMapWindow>();
|
|
|
|
_window.OnEject += pos => SendMessage(new CP14DemiplaneMapEjectMessage(pos));
|
|
_window.OnRevoke += pos => SendMessage(new CP14DemiplaneMapRevokeMessage(pos));
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState state)
|
|
{
|
|
base.UpdateState(state);
|
|
|
|
if (_window == null || state is not CP14DemiplaneMapUiState mapState)
|
|
return;
|
|
|
|
_window?.UpdateState(mapState);
|
|
}
|
|
}
|