Rewrite ActorInit queries.

This commit is contained in:
Paul Chote
2020-05-24 22:28:16 +01:00
committed by teinarss
parent 626b40f31b
commit 7c6ec577dc
66 changed files with 332 additions and 265 deletions

View File

@@ -74,9 +74,7 @@ namespace OpenRA.Mods.Common.Traits
this.info = info;
MaxLevel = info.Conditions.Count;
if (init.Contains<ExperienceInit>())
initialExperience = init.Get<ExperienceInit, int>();
initialExperience = init.GetValue<ExperienceInit, int>(info, 0);
}
void INotifyCreated.Created(Actor self)
@@ -154,6 +152,6 @@ namespace OpenRA.Mods.Common.Traits
public ExperienceInit() { }
public ExperienceInit(int init) { value = init; }
public int Value(World world) { return value; }
public int Value { get { return value; } }
}
}