Add a single-argument constructor to HealthInit
...which is a requirement for an ActorInit to be usable with the Lua API's Actor.Create() method.
This commit is contained in:
@@ -209,7 +209,10 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[FieldFromYamlKey] readonly int value = 100;
|
[FieldFromYamlKey] readonly int value = 100;
|
||||||
readonly bool allowZero;
|
readonly bool allowZero;
|
||||||
public HealthInit() { }
|
public HealthInit() { }
|
||||||
public HealthInit(int init, bool allowZero = false)
|
public HealthInit(int init)
|
||||||
|
: this(init, false) { }
|
||||||
|
|
||||||
|
public HealthInit(int init, bool allowZero)
|
||||||
{
|
{
|
||||||
this.allowZero = allowZero;
|
this.allowZero = allowZero;
|
||||||
value = init;
|
value = init;
|
||||||
|
|||||||
Reference in New Issue
Block a user