Add sorting, filtering, and new columns to WeaponTable
Enhanced the `MudDataGrid` in `WeaponTable` by enabling multiple sorting and filtering while adding new "Faction" and "Immortal" columns. Extended `EntityModel` and `DATA` to support faction and immortal data for the table. Added "Neutral" faction and new entity "Pyre Miner" to the data model.
This commit is contained in:
@@ -44,6 +44,18 @@ public class EntityModel
|
||||
var entityInfo = EntityParts.FirstOrDefault(a => a.GetType() == typeof(EntityInfoModel)) as EntityInfoModel;
|
||||
return entityInfo == null ? string.Empty : entityInfo.Name;
|
||||
}
|
||||
|
||||
public string GetFaction()
|
||||
{
|
||||
var entityInfo = EntityParts.FirstOrDefault(a => a.GetType() == typeof(EntityFactionModel)) as EntityFactionModel;
|
||||
return entityInfo == null ? string.Empty : DATA.Get()[entityInfo.Faction].GetName();
|
||||
}
|
||||
|
||||
public string GetImmortal()
|
||||
{
|
||||
var entityInfo = EntityParts.FirstOrDefault(a => a.GetType() == typeof(EntityVanguardAddedModel)) as EntityVanguardAddedModel;
|
||||
return entityInfo == null ? string.Empty : DATA.Get()[entityInfo.ImmortalId].GetName();
|
||||
}
|
||||
|
||||
public string AsYaml()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user