|
|
@@ -18,11 +18,11 @@ namespace GamecraftModdingAPI.Events |
|
|
|
|
|
|
|
private bool isActivated = false; |
|
|
|
|
|
|
|
private readonly Action<IEntitiesDB> onActivated; |
|
|
|
private readonly Action<EntitiesDB> onActivated; |
|
|
|
|
|
|
|
private readonly Action<IEntitiesDB> onDestroyed; |
|
|
|
private readonly Action<EntitiesDB> onDestroyed; |
|
|
|
|
|
|
|
public IEntitiesDB entitiesDB { set; private get; } |
|
|
|
public EntitiesDB entitiesDB { set; private get; } |
|
|
|
|
|
|
|
public void Add(ref ModEventEntityStruct entityView, EGID egid) |
|
|
|
{ |
|
|
@@ -72,7 +72,7 @@ namespace GamecraftModdingAPI.Events |
|
|
|
/// <param name="name">The name of the engine</param> |
|
|
|
/// <param name="simple">A useless parameter to use to avoid Python overload resolution errors</param> |
|
|
|
public SimpleEventHandlerEngine(Action activated, Action removed, object type, string name, bool simple = true) |
|
|
|
: this((IEntitiesDB _) => { activated.Invoke(); }, (IEntitiesDB _) => { removed.Invoke(); }, type, name) { } |
|
|
|
: this((EntitiesDB _) => { activated.Invoke(); }, (EntitiesDB _) => { removed.Invoke(); }, type, name) { } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Construct the engine |
|
|
@@ -81,7 +81,7 @@ namespace GamecraftModdingAPI.Events |
|
|
|
/// <param name="removed">The operation to do when the event is destroyed (if applicable)</param> |
|
|
|
/// <param name="type">The type of event to handler</param> |
|
|
|
/// <param name="name">The name of the engine</param> |
|
|
|
public SimpleEventHandlerEngine(Action<IEntitiesDB> activated, Action<IEntitiesDB> removed, object type, string name) |
|
|
|
public SimpleEventHandlerEngine(Action<EntitiesDB> activated, Action<EntitiesDB> removed, object type, string name) |
|
|
|
{ |
|
|
|
this.type = type; |
|
|
|
this.Name = name; |
|
|
|