Skip to content

Commit

Permalink
Removed House column and added IsBaseDefense and Weight columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
askeladdk committed Aug 25, 2019
1 parent 96abbe9 commit f3ff4a1
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 56 deletions.
2 changes: 1 addition & 1 deletion AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
[assembly: AssemblyFileVersionAttribute("2.0.4.2")]
[assembly: AssemblyFileVersionAttribute("2.0.4.3")]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Link: https://github.com/askeladdk/aiedit

## Changelog ##

### v2.0.4.3 ###
- Removed House column from TeamTypes tab as it is not all that useful.
- Added IsBaseDefense column to TeamTypes tab.
- Added Initial Weight column to TriggerTypes tab.
- Columns except for the Name column have fixed width.
- Increased screen real estate by broadening form width.

### v2.0.4.2 ###
- Added columns showing House, Max and Priority to Team Types tab.
- Added columns showing Side, Tech Level, Easy, Medium and Hard to Trigger Types tab.
Expand Down
8 changes: 5 additions & 3 deletions TeamType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public abstract class TeamTypeOption
{
protected string tag, name;

public string Tag { get { return tag; } }

public string Name { get { return name; } }

public TeamTypeOption(string tag, string name)
Expand Down Expand Up @@ -205,11 +207,11 @@ public class TeamType : IAIObject, IEnumerable<TeamTypeEntry>, IParamListEntry
private List<TeamTypeEntry> entries;
private int uses;

public string House { get { return entries.First(x => x.Name == "House").Value.ToString(); } }
public string IsBaseDefense { get { return (entries.First(x => x.Option.Tag == "IsBaseDefense").Value as AITypeListEntry).Index == 0 ? "N" : "Y"; } }

public int Max { get { return (int)entries.First(x => x.Name == "Max").Value; } }
public int Max { get { return (int)entries.First(x => x.Option.Tag == "Max").Value; } }

public int Priority { get { return (int)entries.First(x => x.Name == "Priority").Value; } }
public int Priority { get { return (int)entries.First(x => x.Option.Tag == "Priority").Value; } }

public uint ParamListIndex { get { return 0; } }

Expand Down
6 changes: 4 additions & 2 deletions TriggerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ public class TriggerType : IAIObject, IEnumerable<TriggerTypeEntry>

public string Hard { get { return (entries["Hard"].Value as AITypeListEntry).Index == 0 ? "N" : "Y"; } }

public int TechLevel { get { return (int)entries["TechLevel"].Value; } }
public uint TechLevel { get { return (uint)entries["TechLevel"].Value; } }

public uint InitialWeight { get { return (uint)entries["Prob"].Value; } }

public string ID { get { return id; } }
public string Name { get { return name; } set { name = value.Trim(); } }
Expand Down Expand Up @@ -342,7 +344,7 @@ public static TriggerType Parse(string id, string data,
// techlevel
tag = "TechLevel";
option = triggerTypeOptions[tag];
value = int.Parse(split[3]);
value = uint.Parse(split[3]);
entries.Add(tag, new TriggerTypeEntry(option, value));

// condition
Expand Down
Loading

0 comments on commit f3ff4a1

Please sign in to comment.