feat(Database) Adding entity dialog

This commit is contained in:
2022-04-01 17:35:10 -04:00
parent c4f1b86f27
commit a9d3920237
36 changed files with 429 additions and 150 deletions
@@ -8,7 +8,7 @@
<div>
<div>
<b>Name:</b> @info.Name
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
</div>
<div>
<b>Description:</b> @((MarkupString)info.Description)
@@ -9,7 +9,7 @@
<div>
<div>
<b>Name:</b> @info.Name
<b>Name:</b> <EntityLabelComponent EntityId="@passive.DataType"/>
</div>
<div style="max-width: 600px;">
<b>Description:</b> @((MarkupString)info.Description)
@@ -13,7 +13,7 @@
<div>
<span>
<b>@requirement.Requirement.Replace("_", " "):</b> @requirement.Name
<b>@requirement.Requirement.Replace("_", " "):</b> <EntityLabelComponent EntityId="@requirement.DataType"/>
</span>
</div>
}
@@ -46,6 +46,13 @@
<b>Build Time:</b> @production.BuildTime.ToString()s
</div>
}
@if (!production.Energy.Equals(0)) {
<div>
<b>Energy:</b> @production.Energy
</div>
}
@if (!production.Cooldown.Equals(0)) {
<div>
@@ -8,7 +8,7 @@
<div>
<div>
<b>Name:</b> @info.Name
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
</div>
<div>
<b>Description:</b> @((MarkupString)info.Description)
@@ -5,7 +5,7 @@
var entity = EntityModel.Get(upgradeId.Id);
<div>
<div>
<b>Name:</b> @entity.Info().Name
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/>
</div>
<div>
<b>Description:</b> @entity.Info().Description
@@ -0,0 +1,31 @@
@{
var vanguard = Entity.VanguardAdded();
var isNull = Entity.VanguardAdded() == null ? "null" : "not null";
}
@if (vanguard != null) {
var immortalId = Entity.VanguardAdded().ImmortalId;
var immortal = DATA.Get()[immortalId];
<EntityDisplayComponent Title="Vanguard">
<div>
<div>
<b>Immortal:</b> <EntityLabelComponent EntityId="@immortal.DataType"/>
</div>
@if (!Entity.VanguardAdded().ReplaceId.Equals("")) {
<div>
<b>Replaces:</b> <EntityLabelComponent EntityId="@Entity.VanguardAdded().ReplaceId"></EntityLabelComponent>
</div>
}
</div>
</EntityDisplayComponent>
}
@code {
[Parameter]
public EntityModel Entity { get; set; }
}
@@ -1,21 +0,0 @@
@if (Entity.Vanguard() != null) {
<EntityDisplayComponent Title="Vanguard">
<div>
<div>
<b>Immortal:</b> @Entity.Vanguard().Immortal.Replace("_", " ")
</div>
@if (Entity.Vanguard().Replaces != "") {
<div>
<b>Replaces:</b> @Entity.Vanguard().Replaces.Replace("_", " ")
</div>
}
</div>
</EntityDisplayComponent>
}
@code {
[Parameter]
public EntityModel Entity { get; set; }
}
@@ -3,24 +3,21 @@
@foreach (var data in Entity.IdVanguards()) {
var entity = EntityModel.Get(data.Id);
var info = entity.Info();
var production = entity.Production();
var requirements = entity.Requirements();
var vanguard = entity.Vanguard();
var vanguard = entity.VanguardAdded();
var productionBuilding = (from building in requirements
where building.Requirement == RequirementType.Production_Building
select building).First().Name;
select building).First().DataType;
<div>
<div>
<b>Name:</b> @info.Name
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/>
</div>
<div>
<b>Replaces:</b> @vanguard.Replaces
<b>Replaces:</b> <EntityLabelComponent EntityId="@vanguard.ReplaceId"/>
</div>
<div>
<b>Built From:</b> @productionBuilding
<b>Built From:</b> <EntityLabelComponent EntityId="@productionBuilding"/>
</div>
</div>
}