Files
crystall-punk-14/Content.Shared/_CP14/DemiplaneTraveling/CP14DemiplaneMapUI.cs
Ed aeedff5caa Demiplane exploration map (#1251)
* 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
2025-05-05 15:19:44 +03:00

37 lines
1.3 KiB
C#

using System.Numerics;
using Content.Shared._CP14.Demiplane.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared._CP14.DemiplaneTraveling;
[Serializable, NetSerializable]
public enum CP14DemiplaneMapUiKey
{
Key,
}
[Serializable, NetSerializable]
public sealed class CP14DemiplaneMapUiState(Dictionary<Vector2i, CP14DemiplaneMapNode> nodes, HashSet<(Vector2i, Vector2i)>? edges = null) : BoundUserInterfaceState
{
public Dictionary<Vector2i, CP14DemiplaneMapNode> Nodes = nodes;
public HashSet<(Vector2i, Vector2i)> Edges = edges ?? new();
}
[Serializable, NetSerializable]
public sealed class CP14DemiplaneMapNode(int level, Vector2 uiPosition, bool start, ProtoId<CP14DemiplaneLocationPrototype>? locationConfig = null, List<ProtoId<CP14DemiplaneModifierPrototype>>? modifiers = null)
{
public int Level = level;
public int AdditionalLevel = 0;
public Vector2 UiPosition = uiPosition;
public bool Start = start;
public bool InFrontierZone = false;
public bool InUsing = false;
public bool Scanned = start;
public ProtoId<CP14DemiplaneLocationPrototype>? LocationConfig = locationConfig;
public List<ProtoId<CP14DemiplaneModifierPrototype>> Modifiers = modifiers ?? new();
}