You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.2 KiB
70 lines
2.2 KiB
@if (Entity!.IdVanguards().Count > 0) |
|
{ |
|
@if (StyleType.Equals("Plain")) |
|
{ |
|
@foreach (var data in Entity.IdVanguards()) |
|
{ |
|
var entity = EntityModel.Get(data.Id); |
|
|
|
var requirements = entity.Requirements(); |
|
var vanguardAdded = entity.VanguardAdded(); |
|
var replaced = DATA.Get()[vanguardAdded.ReplaceId]; |
|
var immortal = DATA.Get()[vanguardAdded.ImmortalId]; |
|
|
|
|
|
var productionBuilding = (from building in requirements |
|
where building.Requirement == RequirementType.Production_Building |
|
select building).First().Id; |
|
|
|
<div> |
|
<div> |
|
<b>Name:</b> @entity.Info().Name |
|
</div> |
|
<div> |
|
<b>- Replaces:</b> @replaced.Info().Name |
|
</div> |
|
<div> |
|
<b>- Built From:</b> @immortal.Info().Name |
|
</div> |
|
</div> |
|
} |
|
} |
|
else |
|
{ |
|
<EntityDisplayComponent Title="Vanguards"> |
|
@foreach (var data in Entity.IdVanguards()) |
|
{ |
|
var entity = EntityModel.Get(data.Id); |
|
|
|
var requirements = entity.Requirements(); |
|
var vanguard = entity.VanguardAdded(); |
|
var productionBuilding = (from building in requirements |
|
where building.Requirement == RequirementType.Production_Building |
|
select building).First().Id; |
|
|
|
<div> |
|
<div> |
|
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/> |
|
</div> |
|
<div> |
|
<b>Replaces:</b> <EntityLabelComponent EntityId="@vanguard.ReplaceId"/> |
|
</div> |
|
<div> |
|
<b>Built From:</b> <EntityLabelComponent EntityId="@productionBuilding"/> |
|
</div> |
|
</div> |
|
} |
|
</EntityDisplayComponent> |
|
} |
|
} |
|
|
|
@code { |
|
|
|
[CascadingParameter] |
|
public EntityModel? Entity { get; set; } = default!; |
|
|
|
|
|
[CascadingParameter] |
|
public string StyleType { get; set; } = "Detailed"; |
|
|
|
} |